Calculus 3 • Multivariable Functions & Partial Derivatives

Surfaces & Contour Maps — Visualizing Surfaces and Contour Maps

Learn how three-dimensional surfaces are encoded as families of level curves in the plane.

Three-dimensional axes with spatial movement and a multivariable function.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

The challenge of depicting three-dimensional information on a flat page has motivated scientists and mathematicians for centuries. Long before the formal apparatus of multivariable calculus existed, cartographers, military surveyors, and natural philosophers were grappling with a fundamental question: how can one faithfully represent a surface — whether a mountain range, a temperature field, or a gravitational potential — using only marks on a two-dimensional sheet? The tools they developed, contour maps and their close relatives, became indispensable in both applied science and pure mathematics, eventually forming the conceptual backbone for understanding multivariable functions.

1701 • Halley's Isogonic Chart

Edmond Halley published the first known map of isogonic lines — curves of equal magnetic declination over the Atlantic Ocean — establishing the idea that a scalar field on a surface can be visualized by its level sets.

1774 • Hutton's Topographic Contours

Charles Hutton drew lines of equal elevation around Schiehallion in Scotland during a density-of-the-Earth experiment, producing some of the earliest topographic contour maps used for scientific analysis.

1859 • Riemann and Surface Theory

Bernhard Riemann's work on surfaces and complex analysis formalized the notion of a surface as the graph of a function, linking the geometric and analytic viewpoints that underpin modern multivariable calculus.

1900s • Level Sets in Analysis

Twentieth-century mathematicians — including Morse and Whitney — used level set theory to classify critical points and study the topology of surfaces, placing contour analysis at the heart of differential topology.

1980s+ • Computer-Generated Surfaces

Advances in computer graphics enabled real-time rendering of surfaces and automatic generation of contour maps, transforming how students and researchers interact with multivariable functions.

Today, every student of multivariable calculus confronts the same fundamental challenge those early cartographers faced: given a function z = f(x, y), how do we build geometric intuition about its behavior — its peaks, valleys, saddle points, and slopes — when we cannot easily draw in three dimensions? The twin tools of surface visualization and contour mapping provide the answer, and mastering them is essential for everything from computing partial derivatives to evaluating double integrals.

SECTION 2

Core Principles & Definitions

Before we can interpret or construct contour maps, we need to establish precise language. A surface in ℝ³ is a two-dimensional object that can often be described as the graph of a function of two variables, as an implicit relation, or through parametric equations. A contour map (or level curve diagram) is the projection of the surface's horizontal slices onto the xy-plane. The following core ideas organize our discussion.

1

Graph of z = f(x, y)

The set of all points (x, y, z) in ℝ³ satisfying z = f(x, y). This is the most direct representation of a surface: each input pair maps to a unique height.
2

Level Curve (Contour)

The curve in the xy-plane defined by f(x, y) = c for a constant c. It is the 'footprint' of the slice where the surface has height c. Densely packed contours indicate a steep surface.
3

Contour Map

A family of level curves drawn for equally spaced values of c. Together they encode the full three-dimensional shape: spacing reveals slope, closed curves reveal extrema, and saddle patterns reveal passes.
4

Cross-Section (Trace)

The curve obtained by intersecting the surface with a vertical plane such as x = a or y = b. Cross-sections complement contour maps by showing the profile of the surface along a chosen direction.
5

Gradient and Contour Orthogonality

The gradient ∇f is always perpendicular to level curves. This connects the geometric picture (contour spacing and orientation) to the analytic picture (partial derivatives and directional rates of change).
✦

KEY TAKEAWAY

Think of a contour map as a topographic hiking map: every contour line represents one fixed altitude. If the lines are squeezed close together, you are looking at a cliff; if they are spread apart, you are on gentle terrain. A contour map is the mathematical equivalent of reading a terrain map — it compresses the third dimension into spacing and shape of curves in the plane, just as an engineer reads pressure isobars on a weather chart to infer wind speed and storm intensity.

SECTION 3

Visual Explanation — From Surface to Contour Map

