# Level Curves and Contour Plots

As we've already seen, it is often times very difficult to graph surfaces in $\mathbb{R}^3$ on a flat surface. However, we will develop a method of depicting a surface given by a two variable real-valued function $z = f(x, y)$.

Definition: Let $z = f(x, y)$ be a two variable real-valued function. Then the curves obtained by the intersections of the planes $z = k$, $k \in \mathbb{R}$ with the graph of $f$ are called the Level Curves of $f$. |

From the definition of a level curve above, we see that a level curve is simply a curve of intersection between any plane parallel to the $xy$-axis and the surface generated by the function $z = f(x, y)$.

For example, consider the two variable real-valued function $f(x, y) = x^2 + y^2$, which represents a paraboloid that is parallel to the $z$-axis, and consider the level curves generated by the intersection of this paraboloid with the planes $z = 1$, $z = 2$, and $z = 3$. These level curves will be concentric circles with center $(0, 0)$. The image below depicts the level curve of this paraboloid corresponding to $z = 2$.

Another example is the two variable real-valued function $f(x, y) = x^2 - y^2$ which represents a hyperboloid. The level curves generated by the planes $z = 1$, $z = 2$, and $z = 3$ are hyperbolas. The image below depicts the level curve of this hyperboloid corresponding to $z = 1$.

We will now look at another definition is applying these level curves.

Definition: Let $z = f(x, y)$ be a two variable real-valued function. Then the projection of the set of level curves of $f$ onto the $xy$-plane is called the Contour Plot or Contour Map of $f$. |

When we depict a contour plot of a two variable function, it is important to note that it is impossibly to place all the level curves of $z = f(x, y)$ onto the $xy$-plane, and so we often choose specific level curves. For example, consider the paraboloid $f(x, y) = x^2 + y^2$ once again. We saw above that the level curves for $f$ were concentric circles. The following image represents a few planes that are parallel to the $xy$-plane intersecting this paraboloid.

If we project all of these level curves onto the $xy$-plane, then we would obtain the following contour plot for $f(x, y) = x^2 + y^2$.

For a two variable real-valued function, a contour plot can tell us regions of elevation and regions of depression. For example, from above, we can see that as $x$ increases, we scale up the paraboloid. The same happens for when $y$ increases. However, when both $x$ and $y$ approach $0$, we get closer and closer to the part of the paraboloid that is at its "deepest".

## Example 1

**Describe the shape of the surface given by the following contour plot:**

We first note that the elevation increases as we go along the $x$-axis in both directions, and that the elevation decreases as we go along the $y$-axis in both directions. We also note that the level curves of this contour plot are hyperbolas. We deduce that this is a contour plot of a hyperboloid.

## Example 2

**Construct a contour plot for the surface generated by the two variable real-valued function $f(x,y) = x + 2y$.**

We first note that $f$ represents a slanted plane. Let's now determine what the level curves of $f$ look like. First let $z = 0$. Then we get the equation $0 = x + 2y$, or rather $y = -\frac{x}{2}$, which represents a negative straight line. In fact, notice that the level curve corresponding to $z = k$, $k \in \mathbb{R}$ is $y = -\frac{x}{2} + \frac{k}{2}$ which represents a negative straight line. Thus, all of our level curves are straight lines. Notice that as $k$ increases, the $y$-intercept of the corresponding level curve also increases, and so we can even determine the relative elevation of the plane as depicted with the contour plot for $f$ shown below: