When you graph a function [latex]z=f(x,y)[/latex], you’re working with two independent variables ([latex]x[/latex] and [latex]y[/latex]) and one dependent variable ([latex]z[/latex]). For single-variable functions [latex]y=f(x)[/latex], we use the Cartesian plane where every point has an ordered pair [latex](x,\ y)[/latex] associated with it. With two-variable functions, each ordered pair [latex](x,\ y)[/latex] in the domain maps to a real number [latex]z[/latex], creating ordered triples [latex](x,\ y,\ z)[/latex].
The graph of a function [latex]z=f(x,y)[/latex] is called a surface.
To visualize this, imagine the [latex]xy[/latex]-coordinate system lying flat. Every point in the domain of [latex]f[/latex] has a unique [latex]z[/latex]-value associated with it. If [latex]z[/latex] is positive, the graphed point sits above the [latex]xy[/latex]-plane. If [latex]z[/latex] is negative, it sits below. The collection of all these graphed points forms a two-dimensional surface in three-dimensional space.
Create a graph of each of the following functions:
[latex]g\,(x,\ y)=\sqrt{9-x^{2}-y^{2}}[/latex]
[latex]f\,(x,\ y)=x^{2}+y^{2}[/latex]
In the previous example, we determined that the domain of [latex]g\,(x,\ y)=\sqrt{9-x^{2}-y^{2}}[/latex] is [latex]\{(x,\ y)\in\mathbb{R}^{2}\,|\,x^{2}+y^{2}\,\leq\,9\}[/latex] and the range is [latex]{z\in\mathbb{R}^{2}\,|\,0\,\leq\,z\,\leq\,3}[/latex].
When [latex]x^{2}+y^{2}=9[/latex] we have [latex]g\,(x,\ y)=0[/latex]. Therefore, any point on the circle of radius [latex]3[/latex] centered at the origin in the [latex]xy[/latex]-plane maps to [latex]z=0[/latex] in [latex]\mathbb{R}^3[/latex].
If [latex]x^{2}+y^{2}=8[/latex], then [latex]g\,(x,\ y)=1[/latex], so any point on the circle of radius [latex]2\sqrt{2}[/latex] centered at the origin in the [latex]xy[/latex]-plane maps to [latex]z=1[/latex] in [latex]\mathbb{R}^{3}[/latex].
As [latex]x^{2}+y^{2}[/latex] gets closer to zero, the value of [latex]z[/latex] approaches [latex]3[/latex]. When [latex]x^{2}+y^{2}=0[/latex], then [latex]g\,(x,\ y)=3[/latex]. This is the origin in the [latex]xy[/latex]-plane.
If [latex]x^{2}+y^{2}[/latex] is equal to any other value between [latex]0[/latex] and [latex]9[/latex], then [latex]g\,(x,\ y)[/latex] equals some other constant between [latex]0[/latex] and [latex]3[/latex]. The surface described by this function is a hemisphere centered at the origin with radius [latex]3[/latex] as shown in the following graph.
Figure 4. Graph of the hemisphere represented by the given function of two variables.
This function also contains the expression [latex]x^{2}+y^{2}[/latex]. Setting this expression equal to various values starting at zero, we obtain circles of increasing radius.
The minimum value of [latex]f\,(x,\ y)=x^{2}+y^{2}[/latex] is zero (attained when [latex]x=y=0[/latex]). When [latex]x=0[/latex], the function becomes [latex]z=y^{2}[/latex], and when [latex]y=0[/latex], then the function becomes [latex]z=x^{2}[/latex].
These are cross-sections of the graph, and are parabolas. Recall that the name of the graph of [latex]f\,(x,\ y)=x^{2}+y^{2}[/latex] is a paraboloid. The graph of [latex]f[/latex] appears in the following graph.
Figure 5. A paraboloid is the graph of the given function of two variables.
To understand the shape of a surface, examine what happens when you hold one variable constant. For instance, setting [latex]x=0[/latex] or [latex]y=0[/latex] gives you cross-sections that are often familiar curves like parabolas or circles.
A profit function for a hardware manufacturer is given by
[latex]f\,(x,\ y)=16-(x-3)^{2}-(y-2)^{2}[/latex],
where [latex]x[/latex] is the number of nuts sold per month (measured in thousands) and [latex]y[/latex] represents the number of bolts sold per month (measured in thousands). Profit is measured in thousands of dollars. Sketch a graph of this function.
This function is a polynomial function in two variables. The domain of [latex]f[/latex] consists of [latex](x,\ y)[/latex] coordinate pairs that yield a nonnegative profit:
[latex]16-(x-3)^{2}-(y-2)^{2}\,\geq\,0[/latex]
[latex](x-3)^{2}-(y-2)^{2}\,\leq\,16.[/latex]
This is a disk of radius [latex]4[/latex] centered at [latex](3,\ 2)[/latex]. A further restriction is that both [latex]x[/latex] and [latex]y[/latex] must be nonnegative. When [latex]x=3[/latex] and [latex]y=2[/latex], [latex]f\,(x,\ y)=16[/latex]. Note that it is possible for either value to be a noninteger; for example, it is possible to sell [latex]2.5[/latex] thousand nut in a month. The domain, therefore, contains thousands of points, so we can consider all points within the disk. For any [latex]z<16[/latex], we can solve the equation [latex]f\,(x,\ y)=z[/latex]:
[latex]16-(x-3)^{2}-(y-2)^{2}=z[/latex]
[latex](x-3)^{2}-(y-2)^{2}=16-z[/latex]
Since [latex]z<16[/latex], we know that [latex]16-z>0[/latex], so the previous equation describes a circle with radius [latex]\sqrt{16-z}[/latex] centered at the point [latex](3,\ 2)[/latex]. Therefore, the range of [latex]f\,(x,\ y)[/latex] is [latex]\{z\in\mathbb{R}\,|z\,\leq\,16\}[/latex]. The graph of [latex]f\,(x,\ y)[/latex] is also a paraboloid, and this paraboloid points downward as shown.
Figure 6. The graph of the given function of two variables is also a paraboloid.