Change of Variables & the Jacobian
Switching to
polar coordinates
introduced a mysterious extra r in
dA = r\, dr\, d\theta. That r was no
coincidence — it is one instance of a single master formula. For any smooth
substitution (u, v) \mapsto (x, y),
\iint_R f(x, y)\, dx\, dy = \iint_S f\big(x(u,v),\, y(u,v)\big)\; |J|\; du\, dv,
where R is the region in the
xy-plane, S is its preimage in the
uv-plane, and |J| is the absolute value
of the Jacobian determinant. This is the multivariable cousin of
u-substitution,
where the one-dimensional stretch factor \frac{dx}{du} is replaced
by a determinant.
Think of it as u-substitution growing up. In one dimension, swapping
x for u only ever stretches or squashes
a length, so a single number — the derivative dx/du — is enough of
an "exchange rate" to keep the integral honest. Step up to two dimensions and a coordinate
change stretches a whole patch of area, and in general it stretches it by a
different amount in different directions and at different points. One number can no
longer capture that; you need the four partial derivatives describing how the two directions
distort, bundled into a single number by a determinant. That number is the Jacobian, and the
mysterious extra r in polar coordinates was this exchange rate
hiding in plain sight the whole time.
The Jacobian: the local area-scaling factor
The Jacobian of the map (u,v) \mapsto (x,y) is the determinant of
the matrix of partial derivatives:
J = \frac{\partial(x, y)}{\partial(u, v)} = \det\!\begin{bmatrix} x_u & x_v \\ y_u & y_v \end{bmatrix} = x_u\, y_v - x_v\, y_u.
Why it is exactly the area factor. Take a tiny square in the
uv-plane with corner (u, v) and sides
du, dv.
Step 1 — see where the two edges go. The edge along
u (length du) maps, to first order, to
the vector (x_u, y_u)\, du; the edge along
v maps to (x_v, y_v)\, dv. The image of
the little square is the parallelogram spanned by these two vectors.
Step 2 — area of a parallelogram is a determinant. The area spanned by
vectors (a, c) and (b, d) is
|ad - bc|. With (a,c) = (x_u, y_u)\,du
and (b,d) = (x_v, y_v)\,dv:
\text{image area} = |x_u\, y_v - x_v\, y_u|\; du\, dv = |J|\; du\, dv.
So |J| is precisely the factor by which the map
stretches area near a point. A |J| > 1 blows
patches up, |J| < 1 shrinks them, and that is why it must appear
to keep the integral honest.
Worked example 1 — polar, recovering the r
Let us check the formula against a case we already trust. The polar map is
x = r\cos\theta, y = r\sin\theta (so
here (u, v) = (r, \theta)).
Step 1 — the four partial derivatives.
x_r = \cos\theta, \quad x_\theta = -r\sin\theta, \quad y_r = \sin\theta, \quad y_\theta = r\cos\theta.
Step 2 — assemble and take the determinant.
J = \det\!\begin{bmatrix} \cos\theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{bmatrix} = (\cos\theta)(r\cos\theta) - (-r\sin\theta)(\sin\theta).
Step 3 — simplify with \cos^2 + \sin^2 = 1.
J = r\cos^2\theta + r\sin^2\theta = r\,(\cos^2\theta + \sin^2\theta) = r.
Hence dx\, dy = |J|\, dr\, d\theta = r\, dr\, d\theta — exactly
the extra r we measured geometrically before. The mystery factor
was the Jacobian all along.
Worked example 2 — a linear transform
Consider the linear map x = 2u + v,
y = u + 3v (a shear-and-scale of the plane).
Step 1 — partials are just the coefficients.
x_u = 2, \quad x_v = 1, \quad y_u = 1, \quad y_v = 3.
Step 2 — determinant.
J = \det\!\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix} = (2)(3) - (1)(1) = 5.
Step 3 — read off the meaning. A linear map has a constant
Jacobian: this transform multiplies every area by |J| = 5.
The unit square in uv becomes a parallelogram of area
5 in xy, and any region's area is
scaled by the same 5:
\operatorname{area}(R) = 5 \cdot \operatorname{area}(S).
Let T:(u,v) \mapsto (x,y) be a smooth, one-to-one map from a
region S onto R, with continuous
partial derivatives. Then:
-
The Jacobian is
J = \dfrac{\partial(x,y)}{\partial(u,v)} = x_u y_v - x_v y_u.
-
It is the local area factor: a patch of area
du\, dv maps to a patch of area
|J|\, du\, dv.
-
The integral transforms as
\iint_R f(x,y)\, dx\, dy = \iint_S f\big(x(u,v), y(u,v)\big)\, |J|\, du\, dv.
-
Polar is the special case J = r; a
linear map has constant J = ad - bc.
It is no accident that area-scaling and the determinant are the same number — they are
defined to be. The determinant of a 2\times2 matrix is,
by construction, the signed area of the parallelogram its columns span. The sign records
orientation: J > 0 if the map preserves the
handedness of the plane, J < 0 if it flips it (a reflection).
That is why the integral formula takes the absolute value
|J| — area is unsigned, so we discard the orientation bit and
keep only the magnitude of the stretch.
This also explains the danger zone: where J = 0, the map
collapses a patch to zero area (the two image vectors become parallel — the parallelogram
degenerates to a segment). There the change of variables breaks down, which is exactly the
origin in polar coordinates, where J = r = 0 and all angles
\theta pile up onto a single point.
Worked example 3 — a shear that squares up a tilted square
Picture a square standing on one corner, like a diamond, tilted 45°
to the axes: its corners sit at (0,0),
(1,1), (2,0),
(1,-1). The substitution
x = \tfrac{1}{2}(u+v), y = \tfrac{1}{2}(u-v)
untilts it: it sends that diamond to the plain axis-aligned unit square
0 \le u \le 2,\ 0 \le v \le 2 shrunk to
[0,1]\times[0,1] — a shear-and-scale with no rotation left over. How
much does area change along the way?
Step 1 — the four partials.
x_u = \tfrac12, \quad x_v = \tfrac12, \quad y_u = \tfrac12, \quad y_v = -\tfrac12.
Step 2 — determinant.
J = \det\!\begin{bmatrix} \tfrac12 & \tfrac12 \\ \tfrac12 & -\tfrac12 \end{bmatrix} = \left(\tfrac12\right)\!\left(-\tfrac12\right) - \left(\tfrac12\right)\!\left(\tfrac12\right) = -\tfrac14 - \tfrac14 = -\tfrac12.
Step 3 — read off the meaning. So |J| = \tfrac12:
squaring up the diamond halves area at every point (unsurprising — a diamond with
diagonal 2 has area 2, and it lands on a
unit square of area 1). The negative sign is the map's
signature — it quietly flips orientation while it untilts the square, a detail invisible to
the area formula because we take |J|, but one worth noticing.
Worked example 4 — the area of an ellipse falls out for free
Take the linear substitution x = au, y = bv
for constants a, b > 0. It stretches the u
axis by a factor a and the v axis by a
factor b, so it sends the unit circle
u^2 + v^2 = 1 onto the ellipse
(x/a)^2 + (y/b)^2 = 1. What is the ellipse's area?
Step 1 — the Jacobian.
x_u = a,\ x_v = 0,\ y_u = 0,\ y_v = b, so
J = \det\!\begin{bmatrix} a & 0 \\ 0 & b \end{bmatrix} = ab.
Step 2 — apply the area formula with f \equiv 1.
The area of the ellipse R is
\iint_R 1\, dx\, dy, and its preimage S
is the unit disk u^2+v^2 \le 1, which has area
\pi:
\operatorname{area}(R) = \iint_S |J|\, du\, dv = ab \iint_S du\, dv = ab \cdot \pi = \pi a b.
The famous formula \pi a b for an ellipse's area didn't need a new
idea at all — it is the unit circle's area, \pi, times the constant
Jacobian of the stretch that turns a circle into an ellipse.
Three ways the Jacobian trips people up — even after they know the formula by heart:
-
Always take the absolute value. The formula needs
|J|, not J. A negative Jacobian (like
-\tfrac12 above) means the map flips orientation — a real
geometric fact — but a negative area makes no sense, so drop the sign before
multiplying.
-
Know which way the Jacobian points.
J = \partial(x,y)/\partial(u,v) converts a patch of
uv-area into xy-area — it is built from
the map into x,y. If you only know the reverse map
(x,y)\mapsto(u,v), its Jacobian is the reciprocal,
\partial(u,v)/\partial(x,y) = 1/J. Differentiating the wrong pair
of variables and forgetting to invert is one of the most common Jacobian slip-ups.
-
The Jacobian usually isn't one fixed number. For a linear map (like
the shear or the axis-stretch above) J is genuinely constant. For
a general, curved change of variables — polar included — J is a
function of the point: it must sit inside the integral, ready to be evaluated at
each (u,v), not pulled out front as a single multiplier.
Every flat map of the round Earth has to distort something — you cannot unroll a sphere onto
paper without stretching it somewhere. Cartographers describe exactly how a projection
distorts using the very same machinery as this page: the projection is a change of variables
from a point on the globe to a point (x,y) on the page, and its
Jacobian tells you how much a patch of land is being stretched or shrunk at that spot on the
map.
An equal-area projection (used for maps that compare country sizes fairly,
like population or land-use maps) is defined by exactly the property this page has been
exploring: |J| is constant everywhere on the map — every
square kilometre of Earth, wherever it is, lands on the same number of square centimetres of
paper. The trade-off is that shapes and angles get distorted instead (Greenland, notoriously
squashed sideways). Computer graphics engines lean on the same idea in reverse: when a 3-D
artist "unwraps" a curved surface onto a flat texture image, the Jacobian of that unwrapping
tells the renderer exactly how to stretch the flat picture back onto the curved surface without
the texture looking warped.
Watch the area stretch by |J|
The left square lives in the uv-plane (unit area). The right
parallelogram is its image under the linear map
x = a\,u + v, y = u + a\,v; its area is
|J| = a^2 - 1 times the square's. Drag the slider on
a and watch the parallelogram — and the printed Jacobian — grow.
Notice that however you tilt the parallelogram, the picture never lies about the number: the
printed |J| is always exactly the ratio of the two shaded areas.