← MATH 241 MathScape 0 MATH241

Graphs of Functions

11 min read

Jump to a section
Reference: Stewart §14.1

Textbook Reference

Primary source OpenStax Calculus Volume 3, Section 4.1: “Functions of Several Variables”
Direct link https://openstax.org/books/calculus-volume-3/pages/4-1-functions-of-several-variables
Supplementary Stewart Calculus (9th ed.), Section 14.1: “Functions of Several Variables,” pp. 975-977 (Examples 5, 6, and 8)

OpenStax Calculus Volume 3 is free and openly licensed; its second objective for this section is to sketch the graph of a function of two variables. The Stewart graph definition and worked examples cited below appear on pages 975-977.


Key idea

You already know what the graph of $y = f(x)$ is: a curve drawn in a flat plane, where the height of the curve above each input $x$ is the output. The graph of a two-variable function is the very same idea with one more direction. Above each input point $(x, y)$ on the floor, you raise a marker to the output height $z = f(x, y)$. Do that for every point of the domain at once and the markers fuse into a surface floating above the floor.

Picture a tablecloth draped over a table, sagging and rising. The flat table is the domain on the floor; the cloth is the graph. Where the function is large the cloth bulges up; where it is small the cloth dips. The shape of the cloth is the whole behavior of the function, made visible. So a graph in this course is not a curve you trace with a pencil; it is a surface you would drape your hand over.

This means a graph turns algebra into a picture. The equation $z = f(x, y)$ is a recipe; the surface is what the recipe builds.


Prerequisite Check

Before this lesson, make sure you can do all of the following:

If the surface-above-the-floor picture is shaky, review 3D Coordinates and the Plane Equation and Functions of Two Variables.


Quick Reference

Definition. If $f$ is a function of two variables with domain $D$, the graph of $f$ is the set of all points $(x, y, z)$ in space such that $z = f(x, y)$ and $(x, y)$ is in $D$.

The graph is a surface $S$ with equation $z = f(x, y)$, lying directly above (or below) the domain $D$ on the floor.

A few standard surfaces to recognize.

Function Graph
$f(x, y) = ax + by + c$ (linear) a plane
$g(x, y) = \sqrt{r^2 - x^2 - y^2}$ the upper half of a sphere of radius $r$
$h(x, y) = ax^2 + by^2$ (both $a, b > 0$) a paraboloid opening upward (a bowl)

Traces. A trace is the curve where the surface meets a plane. Setting $x = k$ (a constant) gives a curve in a vertical plane; setting $z = k$ gives a horizontal slice. Traces are the cross-sections that let you build the surface from familiar curves.

The procedure for sketching a graph (flashcard size).

  1. Write the graph equation $z = f(x, y)$.
  2. If it is linear, find the three intercepts and draw the plane.
  3. Otherwise, take traces: substitute a few constant values for $x$, for $y$, and for $z$, and see what curves appear.
  4. Assemble the surface from those cross-section curves.

Key Concepts

1. The graph is a surface above the domain

By the definition above, each allowed input $(x, y)$ contributes exactly one point $(x, y, f(x, y))$ to the graph, sitting at height $f(x, y)$ above the floor point $(x, y)$. Sweeping over the whole domain traces out a surface. Because a function returns one output per input, the surface passes a “vertical line test” in space: a vertical line through a floor point meets the surface at most once.

Inline self-check. The graph of $f(x, y) = 5$ (a constant) is what surface?

Show answer

Every input gives output $5$, so the surface sits at height $z = 5$ above every floor point. It is the horizontal plane $z = 5$, parallel to the floor.


2. A linear function graphs as a plane

Example 1. Sketch the graph of $f(x, y) = 6 - 3x - 2y$.

Goal. Recognize the plane and place it by intercepts.

Step 1. Graph equation: $z = 6 - 3x - 2y$, that is, $3x + 2y + z = 6$, the form $ax + by + cz = d$ of a plane.

Step 2. Intercepts: $x = 2$ (from $y = z = 0$), $y = 3$ (from $x = z = 0$), $z = 6$ (from $x = y = 0$).

Step 3. The plane passes through $(2, 0, 0)$, $(0, 3, 0)$, $(0, 0, 6)$; the triangle joining them shows the piece in the first part of the room.

\[ \boxed{\text{The graph is the plane } 3x + 2y + z = 6.} \]

Recap. Any function of the form $f(x, y) = ax + by + c$ graphs as a plane, which is why linear functions are the simplest surfaces and the building block for tangent planes later. (Source: Stewart 14.1, Example 5, pp. 975-976.)


3. A square-root function can graph as half a sphere

