Skip to main content

Multivariable Calculus

Single-variable calculus lives on a line: one input, one output, one direction to move. But the real world rarely cooperates with that simplicity. Temperature depends on where you stand and how high you climb. The profit of a business depends on price, cost, and volume all at once. The gravitational pull on a spacecraft depends on three spatial coordinates simultaneously. Multivariable calculus is the mathematics of functions with several inputs — and its central surprise is that adding even one extra input doesn't just make things harder, it changes the rules. When you have more than one direction to approach a point from, questions like "what is the limit here?" suddenly have infinitely many possible answers, and you have to be much more careful about what you mean.

This page builds the foundations: what a function of several variables actually is, how we visualize it with level curves and surfaces, and why limits in higher dimensions are subtle enough to trip up even strong students. Get these ideas right, and the rest of the subject — partial derivatives, gradients, multiple integrals — becomes a natural extension rather than a wall of new symbols.

Learning Objectives

  • Define a function of two or more variables and identify its domain, range, and graph.
  • Visualize surfaces using level curves (contour maps) and level surfaces.
  • Understand why a limit in higher dimensions requires the same value along every path of approach.
  • Test whether a multivariable limit exists using path-based reasoning.
  • Explain how the leap from one input to many changes continuity and geometric intuition.
  • Connect these ideas to their origins in describing physical fields and surfaces.

Quick Answer

A function of several variables assigns one output to each combination of inputs, e.g. z=f(x,y) z = f(x, y) takes a point in the plane and returns a height, tracing out a surface in 3D space. We visualize such functions with level curves (slices where ff equals a constant, like elevation lines on a hiking map) and level surfaces for functions of three variables. A limit lim(x,y)(a,b)f(x,y)=L\lim_{(x,y) \to (a,b)} f(x,y) = L exists only if ff approaches LL along every possible path to (a,b)(a,b), not just straight lines. This is the key difference from one dimension: with a single variable there are only two directions (left and right), but with two or more there are infinitely many, so a limit can fail even when every straight-line approach agrees. Continuity, derivatives, and integrals all rest on this more demanding notion of "approaching a point."

Where It Came From

Multivariable calculus was not invented for its own sake — it was forced into existence by physics. In the 1700s and 1800s, scientists needed to describe quantities that vary continuously through space: the temperature at every point in a heated metal plate, the velocity of every particle in a flowing fluid, the strength and direction of gravitational and electric pull at every point around a mass or charge. These are fields, and a field is precisely a function of several variables — you feed in a location and get back a number (or a vector).

The pioneers were the great mathematical physicists. Leonhard Euler (1707–1783) and Joseph-Louis Lagrange (1736–1813) developed partial differentiation to handle the mechanics of continuous bodies and vibrating strings. Pierre-Simon Laplace (1749–1827), studying gravitation and later potential theory, gave his name to the equation 2f=0\nabla^2 f = 0 that governs steady-state fields — an equation that only makes sense for a function of several variables. Joseph Fourier (1768–1830), attacking the problem of how heat spreads through a solid, wrote down the heat equation, relating how temperature changes in time to how it curves in space. And James Clerk Maxwell (1831–1879) unified electricity and magnetism into four equations expressed entirely in the language of multivariable and vector calculus.

The through-line is clear: the moment you try to describe the world as a whole rather than a single moving point, you need functions of several variables, and you need a calculus that can differentiate and integrate them. The abstract theory — precise definitions of limits and continuity in higher dimensions — came afterward, in the late 1800s, as mathematicians like Weierstrass and others made rigorous the tools that physicists had been using successfully by intuition. Understanding this order helps: the concepts exist to answer real questions about surfaces and fields, and the formalism is there to keep us honest.

Functions of Several Variables: The Basic Object

A function of two variables, written z=f(x,y) z = f(x, y), takes an ordered pair (x,y)(x, y) and returns a single real number zz. Its domain is the set of allowed input pairs (a region of the plane), and its graph is the set of points (x,y,z)(x, y, z) with z=f(x,y)z = f(x, y) — a surface floating above (or below) the xyxy-plane.

The domain matters more than in one dimension because a formula can fail on whole regions. Consider:

f(x,y)=9x2y2 f(x, y) = \sqrt{9 - x^2 - y^2}

For the square root to be real we need 9x2y20 9 - x^2 - y^2 \geq 0, i.e. x2+y29x^2 + y^2 \leq 9. So the domain is a filled disk of radius 3 centered at the origin. The output ranges from 0 0 (at the edge, where x2+y2=9x^2 + y^2 = 9) up to 3 3 (at the center, where x=y=0x = y = 0). The graph is the upper half of a sphere of radius 3.

