My calculus textbook defines the gradient for a function, $f$, such that $f:\Bbb R^n \to \Bbb R$. However, I am curious if the gradient for a function, $g$, such that $g:\Bbb R^n \to \Bbb R^n$ is simply a vector $\langle D_1g_1, D_2g_2, \ldots, D_ng_n\rangle$? That seems like the natural extension of a gradient into $\Bbb R^n$ since the gradient is all about the partial derivative in the direction of the "natural" basis. Or am I getting something about the gradient wrong? Or does the gradient not naturally extend to be defined for functions like $g$?
Is this the gradient of a function that maps $\Bbb R^n$ to $\Bbb R^n$?
727 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
The most natural object associated to a function in multivariable calculus is it's derivative matrix (aka Jacobian matrix). In the case of function from $\mathbb{R}^n\to \mathbb{R}$ this matrix is a 1 by n, so is a row vector (in fancy language, a "covector"). The gradient is it's transpose (in fancy language, the vector associated to the covector by the metric). For functions $\mathbb{R}^n\to \mathbb{R}^m$ the derivative/Jacobian is an m by n matrix, and one could (and sometimes does) define the gradient as the transpose of that.
The primary object is still the derivative, and the utility of transposing is less clear for functions $\mathbb{R}^n\to \mathbb{R}^m$, since one does not get a vector in the end anyway. On top of that, the multivariate chain rule becomes "transposed" and thus flows "wrong way" (in fancy language, gradient is a contravariant functor); forgetting this can easily lead to a mistake.
First, the notation $D_i g_i$, which you are using to mean $\partial g_i / \partial x_i$ is somewhat cryptic.
The vector $(\partial g_1 / \partial x_1, \ldots, \partial g_n / \partial x_n)$ is the diagonal of the Jacobian matrix of $g$.