Skip to content

Level curves and contour plots

5 min read

Short answer

A level curve of f(x,y)f(x,y) is the set of points where f(x,y)=cf(x,y)=c for a constant cc. Drawing several of them, labeled by their values, gives a contour plot, like a topographic map. Where the curves are close together, ff changes quickly; where they are far apart, ff is nearly flat.

Diagramc = 1c = 4c = 9
For f = x² + y², the level curves are circles of radius √c. They get closer together as you move out, which shows f climbing faster.

How to sketch them

Pick a few values of cc (including negative ones if allowed). Solve f(x,y)=cf(x,y)=c for yy or identify the shape. Evenly spaced values of cc show you the steepness: crowded curves mean a steep surface. Level curves of different values never cross, because a point has only one value of ff.

Connection to the gradient

The gradient ∇f\nabla f at a point is perpendicular to the level curve through it and points toward increasing cc. Walking along a level curve gives a directional derivative of 0.

Worked example

Describe the level curves of f(x,y)=x2+4y2f(x,y)=x^2+4y^2 for c=4c=4 and c=16c=16.

c=4c=4: x2+4y2=4x^2+4y^2=4, i.e. x24+y2=1\dfrac{x^2}{4}+y^2=1, an ellipse with semi-axes 2 (in xx) and 1 (in yy).

c=16c=16: x216+y24=1\dfrac{x^2}{16}+\dfrac{y^2}{4}=1, an ellipse with semi-axes 4 and 2.

Both are ellipses stretched along the xx-axis, because ff grows four times faster in yy than in xx. For equal steps in cc the ellipses crowd together along the yy direction.

Try it yourself

What do the level curves of f(x,y)=x+yf(x,y)=x+y look like?

Show the answer

Setting x+y=cx+y=c gives y=c−xy=c-x: parallel lines of slope −1-1, evenly spaced. The graph of ff is a tilted plane.

Keep going with practice

Vidi's Multivariable & Vector Calculus course has interactive contour plots for reading level curves.