The vector $\nabla f = \langle f_x, f_y \rangle$ that appeared in directional derivatives deserves its own name: the gradient ("del $f$"). It packs every directional derivative into one arrow, and that arrow has a clear meaning.
Key idea
At each point, $\nabla f$ points in the direction in which $f$ increases fastest, and its length $|\nabla f|$ is that fastest rate. $f$ decreases fastest in the direction $-\nabla f$, and does not change at all in the directions perpendicular to $\nabla f$.
Why it works
For a unit vector $\mathbf{u}$ at angle $\theta$ to the gradient,
$$D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u} = |\nabla f|\,|\mathbf{u}|\cos\theta = |\nabla f|\cos\theta.$$
Since $\cos\theta$ is between $-1$ and ${}1$, the rate is largest ($|\nabla f|$) at $\theta = 0$, smallest ($-|\nabla f|$) at $\theta = \pi$, and zero at $\theta = \pm\frac{\pi}{2}$. Nothing about the formula for $f$ entered: this is true for every differentiable function.
Worked examples
Worked example: Fastest increase
For $f(x, y) = x^2 + 2y^2$ at $(1, 1)$, find the direction and rate of fastest increase.
- $\nabla f = \langle 2x, 4y \rangle = \langle 2, 4 \rangle$.
- Direction: $\frac{\langle 2, 4 \rangle}{\sqrt{20}} = \left\langle \frac{1}{\sqrt{5}}, \frac{2}{\sqrt{5}} \right\rangle$.
- Rate: $|\nabla f| = \sqrt{20} = 2\sqrt{5} \approx 4.47$.
Answer: direction $\frac{1}{\sqrt{5}}\langle 1, 2 \rangle$, rate ${}2\sqrt{5}$
Worked example: A hiker
A hill has height $h(x, y) = 100 - 0.01x^2 - 0.02y^2$ meters, with $x$ east and $y$ north in meters. At $(30, 10)$, which way should a hiker head to climb most steeply, and how steep is it?
- $$\nabla h = \langle -0.02x, -0.04y \rangle = \langle -0.6, -0.4 \rangle$$ at $(30, 10)$: head west-southwest, toward the summit at the origin.
- Steepest slope: $|\nabla h| = \sqrt{0.36 + 0.16} = \sqrt{0.52} \approx 0.72$ meters up per meter walked.
Answer: toward $\langle -0.6, -0.4 \rangle$; slope about ${}0.72$
Worked example: No change
In which directions is the rate of change of $f(x, y) = x^2 + 2y^2$ zero at $(1, 1)$?
- Perpendicular to $\nabla f = \langle 2, 4 \rangle$: swap the components and change one sign, $\pm\langle -4, 2 \rangle$.
- As unit vectors: $\pm\frac{1}{\sqrt{5}}\langle -2, 1 \rangle$. These run along the level curve through $(1, 1)$.
Answer: $\pm\frac{1}{\sqrt{5}}\langle -2, 1 \rangle$
Common mistake
Drawing the gradient on the surface. $\nabla f$ has two components, so it lives in the $xy$-plane: it tells the hiker which way to step on the map. It is not tangent to the surface $z = f(x, y)$ and does not point up the hill in 3-D. (The steepest path on the surface rises above it, in the direction $\langle f_x, f_y, |\nabla f|^2 \rangle$.) Check: your gradient arrow should cross the level curves of a contour map at right angles.