Change of Variables & the Jacobian

Study Sheet

Change of Variables & the Jacobian

How substitutions stretch area and volume

The Jacobian Determinant

Tip
Substitution in several variables
xy(2, 1)(1, 2)31
The map x=2u+vx = 2u + v, y=u+2vy = u + 2v carries the unit square (dashed, area 11) to the parallelogram on (2,1)(2, 1) and (1,2)(1, 2), area 3=det⁡3 = \det.

One-variable substitution carries a factor dxdu\tfrac{dx}{du}; in several variables the factor is a DETERMINANT: for a map (u,v)↦(x(u,v),y(u,v))(u, v) \mapsto (x(u,v), y(u,v)), dx dy=∣det⁡∂(x,y)∂(u,v)∣ du dvdx\,dy = \left|\det\dfrac{\partial(x, y)}{\partial(u, v)}\right|\,du\,dv, where the Jacobian matrix collects all four partials.

The reason is geometric: the map sends a tiny du×dvdu \times dv rectangle to a tiny parallelogram spanned by the column vectors (xu,yu)(x_u, y_u) and (xv,yv)(x_v, y_v), and a parallelogram's area is exactly the absolute determinant. Every coordinate system you have used is a special case: polar's factor rr, cylindrical's rr, spherical's ρ2sin⁡ϕ\rho^2\sin\phi — all Jacobians, all computable in two minutes from the definition rather than memorized. For the linear map x=2u+vx = 2u + v, y=u+2vy = u + 2v, the columns are (2,1)(2, 1) and (1,2)(1, 2) and the determinant is 4−1=34 - 1 = 3: the unit square of the uvuv-plane becomes a parallelogram of area 33, and every region's area is multiplied by 33.

Side note
Which direction is the determinant?

The classic trap: if you define the NEW variables from the old (u=x+yu = x + y, v=x−yv = x - y), you naturally compute det⁡∂(u,v)∂(x,y)\det\tfrac{\partial(u,v)}{\partial(x,y)} — but the integral needs the INVERSE factor ∣det⁡∂(x,y)∂(u,v)∣\left|\det\tfrac{\partial(x,y)}{\partial(u,v)}\right|, its reciprocal. Rule of thumb: the Jacobian you multiply by always has the OLD variables on top. When in doubt, test on a unit square.

Try it
Try it: the area of an ellipse in one line

Find the area inside the ellipse x2a2+y2b2=1\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1 with a change of variables.

Show the answer

Substitute x=aux = au, y=bvy = bv. The ellipse becomes u2+v2≤1u^2 + v^2 \le 1, the unit disk. The Jacobian is det⁡(a00b)=ab\det\begin{pmatrix}a & 0\\ 0 & b\end{pmatrix} = ab: every small area is stretched by the factor abab. So the area is ∬diskab du dv=ab⋅π=πab\iint_{\text{disk}} ab\,du\,dv = ab\cdot\pi = \pi ab. With a=b=ra = b = r this is πr2\pi r^2 — the circle formula was the special case all along.

Choosing a Substitution

Tip
Let the boundary choose u and v

When a region is bounded by two pairs of curves u(x,y)=u(x, y) = const and v(x,y)=v(x, y) = const, take those expressions as the new variables: the region becomes a rectangle in the uvuv-plane. Compute the easy Jacobian ∂(u,v)∂(x,y)\dfrac{\partial(u, v)}{\partial(x, y)} (u and v are given in terms of x and y) and use

dx dy=du dv∣∂(u,v)/∂(x,y)∣.dx\,dy = \frac{du\,dv}{\left|\partial(u, v)/\partial(x, y)\right|}.

Why the reciprocal is allowed: the map (x,y)↦(u,v)(x, y)\mapsto(u, v) and its inverse undo each other, so by the chain rule their Jacobian matrices multiply to the identity, and their determinants are reciprocals. This saves the step of solving for xx and yy in terms of uu and vv, which is often the hardest part of the problem.

Example
Example: a slanted parallelogram
xyv = 0u = 3v = 3u = 1
The parallelogram cut out by two pairs of parallel lines; in u=x+yu = x + y, v=x−2yv = x - 2y it is the rectangle [1,3]×[0,3][1, 3]\times[0, 3].

Compute ∬R(x+y) dA\iint_R (x + y)\,dA over the parallelogram bounded by x+y=1x + y = 1, x+y=3x + y = 3, x−2y=0x - 2y = 0 and x−2y=3x - 2y = 3. Let u=x+yu = x + y, from 11 to 33, and v=x−2yv = x - 2y, from 00 to 33. Then ∂(u,v)∂(x,y)=det⁡(111−2)=−3\dfrac{\partial(u, v)}{\partial(x, y)} = \det\begin{pmatrix}1 & 1\\ 1 & -2\end{pmatrix} = -3, so dx dy=13 du dvdx\,dy = \tfrac13\,du\,dv.