The diagram below illustrates how horizontal planes at heights z = 1, 2, 3, and 4 slice through the paraboloid z = x² + y², producing circular level curves. On the left you see a schematic three-dimensional view of the surface with the slicing planes; on the right, the resulting contour map projected onto the xy-plane. Notice how the circles become more closely spaced as you move outward — the surface is steeper far from the origin because the gradient magnitude ‖∇f‖ = 2√(x² + y²) increases with distance.

3D Surface: z = x² + y²Contour Map (xy-plane)z=1z=2z=3z=4Paraboloid cross-section−x+xc=1c=2c=3c=4xyorigin (min)
Left: a cross-sectional view of the paraboloid z = x² + y² with horizontal slicing planes at z = 1, 2, 3, 4 shown as dashed lines. Right: the corresponding contour map, where each circle has radius √c. Notice the circles are not equally spaced — the gaps shrink as c increases, reflecting the steepening slope.

Several observations from this diagram generalize to all surfaces. First, closed contour loops surround local maxima or minima — you can determine which by checking whether the function value increases or decreases as you move inward. Second, the spacing between adjacent contours is inversely proportional to the slope: tightly packed contours correspond to a steep surface, while widely spaced contours indicate a nearly flat region. Third, contour lines for a continuous function never cross — if they did, the function would assign two different values to the same point, violating the definition of a function. These three rules form the foundation for reading any contour map.

SECTION 4

Mathematical Framework

The connection between surfaces and contour maps is grounded in a few precise definitions and equations. Let f : D ⊆ ℝ² → ℝ be a scalar-valued function of two variables. The graph of f is a surface in ℝ³, and the level curves of f encode the same information in the plane.

SURFACE AS GRAPH

S=(x,y,z)∈R3:z=f(x,y),(x,y)∈DS = { (x, y, z) ∈ ℝ³ : z = f(x, y), (x, y) ∈ D }

Here D is the domain in the xy-plane. Each point in D is lifted to height z = f(x, y).

LEVEL CURVE DEFINITION

Lc=(x,y)∈D:f(x,y)=cL_c = { (x, y) ∈ D : f(x, y) = c }

For each constant c in the range of f, Lc is a curve (or set of curves) in the xy-plane. The contour map is the collection {Lc} for equally spaced values of c.

GRADIENT–CONTOUR ORTHOGONALITY

∇f(x,y)=⟨∂f/∂x,∂f/∂y⟩⊥LcateverypointofLc∇f(x, y) = ⟨ ∂f/∂x, ∂f/∂y ⟩ ⊥ L_c at every point of L_c

The gradient vector ∇f points in the direction of steepest ascent and is perpendicular to the level curve through the same point. Its magnitude ‖∇f‖ equals the rate of change of f per unit distance in the xy-plane, which is why closely spaced contours (large ‖∇f‖) indicate steep terrain.

CONTOUR SPACING AND SLOPE

Δd≈Δc/‖∇f‖Δd ≈ Δc / ‖∇f‖

Here Δd is the approximate horizontal distance between two contour lines whose heights differ by Δc. When ‖∇f‖ is large the contours are close together (steep); when ‖∇f‖ is small they are far apart (flat).

These four relationships form a tight feedback loop between the analytic and geometric viewpoints. Knowing the formula for f lets you compute its gradient, which tells you both the direction and density of contour lines. Conversely, given a contour map, you can infer approximate gradient directions and magnitudes, and thereby estimate partial derivatives — a skill that appears frequently on Calculus 3 examinations and in applications such as meteorology, structural engineering, and machine learning optimization landscapes.

SECTION 5

Classifying Common Surfaces & Their Contour Signatures

Different classes of surfaces produce characteristic contour patterns. Recognizing these patterns on sight is an important skill: given only a contour map, you should be able to identify the underlying surface type. The diagram below and the accompanying table survey the most common quadric surfaces and their level curve families.

