Mathwords logoMathwords

Contour Map — Definition, Formula & Example

A contour map is a flat drawing of a surface z=f(x,y)z = f(x, y). It traces the curves along which the function keeps the same value, like the elevation lines on a hiking map.

Let f:D⊆R2→Rf: D \subseteq \mathbb{R}^2 \to \mathbb{R}, and let kk be a value in the range of ff. The level curve of ff at height kk is the set {(x,y)∈D:f(x,y)=k}\{(x, y) \in D : f(x, y) = k\}. A contour map of ff draws the level curves for a chosen list of values k1,k2,…,knk_1, k_2, \dots, k_n in the xyxy-plane and labels each curve with its value. The values are usually equally spaced. A level set does not have to be a curve. For some values of kk it is a single point or a filled region.

Key Formula

f(x,y)=kf(x, y) = k
Where:
  • f(x,y)f(x, y) = The function of two variables being mapped
  • kk = A constant output value. Each choice of k gives one contour.
  • (x,y)(x, y) = The input points in the plane where f takes the value k

Worked Example

Problem: Sketch the contour map of f(x,y)=x2+y2f(x, y) = x^2 + y^2 for k=4,8,12,16k = 4, 8, 12, 16. Then use the spacing between the curves to describe how steep the surface is.
Step 1: Set the function equal to kk. For k>0k > 0, the equation x2+y2=kx^2 + y^2 = k describes a circle centered at the origin with radius k\sqrt{k}. For example, the point (2,0)(2, 0) gives 22+02=42^2 + 0^2 = 4, so it lies on the k=4k = 4 curve.
x2+y2=k⟹r=kx^2 + y^2 = k \quad\Longrightarrow\quad r = \sqrt{k}
Step 2: Find the radius of each contour. The kk-values go up in equal steps of 4, but the radii do not.
4=2,8=22≈2.83,12=23≈3.46,16=4\sqrt{4} = 2,\quad \sqrt{8} = 2\sqrt{2} \approx 2.83,\quad \sqrt{12} = 2\sqrt{3} \approx 3.46,\quad \sqrt{16} = 4
Step 3: Measure the gaps between neighboring circles. Each gap is the horizontal distance you travel to climb 4 units.
22−2≈0.83,23−22≈0.64,4−23≈0.542\sqrt{2} - 2 \approx 0.83,\quad 2\sqrt{3} - 2\sqrt{2} \approx 0.64,\quad 4 - 2\sqrt{3} \approx 0.54
Answer: The contour map is four circles centered at the origin, with radii 2, about 2.83, about 3.46, and 4. The gaps shrink from about 0.83 to 0.64 to 0.54. The circles crowd together as you move outward, so the surface gets steeper the farther you go from the origin.

Why It Matters

In Calculus III, contour maps let you see the gradient. At every point where the gradient is not zero, it is perpendicular to the level curve through that point. With Lagrange multipliers, you find a constrained maximum or minimum where the constraint curve just touches a level curve. Outside math class, the same idea shows up as elevation lines on USGS topographic maps, isobars on weather maps, and isotherms in heat-flow models.

Common Mistakes

Mistake: Drawing two contours of different values so that they cross or touch.
Correction: A function gives each input exactly one output. A point where two curves meet would have two different values of f, which is impossible. Contours for different values of k never intersect.

Related Terms

  • Gradient — Points uphill, perpendicular to every level curve
  • Partial Derivative — Measures how fast contour values change along each axis
  • Lagrange Multiplier — Finds optima where a constraint touches a level curve
  • Level Set — Each contour curve is a level set of the function
  • Surface — The 3D shape that a contour map represents in 2D