Gradient
The vector of all partial derivatives — pointing in the direction of steepest ascent and encoding how a multivariable function changes locally.
x₀=1.0
y₀=1.0
Definition
The gradient of a scalar function is the vector of all its partial derivatives:
Key facts:
- points in the direction of steepest ascent of
- points in the direction of steepest descent
- measures the steepness
At a local maximum or minimum, (critical point).
Key properties
- The gradient is perpendicular to the function's level sets (contour lines) at every point
- exactly at critical points — maxima, minima, and saddle points
- Scaling the function scales the gradient linearly:
- The gradient of a sum is the sum of gradients:
Common mistakes
- Assuming means a minimum: critical points can also be maxima or saddle points — the Hessian's definiteness is what distinguishes them
- Confusing the gradient (a vector) with the directional derivative (a scalar): has the same dimension as the input; is always a single number
Gradient of a simple function
.
.
At : . This vector points away from the minimum at — walking in this direction increases most steeply.
Try it
Find for at the point . What is ?
Solution
. At : .
.
Note: — the gradient of points radially outward.
Related concepts
Calculus· Multivariable
Partial DerivativesThe rate of change of a multivariable function with respect to one variable, holding all others fixed — the building block of multivariable calculus.Calculus· Multivariable
Gradient DescentAn iterative optimisation algorithm that repeatedly moves in the direction of the negative gradient to find a local minimum of a loss function.Algebra· Linear Algebra
Dot ProductThe inner product of two vectors — a scalar measuring alignment, enabling projections, angles, and the geometry of vector spaces.Calculus· Differentiation
Applications of DerivativesUsing derivatives to find maxima and minima, describe curve shape, solve optimisation problems, and analyse rates of change.