Multivariable Calculus · Contour map

Contour map

A contour map draws the level curves f(x, y) = c of a surface on the ground: each contour is the shoreline the water would have if it rose to height c. Inside the map the shoreline changes how it connects only at the critical heights.

The contour map in this visualization

A level curve, or contour, of a function f(x,y)f(x, y) is the set of points where ff takes one value cc. On the surface z=f(x,y)z = f(x, y) these are the points at height cc. A contour map draws level curves for equally spaced heights on the ground, the way a topographic map shows hills.

The surface is drawn as glass over a square map, with the same scale on all three axes, and its contour map lies on the floor below. Raise the water to height cc and every point lower than cc is under water. The shoreline, drawn in blue on the surface and on the map, is the level curve f=cf = c, so a contour map is a stack of shorelines. The water is a threshold, not a flood: a hollow far from any other water is already a lake as soon as its bottom is below cc.

As cc rises, the shoreline mostly just moves and changes shape. Inside the map it changes how it connects only at the heights of critical points, where ∇f=0\nabla f = 0, and at the tip of the cone, where there is no gradient at all. Just above the bottom of a pit a lake appears. At a pass, or saddle point, two shorelines meet or one island splits into two. At a summit an island shrinks to a point and vanishes. The ruler beside the view marks these heights.

The map is a window on a larger landscape, so the page counts only lakes and islands that stay inside it. Water that reaches the edge is open sea, and land that reaches it is mainland. The counts can therefore also change where the shoreline meets the edge. The ruler marks those heights with a dashed tick and no symbol.

A level curve through a saddle point crosses itself there. On the saddle f=14(x2−y2)f = \tfrac14(x^2 - y^2), the level curve f=0f = 0 is the pair of lines y=±xy = \pm x. Below 0 the water lies in two valleys, at 0 their shorelines touch at the saddle, and above 0 it is one sheet. Contours of different heights never meet, because a point has only one height.

Neighbouring contours differ in height by Δc\Delta c, so where they are close the ground climbs Δc\Delta c in a short distance. Where ∇f≠0\nabla f \ne 0 and neighbouring contours are close, the gap measured at right angles to the contours is about

Closer lines, steeper ground
gap≈Δc∣∇f∣\text{gap} \approx \frac{\Delta c}{|\nabla f|}

The Profile window draws the height along a route from A to B at the same scale on both axes, with a tick at each contour the route crosses and the steepest point in yellow. Along a stretch where the route keeps climbing or falling, closer ticks mean a steeper profile.

The lines alone do not say which way is up. On f=2x e−(x2+y2)/2f = 2x\,e^{-(x^2 + y^2)/2}, the rings around (1,0)(1, 0) and (−1,0)(-1, 0) have the same shape, but one is a hill and the other a pit. A map needs the heights written on it, or another clue such as the water.

Things to notice

  • The innermost ring of a nest of closed contours goes round a summit or a pit. A ring further out can go round several critical points: on Two hills the outer rings enclose both summits and the pass.

Controls

  • Drag on the ruler to set the water level. With the answers shown it catches on the critical heights, and the keys under the thumbwheel put the water exactly on one.

Related