Level Sets Math Insight

Graphing Functions

One way to visualize functions is through their graphs. If f(x,y) is a scalar-valued function of two variables, f:R2→R (confused? See note 1 at the end of the document), then its graph is the surface2 formed by the set of all the points (x,y,z) where z=f(x,y), i.e., the set of points (x,y,f(x,y)). By graphing this surface, we can visualize the behavior of the function.

As an example, we graph the function f(x,y)=−x2−2y2 using the domain defined by −2≤x≤2 and −2≤y≤2. The graph of all points (x,y,f(x,y)) with (x,y) in this domain is an elliptic paraboloid3, as shown in the following figure.

Graph of elliptic paraboloid. A graph of the function f(x,y)=−x2−y2 over the domain −2≤x≤2 and −2≤y≤2.

Three-dimensional plots, such as the above figure, are more difficult to draw and visualize than two-dimensional plots. Moreover, the graph of a function f(x,y,z) of three variables would be the set of points (x,y,z,f(x,y,z)) in four dimensions, and it would be difficult to imagine what such a graph would look like. Another way of visualizing a function is through level sets, i.e., the set of points in the domain of a function where the function is constant. The nice part of of level

Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 1 of 7 sets is that they live in the same dimensions as the domain of the function. A level set of a function of two variables f(x,y) is a in the two-dimensional xy- plane, called a level curve. A level set of a function of three variables f(x,y,z) is a surface in three-dimensional space, called a level surface.

Level

One way to collapse the graph of a scalar-valued function of two variables into a two-dimensional plot is through level curves. A level curve of a function f(x,y) is the curve of points (x,y) where f(x,y) is some constant value. A level curve is simply a cross section4 of the graph of z=f(x,y) taken at a constant value, say z=c. A function has many level curves, as one obtains a different level curve for each value of c in the range of f(x,y). We can plot the level curves for a bunch of different constants c together in a level curve plot, which is sometimes called a contour plot.

We return to the above example function f(x,y)=−x2−2y2. For some constant c, the level curve f(x,y)=c is the graph of c=−x2−2y2. As long as c<0, this graph is an ellipse, as one can rewrite the equation for the level curve as

(If c is negative, then both denominators are positive.) For example, if c=−1, the level curve is the graph of x2+2y2=1. In the level curve plot of f(x,y) shown below, the smallest ellipse in the center is when c=−1. Working outward, the level curves are for c=−2,−3,…,−10.

The below graph illustrates the relationship between the level curves and the graph of the function. The key point is that a level curve f(x,y)=c can be thought of as a horizontal slice of the graph at height z=c. This slice is the intersection of the graph with the plane z=c. Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 2 of 7

Level curves of an elliptic paraboloid shown with graph. The graph of the function f(x,y)=−x2−2y2 is shown along with a level curve plot hovering above the graph. The level curve f(x,y)=c is shown in red in the level curve plot, which is the same as the slice of the graph z=f(x,y) by the plane z=c.

Topographic maps are simply level curves of the elevation of the land (or water). For instance, on standard United States Geological Survey maps, each represents 10 feet of elevation above sea level, as in this topographic map of Eagle Mountain5, the highest mountain (well... hill) in Minnesota. The closer the contour lines are together, the steeper the slope of the land. Not surprisingly, the steepest slopes seem to be very near the summits of Eagle Mountain and Moose Mountain.

Level surfaces

For a scalar-valued functions of three variables, f:R3→R, we would need four dimensions to draw its graph. The graph is the set of points (x,y,z,f(x,y,z)). You should familiarize yourself with vectors in higher dimensions6 to become comfortable with the idea of four dimensions. However, unless your mind is better at abstract visualization than most, you may have a hard time visualizing what this graph in four dimensions would look like.

Instead, we can look at the level sets where the function is constant. For a function of two variables, above, we saw that a level set was a curve in two dimensions that we called a level curve. For a function of three variables, a level Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 3 of 7 set is a surface in three-dimensional space that we will call a level surface. For a constant value c in the range of f(x,y,z), the level surface of f is the implicit surface7 given by the graph of c=f(x,y,z).

The below version of the level curve applet will help you see that level curves and level surfaces are similar concepts, as this verion is put in the format that we will use for level surfaces. In this case, only one level curve f(x,y)=c is displayed at a time.

A level curve of an elliptic paraboloid. A level curve of the function f(x,y)=−x2−2y2=c is shown. The level curves are not restricted to the domain −2≤x≤2, −2≤y≤2, so an entire ellipse is visible for each value of c.