Contour Signatures of Common SurfacesParaboloidz = x² + y²Concentric circlesSaddlez = x² − y²Hyperbolas meeting at saddlePlanez = 2x + 3yParallel, equally spaced linesConez = √(x² + y²)Equally spaced circlesElliptic Paraboloidz = x² + 4y²Concentric ellipsesHyperboloid (1 sheet)x²+y²−z²=1Circles growing outward
Six common surface types and their contour signatures. For the paraboloid and cone, contours are circles centered at the vertex; for the saddle, they are hyperbolas. A plane produces equally spaced parallel lines, an elliptic paraboloid yields concentric ellipses, and a hyperboloid of one sheet produces circles whose radius increases with |z|.
SurfaceEquationLevel Curves f(x,y) = cSpacing Pattern
Circular Paraboloidz = x² + y²Circles: x² + y² = c, r = √cSpacing shrinks as c increases (steepening)
Conez = √(x² + y²)Circles: x² + y² = c², r = cEqually spaced (constant slope)
Hyperbolic Paraboloid (Saddle)z = x² − y²Hyperbolas: x² − y² = cc = 0 gives the two lines y = ±x through the saddle
Planez = ax + by + dLines: ax + by = c − dParallel and equally spaced
Elliptic Paraboloidz = x²/a² + y²/b²Ellipses: x²/a² + y²/b² = cEllipses shrink in spacing as c grows

Contour signatures of common surfaces encountered in Calculus 3.

SECTION 6

Worked Example — Sketching a Contour Map

Let us construct the contour map for the function f(x, y) = 9 − x² − y² using level values c = 0, 3, 5, 7, and 9. This downward-opening paraboloid has a maximum at the origin and intersects the xy-plane in a circle of radius 3.

Contour Map of f(x, y) = 9 − x² − y²

  1. 1

    Step 1 — Set up the level curve equation

    A level curve at height c satisfies f(x, y) = c, i.e., 9 − x² − y² = c. Rearranging: x² + y² = 9 − c. This is a circle of radius r = √(9 − c) provided 9 − c > 0, so c must lie in the interval (−∞, 9].
    x² + y² = 9 − c, radius r = √(9 − c)
  2. 2

    Step 2 — Compute radii for each level value

    For c = 0: r = √9 = 3. For c = 3: r = √6 ≈ 2.449. For c = 5: r = √4 = 2. For c = 7: r = √2 ≈ 1.414. For c = 9: r = √0 = 0 (the peak, a single point at the origin).
    r = 3, 2.449, 2, 1.414, 0
  3. 3

    Step 3 — Sketch concentric circles in the xy-plane

    Draw concentric circles centered at the origin with the radii computed above. Label each circle with its c-value. The outermost circle (c = 0) is the boundary where the surface meets the xy-plane, and the innermost point (c = 9) is the summit.
  4. 4

    Step 4 — Interpret the spacing

    The gap between the c = 0 and c = 3 circles is 3 − 2.449 = 0.551 units; between c = 3 and c = 5 it is 2.449 − 2 = 0.449; between c = 5 and c = 7 it is 2 − 1.414 = 0.586; and between c = 7 and c = 9 it is 1.414 − 0 = 1.414. Because we chose unequally spaced c-values, the spacing varies; with equal Δc the circles would crowd together near the top, reflecting the steepening slope of the inverted bowl.
    Contours crowd near the rim (steep); the peak is flat.
  5. 5

    Step 5 — Compute the gradient for verification

    The gradient is ∇f = ⟨−2x, −2y⟩, with magnitude ‖∇f‖ = 2√(x² + y²) = 2r. At the origin ‖∇f‖ = 0 (flat peak); at r = 3 the magnitude is 6, confirming that the surface is steepest at the boundary — consistent with the crowding of contours there.
    ∇f = ⟨−2x, −2y⟩, ‖∇f‖ = 2r

SECTION 7

Strengths & Limitations of Contour Maps vs. 3D Plots

Both contour maps and three-dimensional surface plots serve the same ultimate goal — building geometric intuition about a function of two variables — but they do so with different strengths and trade-offs. Understanding when to use each representation is an important metacognitive skill for any multivariable calculus course.

