When a function depends on two inputs, x and y, we need a way to graph its output z=f(x,y) and see the shape it makes in space.
From Two Inputs to a 3D Surface
For a single-variable function y=f(x), each input x on a line gets lifted to a height y to form a 2D curve. For a two-variable function, each input point (x,y) on the flat xy-plane gets lifted straight up or down to its output height z:
point on xy-plane(x,y)⟶height above or below (x,y)z=f(x,y)
y=x2
z=f(x,y)
1
Domain and Range on the xy-Plane
Before drawing a surface in 3D, we want to find its domain (the region of input points (x,y) on the xy-plane where the function gives a real height z) and its range (the set of heights z the surface reaches). Just as in single-variable calculus, three things can rule out inputs: square roots, logarithms, and denominators.
Domain and Range on the xy-Plane
Square roots and range
Let's start with the upper hemisphere:
z=9−x2−y2
Text solution
Keep the inside of the square root zero or positiveSet the inside of the square root greater than or equal to zero, then move x2 and y2 to the other side to see the shape on the xy-plane:
9−x2−y2x2+y2≥0≤9
Sketch the domain on the xy-planePoints on the circle x2+y2=9 make the inside of the square root equal 0, which is allowed. So draw the circle of radius 3 centered at (0,0) as a solid curve and shade the disk inside it:
Find the highest and lowest outputs for the rangeSince x2 and y2 are never negative, subtracting nothing at the center (0,0) gives the highest z, and moving out to the boundary circle x2+y2=9 drops z to its lowest value:
At (0,0):z=9−0−0=3On x2+y2=9:z=9−9=0
So the heights of the surface run from 0 to 3, giving the range [0,3].
For z=9−x2−y2, the upper hemisphere only exists directly over the shaded disk x2+y2≤9. It reaches its highest point z=3 at the origin where nothing is subtracted, and drops to z=0 along the solid boundary circle.
The hemisphere only exists above the shaded disk, peaking at the center and dropping to zero along the edge.
Logarithms
Now let's find the domain when the inputs are inside a natural logarithm:
z=ln(y−x2)
Text solution
Keep the inside of the logarithm strictly positiveA logarithm cannot take a negative number or zero, so set the inside greater than zero and solve for y:
y−x2y>0>x2
Sketch the dashed boundary and shadeOn the parabola y=x2, the inside of the log equals zero and the function is undefined. Draw y=x2 as a dashed curve and shade the region above it where y is greater than x2:
Domain: dashed parabola y=x2, shaded abovey>x2
Denominators
Finally, let's look at a fraction where the bottom could equal zero:
z=x−y1
Text solution
Rule out points that make the denominator zeroPositive and negative numbers are both fine in a fraction as long as we never divide by zero:
x−yy=0=x
Shade the plane except the dashed lineEvery point on the xy-plane is in the domain except the line y=x, which we draw as a dashed diagonal line through the origin:
Domain: entire xy-plane except dashed line y=xy=x
x2+y2≤9
x
y
3
y>x2
x
y
y=x2
y=x
x
y
y=x
2
Level Curves, Contour Maps, and Steepness
When a 3D surface has several peaks, valleys, and passes, drawing it in 3D on flat paper turns into a mess that's hard to read. To show the exact 3D shape clearly in 2D, we slice the surface horizontally at evenly spaced heights z=c and drop those slices straight down onto the xy-plane. Each dropped curve is a level curve (a path at a constant height), and the whole set of level curves on the xy-plane is a contour map.
Level Curves, Contour Maps, and Steepness
z=x2+y2
x
y
z
z=1
z=4
z=9
Let's compare the contour map of the paraboloid z=x2+y2 with the contour map of the upper cone z=x2+y2 by slicing both at the evenly spaced heights z=1,2,3,4.
Text solution
Set z to evenly spaced heights on the paraboloid z=x2+y2Setting z=1,2,3,4 gives circles centered at the origin whose radii are the square roots of the heights:
Check the gaps between radii on the paraboloidSubtracting each radius from the next starting at z=0 shows the horizontal steps getting smaller as the paraboloid curves steeper upward:
Gaps between radii: 1,0.41,0.32,0.27
Set z to the same heights on the cone z=x2+y2Setting x2+y2=z and squaring both sides gives circles whose radii are equal to the heights:
x2+y2x2+y2=z=z2⟹r=1,2,3,4(for z=1,2,3,4)
Compare the spacingEvery step of 1 unit outward on the cone climbs 1 unit in height, so its level curves stay an equal 1 unit apart along its straight sides. On the paraboloid, the level curves get closer together as its walls curve steeper upward.
z=x2+y2
x
y
1
2
3
4
gaps: 1,0.41,0.32,0.27
z=x2+y2
x
y
1
2
3
4
gaps: 1,1,1,1
Taking equal steps up in height z makes the paraboloid's circles on the xy-plane get closer together as its walls curve steeper upward, while the cone's circles stay 1 unit apart because its straight sides have the same steepness everywhere.
Taking equal steps up crowds the rings together where a wall curves steeper, and spaces them evenly where the wall goes up straight.
3
Contour Map of a Saddle
On the paraboloid and the cone, the surface only goes up as you move away from the origin. Now let's build the 2D contour map of a saddle (a hyperbolic paraboloid), which curves upward in one direction and downward in the perpendicular direction:
z=y2−x2
Contour Map of a Saddle
z=y2−x2
x
y
z
z=y2
z=−x2
Text solution
Slice at height z=0Set z=0 and take the square root of both sides (keeping both the positive and negative roots) to find where the upward curve in y and downward curve in x cancel out:
0y2y=y2−x2=x2=xandy=−x
These two diagonal lines cross at the origin, and the surface stays at height 0 all along both lines.
Slice at positive heights z=1,2,3Along the y-axis (x=0), the height is z=y2>0, so moving up or down the y-axis from the origin climbs uphill, and the positive level curves are hyperbolas opening along the y-axis:
y2−x2=1,2,3(hyperbolas opening up and down along the y-axis)
Slice at negative heights z=−1,−2,−3Along the x-axis (y=0), the height is z=−x2<0, so moving left or right along the x-axis from the origin drops downhill, and the negative level curves are hyperbolas opening along the x-axis:
y2−x2=−1,−2,−3(hyperbolas opening left and right along the x-axis)
z=y2−x2
x
y
0
0
1
1
2
2
3
3
−1
−1
−2
−2
−3
−3
On the saddle z=y2−x2, staying on any single hyperbola keeps your 3D height the same, following either diagonal line y=x or y=−x stays at height 0, moving out along the y-axis climbs up positive ridges, and moving out along the x-axis drops into negative valleys.
On a saddle surface, each hyperbola and diagonal on the 2D contour map is a flat path at a single height in 3D, while the surface rises in ridges along the y-axis and falls into valleys along the x-axis.
4
Functions of Three Variables and Level Surfaces
When a function takes three inputs, w=f(x,y,z), just plotting the input point (x,y,z) uses up all three dimensions of 3D space, leaving no fourth dimension to plot the output w as a height. Just as a contour map leaves out the output axis by setting f(x,y)=c on the 2D input plane, we can picture w=f(x,y,z) inside 3D input space by setting the output to constants f(x,y,z)=c. Each constant output gives a 3D level surface where the function has that same value c.
Functions of Three Variables and Level Surfaces
w=f(x,y,z)
x
y
z
(x,y,z)
w=67.1∘
Let's find the level surfaces of this three-variable function at w=1,4,9:
w=x2+y2+z2
Text solution
Set the output w to each constant valueSet w=1,4,9 in 3D (x,y,z) space and match each equation to a sphere x2+y2+z2=R2 centered at the origin:
w=1:w=4:w=9:x2+y2+z2=1⟹sphere of radius 1x2+y2+z2=4⟹sphere of radius 2x2+y2+z2=9⟹sphere of radius 3
Moving outward from the origin in any direction passes through nested spheres with larger and larger output values w.
w=x2+y2+z2
x
y
z
w=1
w=4
w=9
Summary
To picture a function with two or three inputs without trying to draw a complicated 3D or 4D graph, draw it in its input space:
Domain on the xy-plane
Check the formula for the three things that rule out inputs: square roots need inside≥0 (like z=9−x2−y2⟹x2+y2≤9), logarithms need inside>0 (like z=ln(y−x2)⟹y>x2), and fractions need denominator=0 (like z=x−y1⟹y=x). Set the two sides equal to draw the boundary curve, using a solid line when the boundary is included (≥,≤) and a dashed line when it is excluded (>,<,=).
Level curves and steepness in 2D (z=f(x,y))
To make a flat map of a 3D surface, set the height to evenly spaced constants:
2D level curve on the xy-planef(x,y)=c
Two surfaces can have the same curve shapes (both z=x2+y2 and z=x2+y2 have circular level curves), so always check the spacing at evenly spaced values of z. Curves getting closer together mean the surface is curving steeper, while curves spaced equally apart mean straight sides with constant steepness. If the surface is a saddle like z=y2−x2, slice at z=0 first to get the crossing diagonal lines y=±x, then plug in x=0 and y=0 to see which axis has the positive hyperbolas and which has the negative ones.
Level surfaces in 3D (w=f(x,y,z))
When a function has three inputs, all three dimensions of space are already used by (x,y,z), so we can't graph the output as a height. Instead, set the output to constants:
3D level surface in xyz-spacef(x,y,z)=c
For w=x2+y2+z2, setting w=c gives nested spheres centered at the origin.
5
Practice
1
Find the domain and range of z=16−x2−y2, and describe how to sketch the domain on the xy-plane.
Watch out: Don't forget to take the square root of 16 (which gives the wrong range [0,16]) or include negative numbers (which gives [−4,4]; the square root symbol x only gives the non-negative root).
Write the inequality for what is allowed inside a square root, then find the height z when x2+y2 is as small and as large as that domain allows.
Inside a square root, the expression must be zero or positive:
16−x2−y2x2+y2≥0≤16
Watch out: Don't read 16 as the radius or draw a dashed boundary. Here 16 is r2, so the radius is 16=4, and because =0 is allowed inside a square root, the boundary circle is included. On the xy-plane, the domain is the disk of radius 4 centered at (0,0), drawn with a solid boundary circle and shaded inside.
For the range, the highest z happens at (0,0) where nothing is subtracted, and the lowest z happens on the boundary circle x2+y2=16:
At (0,0):z=16−0−0=4On x2+y2=16:z=16−16=0
Watch out: Don't forget to take the square root of 16 (which gives the wrong range [0,16]) or include negative numbers (which gives [−4,4]; the square root symbol x only gives the non-negative root). The range is [0,4].
2
Find the domain of z=ln(x2−y), and describe how to sketch it on the xy-plane.
Set the expression inside the logarithm greater than zero and solve for y to see which side of the boundary parabola to shade.
Whatever is inside the logarithm must be greater than zero:
x2−yy>0<x2
Watch out: Don't allow x2−y≥0 (which draws a solid parabola, forgetting that ln(0) is undefined), and don't keep the > sign pointing at y when rearranging (which shades above the parabola as y>x2). On the xy-plane, draw the boundary parabola y=x2 as a dashed curve and shade the region below the parabola.
3
Find the domain of z=x2−y21, and describe how to sketch it on the xy-plane.
Set the denominator not equal to zero and solve for y in terms of x, keeping track of both the positive and negative square roots.
The denominator cannot equal zero:
x2−y2y2y=0=x2=xandy=−x
Watch out: When taking the square root of y2=x2, don't forget the ± sign and only rule out the single line y=x. The domain is the entire xy-plane except the two diagonal lines y=x and y=−x, which are drawn as dashed lines crossing at the origin.
4
Describe the contour map of the saddle z=x2−y2 by finding the level curves at z=0, at z=1,2,3, and at z=−1,−2,−3.
Slice at z=0 first to get the crossing diagonal lines, then plug in y=0 (the x-axis) and x=0 (the y-axis) to see which direction climbs to positive heights and which drops to negative heights.
At z=0, set the height to zero:
x2−y2y2y=0=x2=xandy=−x
This gives the two diagonal lines y=x and y=−x crossing at the origin.
Watch out: Don't reuse the picture from z=y2−x2 and put the positive hyperbolas on the y-axis; here the signs on x2 and y2 are swapped. Along the x-axis (y=0),z=x2 is positive, so the positive contours z=1,2,3 are hyperbolas x2−y2=c opening left and right along the x-axis. Along the y-axis (x=0),z=−y2 is negative, so the negative contours z=−1,−2,−3 are hyperbolas x2−y2=−c opening up and down along the y-axis.
5
Slice the upper hemisphere z=9−x2−y2 at the evenly spaced heights z=0,1,2,3. Find the radius of each level curve and use the gaps between radii to explain where the surface is steepest and where it is flattest.
Watch out: Don't forget to square z on the right side (writing 9−z instead of 9−z2), and don't list 9−z2(9,8,5,0) as the radii without taking the square root r=9−z2.
Set 9−x2−y2=z and square both sides to solve for x2+y2, then compare the gaps between radii from one circle to the next as z steps from 0 to 3.
Set the height equal to z and square both sides to write the level curves as circles:
9−x2−y29−x2−y2x2+y2=z=z2=9−z2
Watch out: Don't forget to square z on the right side (writing 9−z instead of 9−z2), and don't list 9−z2(9,8,5,0) as the radii without taking the square root r=9−z2.
At z=0,1,2,3, the level curves are circles centered at the origin with radii:
z=0:z=1:z=2:z=3:r=9−0=3r=9−1=8≈2.83r=9−4=5≈2.24r=9−9=0(a single point at the origin)
Climbing from z=0 inward to z=3, the gaps between radii from one circle to the next are about 0.17,0.59, and 2.24. The contours are packed tightly near the outer edge (radius 3) where the hemisphere goes almost straight up, and spread wide apart near the center (radius 0) where the dome flattens out at the top.
6
Describe the level surfaces of w=x2+y2+z2 at the evenly spaced values w=1,2,3,4, and compare their spacing to the level surfaces of w=x2+y2+z2 at w=1,2,3,4.
Set w=c in each equation and rewrite it in the sphere form x2+y2+z2=R2 to find the radius R for c=1,2,3,4.
For w=x2+y2+z2, setting x2+y2+z2=c and squaring both sides gives:
x2+y2+z2=c2
So for w=1,2,3,4, the level surfaces are nested spheres centered at the origin with radii 1,2,3,4, spaced an equal 1 unit apart.
For w=x2+y2+z2, setting w=c gives:
x2+y2+z2=c
Watch out: Don't read the right side c as the radius R instead of R2 (which mistakes these spheres as also having radii 1,2,3,4). Taking the square root gives nested spheres at w=1,2,3,4 with radii 1,2≈1.41,3≈1.73, and 2, which get closer together as you move outward from the origin.