1

For a function of $n + 1$ variables $f(x_0, x_1, x_2, ...x_n)$ can a gradient exist?

When I asked my professor this during class he said, "no, at most a gradient will exist for a function of three variables $f(x, y, z)$ because there are only at most three standard basis vectors with which to represent a vector."

This is a calculus 3 class so perhaps this answer was given to keep the concept of the gradient within the scope of the class, but I suspect this isn't the whole story and there is more to this than my professor is telling.

Edit:

The definition of the gradient for a function of two variables given during class was: Let $z = f(x, y)$ be a function, then the gradient of $f$ is defined as $\nabla f = f_x \vec i + f_y \vec j$

Slecker
  • 969
  • 10
  • 29
  • 1
    Which is the definition of gradient for a function of two variables that you use? The standard definition extends very easily to any number of dimensions. – Miguel Apr 06 '21 at 08:37
  • Let $z = f(x, y)$ be a function, then the gradient of $f$ is defined as $\nabla f = f_x \vec i + f_y \vec j$. This was the defintion given in class. – Slecker Apr 06 '21 at 08:44
  • 1
    The gradient is defined over the same space as the function itself. In a general case, $f:\mathbb{R}^n\to \mathbb{R}$. But if the function is defined over $\mathbb{R}^2$, then the gradient too will be over $\mathbb{R}^2$ as your teacher mentions. If on the other hand your function is not real valued, for example, if $f:\mathbb{R}^m\to \mathbb{R}^n$, then what you get is something called a Jacobian as a generalization of a gradient. See: https://math.stackexchange.com/questions/1519367/difference-between-gradient-and-jacobian – Rahul Madhavan Apr 06 '21 at 08:45
  • (Sorry, I didn't intend for this to be as much over-kill as it is.) For any smooth $f: H\to\mathbb R$, where $H$ is any Hilbert space with inner product $\langle\cdot,\cdot\rangle$, you can define the gradient of $f$ to be the unique element $\nabla f\in H$ such that $$\mathrm df_x(h)=\langle \nabla f, h\rangle$$ for every $h\in H$, where $\mathrm df$ is the differential. In particular this works for $H=\mathbb R^n$. – Maximilian Janisch Apr 06 '21 at 09:01
  • 3
    Yes, a function $f:\mathbb R^n \to \mathbb R$ can have a gradient. By the way, in your first sentence, that's a function of $n+1$ variables. – littleO Apr 06 '21 at 09:05

1 Answers1

1

I think the correction to your teacher is purely algebraic: the $n$-dimensional vector space $\mathbb{R}^d$ does have a standard basis formed by $d$ vectors $e_1,\dots e_d$. Each basis vector is given by $e_i=(0\dots 1 \dots 0)^\top$ where the only non-zero component is at the $i$-th position.

The extension of the definition of partial derivative is also straightforward. Given a function $f:\mathbb{R}^d\to \mathbb{R}$, and a point $p\in \mathbb{R}^d$, $p=(p_1,\dots p_d)$, consider the function $g_i:\mathbb{R}\to \mathbb{R}$ given by $g(x)=f(p_1,\dots p_{i-1},x,p_{i+1},\dots p_d)$. The partial derivative of $f$ with respect to the $i$-th component at the point $p$ is: $$ \left. f_{x_i}\right|_p=g_i'(p_i) $$

Then the gradient of $f$ at the point $p$ is the vector $\sum_i \left. f_{x_i}\right|_p \, e_i$

Miguel
  • 3,265