Kneel down in a field and the ground looks perfectly flat, even though you are standing on a
giant curved ball spinning through space. Zoom in on any smooth surface — a sand dune, a
soap bubble, the Earth itself — and close enough to one point it becomes almost indistinguishable
from a flat sheet touching it there. That is exactly why an ordinary paper map works beautifully
for finding your way around town, even though the very same flat sheet would be hopeless
stretched over the whole curved planet. Calculus turns that "close enough to flat" feeling into
an exact formula.
For a one-variable curve, the
tangent line
is the best straight-line approximation near a point. A surface
z = f(x, y) has two
partial derivatives,
one slope in the x direction and one in the
y direction, and together they pin down the best flat approximation
— a tangent plane. At a point (a, b) it is
z = f(a, b) + f_x(a, b)\,(x - a) + f_y(a, b)\,(y - b).
Read it as a recipe: start at the height f(a, b), then add the rise
from moving (x - a) in the x direction at
slope f_x, and the rise from moving (y - b)
in the y direction at slope f_y. Each
x-slice of this plane is exactly the tangent line to the
corresponding slice of the surface.
Building the plane, step by step
Build the tangent plane to the paraboloid f(x, y) = x^2 + y^2 at the
point (a, b) = (1, 1), then use it to estimate
f(1.1, 0.9) without squaring anything.
Step 1 — the partials. Differentiate in each variable, holding the other
constant:
f_x = 2x, \qquad f_y = 2y.
Step 2 — evaluate at the point (1, 1). The height
and the two slopes are
f(1, 1) = 1 + 1 = 2, \qquad f_x(1, 1) = 2, \qquad f_y(1, 1) = 2.
Step 3 — assemble the plane. Substitute into the template:
z = 2 + 2\,(x - 1) + 2\,(y - 1).
Step 4 — read it as a linearization. The right-hand side is the
linear approximation L(x, y) of
f near (1, 1):
L(x, y) = 2 + 2(x - 1) + 2(y - 1).
Step 5 — estimate f(1.1, 0.9). Here
x - 1 = 0.1 and y - 1 = -0.1, so the two
corrections cancel:
L(1.1, 0.9) = 2 + 2(0.1) + 2(-0.1) = 2 + 0.2 - 0.2 = 2.
Step 6 — check against the truth. The exact value is
f(1.1, 0.9) = 1.1^2 + 0.9^2 = 1.21 + 0.81 = 2.02.
The estimate 2 is off by only 0.02 — the
error is second-order in the small step, exactly as the tangent-line story promised, now in
two variables.
It's worth seeing exactly where that 0.02 comes from. The
differential predicted
df = f_x\,dx + f_y\,dy = 2(0.1) + 2(-0.1) = 0, which is precisely
L(1.1, 0.9) - f(1, 1) — the plane's own change. The true change,
f(1.1, 0.9) - f(1, 1) = 0.02, differs from that by exactly
dx^2 + dy^2 = 0.01 + 0.01 = 0.02. That squared leftover is the
second-order term the differential is built to ignore — and it's also why the trick works so
well here: the two first-order corrections happened to cancel, leaving only the (tiny) curvature
term visible.
The total differential
Writing dx = x - a and dy = y - b for the
small displacements, the change in height predicted by the plane is the
total differential
df = f_x\, dx + f_y\, dy.
It is the workhorse of error propagation: a small wiggle dx in one
input and dy in the other produce, to first order, a change
df in the output. Drag the point a below
to watch the tangent line track the slice of the paraboloid and read off the linearization
there.
Let f be differentiable at (a, b).
Then:
-
The tangent plane to z = f(x, y) at
(a, b) is
z = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b).
-
The linear approximation
L(x, y) equals the right-hand side, and
f(x, y) \approx L(x, y) near (a, b),
with error vanishing faster than the distance to (a, b).
-
The total differential
df = f_x\,dx + f_y\,dy gives the first-order change in
f from displacements dx, dy.
Worked example: tolerance on a measured volume
The total differential turns into a practical tolerance check whenever a quantity is assembled
from measured, error-prone ingredients. Suppose a sheet-metal box has a fixed height
h = 5 cm (cut exactly), but its base is a length
l = 8 cm and a width w = 6 cm, each set by
a machine accurate only to dl = 0.1 cm and
dw = 0.05 cm. How far off could the finished volume be?
Step 1 — write volume as a function of the two measured variables. With
h fixed, V(l, w) = lwh is a function of
exactly two variables, just like f(x, y) above.
Step 2 — the partials.
V_l = wh, \qquad V_w = lh.
Step 3 — evaluate at (l, w, h) = (8, 6, 5):
V_l = 6 \times 5 = 30, \qquad V_w = 8 \times 5 = 40.
Step 4 — the total differential.
dV = V_l\, dl + V_w\, dw = 30(0.1) + 40(0.05) = 3 + 2 = 5\ \text{cm}^3.
The nominal volume is V = 8 \times 6 \times 5 = 240\ \text{cm}^3, so
the two measurement tolerances could push the true volume off by roughly
5\ \text{cm}^3 — about 2\% — without ever
having to multiply out a worst case exactly. This is precisely how engineers turn a spec sheet of
individual tolerances into one overall error budget, and it works because
dV is linear in dl and
dw: double a tolerance and its contribution to the error simply
doubles.
Having partial derivatives is not enough to guarantee a tangent plane — the classic culprit is
a cone. Take z = \sqrt{x^2 + y^2}, an
ice-cream-cone shape with its point sitting at the origin. Walk away from the tip in
any direction and the surface climbs at the same steady rate — every directional slope
you measure there looks identical. And yet there is obviously no single flat plane you could
balance on that sharp point: it's a corner, not a smooth cap. (The partials
f_x(0,0) and f_y(0,0) don't even exist in
the ordinary two-sided sense for this cone — the slope flips sign depending which way you
approach the tip from.)
Even functions whose partials do exist everywhere can still fail to have a tangent
plane. In one variable, "the derivative exists" and "the function is differentiable" are the same
statement. In two variables they come apart, and the gap is a genuine trap. A function can
have both partial derivatives at a point and yet not be
differentiable there — not even continuous. The standard specimen is
f(x, y) = \frac{xy}{x^2 + y^2} \quad (f(0, 0) = 0).
Along the axes f is identically zero, so
f_x(0, 0) = f_y(0, 0) = 0 both exist. But we already saw this
function has
no limit at the origin
— so it is not even continuous there, let alone differentiable. The partials see only two
directions; differentiability demands the tangent plane approximate f
from every direction at once.
The clean sufficient condition: if f_x and
f_y exist and are continuous near
(a, b), then f is differentiable there
(such an f is called C^1). For
everyday functions — polynomials, exponentials, sines — this always holds, which is why the
tangent-plane formula can be applied without anxiety.
The Earth is a sphere, and a sphere has no tangent plane that fits it globally — try
to flatten an orange peel and it always tears or wrinkles somewhere. But zoom in on any one
spot, and the curved surface and its tangent plane are almost the same thing: the gap between
them shrinks faster than the distance you move away, exactly as it does for
f(x, y) = x^2 + y^2 above. That is why a street map, accurate over a
few kilometres, can pretend the Earth is flat and get away with it — while a map of the whole
globe squashed onto one flat sheet must distort something (Greenland famously balloons to the
size of Africa on a Mercator projection).
Surveyors and cartographers exploit this on purpose: pick a plane tangent to the Earth at the
town you care about, project onto it, and the map stays honest over a useful radius around that
point — the very same "match the height, match both slopes" idea behind the tangent-plane
formula, just scaled up from a paraboloid to a planet.