Change-of-Variables Formula
1 Intuition
The change-of-variables (or transformation) formula is a central tool in multivariate calculus and probability. It states how integrals - and in particular probability densities - transform under smooth, invertible maps.
It is the multivariate analogue of the one-dimensional substitution rule \[ \int_a^b f(x)\,dx = \int_{\phi(a)}^{\phi(b)} f(\phi^{-1}(y))\, \bigl|(\phi^{-1})'(y)\bigr|\,dy. \] In higher dimensions the derivative is replaced by the determinant of the Jacobian matrix, which encodes how volume is distorted.
Locally, a smooth map \(T\) behaves like a linear transformation, \[ T(x + h) \approx T(x) + J_{T}(x)h. \] A small volume element \(dx\) near \(x\) is sent to a distorted parallelepiped near \(T(x)\) of volume \(|\det J_{T}(x)|\,dx\). The Jacobian determinant is the local volume-scaling factor.
2 Statement
Let \(U, V \subset \mathbb{R}^d\) be open and let \(T : U \to V\) be a \(C^1\) bijection with \(C^1\) inverse, \(y = T(x)\). Then for any integrable \(f : V \to \mathbb{R}\), \[ \int_V f(y)\,dy = \int_U f(T(x))\,\bigl|\det J_{T}(x)\bigr|\,dx, \] where \(J_{T}(x)\) is the Jacobian matrix of \(T\) at \(x\). Equivalently, for integrable \(g : U \to \mathbb{R}\), \[ \int_U g(x)\,dx = \int_V g(T^{-1}(y))\,\bigl|\det J_{T^{-1}}(y)\bigr|\,dy. \]
Let \(X\) be a random vector in \(\mathbb{R}^d\) with density \(f_X\) and let \(Y = T(X)\), where \(T\) satisfies the assumptions above. Then \(Y\) has density \[ f_Y(y) = f_X(T^{-1}(y))\,\bigl|\det J_{T^{-1}}(y)\bigr|. \]
This preserves probabilities: \(\mathbb{P}(Y \in A) = \mathbb{P}(X \in T^{-1}(A))\). See also Random Variable Transformations.
3 Proof (Sketch)
We prove the deterministic version.
Linear case. If \(T(x) = Ax\) with \(A \in \mathbb{R}^{d \times d}\) invertible, then for any measurable \(E\), \(\mathrm{Vol}(A E) = |\det A|\,\mathrm{Vol}(E)\). Hence \[ \int_{A U} f(y)\,dy=\int_U f(Ax)\,|\det A|\,dx. \]
Local linearisation. For general \(C^1\) maps, near each \(x\), \(T(x+h) = T(x) + J_{T}(x)h + o(\lVert h\rVert)\). On a fine partition of \(U\) into small cells \(C_k\), \(T\) is well approximated on each \(C_k\) by its linearisation at some point \(x_k \in C_k\).
Riemann sums. Writing the integral as a limit of Riemann sums, \[ \int_V f(y)\,dy \approx \sum_k f(T(x_k))\,\mathrm{Vol}(T(C_k)) \approx \sum_k f(T(x_k))\,|\det J_{T}(x_k)|\,\mathrm{Vol}(C_k). \] Letting the mesh go to zero gives the formula.
A fully rigorous proof uses measure-theoretic arguments and the inverse function theorem.
4 Examples
Let \(T(r,\theta) = (r\cos\theta, r\sin\theta)\). Then \[ J_{T}(r,\theta) = \begin{pmatrix} \cos\theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{pmatrix}, \qquad \det J_{T}(r,\theta) = r, \] so \[ \int_{\mathbb{R}^2} f(x,y)\,dx\,dy = \int_0^\infty \int_0^{2\pi} f(r\cos\theta, r\sin\theta)\, r\, d\theta\, dr. \] In probability, if \((R,\Theta)\) has joint density \(g(r,\theta)\), then \(f_{X,Y}(x,y) = g(r,\theta)/r\) at \((x,y) = (r\cos\theta, r\sin\theta)\).
Let \(X \sim \mathcal{N}(0, I_d)\) and \(Y = AX\) with \(A\) invertible. Then \(T^{-1}(y)=A^{-1}y\) and \(|\det J_{T^{-1}}(y)| = 1/|\det A|\), so \[ f_Y(y) = (2\pi)^{-d/2} \exp\!\left(-\tfrac12 \lVert A^{-1}y\rVert^2\right)\frac{1}{|\det A|}, \] which is exactly the density of \(\mathcal{N}(0, AA^\top)\).
Let \(X,Y\) be independent with joint density \(f_{X,Y}\), and define \(U = X/Y\), \(V = Y\). Then \(T(x,y) = (x/y, y)\) and \(T^{-1}(u,v) = (uv, v)\) with \[ J_{T^{-1}}(u,v) = \begin{pmatrix} v & u \\ 0 & 1 \end{pmatrix}, \qquad \det J_{T^{-1}} = v. \] Hence \(f_{U,V}(u,v) = f_{X,Y}(uv, v)\,|v|\), and marginalising over \(v\) gives the density of \(U = X/Y\).