Skip to content

Why the gradient points toward steepest ascent

5 min read

Short answer

Among all directions, ff increases fastest in the direction of ∇f\nabla f, and the maximum rate is ∣∇f∣|\nabla f|. The reason: the rate of change in unit direction u\mathbf u is Duf=∇f⋅u=∣∇f∣cos⁡θD_{\mathbf u}f=\nabla f\cdot\mathbf u=|\nabla f|\cos\theta, which is largest when θ=0\theta=0 (aligned with the gradient) and equals 00 when u\mathbf u is perpendicular to it.

Diagram∇flevel
On the contours of f = x² + y², the gradient at (1, 1) points straight outward, perpendicular to the contour. Moving along the contour does not change f.

The one-line proof

For a unit vector u\mathbf u, Duf=∇f⋅u=∣∇f∣ ∣u∣cos⁡θ=∣∇f∣cos⁡θD_{\mathbf u}f=\nabla f\cdot\mathbf u=|\nabla f|\,|\mathbf u|\cos\theta=|\nabla f|\cos\theta. Cosine is at most 1, with equality when the angle is zero. So the best direction is ∇f/∣∇f∣\nabla f/|\nabla f|, with rate ∣∇f∣|\nabla f|. The worst (steepest descent) is the opposite direction, rate −∣∇f∣-|\nabla f|.

Why it is perpendicular to level curves

Along a level curve ff does not change, so the rate of change in the direction of the curve is 0. A zero dot product with the gradient means the tangent is perpendicular to ∇f\nabla f. This is the basis of gradient descent in optimization.

Worked example

For f(x,y)=x2+3y2f(x,y)=x^2+3y^2 at (1,1)(1,1), find the direction of steepest ascent, the maximum rate, and a direction of zero change.

∇f=(2x,6y)=(2,6)\nabla f=(2x,6y)=(2,6) at (1,1)(1,1).

Steepest ascent direction: (2,6)40=(1,3)10\dfrac{(2,6)}{\sqrt{40}}=\dfrac{(1,3)}{\sqrt{10}}. Maximum rate: ∣∇f∣=40=210≈6.32|\nabla f|=\sqrt{40}=2\sqrt{10}\approx6.32.

Zero change: any direction perpendicular to (2,6)(2,6), e.g. (3,−1)(3,-1), since (2,6)⋅(3,−1)=6−6=0(2,6)\cdot(3,-1)=6-6=0. That is the tangent to the level curve.

Try it yourself

For f(x,y)=xyf(x,y)=xy at (2,3)(2,3), what is the maximum rate of increase?

Show the answer

∇f=(y,x)=(3,2)\nabla f=(y,x)=(3,2) at that point, so the maximum rate is ∣∇f∣=9+4=13≈3.61|\nabla f|=\sqrt{9+4}=\sqrt{13}\approx3.61.

Keep going with practice

Vidi's Multivariable & Vector Calculus course shows the gradient on live contour plots so you can see why it points uphill.