Advanced Mathematics

The Multivariable Chain Rule and Jacobians

How rates of change pass through functions of several variables, organised as a product of Jacobian matrices.

Needs a step first: 12

If zz depends on xx and yy, and both depend on tt, then dzdt=∂z∂xdxdt+∂z∂ydydt\frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt}: add the contributions along every path. For a map from nn variables to mm, the Jacobian is the m×nm \times n matrix of all partial derivatives, the best linear approximation to the map near a point, and the chain rule says the Jacobian of a composition is the product of the Jacobians. Its determinant measures how the map scales area or volume, which is why it appears when changing variables in Multiple Integrals.

Where it shows up: Backpropagation multiplies Jacobians from the loss back to the weights, and Lagrangian mechanics changes coordinates with the same rule.

How to hold it: In your head

Draw the dependency tree and see the chain rule as a sum over its paths, and see the Jacobian as the best linear approximation, so composing maps means multiplying matrices.

What knowing it looks like

  • Draw the dependency tree for a composite function and write the chain rule as a sum over its paths.
  • Compute the Jacobian matrix of a map such as polar to Cartesian coordinates, and its determinant.
  • Explain why the Jacobian of a composition is a matrix product, and check the shapes match.

Test yourself

For x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta: (a) find the Jacobian matrix ∂(x,y)∂(r,θ)\frac{\partial(x, y)}{\partial(r, \theta)} and its determinant; (b) for f(x,y)=x2+y2f(x, y) = x^2 + y^2, use the chain rule to find ∂f∂r\frac{\partial f}{\partial r}.
Show the worked answer
(a) J=(cos⁡θ−rsin⁡θsin⁡θrcos⁡θ)J = \begin{pmatrix} \cos\theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{pmatrix} and det⁡J=rcos⁡2θ+rsin⁡2θ=r\det J = r\cos^2\theta + r\sin^2\theta = r. (b) ∂f∂r=∂f∂x∂x∂r+∂f∂y∂y∂r=2xcos⁡θ+2ysin⁡θ=2rcos⁡2θ+2rsin⁡2θ=2r\frac{\partial f}{\partial r} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial r} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial r} = 2x\cos\theta + 2y\sin\theta = 2r\cos^2\theta + 2r\sin^2\theta = 2r. Check: f=r2f = r^2, whose derivative in rr is 2r2r.

Needs a step first: 12

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "The Multivariable Chain Rule and Jacobians" (Undergraduate I tier): How rates of change pass through functions of several variables, organised as a product of Jacobian matrices.
I already know: Partial Derivatives and the Gradient, Matrices as Transformations.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: For $x = r\cos\theta$, $y = r\sin\theta$: (a) find the Jacobian matrix $\frac{\partial(x, y)}{\partial(r, \theta)}$ and its determinant; (b) for $f(x, y) = x^2 + y^2$, use the chain rule to find $\frac{\partial f}{\partial r}$.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

On the way to

Recommended