CALCULUS 3 • MULTIVARIABLE FUNCTIONS & PARTIAL DERIVATIVES

Multivariable Functions & Level Sets — Functions of Two and Three Variables; Domains and Level Sets

Extending the function concept beyond one variable to map domains in ℝ² and ℝ³ and visualize outputs through level curves and level surfaces.

Historical Context & Motivation

Single-variable calculus, as developed by Newton and Leibniz in the seventeenth century, provided powerful tools for analyzing quantities that depend on one independent variable. However, the physical world rarely cooperates with such simplicity: temperature depends on spatial position and time, atmospheric pressure depends on latitude, longitude, and altitude, and economic output depends on labor, capital, and technology simultaneously. The need to handle such dependencies drove mathematicians toward a rigorous theory of multivariable functions—functions whose inputs are ordered tuples of real numbers rather than single scalars.

1740s
Euler's Multivariable Analysis
Leonhard Euler systematically studied functions of several variables in his work on fluid mechanics and differential equations, laying groundwork for partial derivatives and surfaces defined by equations in multiple unknowns.
1760s
Lagrange and Optimization
Joseph-Louis Lagrange introduced techniques for optimizing functions subject to constraints, requiring a clear understanding of domains and level sets in higher dimensions. His method of multipliers relies on the geometry of level curves.
1820s
Gauss and Level Surfaces in Geodesy
Carl Friedrich Gauss used equipotential surfaces—level surfaces of the gravitational potential—in his geodetic surveys, demonstrating that level sets are not merely abstract constructs but essential tools for understanding physical fields.
1850s–1860s
Riemann and Higher-Dimensional Spaces
Bernhard Riemann formalized the idea of functions on n-dimensional manifolds. His geometric perspective unified the treatment of domains in ℝⁿ, making rigorous the intuitive notions of regions, boundaries, and open sets.
1900s–Present
Modern Multivariable Calculus
Twentieth-century analysts placed multivariable calculus on a firm topological foundation. Level sets now appear in computer graphics (isosurfaces), machine learning (decision boundaries), and physics (equipotential surfaces) as indispensable visualization and analysis tools.

The central question this lesson addresses is deceptively simple: What does it mean for a function to accept two or three inputs, what is its natural domain, and how can we visualize its output without requiring four-dimensional graphs? The answer lies in the elegant concept of level sets—slices of the output at constant values that reduce the visualization problem by one dimension.

Core Principles & Definitions

Before diving into computations, we establish the foundational vocabulary and ideas that govern multivariable functions. These principles generalize familiar single-variable concepts—domain, range, and graph—to higher dimensions, while introducing the new idea of level sets as a dimensionally reduced portrait of a function's behavior.

1

Function of Two Variables

A rule f: D → ℝ that assigns to each ordered pair (x, y) in a domain D ⊆ ℝ² exactly one real number z = f(x, y). The graph is a surface in ℝ³.
2

Function of Three Variables

A rule f: D → ℝ with D ⊆ ℝ³ that assigns to each ordered triple (x, y, z) a real number w = f(x, y, z). The graph would live in ℝ⁴, which we cannot visualize directly.
3

Natural Domain

The largest subset of ℝ² (or ℝ³) on which the function's rule produces a well-defined real output. Restrictions arise from division by zero, even roots of negatives, logarithms of non-positives, and similar algebraic constraints.
4

Level Curves (Contour Lines)

For z = f(x, y), the set of all (x, y) satisfying f(x, y) = c for a constant c is a level curve. Collected for multiple values of c, these form a contour map.
5

Level Surfaces

For w = f(x, y, z), the set of all (x, y, z) satisfying f(x, y, z) = c is a level surface in ℝ³. Since the graph lives in ℝ⁴, level surfaces are the primary visualization tool for functions of three variables.
✦ KEY TAKEAWAY
Think of level curves like the contour lines on a topographic map. Each line connects all points at the same elevation. You cannot see the mountain from a flat paper map, but the contour lines encode its shape completely: closely spaced lines mean steep slopes, widely spaced lines mean gentle terrain. A level curve does the same for any function z = f(x, y)—it projects the surface down into the xy-plane, trading a lost dimension for a family of informative curves. For functions of three variables, the same idea produces level surfaces rather than level curves, since we have one more input dimension to work with.