Criterion3D Surface PlotContour Map
Overall shapeExcellent — viewer immediately grasps hills, valleys, saddlesRequires practice to reconstruct shape from curves
Precise height readingDifficult — perspective distortion obscures exact valuesEasy — each curve is labeled with its z-value
Slope / gradient infoModerate — steepness is visible but hard to quantifyDirect — contour spacing is proportional to 1/‖∇f‖
Locating critical pointsCan be hidden on the 'back' of the surfaceClear — closed loops = extrema, figure-eights = saddles
Printability / hand sketchingChallenging to draw accurately by handStraightforward with compass and ruler
Extension to higher dimensionsCannot extend beyond 3D (we run out of visual axes)Level sets generalize: level surfaces of f(x,y,z) = c in ℝ³

Trade-offs between 3D surface plots and 2D contour maps.

✦

KEY TAKEAWAY

In practice, the best approach is to use both tools in concert — much as an architect uses both a rendered 3D model and a set of floor plans. The 3D plot gives the global gestalt, while the contour map provides precision for quantitative analysis — reading off heights, estimating gradients, and locating critical points. Moreover, the contour perspective is the one that generalizes: for functions of three or more variables, level sets remain our primary visualization tool even though we can no longer draw the full graph.

SECTION 8

Connections to Advanced Theory

Surfaces and contour maps are not merely pedagogical illustrations — they form the conceptual groundwork for several pillars of advanced mathematics and its applications. The table below highlights how the ideas introduced in this lesson reappear at higher levels of abstraction.

This LessonAdvanced Extension
Level curve f(x,y) = cLevel surfaces f(x,y,z) = c in ℝ³ (e.g., equipotential surfaces in electrostatics, isosurfaces in medical imaging)
∇f ⊥ level curvesLagrange multipliers: at a constrained extremum, ∇f = λ∇g, meaning the objective and constraint gradients are parallel — both perpendicular to their shared level curve
Contour spacing ↔ slopeGradient descent algorithms in machine learning: the optimizer follows −∇f, stepping perpendicular to contours toward the minimum of a loss surface
Critical points (closed contour loops)Morse theory: classifies critical points of smooth functions and links them to the topology of the underlying manifold
Cross-sections (traces)Implicit Function Theorem: guarantees that level sets are smooth curves (or surfaces) near points where the gradient is nonzero

How concepts from this lesson connect to advanced topics.

Perhaps the most impactful modern application is in optimization. Every loss function in a neural network defines a surface in a very high-dimensional parameter space, and understanding its contour structure — where it is steep, where it is flat, where saddle points lurk — directly informs the choice and tuning of gradient-based optimizers such as Adam and SGD. The two-variable intuition you build in this course scales, conceptually if not visually, to millions of dimensions.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain why two distinct contour lines of a continuous function f(x, y) can never intersect each other. What property of functions does this follow from?
Show answer
Each contour line represents the set of points where f(x, y) equals a specific constant. If two contour lines with labels c₁ ≠ c₂ crossed at a point (a, b), then f(a, b) would simultaneously equal c₁ and c₂, which is impossible because f is a function and assigns exactly one output to each input. This is simply the vertical line test applied in the multivariable setting. Note that this argument requires that c₁ ≠ c₂; contour lines with the same label can merge or overlap.

Question 2: BASIC CALCULATION

Determine and describe the level curves of f(x, y) = x² + 4y² for c = 1, 4, 9, and 16. What type of curves are they, and what are their semi-axis lengths?
Show answer
Setting f(x, y) = c gives x² + 4y² = c, which can be rewritten as x²/c + y²/(c/4) = 1. This is the equation of an ellipse with semi-major axis a = √c along the x-direction and semi-minor axis b = √(c/4) = √c / 2 along the y-direction. For c = 1: a = 1, b = 1/2. For c = 4: a = 2, b = 1. For c = 9: a = 3, b = 3/2. For c = 16: a = 4, b = 2. The ellipses are concentric about the origin, all with the same eccentricity, and they grow larger with increasing c. The 2:1 aspect ratio reflects the coefficient 4 in front of y².

Question 3: INTERMEDIATE

