Directional Derivatives and Gradients
The directional derivative measures the instantaneous rate of change of a scalar field as you move in a specified unit direction . The gradient is the vector of partial derivatives; it packages all directional rates at once, points in the direction of steepest ascent, and equals the maximum directional derivative in magnitude. Used everywhere in multivariable calculus, optimization, physics (potentials, fields), and machine learning. Formalized in the 19th century by Hamilton, Maxwell, and Gibbs.
The gradient is the linear map "rate of change" written as a vector. The directional derivative in any direction is just the projection of the gradient onto that direction. So the gradient is not one rate — it is the encoding of all rates simultaneously, and the geometry (steepest ascent, perpendicularity to level sets) falls out of the dot product .
Formal Statement
Let and let be a unit vector (). The directional derivative of at the point in the direction is
Derivation hint: This is the ordinary single-variable derivative of the restriction evaluated at ; the path is the straight line through with velocity . Here is the base point, is a scalar step size, and specifies the direction. The result is a scalar: a rate of change of -value per unit distance traveled.
The unit-length requirement on is not cosmetic. If is not normalized, the limit in scales by and no longer measures "rate per unit distance." Some texts define for arbitrary as (the "Gâteaux" convention); this is linear in but only equals geometric rate-of-change when . Always check the convention.
The gradient of a differentiable function at is the vector of first-order partial derivatives:
Derivation hint: Each component is the directional derivative along a standard basis vector , i.e. . The symbol ("nabla" or "del") is the formal operator . The gradient is a vector field: at each point it returns a vector.
If is differentiable at , then for every unit vector ,
Derivation hint: Apply the multivariable chain rule to ; differentiability guarantees the linear approximation is exact in the limit.
Writing for the angle between and ,
Derivation hint: Expand the dot product in using and . Consequences: (i) the maximum value occurs at , so points in the direction of steepest ascent; (ii) the minimum occurs at (steepest descent); (iii) when , so is orthogonal to the level set through .
Why It Holds / Derivation
We prove equation for differentiable at .
Step 1. Define the single-variable function , a parametrization of the line through with direction . By , .
Step 2. The components of the path are , so .
Step 3. Because is differentiable at , the multivariable chain rule applies:
Derivation hint: This is the chain rule for with ; valid precisely because differentiability gives a single good linear approximation.
Step 4. Evaluate at :
Derivation hint: Set so ; recognize the sum as a dot product. This is exactly .
∎The proof requires differentiability, not merely existence of partial derivatives. A function can have all partial derivatives (even all directional derivatives) at a point yet fail to be differentiable, in which case formula can be false. See the counterexample below.
The American mathematical physicist J. W. Gibbs, working at Yale, developed modern vector analysis in the 1880s in his privately printed lecture notes Elements of Vector Analysis. He (alongside Oliver Heaviside) extracted the practical "del" operator and the gradient/divergence/curl trio from Hamilton's heavier quaternion machinery, giving the gradient its present notation and dot-product interpretation. His student E. B. Wilson popularized it in the textbook Vector Analysis (1901), which is essentially the form taught today.
Building Intuition
Picture as the elevation of a hilly landscape, with the map coordinates and the height. Standing at a point, you can face any compass direction and ask "how steep is the slope if I walk this way?" — that number is . Now the magic: there is one special direction in which the ground rises fastest. That direction is , and its length tells you how steep that fastest climb is. Walk at right angles to and you stay at the same elevation — you're walking along a contour line (a level set). Walk directly opposite to and you descend fastest. Every other direction gives a slope equal to the steepest slope times , the cosine "shadow" of full steepness — exactly equation . This is why hiking trails zig-zag: walking perpendicular-ish to the gradient gives a gentle grade.
Worked Examples
Given: , at the point , in the direction toward .
Step 1 — Gradient. , . At :
Derivation hint: Apply ; differentiate treating the other variable as constant.
Step 2 — Unit direction. Displacement , length , so .
Step 3 — Dot product (apply ).
Derivation hint: Multiply componentwise and sum; this is the gradient formula in action.
Answer:
Given: Temperature field (°C), find the direction of fastest temperature increase at and that maximum rate.
Step 1 — Gradient. Using chain rule, .
Step 2 — Evaluate. At , the exponent is , so :
Derivation hint: Multiply the scalar prefactor into each bracketed component.
Step 3 — Direction of steepest ascent is itself; normalize: .
Derivation hint: By , the maximum directional derivative equals the gradient's magnitude (take ).
Answer: Fastest warming is in the unit direction at the rate . (Physically: away from the origin's hot core, the field decays, so steepest ascent points back toward the peak.)
Common Misconceptions
"The gradient is the slope." No — the gradient is a vector. Its magnitude is the slope of steepest ascent; its direction tells you which way that steepest climb lies. Confusing the vector with the scalar is the single most common error.
"Partial derivatives existing means is differentiable, so holds." False. Differentiability is strictly stronger than partial-derivative existence. Formula is guaranteed only under differentiability.
"The gradient lives in the same space as -values." The gradient lives in the domain (input) space, not the output. For , is a 3-vector tangent to the domain, never a 4-dimensional object.
:::counterexample[All Directional Derivatives Exist, Yet Fails] Let
Derivation hint: Substitute the line into and take the limit to compute each directional derivative directly. Along any line through the origin with :
so for every direction (the case also gives ). If held, we'd need for all , forcing — consistent so far. But approaching along the parabola gives , so is not even continuous at the origin, hence not differentiable. The directional derivatives exist in every direction yet do not assemble into a valid linear gradient relation along curved paths. This shows the differentiability hypothesis in the theorem is essential.
Connections
The directional derivative is the bridge between several structures:
- It is the action of the <span class="wiki-link-missing">Total Derivative</span> (Jacobian/differential ) on a vector: . The gradient is just the differential expressed as a vector via the dot product.
- Through it is built on the <span class="wiki-link-missing">Multivariable Chain Rule</span> and the <a class="wiki-link" href="/wiki/math-analysis-partial-derivatives">Partial Derivatives</a>.
- The orthogonality of to level sets is the engine behind <a class="wiki-link" href="/wiki/math-analysis-lagrange-multipliers">Lagrange Multipliers</a> (gradients align at constrained optima) and <span class="wiki-link-missing">Tangent Planes to Surfaces</span> (normal vector for a level surface ).
- The operator generalizes to <span class="wiki-link-missing">Divergence and Curl</span> and the <span class="wiki-link-missing">Laplacian</span> in vector calculus.
- When has a gradient field, line integrals become path-independent — the topic of <span class="wiki-link-missing">Conservative Vector Fields</span> and the gradient theorem.
Real-World Applications
Historical Development
Subtleties & Limits
Several subtleties deserve a serious student's attention:
- Gradient requires a metric. On a general manifold or with non-Euclidean inner products, the differential is a covector (1-form), and converting it to a gradient vector requires raising an index with a metric tensor : . The "obvious" identification partials is metric-dependent; in non-orthonormal coordinates the naive componentwise formula is wrong.
- Differentiability vs. directional derivatives. As the counterexample shows, existence of all directional derivatives does not guarantee differentiability, continuity, or the validity of . The gap is subtle and a recurring source of error.
- Nonsmooth optimization. Many practical objectives (e.g. with regularization, ReLU networks) are not differentiable everywhere. The gradient is replaced by the subgradient or Clarke generalized gradient, an active research area where the clean steepest-descent picture only partially survives.
- Infinite dimensions. In Banach/Hilbert spaces the analog is the Fréchet or Gâteaux derivative; the gradient exists by the Riesz representation theorem only in Hilbert spaces, and pathologies of the finite-dimensional counterexample multiply.
See Also
Total Derivative · Jacobian Matrix · Hessian Matrix · Level Sets and Contour Lines · Laplacian · Vector Calculus Identities · Taylor Series in Several Variables