Worked example — evaluating and finding the domain. Let g(x,y)=x+yxy g(x, y) = \dfrac{x + y}{x - y}.

  • Evaluate at (3,1)(3, 1): g(3,1)=3+131=42=2g(3, 1) = \dfrac{3 + 1}{3 - 1} = \dfrac{4}{2} = 2.
  • Domain: the expression is undefined when the denominator is zero, i.e. when x=yx = y. So the domain is all of the plane except the line y=xy = x.

Functions of three variables, w=f(x,y,z) w = f(x, y, z), work the same way but can't be graphed directly — their graph would live in 4D space. Instead we study them through level surfaces (below).

Level Curves and Level Surfaces: Seeing in Lower Dimensions

Since a surface in 3D is hard to sketch, we use a trick borrowed from cartography: slice the surface at constant heights and project the slices onto the plane. A level curve of f(x,y)f(x,y) is the set of points where f(x,y)=cf(x, y) = c for a fixed constant cc. On a topographic map, these are the contour lines; points on one line are all at the same elevation. Where the lines bunch together, the surface is steep; where they spread out, it is gentle.

Worked example — level curves of a paraboloid. Take f(x,y)=x2+y2 f(x, y) = x^2 + y^2. Setting f=cf = c:

x2+y2=c x^2 + y^2 = c

  • For c=0c = 0: just the single point (0,0)(0, 0) — the bottom of the bowl.
  • For c=1c = 1: the circle x2+y2=1x^2 + y^2 = 1, radius 1 1.
  • For c=4c = 4: the circle of radius 2 2.
  • For c=9c = 9: the circle of radius 3 3.

Notice the radii are c\sqrt{c}: 1,2,3 1, 2, 3 for c=1,4,9c = 1, 4, 9. The gaps between successive levels shrink as we move outward (from radius 1 to 2 to 3, the circles get closer for equal jumps in height only if height jumps grow) — reading it the standard way, equally spaced heights give circles whose spacing shrinks outward, telling us the bowl gets steeper as we climb. That is the whole point of a contour map: spacing encodes steepness.

Level surfaces. For a function of three variables f(x,y,z) f(x, y, z), the analog is a level surface f(x,y,z)=cf(x, y, z) = c. For f(x,y,z)=x2+y2+z2 f(x, y, z) = x^2 + y^2 + z^2, the level surfaces are spheres of radius c\sqrt{c} centered at the origin — nested shells, each one a set of points where the function takes a single value. If ff represented temperature, these would be isothermal surfaces: every point on one shell is equally hot.

Limits in Higher Dimensions: Why More Inputs Change the Game

Here is where multivariable calculus earns its reputation. In one variable, limxaf(x)\lim_{x \to a} f(x) exists only if the left-hand and right-hand limits agree — just two directions to check. In two variables, a point (a,b)(a, b) can be approached along infinitely many paths: straight lines from any angle, parabolas, spirals, anything. The limit

lim(x,y)(a,b)f(x,y)=L \lim_{(x,y) \to (a,b)} f(x, y) = L

exists only if ff approaches the same value LL along every one of those paths. If two paths give different values, the limit does not exist.

Worked example — a limit that fails. Consider

f(x,y)=xyx2+y2 f(x, y) = \frac{xy}{x^2 + y^2}

near the origin. Approach along the xx-axis (set y=0y = 0): f(x,0)=x0x2+0=0f(x, 0) = \dfrac{x \cdot 0}{x^2 + 0} = 0, so the limit along this path is 0 0. Approach along the yy-axis (set x=0x = 0): f(0,y)=0f(0, y) = 0 likewise. So far, so consistent — you might guess the limit is 0 0.

Now approach along the line y=xy = x:

f(x,x)=xxx2+x2=x22x2=12. f(x, x) = \frac{x \cdot x}{x^2 + x^2} = \frac{x^2}{2x^2} = \frac{1}{2}.

Along this diagonal the function is constantly 12\tfrac{1}{2}. Two paths, two different answers (0 0 and 12\tfrac{1}{2}), so the limit does not exist — even though both axis-approaches agreed. This is the trap: checking a few paths is never enough to prove a limit exists; it can only prove one fails.

Worked example — a limit that exists. Consider

f(x,y)=x2yx2+y2 f(x, y) = \frac{x^2 y}{x^2 + y^2}

