Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 11: Multivariable Functions

So far, we have focused on functions of a single variable, where each input is a single number and each output is a single number . Many situations, however, involve relationships between more than one independent variable.

When working with two independent variables, say and , it is natural to consider ordered pairs , where each coordinate is a real number. The set of all such pairs is denoted by and is often thought of as the Cartesian plane. Similarly, ordered triples form , which we interpret as three-dimensional space. More generally, denotes the set of all ordered -tuples , where each coordinate is a real number.

Definition: Multivariable Function

A real-valued multivariable function of variables assigns to each input

exactly one real number .

Such a function is also called a function of several variables.

This is written as:

  • The set is called the domain of and contains all valid inputs (points in ) for which is defined.
  • The range (or image) of is the set of all actual outputs:

Examples: Multivariable Functions

Multivariable functions appear whenever an output depends on more than one input.

  • The temperature at a given location may depend on both latitude and longitude.
  • The profit of a company may depend on both the number of units sold and the unit price.
  • Crop yield may depend on both fertilizer amount and rainfall.

In each case, the input is not a single number but a collection of values, such as an ordered pair .

Visualizing Multivariable Functions

When , the graph of a function can be drawn in a two-dimensional coordinate system. When , we can represent the graph in three dimensions, with the third axis showing the value of . For , it is no longer possible to directly visualize the graph in physical space, but other techniques, such as level curves and function traces, can be used to represent the function’s behavior.

To illustrate these ideas conceptually, we extend the crop yield model from Chapter 4 to include an additional factor. The purpose of the example is to interpret the different visual representations; no particular fitted formula or underlying data set is needed.

Example: Extended Crop Yield Model

In reality, crop yield depends on more than just fertilizer amount. Another important factor is rainfall, denoted by (in millimeters over a growing season of about days, i.e., months). We now model crop yield as a function of two variables:

Here, assigns a real-valued yield to each ordered pair in a suitable domain , for example, inputs with kg/ha of fertilizer and mm of rainfall. The surface below is an illustrative model intended to make the visual ideas concrete; it should not be interpreted as an empirically fitted crop model.

Illustrative surface showing crop yield as a function of fertilizer and rainfall.
Figure 11.1. Graph of the crop yield as a function of fertilizer and rainfall .

Because depends on two variables, its graph lives in three dimensions: the horizontal plane represents (fertilizer) and (rainfall), while the vertical axis represents (yield). Although 3D graphs are possible, they can be difficult to interpret—especially for decision-making—so we often use level curves and function traces instead.

Level Curves or Contours

Level curves show where the function has the same value, making it easier to identify trade-offs and regions of interest.

Definition: Level Curve of a Function

For a function of two variables , a level curve (or contour) is the set of all points in the domain where the function takes a fixed constant value :

In the -plane, a level curve connects all points where produces the same output.

Example: Level Curves for Crop Yield

In the crop yield model, a level curve for represents all combinations of fertilizer and rainfall that yield the same harvest.

For a fixed yield , the level curve is:

For example, the level curve for shows all fertilizer-rainfall combinations producing a yield of tonnes per hectare.

Contour plot showing combinations of fertilizer and rainfall with equal crop yield.
Figure 11.2. Level curves (contours) of crop yield.

From a contour plot, we can answer questions such as:

  • "If I want t/ha, how can I trade fertilizer for rainfall?"
  • "Where is the optimal combination of fertilizer and rainfall for maximum yield?"

Level curves are especially useful for visualizing decision boundaries and trade-offs when multiple factors influence an outcome.

Function Traces

Function traces help us examine cross-sections of the surface by fixing one variable and varying the other.

Definition: Trace of a Function

For , a trace is obtained by fixing one variable and letting the other vary:

Trace in the -direction. Fix and consider

This curve lies in the vertical plane parallel to the -plane.

Trace in the -direction. Fix and consider

This curve lies in the vertical plane parallel to the -plane.

Example: Function Traces for Crop Yield

For the crop yield model, traces show how yield changes when one input is fixed and the other is allowed to vary.

First, fix fertilizer at kg/ha and vary rainfall. The trace shows how yield changes with rainfall for that fertilizer level.

Trace showing crop yield as rainfall varies while fertilizer is fixed.
Figure 11.3. Trace: Yield vs Rainfall with Fertilizer fixed at kg/ha.

Second, fix rainfall at mm and vary fertilizer. The trace shows how yield changes with fertilizer for that rainfall level.

Trace showing crop yield as fertilizer varies while rainfall is fixed.
Figure 11.4. Trace: Yield vs Fertilizer with Rainfall fixed at mm.

From these traces, we can identify thresholds, such as the fertilizer amount beyond which adding more no longer increases yield.

Interpreting Level Curves and Traces

When a formula is available, finding level curves and traces reduces to substituting a fixed value or solving an equation. The algebraic and graphical techniques are the same as those used for curves in two dimensions, but here they are applied to cross-sections and slices of surfaces. For a conceptual model such as the crop-yield example, the same representations can instead be interpreted directly from a graph or data visualization.

Examples: Domains and Ranges of Multivariable Functions

The following examples show how domain restrictions come from the algebraic form of the function.

Find the domain and range of each function.

  1. Linear function. First, consider

    There are no algebraic restrictions on or , so every ordered pair is allowed. Therefore, the domain is .

    The expression can produce any real output, so the range is .

  2. Square-root function. Next, consider

    For the output to be real, the expression under the square root must be non-negative:

    Therefore, the domain is

    For the range, the square root produces non-negative outputs. Its smallest value is , and its largest value is , so the range is .