Multivariable Calculus · Undergraduate

Functions of Several Variables and Contour Maps

Quick answer

A function of two variables assigns a number f(x, y) to each point of a region in the plane, and its graph z = f(x, y) is a surface in space. The level curves f(x, y) = c are the points where the function takes one fixed value; drawing several of them gives a contour map, the same device a topographic map uses for elevation. Where equally spaced level curves crowd together the surface is steep. A function of three variables has level surfaces instead of level curves.

What you'll learn

  • Evaluate a function of two or three variables
  • Find and sketch the domain of a function of two variables
  • Draw and read level curves and contour maps
  • Describe level surfaces of a function of three variables

Two inputs, one output

Many quantities depend on more than one thing. The volume of a cylinder depends on its radius and its height, V(r,h)=πr2hV(r, h) = \pi r^2h. The temperature on a weather map depends on two coordinates. A function of two variables ff assigns a number f(x,y)f(x, y) to each point (x,y)(x, y) of its domain, a region of the plane.

When a formula is given without a domain, the domain is every point where the formula makes sense. Square roots need nonnegative inputs, logarithms need positive ones, and denominators must not be zero.

Graphs are surfaces

The graph of ff is the set of points (x,y,z)(x, y, z) with z=f(x,y)z = f(x, y): above each point of the domain, one point at height f(x,y)f(x, y). The graph of f(x,y)=x2+y2f(x, y) = x^2 + y^2 is a bowl opening upward, a paraboloid; the graph of 4−x2−y24 - x^2 - y^2 is the same bowl turned over; the graph of 6−2x−3y6 - 2x - 3y is a plane.

Level curves and contour maps

Surfaces are hard to draw on paper. Instead, slice the graph at a few heights z=cz = c and drop each slice onto the plane. The slice at height cc is the level curve

f(x,y)=cf(x, y) = c

and a collection of them is a contour map. Hiking maps do exactly this with elevation.

Level curves of f(x, y) = x² + y² Four circles centered at the origin with radii 1, 2, 3 and 4, the level curves for c = 1, 4, 9 and 16. The circles are equally spaced, while the values they carry climb by 3, then 5, then 7. -4-224-4-224xy c = 1 c = 4 c = 9 c = 16
Level curves of f(x, y) = x² + y²

Why crowded contours mean steep ground

Draw level curves for equally spaced values cc, say every 1010 meters of elevation. Walking from one curve to the next always climbs the same amount. If the next curve is close, that climb happens over a short distance, so the ground is steep; if it is far, the ground is gentle. The spacing of equally spaced contours measures the rate of change: crowded curves mean fast change, spread-out curves mean slow change. In the map above the circles are evenly spaced, but the values climb by 33, then 55, then 77 per step outward. The bowl grows steeper away from the center.

Worked examples

Common mistakes

Practice problems

  1. Evaluate f(x,y)=4−x2−y2f(x, y) = 4 - x^2 - y^2 at (1,1)(1, 1).

    Answer

    22

    Full solution

    4−1−1=24 - 1 - 1 = 2.

  2. Find the domain of f(x,y)=x+yf(x, y) = \sqrt{x + y}.

    Answer

    All points with x+y≥0x + y \ge 0: on or above the line y=−xy = -x

    Full solution

    The square root needs a nonnegative input.

  3. Find the domain of f(x,y)=1x2−y\displaystyle f(x, y) = \frac{1}{x^2 - y}.

    Answer

    Every point not on the parabola y=x2y = x^2

    Full solution

    The denominator is zero exactly when y=x2y = x^2.

  4. Describe the level curve of f(x,y)=4−x2−y2f(x, y) = 4 - x^2 - y^2 at c=0c = 0.

    Answer

    The circle of radius 22

    Full solution

    4−x2−y2=04 - x^2 - y^2 = 0 gives x2+y2=4x^2 + y^2 = 4. It is where the upside-down bowl meets the xyxy-plane.

  5. Which level curve of f(x,y)=xyf(x, y) = xy passes through (2,2)(2, 2)? Describe it.

    Answer

    xy=4xy = 4, a hyperbola

    Full solution

    f(2,2)=4f(2, 2) = 4, and xy=4xy = 4 is the hyperbola y=4xy = \tfrac{4}{x}, with branches in the first and third quadrants.

  6. Describe the level curves of f(x,y)=2x+yf(x, y) = 2x + y.

    Answer

    Parallel lines y=−2x+cy = -2x + c

    Full solution

    Each level set 2x+y=c2x + y = c is a line of slope −2-2, and changing cc shifts it.

  7. Evaluate g(x,y)=ln⁡(x−y)g(x, y) = \ln(x - y) at (3,2)(3, 2), and say whether (2,3)(2, 3) is in its domain.

    Answer

    g(3,2)=0g(3, 2) = 0; (2,3)(2, 3) is not in the domain.

    Full solution

    ln⁡1=0\ln 1 = 0. At (2,3)(2, 3) the input x−y=−1x - y = -1 is negative.

  8. On a hiking map with contours every 2020 meters, the curves are 11 cm apart on one slope and 44 cm apart on another. Which slope is steeper?

    Answer

    The slope with curves 11 cm apart

    Full solution

    Both climb 2020 meters between curves, one over a quarter of the distance of the other, so it is four times as steep.

  9. Describe the level surfaces of F(x,y,z)=x+y+zF(x, y, z) = x + y + z.

    Answer

    Parallel planes x+y+z=cx + y + z = c

    Full solution

    Each level surface is a plane with normal (1,1,1)(1, 1, 1), and changing cc slides it along that normal.

  10. A student says the graph of f(x,y)=x2+y2f(x, y) = x^2 + y^2 is a circle. What went wrong?

    Hint

    How many coordinates does a point of the graph have?

    Answer

    The graph is the surface z=x2+y2z = x^2 + y^2, a bowl. The circles are its level curves.

    Full solution

    The graph of a function of two variables lives in three dimensions: each point is (x,y,f(x,y))(x, y, f(x, y)). Setting f=cf = c picks out one horizontal slice, which is a circle, but the whole graph stacks all those circles into a paraboloid.

Frequently asked questions

What is a function of two variables?

A rule that assigns one number f(x, y) to each point (x, y) of its domain, a region of the plane.

What does the graph of f(x, y) look like?

A surface in space: the points (x, y, z) with z = f(x, y). Above each point of the domain sits one point of the surface.

What is a level curve?

The set of points in the plane where f(x, y) equals a fixed number c. It is the horizontal slice of the graph at height c, dropped onto the plane.

How do you read steepness from a contour map?

When the level curves are drawn for equally spaced values, curves that are close together mean the function changes quickly, so the surface is steep there.

What is a level surface?

For a function of three variables, the set of points where f(x, y, z) = c. For x² + y² + z² the level surfaces are spheres.

What to learn next