Visual Explanation — Level Curves of f(x, y) = x² + y²

The most illuminating way to grasp level sets is to start with a concrete example. Consider the paraboloid z = x² + y². Its graph in three-dimensional space is a bowl opening upward with vertex at the origin. To form a contour map, we slice this surface with horizontal planes z = c for several non-negative constants c and project each resulting circle down onto the xy-plane. The diagram below shows the result: a family of concentric circles centered at the origin, where the radius of each circle is √c.

The concentric circles represent level curves f(x, y) = c for c = 1, 4, 9, 16, 25. Notice that the circles are closer together near the origin and spread apart as c increases, reflecting the fact that the paraboloid's slope is steeper near the vertex. The radius of each level curve equals √c, confirming that equal increments in c produce decreasing increments in radius—a hallmark of the quadratic growth z = x² + y².

Several features of this contour map generalize to all functions of two variables. First, level curves for different values of c never intersect, because a single point (x, y) cannot produce two different output values simultaneously (the function must be well-defined). Second, the spacing between adjacent level curves encodes the rate of change of the function: closely packed contours mean the function changes rapidly, while widely spaced contours indicate gradual change. These observations connect directly to the gradient vector, which points perpendicular to the level curve in the direction of steepest ascent—a topic explored in subsequent lessons on partial derivatives.

Mathematical Framework

We now formalize the definitions introduced qualitatively in Section 2 and develop the algebraic machinery for determining domains and level sets.

FUNCTION OF TWO VARIABLES
f : D ⊆ ℝ² → ℝ, z = f(x, y)
D is the domain, a subset of ℝ². The output z is a scalar. The range is the set of all attainable values { f(x, y) : (x, y) ∈ D }.
FUNCTION OF THREE VARIABLES
f : D ⊆ ℝ³ → ℝ, w = f(x, y, z)
D is now a region in three-dimensional space. The output w is again a scalar. The graph would require four coordinates (x, y, z, w), so we rely on level surfaces for visualization.
LEVEL CURVE DEFINITION
L_c = { (x, y) ∈ D : f(x, y) = c }
For a fixed constant c in the range of f, Lc is the set of all domain points at which f equals c. This is a curve (or union of curves) in ℝ².
LEVEL SURFACE DEFINITION
S_c = { (x, y, z) ∈ D : f(x, y, z) = c }
For w = f(x, y, z), fixing w = c yields a surface (or union of surfaces) in ℝ³. Common examples include spheres (for f = x² + y² + z²) and planes (for linear f).

Determining the Natural Domain

Finding the natural domain requires identifying all algebraic restrictions that prevent the formula from producing a real number. The most common restrictions are as follows: (1) division by zero—any expression in the denominator must be nonzero; (2) even roots of negative numbers—the radicand of a square root (or fourth root, etc.) must be non-negative; (3) logarithms of non-positive numbers—the argument of ln must be strictly positive. When multiple restrictions apply simultaneously, the domain is the intersection of the individual admissible regions. Geometrically, one should describe the domain as a region in ℝ² or ℝ³ using inequalities, and, when feasible, sketch it.

📋 Domain Checklist
For any formula defining f(x, y) or f(x, y, z), systematically check: (1) Is there a denominator? Set it ≠ 0. (2) Is there an even root? Set the radicand ≥ 0. (3) Is there a logarithm? Set the argument > 0. (4) Is there an arcsine or arccosine? Restrict the argument to [−1, 1]. Intersect all resulting conditions to obtain the domain.

Detailed Breakdown — Domains and Level Set Sketching

To solidify understanding, we examine several representative functions, determine their domains, and classify their level sets. The diagram below illustrates the domain of a function with both a square root and a denominator restriction, and then we present a classification table relating common function forms to their level curve families.

