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 5: 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.

Examples: Multivariable Functions

For example:

  • The temperature at a given location may depend on both the latitude and the longitude
  • The profit of a company may depend on both the number of units sold and the unit price

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: Function of Several Variables

A real-valued function of variables is a rule that assigns to each input

exactly one real number .

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:

Visualizing Functions of Multiple Variables

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, we extend the crop yield model we studied earlier, in Chapter 3, to include additional factors.

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 within a suitable domain (e.g., kg/ha of fertilizer and mm of rainfall).

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.

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.

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.

For example:

  • Fix fertilizer at kg/ha and vary rainfall: The trace shows how yield changes with rainfall for that fertilizer level.

    Trace: Yield vs Rainfall with Fertilizer fixed at kg/ha.
  • Fix rainfall at mm and vary fertilizer: The trace shows how yield changes with fertilizer for that rainfall level.

    Trace: Yield vs Fertilizer with Rainfall fixed at mm.

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

Computing Level Curves and Traces

The task of finding level curves and traces reduces to solving equations. 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.

Examples: ???

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