multivariable calculus
The Multivariable Chain Rule
You should know: partial derivatives, chain rule
Overview
The single-variable chain rule computes d/dt[f(g(t))] = f'(g(t))·g'(t) — the rate of change of a composed function is the product of the rates of change along the way. The multivariable chain rule generalizes this when a function z = f(x,y) depends on x and y, and x and y in turn depend on other variables (like time t, or two other parameters u and v). Instead of a single product, every path from the output back to the input variable contributes a term, and the total rate of change is the SUM over all such paths. This 'multivariable chain rule' underlies related rates problems in several variables, implicit differentiation of multivariable equations, and backpropagation in neural networks (where a loss depends on outputs, which depend on weights, through many layered compositions).
Intuition
Imagine f(x,y) is the temperature at position (x,y), and a bug walks along a path so that x=x(t) and y=y(t) trace out its position over time. As the bug moves, temperature changes for two independent reasons: because x is changing (contributing ∂f/∂x times how fast x changes) AND because y is changing (contributing ∂f/∂y times how fast y changes). Since both effects act simultaneously and independently, the total rate of temperature change the bug feels is the SUM of both contributions — this is exactly the multivariable chain rule. When x and y each depend on two new variables (a 'tree' of dependencies), you sum over every branch of that tree that reaches back to the variable you're differentiating with respect to.
Formal Definition
If z = f(x,y) is differentiable and x = x(t), y = y(t) are differentiable functions of t, then z is differentiable in t with:
When x=x(u,v) and y=y(u,v) each depend on two new variables
The chain rule as a dot product of the gradient with the velocity vector of the path
Notation
| Notation | Meaning |
|---|---|
| Sum over every intermediate variable that connects z to u along the dependency tree |
Derivation
The single-parameter case follows from a linear approximation (total differential) of f, divided by a small change in t and taking the limit:
Linear approximation of f near a point, with error terms ε₁, ε₂ → 0 as Δx, Δy → 0
Divide through by Δt
As Δt→0, Δx,Δy→0 too (by continuity), so ε₁,ε₂→0 and the error terms vanish
Properties
Additivity over paths
Reduces to single-variable chain rule
Theorems
Applications
Worked Examples
Compute the partial derivatives of z with respect to x and y.
Compute the derivatives of x and y with respect to t.
Combine via the chain rule formula.
Substitute x=t², y=t³ and evaluate at t=1: x=1, y=1.
Answer: dz/dt at t=1 is 7.
Practice Problems
Let z = xy, with x = t and y = t². Find dz/dt at t=2 using the chain rule.
Let z = x² − y², where x = 2u+v and y = u−3v. Find ∂z/∂v.
The area of a rectangle is A = xy where x is growing at 3 cm/s and y is shrinking at 2 cm/s. At the instant x=10 cm, y=5 cm, find dA/dt.
Common Mistakes
Forgetting a term in the sum when an intermediate variable has multiple paths back to the differentiation variable.
Draw the dependency tree first: if both x and y depend on u, ∂z/∂u needs BOTH terms (∂f/∂x)(∂x/∂u) + (∂f/∂y)(∂y/∂u) — dropping either term is the most common chain-rule mistake.
Using ordinary derivative notation (d/du) when partial derivatives are required because other variables (like v) are held fixed.
When x and y depend on TWO OR MORE parameters (u and v), use ∂x/∂u (partial), not dx/du, since x also depends on v which must stay fixed while differentiating with respect to u.
Quiz
Flashcards
Summary
- The multivariable chain rule sums a product term for EACH intermediate variable connecting the output to the differentiation variable.
- One parameter: dz/dt = f_x x'(t) + f_y y'(t). Two parameters: analogous sums for ∂z/∂u and ∂z/∂v.
- Compactly, dz/dt = ∇f · (velocity vector of the path) — a dot product form linking the chain rule to the gradient.
- Drawing the dependency tree prevents the most common error: dropping a term when a variable has multiple paths.
- Backpropagation in neural networks and related-rates problems are direct applications of this rule.
References
- BookStewart, J. Calculus: Early Transcendentals, 8th ed. Ch. 14.5.
Mathematics