The domain of f(x, y) = √(9 − x² − y²) / (x − 1) is the closed disk of radius 3 centered at the origin (from the square root condition x² + y² ≤ 9), with the vertical line x = 1 removed (from the denominator condition x ≠ 1). Notice that the boundary circle is included (solid boundary), but the line is excluded (dashed).
Common two-variable functions, their domains, and level curve families
Function FormNatural DomainLevel Curves (c = const)
f(x, y) = x² + y²All of ℝ² (no restrictions)Circles centered at origin, radius √c, for c > 0; point at origin for c = 0
f(x, y) = x² − y²All of ℝ²Hyperbolas with axes along x and y; two lines y = ±x when c = 0
f(x, y) = ln(x² + y² − 1)x² + y² > 1 (exterior of unit circle)Circles of radius √(eᶜ + 1) centered at origin, for all c ∈ ℝ
f(x, y) = √(x − y)x ≥ y (half-plane above line y = x)Parallel lines y = x − c² for c ≥ 0
f(x, y) = eˣ sin(y)All of ℝ²Curves defined by sin(y) = c·e⁻ˣ; family shifts with c

Worked Example — Domain and Level Curves

We work through a complete example that combines domain analysis with level curve identification. Consider the function:

GIVEN FUNCTION
f(x, y) = ln(y − x²)
We seek the natural domain in ℝ² and the family of level curves f(x, y) = c for arbitrary constants c.
Find the domain and sketch the level curves of f(x, y) = ln(y − x²)
1
Step 1 — Identify RestrictionsThe natural logarithm ln(u) is defined only when u > 0. Here the argument is y − x², so we require y − x² > 0, which rearranges to y > x². There are no other restrictions (no denominators, no even roots).
Domain: D = { (x, y) ∈ ℝ² : y > x² }
2
Step 2 — Describe the Domain GeometricallyThe inequality y > x² defines the open region strictly above the parabola y = x². This is an unbounded region that extends upward to infinity. The boundary parabola itself is not included because the strict inequality prohibits y = x² (which would make the argument of ln equal to zero).
D is the open region above the parabola y = x², boundary excluded.
3
Step 3 — Set Up the Level Curve EquationFor a constant c, set f(x, y) = c, which gives ln(y − x²) = c. Exponentiating both sides yields y − x² = eᶜ, so the level curve equation is y = x² + eᶜ.
Level curve: y = x² + eᶜ for each c ∈ ℝ
4
Step 4 — Interpret the Level CurvesEach level curve is a parabola of the form y = x² + k where k = eᶜ > 0. As c increases, k = eᶜ grows, shifting the parabola upward. As c → −∞, k → 0⁺, and the level curve approaches the boundary parabola y = x² from above. The entire family consists of upward-opening parabolas, vertically translated copies of y = x², all lying strictly within the domain.
The level curves form a family of parabolas y = x² + eᶜ, each shifted vertically by eᶜ units above y = x².
5
Step 5 — Determine the RangeSince y − x² can be any positive real number for points in D, and ln maps (0, ∞) onto (−∞, ∞), the range of f is all of ℝ. Every real number c is achieved as a function value, confirming that a level curve exists for every c.
Range of f = (−∞, ∞) = ℝ

Level Curves vs. Level Surfaces — Strengths & Limitations

Both level curves and level surfaces serve the same fundamental purpose—reducing the dimensionality of a visualization problem by fixing the output—but they operate in different settings and come with distinct trade-offs. The table below highlights key comparisons that help clarify when and why each tool is most effective.

Comparison of level curves and level surfaces
FeatureLevel Curves (2 Variables)Level Surfaces (3 Variables)
Input dimension(x, y) ∈ ℝ²(x, y, z) ∈ ℝ³
Output dimensionz = f(x, y) ∈ ℝw = f(x, y, z) ∈ ℝ
Graph dimensionSurface in ℝ³ (viewable)Hypersurface in ℝ⁴ (not viewable)
Level set dimension1D curves in ℝ² (easy to draw on paper)2D surfaces in ℝ³ (requires 3D rendering)
Visualization easeHigh — flat contour maps are intuitiveModerate — 3D surfaces can be complex; cross-sections help
Real-world exampleTopographic maps, isotherms on weather mapsEquipotential surfaces in electrostatics, medical CT isosurfaces
Gradient relationship∇f ⊥ level curve at each point∇f ⊥ level surface at each point
✦ KEY TAKEAWAY
Level sets always live in the input space of the function, not in the output space. Their dimension is one less than the input dimension (curves in ℝ² for two-variable functions, surfaces in ℝ³ for three-variable functions). This "dimension drop" is precisely what makes them useful: by sacrificing one degree of freedom to fix the output value, we obtain an object we can visualize in the same space where the inputs live. This is analogous to how an MRI machine produces two-dimensional cross-sectional images of a three-dimensional brain—each slice fixes one spatial coordinate to reveal structure in the remaining two.

