Linear Algebra
13.48 min read

U-Derivative for Vector-Valued Functions

For a vector-valued function f:RnRm\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m, the directional derivative in direction u\mathbf{u} at a\mathbf{a} is the vector: Duf(a)=limt0f(a+tu)f(a)t=Jf(a)uRmD_\mathbf{u}\mathbf{f}(\mathbf{a}) = \lim_{t\to 0}\frac{\mathbf{f}(\mathbf{a}+t\mathbf{u})-\mathbf{f}(\mathbf{a})}{t} = J\mathbf{f}(\mathbf{a})\mathbf{u} \in \mathbb{R}^m

This is the Jacobian-vector product: apply the Jacobian matrix Jf(a)J\mathbf{f}(\mathbf{a}) to the direction vector u\mathbf{u}. The result tells us how all mm output components change simultaneously when we perturb the input in direction u\mathbf{u}.

Component-wise: (Duf)i=Dufi=fiu(D_\mathbf{u}\mathbf{f})_i = D_\mathbf{u} f_i = \nabla f_i \cdot \mathbf{u} — the directional derivative of the ii-th component. So the vector directional derivative is just a stack of scalar directional derivatives.

Formal View

Theorem 13.1 — Directional Derivative via Jacobian
If f:RnRm\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m is differentiable at a\mathbf{a} and uRn\mathbf{u} \in \mathbb{R}^n, then
Duf(a)=Jf(a)uD_\mathbf{u}\mathbf{f}(\mathbf{a}) = J\mathbf{f}(\mathbf{a})\mathbf{u}
This is a vector in Rm\mathbb{R}^m.

Why This Matters

Jacobian-vector products (JVPs) are one of the two fundamental operations in automatic differentiation.

  • Forward-mode AD: compute Jf(a)vJ\mathbf{f}(\mathbf{a})\mathbf{v} for a given tangent vector v\mathbf{v}
  • Sensitivity analysis: how much does the vector output change for a unit perturbation in direction u\mathbf{u}?
  • Lanczos and Krylov methods: iterative linear algebra methods that use Jacobian-vector products without forming the full Jacobian

Quiz

Question 1

If Jf(a)=[1234]J\mathbf{f}(\mathbf{a}) = \begin{bmatrix}1&2\\3&4\end{bmatrix} and u=(1,0)T\mathbf{u} = (1,0)^T, then Duf(a)=D_\mathbf{u}\mathbf{f}(\mathbf{a}) =

Question 2

The directional derivative Duf(a)D_\mathbf{u}\mathbf{f}(\mathbf{a}) for a vector-valued function f:RnRm\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m is a vector in Rm\mathbb{R}^m.

Common Mistakes

  • Thinking the directional derivative is always a scalar — for vector-valued functions, it is a vector.
  • Computing uTJf\mathbf{u}^T J\mathbf{f} (wrong order/transposition) instead of JfuJ\mathbf{f}\mathbf{u}.