Login
📚 Multivariable Calculus, Interactive Edition
Chapters ▾
⇩ Download ▾

4.1 The Gradient and Level Curves

Partial derivatives measure slope in two special directions. To get every other direction, bundle them into the gradient vector f=(fx,fy). The slope of the surface in the direction of a unit vector 𝐮 — the directional derivative — is then a dot product:

D 𝐮 f = f · 𝐮 ,

largest when 𝐮 points along f (value f), zero when 𝐮 is perpendicular to it. Those two facts give the gradient its geometry: it points straight uphill, at the rate f, and it crosses the level curve through its point at a right angle. The figure lets you audit that claim wholesale.

A near-top-down view of twelve nested dark elliptical contour lines of f(x,y) = x^2/2 + y^2, overlaid with a flat grid of gradient arrows colored from purple to yellow by strength; every arrow meets its ellipse at a right angle and points outward, away from the center. A translucent bowl-shaped surface of the same function is present but hidden.Explore in 3D (opens in a new tab)
A near-top-down view of twelve nested elliptical level curves of f(x,y)=x2/2+y2 (the outermost run off the edge of the window), under a flat carpet of gradient arrows colored from purple (weak) to yellow (strong) — color, not length, carries the gradient's magnitude here. A translucent surface of f hides in the object list until the last exploration step.
[x,2·y]
∇f for the surface above ✓ Computed · mojocas 0.1.0 ∇f for the surface above, computed exactly by mojo-cas mojocas 0.1.0.

The gradient of the same f the figure contours, computed from the formula rather than read off the arrows. The y-component is twice the x-component's coefficient, which is why the ellipses are wider than they are tall and why the arrows lean the way they do.

Explore

  1. Pick any arrow away from the center and look at the ellipse it sits on. At what angle does the arrow cross its curve? Check five more arrows in different parts of the map. Do you find a single exception?
  2. Every arrow points away from the center — the bottom of the bowl. Do the arrows turn yellow (strong) where the ellipses pack tightly, or where they spread apart? Say why, using the map-reading skill that opened Chapter 3: crowded contours mean steep ground.
  3. The gradient here is f=(x,2y). Before zooming in, predict: at (3,1.5), which compass direction does the arrow point, and how many times stronger is it than the arrow at (1.5,0.75)?
  4. Zoom in and check — the field samples every 0.75 units, so an arrow sits exactly at each of those points. Direction should match, and the stronger arrow should sit visibly further toward yellow.
  5. Both points of step 3 lie on one ray from the origin. Will every arrow on that ray point the same way? Will that hold on the y-axis too? Zoom out and check both.
  6. Reveal the hidden surface with its eye toggle and orbit down to a low side view. Confirm the whole point: at every sampled point, the arrow on the map aims in the direction the surface climbs.

Why the crossing is always square

Walk along a level curve and, by definition, the value of f does not change: the directional derivative along the curve's tangent 𝐓 is zero. But D𝐓f=f·𝐓, so the gradient has no component along the level curve at all — it is purely normal to it. Perpendicularity is not a coincidence of this bowl; it is the dot product doing its job. And since equally spaced levels crowd where the surface is steep, the strongest (yellowest) arrows live exactly where the ellipses bunch: the map's spacing and the arrows' color are two readouts of the same number, f.

An original work of XYZ Homework, built around interactive XYZ 3D figures. Aligned to OpenStax Calculus Volume 3 (Strang & Herman), © OpenStax (Rice University), licensed CC BY-NC-SA 4.0; no OpenStax content is reproduced, and this work is not affiliated with or endorsed by OpenStax or Rice University. License: CC-BY-NC-SA-4.0.