#### Dear Wikiwand AI, let's keep it short by simply answering these key questions:

SHOW ALL QUESTIONS

In vector calculus, the gradient of a scalar-valued differentiable function ${\displaystyle f}$ of several variables is the vector field (or vector-valued function) ${\displaystyle \nabla f}$ whose value at a point ${\displaystyle p}$ gives the direction and the rate of fastest increase. The gradient transforms like a vector under change of basis of the space of variables of ${\displaystyle f}$. If the gradient of a function is non-zero at a point ${\displaystyle p}$, the direction of the gradient is the direction in which the function increases most quickly from ${\displaystyle p}$, and the magnitude of the gradient is the rate of increase in that direction, the greatest absolute directional derivative.[1] Further, a point where the gradient is the zero vector is known as a stationary point. The gradient thus plays a fundamental role in optimization theory, where it is used to maximize a function by gradient ascent. In coordinate-free terms, the gradient of a function ${\displaystyle f(\mathbf {r} )}$ may be defined by:

${\displaystyle df=\nabla f\cdot d\mathbf {r} }$

where ${\displaystyle df}$ is the total infinitesimal change in ${\displaystyle f}$ for an infinitesimal displacement ${\displaystyle d\mathbf {r} }$, and is seen to be maximal when ${\displaystyle d\mathbf {r} }$ is in the direction of the gradient ${\displaystyle \nabla f}$. The nabla symbol ${\displaystyle \nabla }$, written as an upside-down triangle and pronounced "del", denotes the vector differential operator.

When a coordinate system is used in which the basis vectors are not functions of position, the gradient is given by the vector[lower-alpha 1] whose components are the partial derivatives of ${\displaystyle f}$ at ${\displaystyle p}$.[2] That is, for ${\displaystyle f\colon \mathbb {R} ^{n}\to \mathbb {R} }$, its gradient ${\displaystyle \nabla f\colon \mathbb {R} ^{n}\to \mathbb {R} ^{n}}$ is defined at the point ${\displaystyle p=(x_{1},\ldots ,x_{n})}$ in n-dimensional space as the vector[lower-alpha 2]

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

Note that the above definition for gradient is only defined for the function ${\displaystyle f}$, if it is differentiable at ${\displaystyle p}$. There can be functions for which partial derivatives exist in every direction but still fail to be differentiable. For example, the function ${\displaystyle f(x,y)={\frac {x^{2}y}{x^{2}+y^{2}}}}$ unless at origin where ${\displaystyle f(0,0)=0}$, is not differentiable at origin as it does not have a well defined tangent plane despite having well defined partial derivatives in every direction at the origin.[3] In the particular example, under rotation of x-y coordinate system, the above formula for gradient fails to transform like a vector (gradient becomes dependent on choice of basis for coordinate system) and also fails to point towards the steepest ascent in some orientations. For differentiable functions where the formula for gradient holds, it can be shown to always transform as a vector under transformation of the basis so as to always "point towards the fastest increase".

The gradient is dual to the total 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 functional on vectors.[lower-alpha 3] They are related in that the dot product of the gradient of ${\displaystyle f}$ at a point ${\displaystyle p}$ with another tangent vector ${\displaystyle \mathbf {v} }$ equals the directional derivative of ${\displaystyle f}$ at ${\displaystyle p}$ of the function along ${\displaystyle \mathbf {v} }$; that is, ${\textstyle \nabla f(p)\cdot \mathbf {v} ={\frac {\partial f}{\partial \mathbf {v} }}(p)=df_{p}(\mathbf {v} )}$. The gradient admits multiple generalizations to more general functions on manifolds; see § Generalizations.

Oops something went wrong: