Calculus

Jacobian Change of Variables

The local stretch factor of a coordinate map — and the missing piece of multivariable substitution

The Jacobian determinant |J| measures how a coordinate transformation stretches local area (in 2D) or volume (in 3D). The change-of-variables formula reads ∬ f(x,y) dx dy = ∬ f(x(u,v), y(u,v)) |J| du dv. Polar maps give |J| = r, spherical maps give |J| = ρ² sinφ, and any linear map x = Au gives |J| = |det A|.

  • Definition (2D)J = ∂(x,y)/∂(u,v)
  • Polar |J|r
  • Cylindrical |J|r
  • Spherical |J|ρ² sinφ
  • Linear map |J||det A|

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why a stretch factor is needed

In one dimension, u-substitution carries a derivative: ∫ f(g(u)) g'(u) du. The factor g'(u) rescales the differential — if g stretches the line by 2× near a point, du there represents 2× as much "length" as it would un-mapped.

The same thing happens in higher dimensions, only now the rescaling is a matrix and the determinant is the volume scale. A unit square in the (u,v)-plane gets mapped to some parallelogram in the (x,y)-plane. The area of that parallelogram is the absolute value of the determinant of the matrix of partial derivatives — the Jacobian determinant.

J = ∂(x,y)/∂(u,v) = det [[∂x/∂u, ∂x/∂v], [∂y/∂u, ∂y/∂v]].

The change-of-variables formula then reads

∬_R f(x,y) dx dy = ∬_S f(x(u,v), y(u,v)) |J| du dv

where R is the original region and S is its preimage in (u,v) space.

Worked derivation: polar coordinates

The polar transformation is x = r cosθ, y = r sinθ. Compute partials:

  • ∂x/∂r = cosθ, ∂x/∂θ = −r sinθ
  • ∂y/∂r = sinθ, ∂y/∂θ = r cosθ

The Jacobian matrix is [[cosθ, −r sinθ], [sinθ, r cosθ]], with determinant

r cos²θ + r sin²θ = r.

So dx dy = r dr dθ. The geometric picture: a thin polar wedge at radius r with width dr and angle dθ has arc length r dθ, so its area is exactly r dr dθ. The classic example is

∫_{−∞}^∞ e^{−x²} dx = √π,

which is impossible in Cartesian coordinates but trivial in polar:

(∫_{−∞}^∞ e^{−x²} dx)² = ∬ e^{−x²−y²} dx dy = ∫₀^{2π} ∫₀^∞ e^{−r²} r dr dθ = π.

The factor of r is what made the radial integral elementary.

Worked derivation: spherical coordinates

Spherical: x = ρ sinφ cosθ, y = ρ sinφ sinθ, z = ρ cosφ. The 3×3 Jacobian matrix has rows (∂/∂ρ, ∂/∂φ, ∂/∂θ) of (x, y, z). Working through the determinant — or expanding along the bottom row — gives

|J| = ρ² sinφ.

Geometrically, a small spherical box with sides dρ, ρ dφ, ρ sinφ dθ has volume ρ² sinφ dρ dφ dθ. The ρ² accounts for the fact that the surface area of a sphere of radius ρ scales as ρ²; the sinφ accounts for circumferences of latitude lines shrinking near the poles.

Common changes of variables

TransformEquations|J|Best for
Polar (2D)x = r cosθ, y = r sinθrDisks, annuli, e^{−x²−y²}
Cylindrical (3D)x = r cosθ, y = r sinθ, z = zrCylinders, paraboloids
Spherical (3D)x = ρ sinφ cosθ, y = ρ sinφ sinθ, z = ρ cosφρ² sinφBalls, shells, central forces
Linear x = Aux = a u + b v, y = c u + d v|ad − bc|Tilted parallelograms, ellipses
Elliptic (a, b axes)x = a r cosθ, y = b r sinθab rEllipses (x/a)² + (y/b)² ≤ 1
Sum/differenceu = x+y, v = x−y1/2Symmetric integrands in x±y
Hyperbolicx = u v, y = u/v2u/vxy = const, y = const · x

Worked example: a linear change of variables

To compute the area of an ellipse (x/a)² + (y/b)² ≤ 1, set x = au, y = bv. The map is linear with matrix diag(a,b), so |J| = ab. The new region is the unit disk, area π. So

