Can the gradient exist for a function of $n + 1$ variables

multivariable-calculusscalar-fieldsvectors

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$

Best Answer

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$