01 / 20

Domains &
Level Sets

Explore how to determine where multivariable functions live and how to visualize them using level curves and level surfaces.

Multivariable Calculus

What Is a Multivariable Function?

A multivariable function takes two or more input variables and produces a single output. The most common form is \( f(x, y) \), which maps a point in \( \mathbb{R}^2 \) to a real number in \( \mathbb{R} \).

\( f \colon \mathbb{R}^2 \to \mathbb{R} \)
Two inputs \( (x, y) \), one output \( z = f(x, y) \)
\( g \colon \mathbb{R}^3 \to \mathbb{R} \)
Three inputs \( (x, y, z) \), one output \( w = g(x, y, z) \)

What Is the Domain?

The domain of \( f(x, y) \) is the set of all points \( (x, y) \) in \( \mathbb{R}^2 \) where the function is defined. We write it as a subset of \( \mathbb{R}^2 \).

Just as in single-variable calculus, we look for division by zero, square roots of negatives, and logarithms of non-positive numbers to find restrictions.

Visualizing Domains in \( \mathbb{R}^2 \)

\(x\)
\(y\)
\( x^2 + y^2 \leq 9 \)
Domain is a closed disk of radius 3
\( r = 3 \)

What Are Level Sets?

A level set of \( f \) at height \( c \) is the collection of all input points where the function equals \( c \). For \( f \colon \mathbb{R}^2 \to \mathbb{R} \), these are level curves. For \( f \colon \mathbb{R}^3 \to \mathbb{R} \), they are level surfaces.

Level Curve
Set \( f(x,y) = c \): a curve in \( \mathbb{R}^2 \)
Level Surface
Set \( g(x,y,z) = c \): a surface in \( \mathbb{R}^3 \)

Level Curves as a Contour Map

\(x\)
\(y\)
\( c = 1 \)
\( c = 4 \)
\( c = 9 \)
\( c = 16 \)
Level curves of \( f(x, y) = x^2 + y^2 \)

Core Definitions

1
Domain: \( \text{dom}(f) = \{ (x,y) \in \mathbb{R}^2 \mid f(x,y) \text{ is defined} \} \). This is a region in the input space.
2
Range: \( \text{range}(f) = \{ c \in \mathbb{R} \mid c = f(x,y) \text{ for some } (x,y) \in \text{dom}(f) \} \). This determines which level sets exist.
3
Level set at \( c \): \( L_c = \{ (x,y) \in \text{dom}(f) \mid f(x,y) = c \} \). Empty if \( c \notin \text{range}(f) \).

Level Curves vs. Level Surfaces

Level Curve Level Surface
Function type \( f \colon \mathbb{R}^2 \to \mathbb{R} \) \( g \colon \mathbb{R}^3 \to \mathbb{R} \)
Equation \( f(x,y) = c \) \( g(x,y,z) = c \)
Lives in \( \mathbb{R}^2 \) (the \( xy \)-plane) \( \mathbb{R}^3 \) (3D space)
Dimension 1D (curve) 2D (surface)
Analogy Contour line on a map Equipotential surface

How to Find the Domain

1
Start with all of \( \mathbb{R}^2 \). Assume every point is allowed until a restriction says otherwise.
2
Remove division by zero. If the formula has \( \frac{1}{g(x,y)} \), exclude points where \( g(x,y) = 0 \).
3
Restrict square roots. For \( \sqrt{h(x,y)} \), require \( h(x,y) \geq 0 \).
4
Restrict logarithms. For \( \ln(h(x,y)) \), require \( h(x,y) > 0 \).
5
Intersect all restrictions. The domain is the set of \( (x,y) \) satisfying every constraint simultaneously.

Example 1: \( f(x,y) = \ln(x - y^2) \)

\(x\)
\(y\)
\( x = y^2 \)
Domain
Region where \( x > y^2 \)

Example 2: Level Curves of \( f(x,y) = x^2 - y^2 \)

\(x\)
\(y\)
\( c = 1 \)
\( c = 0 \)
\( c = -1 \)

Example 3: \( f(x,y) = \dfrac{1}{x^2 + y^2 - 4} \)

\(x\)
\(y\)
\( x^2 + y^2 = 4 \)
Domain
All of \( \mathbb{R}^2 \) except the circle of radius 2

Level Sets Can Be Surprising

A single point
\( f(x,y) = x^2 + y^2 \), \( c = 0 \): the level set is just the origin \( (0,0) \).
The empty set
\( f(x,y) = x^2 + y^2 \), \( c = -1 \): no solution exists, so \( L_{-1} = \emptyset \).
A pair of lines
\( f(x,y) = x^2 - y^2 \), \( c = 0 \): the level set is \( y = x \) and \( y = -x \).

Open vs. Closed Domains

Open Domain Closed Domain
Boundary Excluded Included
Inequality Strict: < or > Non-strict: \( \leq \) or \( \geq \)
Typical source \( \ln(\cdot) \), \( \frac{1}{\cdot} \) \( \sqrt{\cdot} \)
Example \( \ln(1 - x^2 - y^2) \): open disk \( \sqrt{1 - x^2 - y^2} \): closed disk
Drawn as Dashed boundary Solid boundary

Common Mistakes

✕ Forgetting strict vs. non-strict
Writing \( \geq 0 \) for \( \ln \) when it requires strictly \( > 0 \). Logarithm is undefined at zero.
✕ Ignoring the range
Trying to sketch a level curve at \( c = -5 \) for \( f(x,y) = x^2 + y^2 \) when the range is \( [0, \infty) \).
✕ Confusing graph with level set
The graph of \( f(x,y) \) lives in \( \mathbb{R}^3 \). A level curve lives in \( \mathbb{R}^2 \). They are not the same.

Question 1 of 5

What is the domain of \( f(x,y) = \sqrt{4 - x^2 - y^2} \)?

Question 2 of 5

The level curves of \( f(x,y) = x^2 + y^2 \) are:

Question 3 of 5

What is the domain of \( g(x,y) = \ln(x - 2y) \)?

Question 4 of 5

For \( f(x,y) = x^2 + y^2 \), the level set \( L_{-3} \) is:

Question 5 of 5

The level surface \( x^2 + y^2 + z^2 = 9 \) of \( g(x,y,z) = x^2 + y^2 + z^2 \) is: