TheInfoList

In vector calculus, the gradient of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) ${\displaystyle \nabla f}$ whose value at a point ${\displaystyle p}$ is the vector[a] whose components are the partial derivatives of ${\displaystyle f}$ at ${\displaystyle p}$.[1][2][3][4][5][6][7][8][9] That is, for ${\displaystyle f\colon \mathbf {R} ^{n}\to \mathbf {R} }$, its gradient ${\displaystyle \nabla f\colon \mathbf {R} ^{n}\to \mathbf {R} ^{n}}$ is defined at the point ${\displaystyle \mathrm {p} =(x_{1},\ldots ,x_{n})}$ in n-dimensional space as the vector:[b]

${\displaystyle \nabla f(p)={\begin{bmatrix}{\frac {\partial f}{\partial x_{1}}}(p)\\\vdots \\{\frac {\partial f}{\partial x_{n}}}(p)\end{bmatrix}}.}$

The nabla symbol ${\displaystyle \nabla }$, written as an upside-down triangle and pronounced "del", denotes the vector differential operator.

The gradient is dual to the derivative ${\displaystyle df}$: the value of the gradient at a point is a tangent vector – a vector at each point; while the value of the derivative at a point is a cotangent vector – a linear function on vectors.[c] They are related in that the dot product of the gradient of f at a point p with another tangent vector v equals the directional derivative of f at p of the function along v; that is, ${\displaystyle \nabla f(p)\cdot \mathrm {v} ={\tfrac {\partial f}{\partial \mathbf {v} }}(p)=df_{p}(\mathrm {v} )}$.

The gradient vector can be interpreted as the "direction and rate of fastest increase". If the gradient of a function is non-zero at a point p, the direction of the gradient is the direction in which the function increases most quickly from p, and the magnitude of the gradient is the rate of increase in that direction.[10][11][12][13][14][15][16] Further, the gradient is the zero vector at a point if and only if it is a stationary point (where the derivative vanishes). The gradient thus plays a fundamental role in nabla symbol ${\displaystyle \nabla }$, written as an upside-down triangle and pronounced "del", denotes the vector differential operator.

The gradient is dual to the derivative ${\displaystyle df}$: the value of the gradient at a point is a tangent vector – a vector at each point; while the value of the derivative at a point is a cotangent vector – a linear function on vectors.[c] They are related in that the dot product of the gradient of f at a point p with another tangent vector v equals the directional derivative of f at p of the function along v; that is,

The gradient vector can be interpreted as the "direction and rate of fastest increase". If the gradient of a function is non-zero at a point p, the direction of the gradient is the direction in which the function increases most quickly from p, and the magnitude of the gradient is the rate of increase in that direction.[10][11][12][13][14][15][16] Further, the gradient is the zero vector at a point if and only if it is a stationary point (where the derivative vanishes). The gradient thus plays a fundamental role in optimization theory, where it is used to maximize a function by gradient ascent.

The gradient admits multiple generalizations to more general functions on manifolds; see § Generalizations.

Consider a room where the temperature is given by a scalar field, T, so at each point (x, y, z) the temperature is T(x, y, z), independent of time. At each point in the room, the gradient of T at that point will show the direction in which the temperature rises most quickly, moving away from (x, y, z). The magnitude of the gradient will determine how fast the temperature rises in that direction.

Consider a surface whose height above sea level at point (x, y) is H(x, y). The gradient of H at a point is a plane vector pointing in the direction of the steepest slope or grade at that point. The steepness of the slope at that point is given by the magnitude of the gradient vector.

The gradient can also be used to measure how a scalar field changes in other directions, rather than just the direction of greatest change, by taking a dot product. Suppose that the steepest slope on a hill is 40%. A road going directly uphill has slope 40%, but a road going around the hill at an angle will have a shallower slope. For example, if the road is at a 60° angle from the uphill direction (when both directions are projected onto the horizontal plane), then the slope along the road will be the dot product between the gradient vector and a unit vector along the road, namely 40% times the cosine of 60°, or 20%.

More generally, if the hill height function H is differentiable, then the gradient of H dotted with a unit vector gives the slope of the hill in the direction of the vector, the directional derivative of H along the unit vector.

## Definition

In cylindrical coordinates with a Euclidean metric, the gradient is given by:[19]

${\displaystyle \nabla f(r,\theta ,\varphi )={\frac {\partial f}{\partial r}}\mathbf {e} _{r}+{\frac {1}{r}}{\frac {\partial f}{\partial \theta }}\mathbf {e} _{\theta }+{\frac {1}{r\sin \theta }}$