
We introduce functions that take vectors or points as inputs and output a number.

The world is constantly changing. Sometimes this change is very slow, other times it is shockingly fast. Consider Meteor Crater in northern Arizona. This area was once grasslands and woodlands inhabited by bison, camels, wooly mammoths, and giant ground sloths. During the Pleistocene epoch, a meteor only $40$ meters in diameter collided with the Earth and this changed very quickly. The collision released around $4\times 10^{16}$ joules of energy, comparable to the energy released by a large nuclear weapon. A fireball extended out $10$ kilometers from the center of the impact, destroying all life in its wake. It is estimated it took one hundred years for the local plant and animal life to repopulate the area. Fifty thousand years later, the remains of the impact crater are still intact on our ever-changing Earth.

To help us understand events like these, we need to precisely describe what we are observing (in this case, the crater). To do this we use a contour map, often called a topographical map:

In essence, we are looking at the crater from directly above, and each curve in the map above represents a fixed, constant height. Mathematically, a contour map illustrates a function of two variables. We will now define a more general case of a function of $n$ variables. These are often called functions of several variables. The relationship from the previous example can be described more succinctly by the equation which is the notation that we will use most frequently when describing functions.

Often, we will not specify the domain of a function in order to shorten its description. Unless otherwise specified, we will take the domain of a given function on $\R ^n$ to be the set of all ordered tuples in $\R ^n$ for which the function is defined. We are familiar with this concept from one-variable calculus, where we would see a function such as $f(x) = \sqrt {x}$ and take its domain to be $[0, \infty )$. In our example $F(x,y) = x^2+y^2$, we take its domain to be $\R ^2$, as we found above.

Let’s investigate a few functions of two variables, $F:\R ^2\to \R$.

Consider What is $F(2,1)$?
What is the domain of $F$? Since we have not specified the domain, we take it to be the set of all vectors $\vector {x,y}$ allowable as inputsoutputs for $F$. Because of the logarithm, we need $\vector {x,y}$ such that:
$0 < 9-x^2-y^2$ $0 \leq 9-x^2-y^2$ $0 > 9-x^2-y^2$ $0 \geq 9-x^2-y^2$

The observant young mathematician may note that this inequality describes the interior of a circle of radius $\answer [given]{3}$ centered at $(0,0)$ in the $(x,y)$-plane since we can write

While the domain may not always be easy to visualize, it is and excellent practice and often insightful to try such visualization.

What is the range of $F$? The range is the set of all possible inputoutput values. If we visualize the graph of $y = \ln (x)$, we can see that the logarithm function outputs all values in $(-\infty , \infty )$. However, the input for our logarithm function is not any value of $x$, but any value of $9 - x^2 - y^2$. Since the $x$ and $y$ terms are squared and then subtracted from $9$, the largest possible value of $9-x^2-y^2$ occurs where $x=\answer {0}$ and $y=\answer {0}$, in which case $F(0,0) = \answer {\ln (9)}$. Notice that we must also have $9-x^2-y^2 > \answer [given]{0}$ in order to calculate the logarithm.

What do these calculations mean for the range of $F$? In general, the logarithm is an increasingdecreasing function of its input, meaning that as the input gets larger, the output gets largersmaller . In other words, the largest value of $9-x^2-y^2$ gives us the largest possible value of $F$. We similarly find smaller values of $F$ by plugging in smaller values of $9-x^2-y^2$. We have determined that the values of $9-x^2-y^2$ which make sense for this problem are those in the interval $(0, 9]$, and so evaluating the logarithm on this interval gives us that the range $R$ is the interval $\left (\answer {-\infty },\answer {\ln (9)}\right ]$.

Consider this geometric example.

### Visualizing functions of several variables

There are many ways to interpret a function of several variables. Two very common ways to do this are to graph the function or to look at what we will call the level sets of our function.

Recall that given a function $f(x)$ of a single variable, we can consider the equation $y=f(x)$, which allows us to visualize the function as the set of all points $(x,y)$ in the $(x,y)$-plane. To do this, we pick an $x$-value in the domain, and then the corresponding $y$-coordinate is given by $f(x)$.

