The gradient and directional derivatives
∇f points uphill; ∇f · u gives the slope in direction u.
The gradient ∇f = ⟨∂f/∂x, ∂f/∂y⟩ points in the direction of steepest increase, and its length is that steepest rate. The directional derivative in the direction of a unit vector u is ∇f · u.
Example: f = x² + 3y at (2, 1), direction ⟨3/5, 4/5⟩
- ∇f = ⟨2x, 3⟩ = ⟨4, 3⟩ — At (2, 1)
- 4(3/5) + 3(4/5) — Dot with u
- 24/5 = 4.8 — Directional derivative
Why it works: The gradient points in the direction of steepest climb. The rate in any other direction is how much of the gradient points that way.
Tip: Make the direction a unit vector first: divide by its length.