near the origin. Switch to polar coordinates: x=rcosθx = r\cos\theta, y=rsinθy = r\sin\theta, so x2+y2=r2x^2 + y^2 = r^2. Then

f=(rcosθ)2(rsinθ)r2=r3cos2θsinθr2=rcos2θsinθ. f = \frac{(r\cos\theta)^2 (r\sin\theta)}{r^2} = \frac{r^3 \cos^2\theta \sin\theta}{r^2} = r\cos^2\theta\,\sin\theta.

As (x,y)(0,0)(x, y) \to (0, 0) we have r0r \to 0, and since cos2θsinθ1|\cos^2\theta \sin\theta| \leq 1, the whole expression is bounded by rr in absolute value. So f0f \to 0 regardless of the angle θ\theta. The limit exists and equals 0 0. Polar coordinates are the workhorse trick here precisely because rr measures distance from the point along any direction at once.

A function is continuous at (a,b)(a, b) when the limit exists there and equals f(a,b)f(a, b) — the same definition as in one variable, but now resting on this far stricter limit.

Real-World Applications

  • Weather and climate modeling. Temperature, pressure, and humidity are all functions of latitude, longitude, and altitude. The isobars and isotherms you see on a weather map are literally level curves of pressure and temperature fields.
  • Engineering and heat transfer. Designing a heat sink or an engine block means solving the heat equation, a partial differential equation in a temperature function T(x,y,z,t)T(x, y, z, t). The steady-state solutions are exactly the level-surface problems Laplace studied.
  • Economics and optimization. A firm's output depends on labor, capital, and materials — a function of several variables. Indifference curves and isoquants in economics are level curves; finding maximum profit is a multivariable optimization problem.
  • Computer graphics and terrain. Height maps for 3D landscapes are functions z=f(x,y) z = f(x, y); rendering realistic lighting requires gradients (a multivariable derivative) of these surfaces.
  • Medical imaging. A CT or MRI scan reconstructs a density function f(x,y,z)f(x, y, z) throughout the body; the surfaces of constant density are level surfaces used to isolate organs and tumors.

Common Mistakes

1. Assuming a limit exists because a few paths agree. Many students check the xx-axis and yy-axis, see the same value, and declare the limit found. Why it's wrong: there are infinitely many paths, and a mismatch may only appear along a diagonal or curve (as in the xyx2+y2\tfrac{xy}{x^2+y^2} example). Correction: agreement along some paths only suggests a candidate value. To prove existence, use polar coordinates or the squeeze theorem to bound the function for all directions at once; to prove non-existence, find two paths that disagree.

2. Confusing the graph of f(x,y)f(x,y) with its level curves. Students sometimes think the circles x2+y2=cx^2 + y^2 = c are the surface. Why it's wrong: the level curves live in the flat xyxy-plane; the actual graph is a surface rising into the third dimension. Correction: remember a level curve is the shadow of a horizontal slice — the surface is what you get by lifting each curve to its height cc.

3. Ignoring the domain when it's a whole region. In one variable, forbidden points are usually isolated (a single xx where you divide by zero). In several variables, entire curves or regions can be excluded, like the line y=xy = x for x+yxy\dfrac{x+y}{x-y}. Why it's wrong: treating the domain as "everywhere" leads to evaluating a function where it's undefined. Correction: always solve the domain condition explicitly and describe it as a region (disk, half-plane, complement of a line, etc.).

Comparison and Connections

The clearest way to internalize multivariable calculus is to hold it up against the single-variable version you already know.

FeatureSingle-variable calculusMultivariable calculus
InputOne number, xxA point, (x,y)(x, y) or (x,y,z)(x, y, z)
GraphCurve in a planeSurface in 3D (or higher)
Approaching a pointTwo directions (left, right)Infinitely many paths
Limit exists whenLeft limit = right limitSame value along every path
Visualization aidThe graph itselfLevel curves / level surfaces
DerivativeSingle slope f(x)f'(x)Partial derivatives, gradient vector

Level curves connect directly to partial derivatives (how ff changes if you move in the xx-direction only) and to the gradient, which always points perpendicular to level curves toward steepest ascent. Limits here are the same foundational idea as one-variable limits — just applied in a space where "nearby" is far richer. And the surfaces you learn to read become the domains over which you'll later compute multiple integrals.

Practice Questions

Recall

Q: What is a level curve of a function f(x,y)f(x, y), and how does it relate to the graph of ff?

