Gradient

Author

John Robin Inston

Published

September 25, 2026

1 Gradient

1.1 Gradients of Vector Fields

A vector field is an assignment of a vector to each point in a space. On a Euclidean plane \(\mathbb{R}^2\) we can visualize the field as a collection of arrows with given magnitudes and directions, each attached to a point on the plane.

Figure: Vector field visualization.

The gradient of a scalar-valued differentiable function \(f\) of several variables is the vector field \(\nabla f\) whose value at a point \(p\) gives the direction and the rate of fastest increase.

1.2 Cartesian Gradient

In \(n\)-dimensional Cartesian coordinates with Euclidean metric the gradient, if it exists, is given by \[ \nabla f:=\sum_{i=1}^{n} \frac{{\partial f}}{\partial x_{i}}\boldsymbol{i}_{i}, \] where \(\boldsymbol{i}_{j}\) is the standard unit vector in the directions of the \(x_{j}\) coordinate respectively.

This result is written in standard basis notation but alternatively could be written in column vector notation as \[ \nabla f:=\begin{bmatrix} \frac{{\partial f}}{\partial x_{1}} \\ \vdots \\ \frac{{\partial f}}{\partial x_{n}} \end{bmatrix}=\left[ \frac{{\partial f}}{\partial x_{i}} \right]_{i=1,..,n}. \]

Example (Cartesian Gradient): We consider the function \(f(x,y,z)=2x+3xy^2-\sin (z)\). The gradient is \[ \nabla f:=\begin{bmatrix} 2+3y^2 \\ 6xy \\ -\cos(z) \end{bmatrix}. \] ## General Coordinate Gradient Consider general coordinates in an \(n\)-dimensional space \(x=(x^i)_{i=1,\dots,n}\) and let \(f\) be a scalar-valued differentiable function \(f(x):=f(x^1, \dots, x^n)\). The gradient of \(f\) is given by \[ \nabla f= \frac{{\partial f}}{\partial x^i}g^{ij}\boldsymbol{e}_{j}, \] where \(\boldsymbol{e}^i=dx^i\) and \(\boldsymbol{e}_{i}=\frac{{\partial \boldsymbol{x}}}{\partial x^i}\) refer to the unnormalized local covariant and contravariant bases respectively, \(g^{i,j}\) is the inverse metric tensor, and the Einstein summation convention implies summation over \(i\) and \(j\).

1.3 Gradient Results

1.3.1 Relationship to Total Derivative

The gradient is closely related to the total derivative \(df\) in that they are transpose of one another \[ \nabla f=df^T \]

1.4 Backlinks

Back to top