Area = ∬_{disk} ab du dv = ab · π = πab.

For a more general linear map x = Au + b, the Jacobian is just |det A| — the determinant measures how much the linear map scales volume, exactly as it does for any matrix.

When to use the inverse direction

Sometimes the integrand is naturally written in (u,v) but the region is defined in (x,y) — or vice versa. In that case you need the Jacobian of the inverse map. Two facts make this easy:

  • The Jacobian of the inverse is the reciprocal: ∂(u,v)/∂(x,y) = 1 / [∂(x,y)/∂(u,v)].
  • You can compute either one and use whichever is convenient.

For example, if u = x + y, v = x − y, then ∂(u,v)/∂(x,y) = det[[1,1],[1,−1]] = −2, so |∂(u,v)/∂(x,y)| = 2 and |∂(x,y)/∂(u,v)| = 1/2.

Where the Jacobian shows up

  • Probability transforms. If Y = g(X) and X has density f_X, then f_Y(y) = f_X(g⁻¹(y)) |J| where J is the Jacobian of g⁻¹. The same formula governs the change-of-variables in joint distributions.
  • Statistical mechanics. Phase-space integrals over (q, p) coordinates use Jacobians under canonical transformations — Liouville's theorem says |J| = 1 for them.
  • Computer graphics. Texture mapping and surface parametrizations use Jacobians to compute how a unit area on the texture stretches across the model.
  • General relativity. The volume element in curved space is √|g| d⁴x where g is the metric determinant — a generalised Jacobian.
  • Optimization. Newton's method and other root finders for vector-valued equations rely on the Jacobian matrix at each step.

Common mistakes

  • Forgetting the absolute value. A negative determinant just means the map flips orientation. Volume is positive, so we always use |J|. Without the absolute value, you can get negative areas and wrong answers.
  • Computing the wrong direction. If you wrote x and y in terms of u and v, then J = ∂(x,y)/∂(u,v) and the formula is dx dy = |J| du dv. If you wrote u and v in terms of x and y, take the reciprocal.
  • Skipping the Jacobian in spherical or cylindrical. "I'll convert to spherical, dV = dρ dφ dθ" is a fast way to wrong answers. The factor ρ² sinφ (or r) is essential.
  • Forgetting to transform the region. A disk in (x,y) becomes a rectangle in (r,θ) — the bounds change with the variables. Always map the region too.
  • Using the wrong sign convention. Some textbooks define the Jacobian without an absolute value, then handle sign through orientation. For ordinary (unsigned) integrals, always take |J|.

Frequently asked questions

What does the Jacobian determinant mean geometrically?

It's the local area or volume scale factor. A tiny square du dv maps to a parallelogram of area |J| du dv. So |J| acts like a position-dependent zoom level: bigger where the map stretches, smaller where it compresses.

Why does the Jacobian show up in change of variables?

Because integration weighs the integrand by area or volume. When coordinates change, the differential du dv corresponds to a different physical chunk than dx dy. The Jacobian converts between them: dx dy = |J| du dv.

Why is the Jacobian for polar coordinates equal to r?

The matrix [[cosθ, −r sinθ], [sinθ, r cosθ]] has determinant r cos²θ + r sin²θ = r. Geometrically a thin annular wedge has arc r dθ and width dr, so its area is r dr dθ.

Why is the Jacobian for spherical coordinates ρ² sinφ?

Working out the 3×3 Jacobian of (ρ sinφ cosθ, ρ sinφ sinθ, ρ cosφ) gives ρ² sinφ. Geometrically a tiny spherical box has sides dρ, ρ dφ, ρ sinφ dθ; their product is the same.

Why must we take the absolute value of the Jacobian?

Area and volume are positive. A negative determinant means the map reversed orientation, but the physical region's size is unchanged. Unsigned integrals therefore use |J|. Signed (oriented) integrals such as flux keep the sign.

Does the Jacobian appear in probability too?

Yes — it's the rule for transforming probability densities. If Y = g(X) and X has density f_X, then f_Y(y) = f_X(g⁻¹(y)) |J| where J is the Jacobian of g⁻¹. The same idea generalises to joint distributions.