A: A level curve is the set of points (x,y)(x, y) in the plane where f(x,y)=cf(x, y) = c for a fixed constant cc. It corresponds to a horizontal slice of the surface at height cc, projected straight down onto the xyxy-plane. The full collection of level curves at different heights is a contour map of the surface.

Understanding

Q: Why does a multivariable limit require checking every path, when a single-variable limit only needs two?

A: In one dimension, the only ways to approach a point are from the left or the right — two directions. In two or more dimensions, a point can be reached along infinitely many paths (lines at any angle, parabolas, spirals). Since the function might behave differently along different paths, the limit is defined to exist only if all paths give the same value; otherwise "the value near the point" would be ambiguous.

Application

Q: Find the domain of f(x,y)=ln(xy2) f(x, y) = \ln(x - y^2) and evaluate f(5,2)f(5, 2).

A: The logarithm requires a positive argument: xy2>0x - y^2 > 0, i.e. x>y2x > y^2. The domain is the region of the plane to the right of the parabola x=y2x = y^2. Evaluating: f(5,2)=ln(54)=ln(1)=0f(5, 2) = \ln(5 - 4) = \ln(1) = 0.

Analysis

Q: Determine whether lim(x,y)(0,0)x2y2x2+y2\displaystyle \lim_{(x,y)\to(0,0)} \frac{x^2 - y^2}{x^2 + y^2} exists.

A: Approach along the xx-axis (y=0y = 0): x2x2=1\dfrac{x^2}{x^2} = 1. Approach along the yy-axis (x=0x = 0): y2y2=1\dfrac{-y^2}{y^2} = -1. The two paths give 1 1 and 1-1, which differ, so the limit does not exist.

FAQ

Is multivariable calculus much harder than single-variable calculus? The individual computations (differentiating, integrating) are usually not harder — they reuse your single-variable skills. What's genuinely new is the geometry and the subtlety of limits. Once you accept that "approaching a point" now means from infinitely many directions, most of the difficulty dissolves. Invest your effort in visualizing surfaces and level curves early.

Why do we bother with level curves if we could just look at the 3D surface? Because 3D surfaces are hard to draw accurately and even harder to read quantitatively. A contour map is flat, precise, and instantly shows steepness (via line spacing), peaks, valleys, and saddle points. It's the same reason hikers use topographic maps instead of clay models.

What's the difference between a level curve and a level surface? A level curve comes from a function of two variables, f(x,y)=cf(x,y) = c, and is a curve in the plane. A level surface comes from a function of three variables, f(x,y,z)=cf(x,y,z) = c, and is a surface in space. Both are "sets where the function is constant"; the dimension of the input determines whether you get a curve or a surface.

If a limit gives the same answer along every straight line, does the limit exist? Not necessarily. There are functions where every straight-line approach gives 0 0 but a parabolic path like y=x2y = x^2 gives a nonzero value. Straight lines are not enough — that's why we use polar coordinates or the squeeze theorem to check all directions at once.

When should I use polar coordinates for a limit? Whenever the point of interest is the origin and the function involves x2+y2x^2 + y^2 (which becomes a clean r2r^2). Substituting x=rcosθx = r\cos\theta, y=rsinθy = r\sin\theta turns the two-variable limit into a single limit as r0r \to 0; if the result is bounded by something going to zero independent of θ\theta, the limit exists.

Quick Revision

  • Function of several variables: z=f(x,y) z = f(x, y) maps a point to a number; graph is a surface. Always find the domain as a region.
  • Level curve: f(x,y)=cf(x, y) = c, a contour in the plane; closely spaced lines = steep.
  • Level surface: f(x,y,z)=cf(x, y, z) = c, a surface in space (e.g. isothermal shells).
  • Limit exists     \iff same value along every path to the point.
  • To disprove a limit: find two paths with different values (e.g. y=0y = 0 vs y=xy = x).
  • To prove a limit: use polar coordinates or the squeeze theorem to bound ff for all θ\theta.
  • Continuity at (a,b)(a,b): limit exists there and equals f(a,b)f(a, b).
  • Key example: xyx2+y2\dfrac{xy}{x^2+y^2} has no limit at origin; x2yx2+y2\dfrac{x^2 y}{x^2+y^2} has limit 0 0.

Prerequisites

  • Partial Derivatives
  • Vector calculus and the gradient (steepest ascent perpendicular to level curves)

Next Topics

  • Multiple Integrals
  • Optimization of functions of several variables (maxima, minima, saddle points)