Now, we look at the function f(x,y,z)=10e−9x2−4y2−z2. Even though we can't plot the graph of f(x,y,z) (without using four dimensions), we can still visualize the behavior of the function by plotting its level surfaces. We simply plot f(x,y,z)=c for cbetween 0 and 10. (Note that f(x,y,z) always lies between 0 and 10. The argument of the exponential is always negative or zero, so the value of the exponential is always between zero and one.) The behavior of these level surfaces is illustrated in the following image.

Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 4 of 7

Level surface of a function of three variables. A level surface f(x,y,z)=10e−9x2−4y2−z2=c is shown.

The significance of the level surfaces may become clearer if you think of f(x,y,z) as giving the temperature at the point (x,y,z). Then, the level surface f(x,y,z)=2 is the surface of points where the temperature is 2. In this example, the temperature at the origin is 10 and every other point has a lower temperature. Hence, the level surface f(x,y,z)=c shrinks to a point around the origin as c increases to 10.

As one moves away from the origin, the temperature decreases. The temperature decreases toward zero as you get far from the origin. The level surface f(x,y,z)=0 doesn't exist because f(x,y,z) never reaches zero. But, if c is a small positive number, the level surface f(x,y,z)=c is a large ellipsoid8. (The applet won't let c get all the way down to 0; the lowest c goes is about 0.00001.) You can look at a couple more examples9.

Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 5 of 7 Notes and Links:

1. Function notation

Recall the notation that R stands for the real numbers. Similarly, R2 is a two- dimensional vector, and R3 is a three-dimensional vector.

Scalar-valued functions In one-variable calculus, you worked a lot with one-variable functions, i.e., functions from R onto R. If f(x) is such a one-variable functions, we can write f:R→R as a shorthand way of expressing that f is a function from R onto R. A function like f(x,y)=x+y is a function of two variables. It takes an element of R2, like (2,1), and gives a value that is a (i.e., an element of R), like f(2,1)=3. Since f maps R2 to R, we write f:R2→R. We can also use this “mapping” notation to define the actual function. We could define the above f(x,y) by writing f:(x,y)↦x+y. To contrast a simple real number with a vector, we refer to the real number as a scalar. Hence, we can refer to f:R2→R as a scalar-valued function of two variables or even just say it is a real-valued function of two variables. Everything works the same for scalar valued functions of three or more variables. For example, f(x,y,z), which we can write f:R3→R, is a scalar-valued function of three variables.

Vector-valued functions In contrast, a vector-valued function takes on values that are vectors. First, let's talk about vector-valued functions of a single variable. A vector-valued function in two dimensions can be written f:R→R2. An example is f(t)=(3t,−t). For a given real number, which we'll denote by ♣ for fun, f(♣) is the two-dimensional vector (3♣,−♣). Similarly, a vector-valued function in three dimensions can be written f:R→R3. For example, if f(s)=(1−s,s3,coss), then f(0)=(1,0,1). We sometimes write vector-valued functions using the standard unit vector i, j, and k, as in f(s)=(1−s)i+s3j+(coss)k. Lastly, we can have vector-valued functions of multiple variables. For example, a function could take values in R3, say (x,y,z), and map them to R2, such as f(x,y,z)=(x−y,x22/z). We can write a function from R3 to R2 as f:R3→R2. You get the idea.

The domain of a function The function f(t)=(t,t2) is defined over all real numbers R, i.e., the domain of the function is R. Sometimes a function of one variable may be defined over a subset of real numbers, say some set U⊂R; in this case, the domain of the function is U. (Note, the symbol “⊂” just means “is subset of”.) In three dimensions, for example, we can specify the domain by writing f:U⊂R→R3, or simply f:U→R3.

Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 6 of 7 Example: since logt isn't a real number for t≤0, the domain of f(t)=(logt)i+tj, is the set D=(0,∞). We could write this f:(0,∞)→R2. What would the domain be if we replaced logt with log(t−3) or log(2−t)? You have to think where log(t−3) or log(2−t) is a real number, i.e., where t−3>0 or where 2−t>0. We use the same notation for functions of multiple variables. If we wrote f:U⊂R2→R3, we would mean a function maps values in a subset U of R2 to values in R3.

2. http://mathinsight.org/surface_graph_function

3. http://mathinsight.org/elliptic_paraboloid

4. http://mathinsight.org/surface_cross_sections

5. http://www.dnr.state.mn.us/maps/tomo.html?mode=recenter&size=3&layer=24k&col=513&row=2 43

6. http://mathinsight.org/n_dimensional_vector_examples

7. http://mathinsight.org/surface_defined_implicitly

8. http://mathinsight.org/ellipsoid

9. http://mathinsight.org/level_set_examples

Source URL: http://mathinsight.org/level_sets Saylor URL: http://www.saylor.org/courses/ma103/

Attributed to: [Duane Q. Nykamp] www.saylor.org Page 7 of 7