The integrand is simply uu, so ∬R(x+y) dA=∫03 ⁣∫13u⋅13 du dv=13⋅4⋅3=4\iint_R (x + y)\,dA = \int_0^3\!\int_1^3 u\cdot\tfrac13\,du\,dv = \tfrac13\cdot4\cdot3 = 4. The area is ∫03 ⁣∫1313 du dv=13⋅2⋅3=2\int_0^3\!\int_1^3 \tfrac13\,du\,dv = \tfrac13\cdot2\cdot3 = 2. Check it directly: the corners are (23,13)\left(\tfrac23, \tfrac13\right), (2,1)(2, 1), (3,0)(3, 0) and (53,−23)\left(\tfrac53, -\tfrac23\right), and the shoelace formula also gives 22.

Example
Example: between two hyperbolas
xy12123xy = 1xy = 4y = xy = 4x
The curved quadrilateral between xy=1xy = 1, xy=4xy = 4, y=xy = x and y=4xy = 4x becomes the square [1,4]×[1,4][1, 4]\times[1, 4] in u=xyu = xy, v=yxv = \tfrac yx.

Find the area of the region in the first quadrant bounded by xy=1xy = 1, xy=4xy = 4, y=xy = x and y=4xy = 4x. The boundaries suggest u=xyu = xy, from 11 to 44, and v=yxv = \tfrac yx, from 11 to 44. Then ∂(u,v)∂(x,y)=det⁡(yx−y/x21/x)=yx+yx=2v\dfrac{\partial(u, v)}{\partial(x, y)} = \det\begin{pmatrix} y & x\\ -y/x^2 & 1/x\end{pmatrix} = \tfrac yx + \tfrac yx = 2v.

So dx dy=du dv2vdx\,dy = \dfrac{du\,dv}{2v} and the area is ∫14 ⁣∫1412v du dv=3⋅ln⁡42=3ln⁡2≈2.08\int_1^4\!\int_1^4 \dfrac{1}{2v}\,du\,dv = 3\cdot\dfrac{\ln4}{2} = 3\ln2 \approx 2.08. The factor 12v\tfrac1{2v} records that equal squares in the uvuv-plane correspond to smaller pieces of the region near the steep line y=4xy = 4x than near y=xy = x.

Side note
Where it goes wrong

Using the forward Jacobian instead of its reciprocal. In the parallelogram example, writing dx dy=3 du dvdx\,dy = 3\,du\,dv gives the area 3⋅2⋅3=183\cdot2\cdot3 = 18 instead of 22, nine times too big. A quick size check catches it: the parallelogram fits inside the box [0,3]×[−1,1][0, 3]\times[-1, 1], whose area is 66, so 1818 is impossible. The factor always converts new areas into old ones, so it is ∣∂(x,y)∂(u,v)∣\left|\tfrac{\partial(x, y)}{\partial(u, v)}\right|, with the old variables on top.

Try it
Try it: a tilted square

Evaluate ∬R(x2−y2) dA\iint_R (x^2 - y^2)\,dA, where RR is bounded by the lines y=xy = x, y=x−2y = x - 2, y=−xy = -x and y=−x+4y = -x + 4.

Show the answer

The boundaries are x−y=0x - y = 0, x−y=2x - y = 2, x+y=0x + y = 0 and x+y=4x + y = 4, so let u=x−yu = x - y (00 to 22) and v=x+yv = x + y (00 to 44). The integrand factors as x2−y2=(x−y)(x+y)=uvx^2 - y^2 = (x - y)(x + y) = uv. The Jacobian is det⁡(1−111)=2\det\begin{pmatrix}1 & -1\\ 1 & 1\end{pmatrix} = 2, so dx dy=12 du dvdx\,dy = \tfrac12\,du\,dv. Then ∫04 ⁣∫02uv⋅12 du dv=12⋅2⋅8=8\int_0^4\!\int_0^2 uv\cdot\tfrac12\,du\,dv = \tfrac12\cdot2\cdot8 = 8.

Jacobians in Three Dimensions

Tip
The volume factor is a 3 × 3 determinant

For a map (u,v,w)↦(x,y,z)(u, v, w)\mapsto(x, y, z),

dx dy dz=∣det⁡∂(x,y,z)∂(u,v,w)∣du dv dw,dx\,dy\,dz = \left|\det\frac{\partial(x, y, z)}{\partial(u, v, w)}\right|du\,dv\,dw,