Given a function $F(x,y)$ of two variables, we can take the same approach. We’ll consider the set of all points in $(x,y,z)$-space where $z=F(x,y)$. By choosing a point $(x,y)$ in the domain of the function, the corresponding $z$-coordinate will be given by $F(x,y)$.

Thus, one way of visualizing the function $F(x,y)$ is to consider the equation $z=F(x,y)$ and interpret that the function assigns a height to each point $(x,y)$ in its domain. Be very careful with this way of visualizing the function, however! The “height” can sometimes be negative, while we tend to almost always visualize a positive height. Also, the thing we are calling height here is actually the $z$-value of the point $(x,y,z)$ on the graph of the function, and we do not always interpret this as a height. Be careful to keep the meaning of the function in mind.

To make a sketch of a surface, we can specify many locations in the $(x,y)$-plane (by picking many different values for $x$ and $y$), and plot the corresponding $z$-values. While this is tedious to do by hand, computers can do it very easily. For example, if we consider the function $F(x,y) = 2-4x^3+y^2$, we can evaluate the function at many different points $(x,y)$ and plot the results. For instance, at the point $(x,y)=(1,2)$, we have $F(1,2) = \answer [given]{2}$. Using software to graph both the surface and this point gives the following.

#### Generating curves on surfaces

Recall that we described curves in $\R ^n$ by giving vector-valued functions $\vec {p}(t)$, where the coordinates of any point on the curve can be determined from a single parameter. We would now like to consider vector-valued functions alongside functions of several variables. As usual, we will work with two variables so that we can better visualize our examples, but our results will also extend to the case of $n$ variables.

If we have a function $F(x,y) : D \to \R$ and a vector-valued function $\vec {p}(t) = \vector {x(t), y(t)}$ so that for any value of $t$, $\vector {x(t), y(t)}$ is in the domain $D$, we can evaluate $F$ at each point along $\vec {p}$ and produce another curve $F\left (\vec {p} \right )$ on the surface.

We can think of the function as “lifting” a curve onto the surface $z=F(x,y)$ in $(x,y,z)$-space. Of course, the curve must be in the domain of the function $F$, and we should always be cautious when using the notion of “height” for our $z$-coordinate.

So far, we have focused mainly on the curve $\vec {p}(t)$ lying in the domain of a function $F$. Let’s now focus on the curve $F \left ( \vec {p} (t) \right )$ on the surface. Since the curve is in $\R ^n$, we must use a parametric equation to describe it. Fortunately, with our background on vector-valued functions, finding such a description should be straightforward.

The idea of looking at a curve in the domain of $F$ and the corresponding curve on the surface can be helpful when thinking about many topics that follow. We may see these ideas again when we discuss limits of functions of several variables, derivatives and differentiability, the chain rule, tangent planes, as well as constrained optimization. Any time we work with these curves on surfaces, remember to think carefully about whether we are working in the domain of $F$ or on the surface itself.

### Level sets

It was Descartes who said “Je pense, donc je suis.” He also developed our rectangular coordinate system, the $(x,y)$-plane. This is also known as the Cartesian coordinate system. This coordinate system allows us to consider the graph of a function. First, recall that the graph of a function of a single variable, $y=f(x)$ is a curve in a two-dimensional plane. In the same sense, the graph of a function of two variables, $z = F(x,y)$ is a surface in three-dimensional space. The graph of a function of three variables, $w=F(x,y,z)$ is a surface in four-dimensional space. A surfaces in higher than three dimensions is often called a hypersurface. How can we visualize such functions? For visualizing functions $f:\R \to \R$, a graphing utility like Desmos is really great. For visualizing functions $F:\R ^2\to \R$, GeoGebra is very helpful. However, once we get to functions $F:\R ^3\to \R$ (or $F: \R ^n \to \R$), visualizing the graph of the function as we do in two and three dimensions becomes much more difficult. One powerful technique to help us understand a function $F:\R ^3\to \R$ visually is known as sketching level sets.

When working with functions $F:\R ^2\to \R$ the level sets are known as level curves.

