A scalar-valued function of several variables assigns one number to each point in its domain. We can visualize this number as a height or examine the points where it has a fixed value. These viewpoints lead to graphs and level sets.
Thus \(\operatorname{graph}(f)\) is a subset of \(\R^{n+1}\text{.}\) For \(n=1\text{,}\) it is the familiar curve \(y=f(x)\text{.}\) For \(n=2\text{,}\) it is the surface \(z=f(x,y)\) in \(\R^3\text{.}\)
When \(n\ge 3\text{,}\) the graph lies in at least four dimensions and cannot be drawn directly in three-dimensional space. Level sets give a useful lower-dimensional picture that works in any dimension.
For a function on \(\R^2\text{,}\) a level set is also called a level curve or contour line. A collection of labeled contour lines is a contour map. For a function on \(\R^3\text{,}\) a level set is often called a level surface.
If \(f\colon A\subseteq\R^2\to\R\text{,}\) then the horizontal plane \(z=c\) intersects the graph \(z=f(x,y)\) above the contour \(f(x,y)=c\text{.}\) Projecting this intersection onto the \(xy\)-plane produces the contour line. Closely spaced contours indicate that the height changes rapidly, as on a topographic map.
The graph \(z=x^2+y^2\) is an upward-opening paraboloid. At level \(c\text{,}\) the equation is
\begin{equation*}
x^2+y^2=c.
\end{equation*}
The level set is empty when \(c\lt 0\text{,}\) is the single point \(\langle 0,0\rangle\) when \(c=0\text{,}\) and is a circle of radius \(\sqrt{c}\) when \(c\gt 0\text{.}\) The circular contours record the heights of horizontal slices through the paraboloid.
The level equation is \(x^2-y^2=c\text{.}\) For \(c\gt 0\text{,}\) it is a hyperbola opening left and right. For \(c\lt 0\text{,}\) it is a hyperbola opening up and down. At \(c=0\text{,}\) it becomes the two lines \(y=x\) and \(y=-x\text{.}\) The change in the contours reflects the saddle shape of the graph.
A graph is itself a level set of a function with one additional input variable. Indeed, let \(f\colon A\subseteq\R^n\to\R\) and define \(F\colon A\times\R\to\R\) by
The converse is not always true globally: a level set need not be the graph of a function in a chosen coordinate direction. For example, the level set \(x^2+y^2-1=0\) is the unit circle. It is not the graph of a single function \(y=f(x)\text{,}\) because most vertical lines meet it twice. It can, however, be split into the two graphs \(y=\sqrt{1-x^2}\) and \(y=-\sqrt{1-x^2}\text{.}\) This local graph viewpoint will return in the implicit function theorem.