Connection to Gradients, Optimization, and Implicit Surfaces

The concepts of domain and level set are not endpoints—they serve as the foundation for nearly every subsequent topic in multivariable calculus. Understanding how level sets connect to the gradient, optimization, and implicit functions provides motivation for the rest of the course.

From level sets to advanced multivariable theory
This Lesson's ConceptAdvanced Extension
Level curves f(x, y) = cThe gradient ∇f is perpendicular to each level curve; the magnitude |∇f| measures how fast f changes between adjacent curves. This is the foundation of directional derivatives.
Level surfaces f(x, y, z) = c∇f at a point on a level surface gives the normal vector to the tangent plane, enabling the equation of tangent planes and normal lines to implicitly defined surfaces.
Domain D ⊆ ℝ²Whether D is open, closed, bounded, or connected determines the applicability of the Extreme Value Theorem (continuous f on a closed bounded D attains its max and min).
Contour spacing encodes steepnessLagrange multipliers exploit the tangency between level curves of f and the constraint g(x, y) = k to locate constrained extrema.
Level set as implicit relationThe Implicit Function Theorem guarantees that, under mild conditions (non-vanishing partial derivative), a level set locally defines one variable as a function of the others.

In subsequent lessons, you will see that the gradient vector ∇f at a point (a, b) is perpendicular to the level curve f(x, y) = f(a, b) passing through that point. This remarkable geometric fact transforms level curves from a passive visualization tool into an active computational framework: the gradient tells you the direction of steepest ascent, and level curves tell you the directions along which f does not change at all. The interplay between these two perspectives is at the heart of optimization theory, fluid dynamics (streamlines vs. equipotentials), and differential geometry.

Practice Problems

PROBLEM 1 — CONCEPTUAL
Explain why two distinct level curves of a function f(x, y) can never intersect. What fundamental property of functions does this reflect?
PROBLEM 2 — BASIC CALCULATION
Find and describe the natural domain of g(x, y) = √(4 − x²) / (y − 2). Sketch or describe the region in the xy-plane.
PROBLEM 3 — INTERMEDIATE
For the function f(x, y) = x² − 4y², determine the level curves for c = −4, 0, and 4. Classify each level curve geometrically and identify which quadrants they pass through.
PROBLEM 4 — APPLIED
The temperature at a point (x, y) on a metal plate is modeled by T(x, y) = 100 − x² − 2y² (in °C). Determine the domain of physically meaningful temperatures (T ≥ 0), describe the isotherms (level curves) for T = 0, 50, and 100, and explain what the spacing of isotherms tells a thermal engineer about heat flow.
PROBLEM 5 — CRITICAL THINKING
Let f(x, y, z) = x² + y² − z². Describe the level surfaces f = c for c > 0, c = 0, and c < 0, identifying each surface by name. Then prove that no level surface is bounded (i.e., each one extends to infinity). Hint: consider what happens as you move along coordinate axes.

Summary — Multivariable Functions & Level Sets

A function of two variables maps each point (x, y) in a domain D ⊆ ℝ² to a scalar z = f(x, y), producing a surface in ℝ³, while a function of three variables maps (x, y, z) ∈ D ⊆ ℝ³ to a scalar w = f(x, y, z), producing an unvisualizable graph in ℝ⁴. The natural domain is found by identifying all algebraic restrictions—division by zero, even roots of negatives, logarithms of non-positives—and intersecting the resulting conditions. Domains should be described both algebraically (inequalities) and geometrically (sketched regions).

Level curves (for two-variable functions) and level surfaces (for three-variable functions) are the sets of input points where the function takes a constant value c. They reduce the visualization problem by one dimension and encode critical information about the function's rate of change: closely spaced level sets indicate rapid change, while widely spaced ones indicate gradual change. Level sets for distinct output values never intersect (by the definition of a function), and the gradient vector is always perpendicular to the level set—a fact that bridges this introductory material to partial derivatives, directional derivatives, and Lagrange multipliers in subsequent lessons.

Varsity Tutors • Calculus 3 • Multivariable Functions & Level Sets