the determinant of the 3×33\times3 matrix of all nine partial derivatives.

Why a determinant again: the tiny box du dv dwdu\,dv\,dw is carried to a tiny parallelepiped spanned by ru du\mathbf r_u\,du, rv dv\mathbf r_v\,dv, rw dw\mathbf r_w\,dw, where ru=(xu,yu,zu)\mathbf r_u = (x_u, y_u, z_u) and so on. The volume of a parallelepiped is the absolute value of the triple product of its edges, which is the determinant with those edges as columns (see the triple product in the vectors topic).

Example
Example: the spherical volume element

For x=ρsin⁡ϕcos⁡θx = \rho\sin\phi\cos\theta, y=ρsin⁡ϕsin⁡θy = \rho\sin\phi\sin\theta, z=ρcos⁡ϕz = \rho\cos\phi, the matrix of partials in the order (ρ,ϕ,θ)(\rho, \phi, \theta) is

(sin⁡ϕcos⁡θρcos⁡ϕcos⁡θ−ρsin⁡ϕsin⁡θsin⁡ϕsin⁡θρcos⁡ϕsin⁡θρsin⁡ϕcos⁡θcos⁡ϕ−ρsin⁡ϕ0).\begin{pmatrix}\sin\phi\cos\theta & \rho\cos\phi\cos\theta & -\rho\sin\phi\sin\theta\\ \sin\phi\sin\theta & \rho\cos\phi\sin\theta & \rho\sin\phi\cos\theta\\ \cos\phi & -\rho\sin\phi & 0\end{pmatrix}.

Expand along the bottom row, which has a zero. The two 2×22\times2 minors simplify with cos⁡2θ+sin⁡2θ=1\cos^2\theta + \sin^2\theta = 1 to ρ2sin⁡ϕcos⁡ϕ\rho^2\sin\phi\cos\phi and ρsin⁡2ϕ\rho\sin^2\phi, so the determinant is cos⁡ϕ⋅ρ2sin⁡ϕcos⁡ϕ+ρsin⁡ϕ⋅ρsin⁡2ϕ=ρ2sin⁡ϕ(cos⁡2ϕ+sin⁡2ϕ)=ρ2sin⁡ϕ\cos\phi\cdot\rho^2\sin\phi\cos\phi + \rho\sin\phi\cdot\rho\sin^2\phi = \rho^2\sin\phi\left(\cos^2\phi + \sin^2\phi\right) = \rho^2\sin\phi. This is the factor the triple-integrals topic found by measuring the edges of a spherical cell; here it comes from the same machine as every other Jacobian.

Example
Example: the volume of an ellipsoid

Find the volume of x24+y29+z216≤1\dfrac{x^2}{4} + \dfrac{y^2}{9} + \dfrac{z^2}{16} \le 1. The substitution x=2ux = 2u, y=3vy = 3v, z=4wz = 4w turns it into the unit ball u2+v2+w2≤1u^2 + v^2 + w^2 \le 1, and the Jacobian matrix is diagonal with determinant 2⋅3⋅4=242\cdot3\cdot4 = 24.

So the volume is 2424 times the volume of the unit ball: 24⋅43π=32π24\cdot\tfrac43\pi = 32\pi. In general the ellipsoid with semi-axes a,b,ca, b, c has volume 43πabc\tfrac43\pi abc; stretching each direction separately multiplies volume by each stretch factor, and the determinant of a diagonal matrix is just that product.

Side note
Where it goes wrong

Forgetting the absolute value. The swap x=vx = v, y=uy = u has Jacobian det⁡(0110)=−1\det\begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix} = -1. Used without the absolute value, it gives the area of the unit square as ∬(−1) du dv=−1\iint(-1)\,du\,dv = -1. Reversing orientation flips the sign of a determinant, never the sign of an area; the formula uses ∣det⁡∣|\det|.

Try it
Try it: a moment of an ellipsoid

Over the unit ball, ∭w2 dV=4π15\iiint w^2\,dV = \tfrac{4\pi}{15} (computed in the triple-integrals topic). Use it to find ∭Ez2 dV\iiint_E z^2\,dV for the solid ellipsoid E:x24+y29+z2≤1E: \dfrac{x^2}{4} + \dfrac{y^2}{9} + z^2 \le 1.

Show the answer

Substitute x=2ux = 2u, y=3vy = 3v, z=wz = w: EE becomes the unit ball, the Jacobian is 2⋅3⋅1=62\cdot3\cdot1 = 6, and z2=w2z^2 = w^2. So ∭Ez2 dV=6∭ballw2 dV=6⋅4π15=8π5\iiint_E z^2\,dV = 6\iiint_{\text{ball}} w^2\,dV = 6\cdot\tfrac{4\pi}{15} = \tfrac{8\pi}{5}.

