Scalar Fields, Graphs, and Level Sets
Part II studied functions whose input was one parameter and whose output was a point or vector. We now reverse that arrangement:
A scalar field takes a point with several coordinates and returns one number.
10.1Scalar Fields
So far in this course we have been studying parametric curves.
These are functions which have a single input (the parameter) and multiple outputs (perhaps
In physics, functions with multiple inputs are often called fields. So yet another name for this class of things is a scalar field! We will use scalar field as our default term, while remembering that multivariable function and scalar-valued function describe the same objects.
Definition 10.1 (Scalar Field). A scalar field is a function
which takes in an
Such a function is written
The domain of a scalar field is the set of inputs for which the function makes sense.
Example 10.2. The domain of
Our goal in this chapter is to get comfortable with scalar fields from two different perspectives: drawing graphs and drawing level sets.
Scalar fields show up everywhere in mathematics and the sciences. Consider the temperature in a room: this is a function that takes in a point (say, with three coordinates
If we wanted to track the temperature over time, this could be done with a function
Of course - temperature is just an arbitrary (but conceptually useful!) example. Any quantity you can measure at different points in space(time) gives a scalar function of 3 or 4 variables!
Exercise 10.3. Come up with some examples of scalar functions that you think about in daily life (without necessarily having ever thought about them mathematically!)
10.2Graphs and Slices
The graph of a 1-variable function
Definition 10.4 (Graph of a Scalar Field). The graph of a function
This isn't that useful for visualizing unless dimensions are pretty small! If there are
If
Drawing a 3D graph is difficult to do in general: but often we can use our knowledge of 2D graphs to try and build up an understanding by slicing. The idea is to take a function
Example 10.5 (Slicing $z=x^2+y^2$). Slices of this function are parabolas in both the
There are a couple multivariable functions whose graphs are good to know. Indeed - we've already met some of these before! If
This is a plane! (It might help to rewrite as
What about
Another useful function to know is the saddle surface
Vertical slices fix
10.3Level Sets and Contour Plots
Above we looked at one means of drawing a graph by slicing: we attempted to slice it by vertical planes into the graphs of simpler 1-dimensional functions that we already knew! This works sometimes, but if you can't quickly stack the slices into a coherent image in your mind, knowing the slices won't help you with much else.
So here, we seek other methods of understanding these functions, beyond their graphs. By far the most useful way to depict multivariable functions is by instead slicing with horizontal planes and drawing their level sets.
Definition 10.6 (Level Set). For a scalar field
For a function of two variables, a level set is commonly a curve in the plane; for a function of three variables, it is commonly a surface in space. A level set can also be empty, consist of isolated points, or have a singularity.
I often think about "sea level" when I think of a level set - a coastline is the level set
A contour plot is a drawing of the domain of a function, with level sets representing various values of the range. These are perhaps most familiar from elevation maps. Drawing multiple level sets at once gives a good sense of the behavior of the entire function, though it is most effective when the individual level sets are labeled somehow (often by color) so you can get a sense of their relative values.
A single level set of a function is actually something that you've encountered in previous courses: we called it an implicit equation as it defines a shape implicitly by saying
The relationship between the graph and its level sets is particularly direct:
intersect the graph
After looking at several functions and their level sets, you'll start to notice that there are a couple "important behaviors" that show up again and again. These are
Concentric rings around a point
Nearly parallel lines
A level curve crossing itself
These signify three important types of behavior, which we can see by looking back to our useful graphs to know.
Concentric rings around a point often signify the function has either a maximum or a minimum there.
Nearly parallel lines describe a regular region where the function is increasing or decreasing.
A level curve crossing itself commonly means that we are at a saddle shaped point on our graph - it increases in some directions and decreases in others.
These are useful common patterns, but they are not a complete classification of everything a level set can do.
Distinct level sets cannot cross: if a point belonged to both
Functions of three or more variables. Drawing a contour plot is a form of dimension reduction: we've managed to understand the behavior of a function
This technique can help us level up our intuition to functions of three variables: things like
Exercise 10.7. What do the level sets of the function
In three dimensions there are more types of basic behavior than the ones we saw in 2D. You don't need to learn all of them: but to try and get some intuition for the fourth dimension it is a good exercise to try and imagine what the graphs of these functions must be like from their level surfaces.
Three dimensional level sets describe implicit surfaces which are extremely useful objects. As we've already seen with curves, sometimes writing down a parameterization can be hard. And this is even more true for surfaces! So having another way to express complicated ones can be a huge help. Below are two examples where I have used implicit surfaces in mathematical rendering.

This next surface is called the Barth decic and arises in a field of mathematics called algebraic geometry. Let
be the golden ratio. The scale-

The graph of a scalar field may require one dimension too many to see, but its level sets remain in the input space. In the next chapter, we begin measuring how the field changes there by differentiating one input direction at a time.