For the function f(x, y) = xy, sketch the contour map for c = −4, −1, 0, 1, 4. Then compute ∇f at the point (2, 1) and verify that it is perpendicular to the level curve through that point.
Show answer
The level curves xy = c are rectangular hyperbolas. For c > 0 they lie in quadrants I and III; for c < 0 in quadrants II and IV; and c = 0 gives the coordinate axes x = 0 and y = 0. The gradient is ∇f = ⟨y, x⟩, so at (2, 1) we get ∇f(2, 1) = ⟨1, 2⟩. The level curve through (2, 1) is xy = 2, i.e., y = 2/x. Its tangent vector can be found by implicit differentiation: d(xy)/dx = y + x(dy/dx) = 0, giving dy/dx = −y/x = −1/2 at (2, 1). A tangent vector is therefore ⟨1, −1/2⟩ (or ⟨2, −1⟩). The dot product ⟨1, 2⟩ · ⟨2, −1⟩ = 2 − 2 = 0, confirming orthogonality.

Question 4: APPLIED

A temperature distribution on a metal plate is modeled by T(x, y) = 100 − 2x² − 3y² (°C), where x and y are in centimeters. An ant at the point (3, 2) wants to cool down as rapidly as possible. In what direction should it walk, and at what rate (°C/cm) does the temperature drop in that direction?
Show answer
The gradient is ∇T = ⟨−4x, −6y⟩. At (3, 2): ∇T(3, 2) = ⟨−12, −12⟩. The direction of fastest temperature decrease is −∇T = ⟨12, 12⟩, which after normalization gives the unit vector ⟨1/√2, 1/√2⟩ (pointing toward the upper-right, away from the origin). The rate of temperature drop in this direction equals ‖∇T‖ = √(144 + 144) = 12√2 ≈ 16.97 °C/cm. Note that the ant is moving perpendicular to the level curve T = 100 − 18 − 12 = 70 that passes through (3, 2), consistent with the gradient–contour orthogonality principle.

Question 5: CRITICAL THINKING

Suppose you are given a contour map of a smooth function f(x, y) and you observe that near a certain point P the contour lines form small closed ellipses. However, without knowing the function values, you cannot tell from the contour map alone whether P is a local maximum or a local minimum. Propose a method — using only information available from the contour map — to determine which one it is. Can a similar ambiguity arise at a saddle point?
Show answer
To distinguish a maximum from a minimum using the contour map, you need the labels (c-values) on the contours. If the function values increase as you move inward toward P, then P is a local maximum; if they decrease inward, it is a minimum. Without numerical labels, you could instead examine the map at the boundary of the domain or at a point where the function value is known, and then track the monotonic change of c-values as you move toward P. At a saddle point, the ambiguity is different in character: contour lines near a saddle do not form closed loops at all — they form hyperbolic arcs opening in alternating directions, with the c = f(P) contour degenerating into an 'X'-shaped crossing. Thus, the local topology of the contour pattern distinguishes saddle points from extrema without any reference to c-values; the max/min distinction, however, genuinely requires ordinal information about the function values.

SUMMARY

Lesson Summary

Summary

A surface in ℝ³ can be described as the graph of a function z = f(x, y), and its geometry is encoded by the family of level curves f(x, y) = c drawn in the xy-plane. This family, plotted for equally spaced c-values, constitutes a contour map. Closely spaced contours indicate steep slopes (large ‖∇f‖), while widely spaced contours indicate gentle terrain. Closed contour loops surround local extrema, and figure-eight or hyperbolic patterns mark saddle points.

The gradient ∇f is always perpendicular to the level curves, pointing in the direction of steepest ascent. This gradient–contour orthogonality principle connects geometric visualization directly to the analytic tools of partial derivatives and directional derivatives. Recognizing contour signatures — circles for paraboloids and cones, ellipses for elliptic paraboloids, hyperbolas for saddles, parallel lines for planes — allows rapid identification of surface type. These ideas extend naturally to level surfaces in higher dimensions and underpin applications from Lagrange multipliers to gradient descent in machine learning.

Varsity Tutors • Calculus 3 • Surfaces & Contour Maps — Visualizing Surfaces and Contour Maps