Proofs & Why It Matters

Tip
Proof: why the determinant appears

Near a point, the substitution map is approximated by its derivative — the linear map with the Jacobian matrix JJ (this is the tangent-plane idea applied to a MAP rather than a function).

A linear map multiplies all areas by ∣det⁡J∣|\det J|: the unit square spanned by e1,e2\mathbf e_1, \mathbf e_2 lands on the parallelogram spanned by the columns of JJ, whose area is ∣det⁡J∣|\det J|, and general regions are limits of little squares. Summing f×(image area)f \times (\text{image area}) over a fine grid gives Riemann sums of ∬f ∣det⁡J∣ du dv\iint f\,|\det J|\,du\,dv. ■\blacksquare SIGNIFICANCE: this is the bridge between linear algebra ("determinant = volume factor") and calculus ("substitution rule") — and in probability it is exactly how densities transform, the change-of-variables formula behind every normalizing flow in machine learning.

Tip
Proof: polar coordinates, this time with no hand-waving

x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta: J=(cos⁡θ−rsin⁡θsin⁡θrcos⁡θ)J = \begin{pmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{pmatrix}, det⁡J=rcos⁡2θ+rsin⁡2θ=r\det J = r\cos^2\theta + r\sin^2\theta = r.

The "curvy rectangle" argument from the double-integrals topic was the geometric shadow of this two-line computation — and now spherical's ρ2sin⁡ϕ\rho^2\sin\phi is just a bigger determinant, not a new idea to memorize. ■\blacksquare

Going Deeper: Worked Problems

Example
Worked: an integral that only the right substitution can do
xyu = 1v = 1
The diamond ∣x∣+∣y∣≤1|x| + |y| \le 1 is the square ∣u∣≤1|u| \le 1, ∣v∣≤1|v| \le 1 in the coordinates u=x+yu = x + y, v=x−yv = x - y; the faint lines are uu and vv constant.

Compute ∬R(x+y)2 dA\displaystyle\iint_R (x + y)^2\,dA over the square RR with vertices (1,0),(0,1),(−1,0),(0,−1)(1,0), (0,1), (-1,0), (0,-1).

Step 1 — the region is a diamond, awkward in x,yx,y; substitute u=x+yu = x + y, v=x−yv = x - y, which maps it to the square ∣u∣≤1|u| \le 1, ∣v∣≤1|v| \le 1.

Step 2 — Jacobian: ∂(u,v)∂(x,y)=det⁡(111−1)=−2\dfrac{\partial(u,v)}{\partial(x,y)} = \det\begin{pmatrix}1&1\\1&-1\end{pmatrix} = -2, so dx dy=12 du dvdx\,dy = \tfrac12\,du\,dv.

Step 3 — the integrand is u2u^2: ∫−11 ⁣∫−11u2⋅12 du dv=12⋅23⋅2=23\displaystyle\int_{-1}^1\!\int_{-1}^1 u^2\cdot\tfrac12\,du\,dv = \tfrac12\cdot\tfrac23\cdot2 = \tfrac23.

Step 4 — check plausibility: the diamond has area 22 and (x+y)2(x+y)^2 averages less than 11 on it, so an answer below 22 is right-sized; the exact value 23\tfrac23 took three lines because the substitution matched BOTH region and integrand.

Example
Worked: deriving the cylindrical volume element

Show that dV=r dr dθ dzdV = r\,dr\,d\theta\,dz for x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta, z=zz = z.

Step 1 — the Jacobian matrix of (r,θ,z)↦(x,y,z)(r, \theta, z) \mapsto (x, y, z) is (cos⁡θ−rsin⁡θ0sin⁡θrcos⁡θ0001)\begin{pmatrix}\cos\theta & -r\sin\theta & 0\\ \sin\theta & r\cos\theta & 0\\ 0 & 0 & 1\end{pmatrix}.

Step 2 — expand along the last row: the determinant is 1⋅(rcos⁡2θ+rsin⁡2θ)=r1\cdot(r\cos^2\theta + r\sin^2\theta) = r.

Step 3 — so dV=∣r∣ dr dθ dz=r dr dθ dzdV = |r|\,dr\,d\theta\,dz = r\,dr\,d\theta\,dz since r≥0r \ge 0.

Step 4 — the geometric reading: the zz-direction is untouched, so the 3D element is just the polar area element r dr dθr\,dr\,d\theta times dzdz — the same determinant computed in the Jacobian topic, with one extra dimension riding along for free.