Functions of Two Variables

Learning Outcomes

  • Recognize a function of two variables and identify its domain and range.
  • Sketch a graph of a function of two variables.

The definition of a function of two variables is very similar to the definition for a function of one variable. The main difference is that, instead of mapping values of one variable to values of another variable, we map ordered pairs of variables to another variable.

Definition


A function of two variables [latex]z=f\,(x,\ y)[/latex] maps each ordered pair [latex](x,\ y)[/latex] in a subset [latex]{\bf{D}}[/latex] of the real plane [latex]\mathbb{R}^{2}[/latex] to a unique real number [latex]z[/latex]. The set [latex]{\bf{D}}[/latex] is called the domain of the function. The range of [latex]f[/latex] is the set of all real numbers [latex]z[/latex] that has at least one ordered pair [latex](x,\ y)\in{\bf{D}}[/latex] such that [latex]f\,(x,\ y)=z[/latex] as shown in the following figure.

A bulbous shape is marked domain and it contains the point (x, y). From this point, there is an arrow marked f that points to a point z on a straight line marked range.

Figure 1. The domain of a function of two variables consists of ordered pairs [latex](x,y)[/latex].

Determining the domain of a function of two variables involves taking into account any domain restrictions that may exist. Let’s take a look.

Example: Domains and Ranges for Functions of Two Variables

Find the domain and range of each of the following functions:

  1. [latex]f\,(x,\ y)=3x+5y+2[/latex]
  2. [latex]g\,(x,\ y)=\sqrt{9-x^{2}-y^{2}}[/latex]

Try It

Find the domain and range of the function [latex]f\,(x,\ y)=\sqrt{36-9x^{2}-9y^{2}}[/latex].

Watch the following video to see the worked solution to the above Try It

You can view the transcript for “CP 4.1” here (opens in new window).

Graphing Functions of Two Variables

Suppose we wish to graph the function [latex]z=(x,\ y)[/latex]. This function has two independent variables ([latex]x[/latex] and [latex]y[/latex]) and one dependent variable ([latex]z[/latex]). When graphing a function [latex]y=f\,(x)[/latex] of one variable, we use the Cartesian plane. We are able to graph any ordered pair [latex](x,\ y)[/latex] in the plane, and every point in the plane has an ordered pair [latex](x,\ y)[/latex] associated with it. With a function of two variables, each ordered pair [latex](x,\ y)[/latex] in the domain of the function is mapped to a real number [latex]z[/latex]. Therefore the graph of the function [latex]f[/latex] consists of ordered pairs [latex](x,\ y,\ z)[/latex]. The graph of a function [latex]z=f\,(x,\ y)[/latex] of two variables is called a surface.

To understand more completely the concept of plotting a set of ordered triples to obtain a surface in three-dimensional space, imagine the [latex]x,\ y)[/latex] coordinate system laying flat. Then, every point in the domain of the function [latex]f[/latex] has a unique [latex]z[/latex]-value associated with it. If [latex]z[/latex] is positive, then the graphed point is located above the [latex]xy[/latex]-plane. The set of all the graphed points becomes the two-dimensional surface that is the graph of the function [latex]f[/latex].

Example: Graphing Functions of Two Variables

Create a graph of each of the following functions:

  1. [latex]g\,(x,\ y)=\sqrt{9-x^{2}-y^{2}}[/latex]
  2. [latex]f\,(x,\ y)=x^{2}+y^{2}[/latex]

Example: Nuts and Bolts

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.