The Multivariable Chain Rule
One-line statement: The multivariable chain rule computes the derivative of a composition of functions when intermediate quantities depend on several variables, summing contributions through every dependency path. Key result in words: The total rate of change equals the sum, over all intermediate variables, of (rate of change of the output w.r.t. that intermediate) × (rate of change of that intermediate w.r.t. the input). Where it applies: Functions composed with other multivariable functions; physics, optimization, machine learning (backpropagation), thermodynamics, differential geometry. Who/when: Rooted in Leibniz's and Newton's calculus (1670s); generalized to multiple variables through the 18th–19th century (Euler, Cauchy); formalized via the Jacobian by the late 1800s.
A change in an input variable propagates to the output through every chain of dependencies. To find the total derivative, you trace each path from input to output, multiply the local derivatives along that path, and add up all the paths. The "sum over paths" is the heart of the matter; the matrix-product formulation is just this sum written compactly.
Formal Statement
Let be a differentiable function. The partial derivative measures the rate of change of as varies while all other () are held fixed. If each is a function of a single parameter , then becomes a function of alone, and its total derivative accounts for all the ways influences . The Jacobian matrix of a map , , is the matrix
Derivation hint: stack the gradients as rows; entry is the sensitivity of output to input .
Let be differentiable at a point, and let each be differentiable. Then the composition is differentiable and
Derivation hint: take the total differential and divide by ; the dot product is gradient times velocity.
Let where each . Then for each ,
Derivation hint: hold all () fixed and apply equation [2] with playing the role of .
Let be differentiable at and be differentiable at . Then is differentiable at and its Jacobian factors as a matrix product:
Derivation hint: the best linear approximation of a composition is the composition of best linear approximations; composing linear maps corresponds to multiplying their matrices.
The dimensions confirm consistency: , exactly the Jacobian of .
Why It Holds / Derivation
We prove equation [2]; the general case [4] follows by applying it component-wise.
Step 1 — Differentiability hypothesis. Since is differentiable at , by definition there is a remainder function with as such that
Derivation hint: this is precisely the definition of (total) differentiability — linear part plus error vanishing faster than .
Step 2 — Increment from . Let , so . Substituting into [5] and dividing by :
Derivation hint: divide both sides of [5] by the scalar and identify .
Step 3 — Take the limit. As : each by differentiability of ; the factor stays bounded (it tends to ); and since . Hence the error term vanishes and
Derivation hint: product of (something bounded) and (something ) is ; the surviving sum is the claim.
∎The proof crucially uses the differentiability of (Step 1), which is stronger than mere existence of partial derivatives. A function can have all partials at a point yet fail to be differentiable, and the chain rule can then break. Always verify differentiability (e.g., continuous partials suffice — class ).
While Leibniz and Newton wielded chain-rule reasoning informally, Cauchy is central to the rigorous – foundation that makes the proof above legitimate. His insistence on precise definitions of limit and derivative transformed the chain rule from a symbolic manipulation of differentials into a theorem with hypotheses (differentiability) and a remainder analysis. The Jacobian matrix formulation that crowns the modern statement is named for Carl Gustav Jacob Jacobi (1804–1851), whose 1841 treatise De determinantibus functionalibus systematized functional determinants.
Building Intuition
Draw a dependency graph: arrows from each input to each intermediate variable, then from each intermediate to the output. To find : 1. Find every directed path from the input node to the output node. 2. Along each path, multiply the local derivatives on its edges. 3. Sum over all paths. If depends on , and both depend on , there are two paths from to (through , and through ), giving . The single-variable rule is the degenerate case of exactly one path.
Worked Examples
Given: Temperature field (°C, with in metres). A particle moves along , (metres), with in seconds. Find at s.
Step 1 — Partials.
Derivation hint: differentiate treating the other variable as constant.
Step 2 — Velocities. , .
Step 3 — Chain rule [2].
Derivation hint: substitute the partials and velocities into .
Step 4 — Evaluate at : , , , .
Derivation hint: plug numbers; both terms vanish.
Given: with , . Find and at , .
Step 1 — Partials of . , .
Step 2 — Partials of .
Derivation hint: differentiate and w.r.t. and .
Step 3 — Chain rule [3].
Derivation hint: substitute and use .
Derivation hint: the two terms cancel — consistent with being independent of .
Step 4 — Evaluate at : , .
(Check: . ✓)
Common Misconceptions
When has an explicit and also , the total derivative includes both the direct and indirect dependence:
Derivation hint: reaches directly (through the explicit slot) and indirectly (through ); sum both paths. Forgetting the term is the single most common error in physics and economics. The notation (material derivative) in fluid dynamics is precisely this distinction made explicit.
Let
Derivation hint: a classic homogeneous-degree-zero example. Both partials exist at the origin: (since on both axes). Now take the path , . Then for , so (constant), giving . The naive formula happens to agree here — but is not even continuous at the origin (limit along is , along axes is ), so it is not differentiable, and the chain rule has no theorem to stand on. The agreement is a coincidence, and along other constructions the naive formula misfires. Moral: existence of partials does not license the chain rule.
Connections
The multivariable chain rule is the computational engine behind several neighbouring results. The Gradient Vector appears as the row-vector factor in equation [2], and the rule shows , directly yielding the Directional Derivative. The general Jacobian form [4] is the multivariable face of the Single-Variable Chain Rule, with matrix multiplication replacing scalar multiplication. It underlies the Implicit Function Theorem (differentiate a constraint along a curve), the change-of-variables formula in Multiple Integrals (through ), and the transformation of vector fields in Differential Geometry. In its iterated, layered form it is exactly the Backpropagation Algorithm.
Real-World Applications
Historical Development
Subtleties & Limits
The clean theorem [4] requires differentiability at the relevant points; weakening to mere directional or partial differentiability invalidates it (see the counterexample). Subtle questions persist in: (a) non-smooth analysis — chain rules for subdifferentials and Clarke generalized gradients of nonsmooth functions require careful constraint qualifications, and a single clean equation does not always hold; (b) infinite dimensions — in Banach/Fréchet spaces the chain rule for Fréchet derivatives holds, but Gâteaux differentiability is too weak, mirroring the finite-dimensional cautions; (c) automatic differentiation correctness — efficiently and exactly differentiating programs with control flow, recursion, and nondifferentiable kinks (ReLU, ) is an active engineering and theoretical area, where the naive chain rule can yield wrong or undefined values at kinks. The conceptual rule is settled; its rigorous reach into nonsmooth and infinite-dimensional settings remains a refined subject.
See Also
Partial Derivatives · The Gradient Vector · Jacobian Matrix · Single-Variable Chain Rule · Implicit Function Theorem · Directional Derivatives · Backpropagation Algorithm · Material Derivative · Change of Variables in Multiple Integrals