Multivariable Differential Calculus

directional derivative

Partial derivatives only tell you the slope as you walk parallel to the axes. But you can set off across a hillside in any direction you please, and you might want the slope along that chosen heading. The directional derivative is exactly that: the instantaneous rate of change of f as you move from a point in a specified direction.

Pick a point and a unit vector u (length one, pointing the way you want to go). The directional derivative of f at that point in direction u is the limit of (f(point + t u) - f(point)) / t as t -> 0 — the ordinary derivative of f restricted to the straight line through the point in direction u. When f is differentiable, there is a beautiful shortcut: the directional derivative equals the dot product of the gradient with the direction, grad f dot u. So all the directional derivatives at a point are encoded in a single object, the gradient, and you recover any one of them by projecting onto the chosen direction. (Using a unit vector matters; if u is not unit length the formula reports rate per unit of u, not per unit of distance.)

This dot-product formula immediately explains why the gradient points uphill: grad f dot u is largest when u aligns with grad f, so the steepest direction is the gradient's direction and the steepest slope is its magnitude. Directional derivatives are the language of how a field changes along a beam, a flow line, or a trajectory — heat flux, the response of a cost surface to a search direction in optimization, and the rate a signal varies along a ray all live here.

For f(x, y) = x^2 + y^2, grad f = (2x, 2y); at (1, 2) it is (2, 4). In the direction u = (3/5, 4/5) the directional derivative is (2)(3/5) + (4)(4/5) = 6/5 + 16/5 = 22/5 = 4.4.

With a unit direction, the directional derivative is just the gradient dotted with that direction.

The grad-dot-u formula assumes f is differentiable and u is a unit vector. If the function is not differentiable, directional derivatives can exist in every direction yet not equal grad f dot u — the slick formula quietly fails.

Also called
rate of change in a direction沿方向的变化率沿方向的變化率