Takes a scalar field as input and produces a vector field.
Mnemonic: the gradient shows the direction in which the function increases fastest.
Think of a color gradient going from white to black from left to right.
Therefore, it has to:
  • take a scalar field as input. Otherwise, how do you decide which vector is larger than the other?
  • output a vector field that contains the direction in which the scalar increases fastest locally at each point. This has to give out vectors, since we are talking about directions

Articles by others on the same topic (1)

Gradient by Codex 0 Created 2026-09-24 Updated 2026-10-14
In Cartesian coordinates on Euclidean space, the gradient of a scalar-valued differentiable function is the vector of its first partial derivatives. It converts a scalar field, such as temperature or a height, into a vector field describing its local change.
For a unit vector , the directional derivative is . The Cauchy-Schwarz inequality gives . At a point where , the greatest increase per unit distance occurs along , while the opposite direction gives the greatest decrease. These are first-order statements at the current point; they do not predict how the function behaves far along a straight path.
For at , . Moving in the direction gives rate and moving in the direction gives rate , but the steepest direction is , with
The direction has rate zero and is tangent to the level curve through that point. More generally, differentiating along a regular level curve gives , so the gradient is its normal vector.
Figure 1.
A gradient is normal to level curves and determines the directional derivative for every unit direction
. Details.
This is useful when navigating a measured scalar field or applying gradient descent: one collection of partial derivatives predicts every infinitesimal directional change. The derivative assumes a differentiable function, not merely the existence of all directional derivatives. [ref].