Linear Algebra
12.110 min read

Directional (U-) Derivative

Partial derivatives measure the rate of change of ff in the coordinate directions e1,,en\mathbf{e}_1, \ldots, \mathbf{e}_n. But what about an arbitrary direction? The directional derivative (or UU-derivative) measures the rate of change of ff in the direction of a unit vector u\mathbf{u}.

Formally, the directional derivative of ff at a\mathbf{a} in direction u\mathbf{u} is: Duf(a)=limt0f(a+tu)f(a)tD_\mathbf{u} f(\mathbf{a}) = \lim_{t \to 0} \frac{f(\mathbf{a} + t\mathbf{u}) - f(\mathbf{a})}{t}

This is the rate of change of ff along the line {a+tu:tR}\{\mathbf{a} + t\mathbf{u} : t \in \mathbb{R}\} passing through a\mathbf{a} in direction u\mathbf{u}. The partial derivatives are special cases: Deif=f/xiD_{\mathbf{e}_i} f = \partial f/\partial x_i.

Formal View

Definition 12.1 — Directional Derivative
The directional derivative of f:DRnRf: D \subseteq \mathbb{R}^n \to \mathbb{R} at a\mathbf{a} in the direction of a unit vector uRn\mathbf{u} \in \mathbb{R}^n (u=1\|\mathbf{u}\| = 1) is
Duf(a)=limt0f(a+tu)f(a)tD_\mathbf{u} f(\mathbf{a}) = \lim_{t \to 0} \frac{f(\mathbf{a} + t\mathbf{u}) - f(\mathbf{a})}{t}
provided the limit exists.

Some authors do not require u=1\|\mathbf{u}\|=1, but using unit vectors ensures the directional derivative measures rate of change per unit distance.

Why This Matters

Directional derivatives are how we reason about change in arbitrary directions, which is essential for optimization.

  • Finding the direction of steepest ascent/descent at a point
  • Computing rates of change in gradient-based optimization algorithms
  • Sensitivity analysis when inputs change in a prescribed direction

Quiz

Question 1

The directional derivative De2f(a)D_{\mathbf{e}_2} f(\mathbf{a}) equals:

Question 2

The directional derivative Duf(a)D_\mathbf{u} f(\mathbf{a}) requires u\mathbf{u} to be a unit vector.

Common Mistakes

  • Forgetting to normalize the direction vector — directional derivatives with non-unit vectors scale by u\|\mathbf{u}\|.
  • Confusing the directional derivative (a scalar) with the gradient (a vector).
  • Thinking directional derivatives exist whenever partial derivatives exist — they require a stronger condition.