Example 2. Sketch the graph of $g(x, y) = \sqrt{9 - x^2 - y^2}$.

Goal. Turn the equation into a recognizable surface.

Step 1. Graph equation: $z = \sqrt{9 - x^2 - y^2}$, with domain the disk $x^2 + y^2 \le 9$.

Step 2. Square both sides: $z^2 = 9 - x^2 - y^2$, that is, $x^2 + y^2 + z^2 = 9$, the sphere of radius $3$ centered at the origin.

Step 3. But the original $z$ is a nonnegative square root, so only $z \ge 0$ survives. The graph is the top half of that sphere, the upper hemisphere of radius $3$.

\[ \boxed{\text{The graph is the upper hemisphere } x^2 + y^2 + z^2 = 9, \; z \ge 0.} \]

Recap. Squaring revealed a sphere, and the sign of the square root kept only the top half. (A common error is to claim the graph is the whole sphere; a single function gives one height per input, so it can supply only one hemisphere.) (Source: Stewart 14.1, Example 6 and the following NOTE, pp. 975-976.)


4. Why one function cannot draw a whole sphere

A full sphere fails the one-output-per-input rule: above an interior floor point there are two sphere points, an upper and a lower. So the sphere $x^2 + y^2 + z^2 = 9$ splits into two functions: the upper hemisphere $g(x, y) = \sqrt{9 - x^2 - y^2}$ and the lower hemisphere $h(x, y) = -\sqrt{9 - x^2 - y^2}$. This is the surface version of the fact that $y = \sqrt{1 - x^2}$ and $y = -\sqrt{1 - x^2}$ are needed to draw a full circle in the plane. (Source: Stewart 14.1, the NOTE on p. 976.)


5. Reading a surface from its traces

When a surface is not linear and not an obvious sphere, build it from cross-sections.

Example 3. Describe the graph of $h(x, y) = 4x^2 + y^2$.

Goal. Use traces to identify the surface.

Step 1. The domain is all of $\mathbb{R}^2$ (no restriction), and since $4x^2 \ge 0$ and $y^2 \ge 0$, the range is $[0, \infty)$.

Step 2. Horizontal traces ($z = k$ for $k > 0$): $4x^2 + y^2 = k$ is an ellipse. The slices parallel to the floor are ellipses that grow with height.

Step 3. Vertical traces ($x = k$ or $y = k$): substituting a constant for one variable leaves a parabola in $z$. The slices in vertical planes are parabolas opening upward.

\[ \boxed{\text{The graph is an elliptic paraboloid (an upward bowl with elliptical cross-sections).}} \]

Recap. Ellipses stacked by height and parabolas standing in vertical planes together build the bowl. Traces turn an unfamiliar surface into a stack of familiar curves. (Source: Stewart 14.1, Example 8, p. 976.)


Common Errors Summary

Error Example Correction
Calling the square-root graph a full sphere “$z = \sqrt{9 - x^2 - y^2}$ is a sphere” It is only the upper hemisphere; one function gives one height per input
Confusing the graph with the domain sketching the disk and calling it the graph The domain lives on the floor; the graph is the surface above it
Forgetting to restrict after squaring keeping both signs of $z$ Squaring can add the lower half; keep only the sign the original formula allows
Mixing up the two kinds of trace calling a horizontal slice a parabola for the paraboloid Horizontal traces ($z = k$) are ellipses; vertical traces are parabolas
Sketching a plane from one intercept guessing the tilt A plane needs all three intercepts to be placed correctly

Common Misconceptions

Common misconception

the graph of $z = \sqrt{r^2 - x^2 - y^2}$ is the full sphere of radius $r$.

This is the concept-image-conflicts-definition error. A function of two variables returns exactly one output per input, so its graph passes a vertical-line test in space. The full sphere fails this test: a vertical line through an interior point intersects the sphere twice, once from above and once from below. The equation $z = \sqrt{r^2 - x^2 - y^2}$ selects only the nonneg square root, so it describes the upper hemisphere only. The lower hemisphere requires a separate function $z = -\sqrt{r^2 - x^2 - y^2}$.


Leveled Practice

Work each problem fully before revealing the answer.

Level 1 -- Direct Application

Problem 1. What surface is the graph of $f(x, y) = 10 - 4x - 5y$?

Show answer

It is linear, so the graph is a plane: $z = 10 - 4x - 5y$, that is, $4x + 5y + z = 10$.

Intercepts: $x = \tfrac{10}{4} = 2.5$, $y = 2$, $z = 10$.


Problem 2. Identify the graph of $g(x, y) = \sqrt{25 - x^2 - y^2}$.

Show answer

