Change of Variables

Multivariate calculus from first principles

This last lesson ties the course's two halves together. When you change variables in an integral by substituting x = g(u), you have to account for how the substitution stretches space. That stretch factor is the Jacobian determinant from Module 3, so the final formula is where the course's derivatives and integrals finally meet.

This is the multivariable generalization of Course-I u-substitution. There, the factor was |dx/du|, a 1×1 'Jacobian'. Here it's |det J_g|, the volume-scaling factor: as the map g compresses or expands little boxes of u-space into x-space, the determinant rescales the integral so the total stays right.

Trying to integrate over a round region with square x-y tiles is like paving a circular roundabout with rectangular bricks: the edges never fit cleanly. Switch to circular (polar) coordinates that wrap around the center and the shape falls into place naturally. The price for switching is the stretch factor, which turns the area element into r dr dθ because rings farther from the center cover more space.

Where this lives in MLThis single formula is the mathematical core of normalizing flows and the reparameterization trick. A flow transforms a simple density through an invertible g, and p_X(x) = p_Z(g⁻¹(x))·|det J_{g⁻¹}| keeps probability normalized, with the Jacobian determinant tracking density through the transformation. The reparameterization trick in VAEs uses the same change-of-variables logic to push gradients…
▶ Change of Variables
← Triple IntegralsSample Spaces & Events →