When we are looking at level curves, we can think about choosing a $z$-value, say $z=c$, in the range of the function and ask “at which points $(x,y)$ can we evaluate the function to get $F(x,y)=c$?” Those points form our level curve. If we choose a value $z=c$ that was not in the range of $F$, there would be no points in the $(x,y)$-plane for which $F(x,y)=c$, and hence no level curve associated to $z = c$.

It may be surprising to find that the concept of level sets is familiar to most people, but they don’t realize it. Topographical maps, like the one below represent the surface of Earth by indicating points with the same elevation with contour lines. We also had an example of the contour lines of Meteor Crater as we began this section.

Another example you may know are isotherms, which are curves along which the temperature does not change. We see these in weather maps.

Below we see a surface with level curves drawn beneath the surface. Remember that the level curves are in the domain of the function, not on the surface itself.

We often mark the function value on the corresponding level set. If we choose function values which have a constant difference, then level curves are close together when the function values are changing rapidly, and far apart when the function values are changing slowly.

Suppose you have a differentiable function $F:\R ^2\to \R$ with the following set of level curves. You should interpolate reasonable values of the function $F$ between the level curves which are shown: Consider the points $A$, $B$, and $C$ on the surface $z=F(x,y)$. Order the points from least steep to most steep.

At point $\answer [format=string]{C}$ the surface is less steep than at point $\answer [format=string]{A}$, and the surface is steepest at point $\answer [format=string]{B}$.

Now, let’s see if you can identify some simple surfaces based on their level curves.

Match the following level surfaces to the equations below.

Let’s look at another example.

Let’s see another example.

So far, the level sets we’ve been working with have been curves in $\R ^2$. We can easily generalize to functions $F:\R ^n \to \R$. When working with functions $F:\R ^3\to \R$, our level sets are also called level surfaces.

#### Level sets in higher dimensions

In higher dimensions, we want to try to use what we understand about functions of one and two variables to try to better understand functions of three or more variables.

• A function of one variable can be visualized as a curve drawn in two dimensions.
• A function of two variables can be visualized as a surface drawn in three dimensions.
• A function of three variables can be visualized as what we will call a hypersurface drawn in four dimensions.
• A function of $n$ variables can be visualized as what we will call a hypersurface drawn in $n+1$ dimensions.

We use the term “hypersurface” to refer to an object which is like a surface, but in more than three dimensions. Hypersurfaces are difficult to imagine, and can even be difficult to picture using modern computer utilities.

For a function $F: \R ^3 \to R$ of three variables, one technique we can use is to graph the level surfaces, our three-dimensional analogs of level curves in two dimensions. Given $w=F(x,y,z)$, the level surface at $w=c$ is the surface in space formed by all points $(x,y,z)$ where $F(x,y,z)=c$. It’s time for an example.

We have found that the level surfaces of $F$ in the above example are concentric spheres. If we picture several of these concentric spheres at the same time, we can get some intuition about the graph of $F$ in four dimensions in the same way that a collection of level curves in two dimensions gave us some intuition about the corresponding surface in three dimensions.

#### From explicit surfaces to level surfaces

We turn our attention to an important concept that will arise again in future sections.

Suppose that $F:\R ^2 \to \R$ is a function of two variables. Then, the surface $z = F(x,y)$ is a level surface of the function $G(x,y,z) = F(x,y) - z.$

In fact, if $F: \R ^n \to \R$ is a function of $n$ variables, we can also consider it to be a particular level set for some other function $G: \R ^{n+1} \to \R$ of $n+1$ variables. This idea is very powerful, as it allows us to consider the same function from two different perspectives. Having multiple perspectives gives us extra tools to use when considering our function, as well as allows us to look at the function in whatever manner we find most convenient. Let’s consider a specific example.

Again, it appears that all we did here was some easy algebra. We made a new function of one more variable by simply rearranging the original equation that defined our surface. But having multiple perspectives is always better than having only one. In addition to its other uses, the content of this procedure is vital for

• finding normal vectors for explicitly defined surfaces.
• finding tangent planes for explicitly defined surfaces.

These results will be explored further in later sections. It’s good to become familiar with these ideas now, so that we can make expert use of them later.