Square: $z^2 = 25 - x^2 - y^2$, that is, $x^2 + y^2 + z^2 = 25$, a sphere of radius $5$. Since $z \ge 0$, the graph is the upper hemisphere of radius $5$ centered at the origin. Its domain is the disk $x^2 + y^2 \le 25$.


Problem 3. The graph of $f(x, y) = 2 - x^2 - y^2$ opens which way, and where is its highest point?

Show answer

Horizontal traces $2 - x^2 - y^2 = k$ give $x^2 + y^2 = 2 - k$, circles that shrink as $k$ increases. The surface is a paraboloid opening downward. Its highest point is at the origin of the floor, where $f(0, 0) = 2$, so the peak is $(0, 0, 2)$.


Level 2 -- Traces

Problem 4. Describe the horizontal and vertical traces of $f(x, y) = x^2 + y^2$.

Show answer

Horizontal traces ($z = k$ for $k > 0$): $x^2 + y^2 = k$, circles of radius $\sqrt{k}$ that grow with height.

Vertical traces ($x = k$): $z = k^2 + y^2$, a parabola opening upward; similarly for $y = k$.

The surface is a circular paraboloid (a round bowl) with vertex at the origin.


Problem 5. Two functions are needed to draw the full sphere $x^2 + y^2 + z^2 = 4$. Write them.

Show answer

Solve for $z$: $z = \pm\sqrt{4 - x^2 - y^2}$.

Upper hemisphere: $g(x, y) = \sqrt{4 - x^2 - y^2}$.

Lower hemisphere: $h(x, y) = -\sqrt{4 - x^2 - y^2}$.

Each has domain the disk $x^2 + y^2 \le 4$.


Level 3 -- Building and Interpreting Surfaces

Problem 6. Identify the graph of $f(x, y) = \sqrt{x^2 + y^2}$ and explain its shape using traces.

Show answer

Square (valid since $z \ge 0$): $z^2 = x^2 + y^2$, the equation of a cone. Keeping $z \ge 0$ gives the upper half of a double cone, a single cone opening upward with vertex at the origin.

Horizontal traces ($z = k > 0$): $x^2 + y^2 = k^2$, circles of radius $k$, growing linearly with height (which is what makes the sides straight rather than curved).

Vertical trace ($y = 0$): $z = |x|$, a V-shape, the straight side of the cone.

So the graph is a cone: circular horizontal slices whose radius equals the height, and straight slanted sides.


Mastery Checklist

You have mastered this skill when you can, without notes:


Mental Model

Think of a graph as a landscape draped over the domain.

The domain is a region on the floor. Above each point of it, the function specifies one height, and the heights together form a surface, like a sheet pulled taut at some points and slack at others. To read an unfamiliar surface, slice it. A horizontal slice (hold $z$ fixed) is a contour at one elevation; a vertical slice (hold $x$ or $y$ fixed) is a profile, the silhouette you would see looking along an axis. A bowl has circular or elliptical horizontal slices that grow with height and parabolic profiles; a cone has circular slices that grow in straight proportion to height and straight-line profiles; a plane has straight slices in every direction.

Because the surface is a function, a vertical line through the floor pierces it at most once. That single-pierce rule is why a full sphere needs two functions: a vertical line through the inside of the sphere would pierce it twice, once on top and once on the bottom.


Connections

Built from

Leads to

Where this shows up

A graph turns a two-variable function into a shape you can reason about by eye. A maximum is a peak, a minimum is a valley, a saddle is a mountain pass, and the steepness of the surface in a direction is exactly what a partial derivative measures. In Chapter 15, the volume under a graph and above the floor is what a double integral computes. The same surfaces appear far beyond mathematics: an elliptic paraboloid is the shape of a satellite dish and a headlight reflector, and a saddle surface models a mountain pass or an unstable equilibrium. Reading a surface from its traces is a transferable engineering and data-visualization skill.

Audience Notes

For students who find math intimidating: You graphed $y = f(x)$ as a curve by plotting heights above the $x$-axis. A surface is the same plotting with one more direction. If drawing in three dimensions feels hard, slice the surface into a few cross-sections; each slice is an ordinary curve you already know how to draw.

For students who want depth: The surfaces in this lesson are quadric surfaces, the graphs of degree-two equations in three variables (planes, paraboloids, cones, spheres, ellipsoids, hyperboloids). They are classified completely by the signs of their coefficients, the three-dimensional analogue of classifying conic sections in the plane. The trace method you use here is the standard way to identify which quadric a given equation describes.


Back to MATH241 Skills | Previous: Functions of Two Variables | Next: Level Curves and Contour Maps