The Chain Rule in Multiple Variables
One-line statement: The multivariable chain rule computes the derivative of a composition of functions by summing the contributions of all intermediate variables through which one variable depends on another.
Key result in words: If depends on several intermediate variables, and each of those depends on the true independent variables, the total rate of change of with respect to an independent variable is the sum over every intermediate path of (rate of w.r.t. that intermediate) × (rate of that intermediate w.r.t. the independent variable).
Where it applies: Differential calculus of functions , implicit differentiation, change of variables, PDEs, optimization (gradient descent / backpropagation), thermodynamics, differential geometry.
Who/when: Roots in Leibniz (1670s) and Euler (1734); the modern total-derivative formulation matured with Cauchy and Jacobi in the 19th century.
A differentiable function is, locally, its best linear approximation — encoded by the Jacobian matrix. Composition of functions corresponds to composition of their linear approximations, and composition of linear maps is matrix multiplication. Therefore:
Every "sum over paths" version of the chain rule you ever write down is just one entry of this matrix product spelled out.
Formal Statement
For , , the partial derivative of component with respect to coordinate is
Derivation hint: hold all coordinates but fixed; this is an ordinary one-variable difference quotient along the -th axis. The Jacobian matrix collects these:
Derivation hint: stack the gradients (row vectors) of each component function; row , column is . Here is the -th standard basis vector and .
is differentiable at if there is a linear map with
Derivation hint: demand that the linear part captures the change up to an error that vanishes faster than — this is the genuine, basis-free notion of derivative.
Let be differentiable at and differentiable at . Then is differentiable at and
Derivation hint: the best linear approximation of a composite is the composite of the best linear approximations; in matrix form composition = product. In coordinates, with a scalar depending on and each :
Derivation hint: equation [5] is exactly the entry of the matrix product [4]; the sum over runs over the intermediate variables (the inner dimension of the product). The special case (a single parameter , a curve ) gives the total derivative along a path:
Derivation hint: set in [5]; the row vector dotted with the velocity vector is the directional rate of change along the curve.
Why It Holds / Derivation
We prove [4]. Write , , .
Step 1 — Set up linear approximations. By differentiability of at ,
Derivation hint: this is definition [3] applied to , with remainder .
Step 2 — Feed into . Let . By differentiability of at ,
Derivation hint: same definition [3] applied to , with remainder .
Step 3 — Combine. Substitute :
Derivation hint: ; group all non-linear leftovers into .
Step 4 — Error estimate. We must show .
- by Step 1.
- For : for small , and .
Derivation hint: bound each term using operator-norm linearity and the two conditions; the product of a vanishing factor and a bounded factor vanishes.
Conclusion. Equation [9] exhibits as a linear map satisfying definition [3] for . By uniqueness of the total derivative, . (A subtle point: mere existence of partial derivatives is not enough; the proof crucially uses full differentiability of both maps — see the Counterexample below.)
∎Euler, in his Institutiones calculi differentialis and earlier papers (notably from 1734 onward), was among the first to systematically manipulate functions of several variables and the relations among their partial differentials. The notation and the practice of summing partial-differential contributions — the seed of equation [5] — grow directly from Euler's treatment of "functions of functions." His introduction of the symbol for partial differentiation and his fearless symbolic computation made the multivariable chain rule a routine tool a full century before its rigorous – foundation.
Building Intuition
Think of as the elevation on a mountain and imagine you are hiking along a trail parameterized by time , so your position is . Two things determine how fast your altitude changes: 1. How steep the mountain is in the east and north directions — the partials , . 2. How fast you are moving east and north — the velocities , . Your altitude rate is the steepness in your direction of travel, obtained by weighting each slope by the corresponding speed and adding them (equation [6]). This is precisely . The "tree diagram" / sum-over-paths picture: draw at the top, its intermediate variables below, and the true variables at the bottom. Every directed path from down to contributes a product of the derivatives along its edges; the chain rule says sum over all paths. The inner summation index in [5] is literally "which intermediate node did you pass through."
Worked Examples
Given: (units: meters, with in meters). A particle moves along , (meters), with in seconds. Find at .
Step 1 — Partials.
Step 2 — Velocities.
Step 3 — Apply [6].
Step 4 — Evaluate at : , .
Check: Substituting first, , ; at this is ✓
Given: with , . Express and via , then evaluate for at .
Step 1 — Jacobian of w.r.t. .
Step 2 — Chain rule [5] (row-vector form).
So
Step 3 — Plug in : , .
Step 4 — Evaluate at .
Sanity check: In polar coordinates , so and exactly — consistent, since is rotationally symmetric. ✓
Common Misconceptions
The single-variable mnemonic ", cancel the " does not survive intact. With multiple intermediate variables you must sum over all of them; dropping a path is the most common error:
Also, inside the chain rule is evaluated at the image point , not at . And the symbols on the left vs. the partial of the original "w.r.t. " can mean genuinely different things when appears both directly and through intermediate variables — always specify what is held constant. In thermodynamics this ambiguity is so severe that the held-constant variable is written as a subscript, e.g. .
Existence of partial derivatives does not imply the chain rule. Let
Both partials exist at the origin: (since on the axes). Now compose with the line . Along it for and , so is discontinuous at and does not exist. The naive chain-rule prediction is meaningless. The fix: the theorem requires to be differentiable (e.g. ) at the point, which this is not — it is not even continuous at the origin along .
Connections
The chain rule is the connective tissue between many areas:
- <span class="wiki-link-missing">Gradient and Directional Derivative</span> — equation [6], , is the directional derivative; the chain rule along a curve recovers it.
- <span class="wiki-link-missing">Jacobian Matrix and Determinant</span> — the rule says Jacobians multiply, , hence Jacobian determinants multiply, the engine of Change of Variables in Multiple Integrals.
- <span class="wiki-link-missing">Implicit Function Theorem</span> — differentiating a constraint via the chain rule yields .
- <span class="wiki-link-missing">Inverse Function Theorem</span> — applying the rule to gives .
- <a class="wiki-link" href="/wiki/cs-dl-backpropagation">Backpropagation</a> — reverse-mode automatic differentiation is the chain rule [4] computed right-to-left across a composition of layers.
- <span class="wiki-link-missing">Total Differential</span> — is the chain rule in differential-form clothing.
Real-World Applications
Historical Development
Subtleties & Limits
The classical theorem is closed and complete, but several boundary issues reward attention:
- Differentiability vs. partial derivatives. As the counterexample shows, (or full Fréchet differentiability) is essentially needed; partials alone can fail. Characterizing the minimal regularity under which a chain-rule identity holds in measure-theoretic or Sobolev settings (the chain rule for Sobolev/BV functions, the Vol'pert chain rule) remains a delicate research area in geometric measure theory.
- Nonsmooth analysis. For convex or merely locally Lipschitz functions, one replaces with the subdifferential or Clarke generalized gradient; the chain rule becomes an inclusion (a set), with equality only under qualification conditions.
- Infinite dimensions. In Banach spaces the Fréchet chain rule holds, but for the weaker Gâteaux derivative the chain rule can fail unless additional continuity is assumed — a genuine subtlety in the calculus of variations and PDE.
- Automatic differentiation accuracy. Reverse-mode AD is exact in exact arithmetic, but the practical question of numerically stable, memory-efficient chain-rule evaluation for very deep or recurrent compositions (checkpointing, vanishing/exploding gradients) is an active engineering frontier.
See Also
Gradient and Directional Derivative · Total Differential · Inverse Function Theorem · Material Derivative · Tensor Transformation Laws · Automatic Differentiation