§ 01Why We Need a Multivariable Chain Rule
You already know the single-variable chain rule: if z = f(g(t)), then dz/dt = f′(g(t))·g′(t). The multivariable version extends this idea to functions that depend on several intermediate variables simultaneously.
Consider a physical scenario: the temperature T at a point in a room depends on position (x, y, z). A bee flying through the room traces a path where each coordinate changes with time: x = x(t), y = y(t), z = z(t). To find how fast the temperature the bee experiences is changing, you need the multivariable chain rule.
More formally, we have a function w = f(x, y) where x and y are themselves functions of one or more other variables. The challenge is that changing t affects w through two separate paths: via x and via y. The chain rule sums the contributions from each path.
This is not merely an algebraic trick. The formula follows directly from the definition of the derivative and the linear approximation to a multivariable function. Importantly, it requires that all functions involved be differentiable: not just continuous.
§ 02Case 1 — One Parameter: dz/dt
Suppose z = f(x, y) where x = x(t) and y = y(t) are both functions of a single parameter t. Then z is ultimately a function of t alone, and its total derivative is:
Read this as: "the total effect on z from a change in t equals the effect through the x-branch plus the effect through the y-branch." Each branch contributes a product of two derivatives: the partial derivative of z with respect to the intermediate variable, multiplied by the ordinary derivative of that variable with respect to t.
Dependency Tree Diagram
A dependency tree makes the formula completely transparent. Draw z at the top, branches down to x and y, then each branches further down to t. Label each branch with the corresponding derivative. To find dz/dt, multiply along each path from z to t, then add the results.
Multiply along each path, then add: dz/dt = (∂z/∂x)(dx/dt) + (∂z/∂y)(dy/dt)
Extension to Three or More Intermediate Variables
If w = f(x, y, z) and each of x, y, z depends on t, the pattern extends naturally:
In general, if w = f(x₁, x₂, …, xₙ) and each xᵢ = xᵢ(t), then dw/dt = Σᵢ (∂w/∂xᵢ)(dxᵢ/dt). There is always one term for each intermediate variable, one branch in the dependency tree.
§ 03Case 2 — Two Parameters: ∂z/∂s and ∂z/∂t
Now suppose z = f(x, y) where x = x(s, t) and y = y(s, t) each depend on two parameters, s and t. Then z is a function of both s and t, and we compute its partial derivatives:
Notice that all four derivatives on the right-hand side are now partial derivatives (using ∂, not d), because the intermediate variables depend on more than one parameter. The structure is otherwise identical: multiply along each path, add across paths.
For ∂z/∂s: trace all paths ending at s and sum products. Likewise for ∂z/∂t.
§ 04Implicit Differentiation via Partial Derivatives
The multivariable chain rule gives us a powerful shortcut for implicit differentiation. If a curve in the xy-plane is defined implicitly by F(x, y) = 0, we can find dy/dx without solving for y explicitly.
Treat y as a function of x, so F becomes a composite function of x alone. Differentiating F(x, y(x)) = 0 with respect to x via the chain rule:
This works whenever ∂F/∂y ≠ 0 (the implicit function theorem). In three dimensions, if a surface is defined by F(x, y, z) = 0, the same idea gives the partial derivatives of z with respect to x and y:
This formula is far more efficient than solving F(x, y, z) = 0 for z and then differentiating: especially when F is a polynomial of high degree or involves transcendental functions.
Formula Summary Table
| Setup | Formula | Notes |
|---|---|---|
| z = f(x,y), x=x(t), y=y(t) | dz/dt = (∂z/∂x)(dx/dt) + (∂z/∂y)(dy/dt) | Total derivative; all ordinary d on right |
| z = f(x,y), x=x(s,t), y=y(s,t) | ∂z/∂s = (∂z/∂x)(∂x/∂s) + (∂z/∂y)(∂y/∂s) | Partial derivative; all ∂ on right |
| F(x,y) = 0 implicitly | dy/dx = −Fx/Fy | Requires Fy ≠ 0 |
| F(x,y,z) = 0 implicitly | ∂z/∂x = −Fx/Fz , ∂z/∂y = −Fy/Fz | Requires Fz ≠ 0 |
| w = f(x,y,z), all depend on t | dw/dt = (∂w/∂x)(dx/dt) + (∂w/∂y)(dy/dt) + (∂w/∂z)(dz/dt) | Three-branch tree |
§ 05Worked Examples
Work through each example carefully. Pay attention to which formula applies, and always draw the dependency tree before writing the chain rule.
Find dz/dt given z = x²y + 3y, x = cos t, y = sin t.
Find ∂z/∂s given z = exy, x = s + t, y = s − t.
Find dy/dx for the curve x³ + y³ − 3xy = 0 (the folium of Descartes).
Find dw/dt given w = x² + y² + z², x = et, y = e−t, z = t.
Find ∂z/∂x and ∂z/∂y for the surface x²z + y²z³ − xyz = 1.
Find dz/dt at t = 0 given z = ln(x² + y²), x = et, y = t + 1.
Find ∂z/∂s and ∂z/∂t given z = sin(x/y), x = st², y = s²t.
If u = f(x − ct) where c is a constant, show that ∂u/∂t = −c · ∂u/∂x.
With x = r cos θ, y = r sin θ, find ∂f/∂r and ∂f/∂θ for any differentiable f(x,y).
A function f(x, y) is homogeneous of degree n if f(tx, ty) = tⁿ f(x, y) for all t > 0. Use the chain rule to derive Euler's theorem: x·∂f/∂x + y·∂f/∂y = n·f.
§ 06Common Mistakes to Avoid
§ 07Practice Quiz
Test your understanding of the multivariable chain rule. For the numeric questions enter your answer to 2 decimal places where needed. The score tracker updates as you go.
If z = f(x, y), x = g(t), y = h(t), which formula gives dz/dt?
Given z = x² + y², x = 3t, y = 4t. Find dz/dt.
Tip: ∂z/∂x = 2x, so (∂z/∂x)(dx/dt) = 2(3t)(3) = 18t. Similarly for y.
dz/dt = · t
- ∂z/∂x = 2x = 2(3t) = 6t, (∂z/∂x)(dx/dt) = 6t·3 = 18t
- ∂z/∂y = 2y = 2(4t) = 8t, (∂z/∂y)(dy/dt) = 8t·4 = 32t
- dz/dt = 18t + 32t = 50t
For F(x, y) = x² + y² − 25 = 0, what is dy/dx using the implicit formula?
Given z = xy, x = es, y = et. What is ∂z/∂s?
∂z/∂s =
- ∂z/∂x = y, ∂x/∂s = es, ∂y/∂s = 0 (y does not depend on s)
- ∂z/∂s = y·es + x·0 = y·es
- Equivalently: z = es·et, so ∂z/∂s = es·et = yes ✓
A function f(x, y) is homogeneous of degree 3. According to Euler's theorem, x·fx + y·fy equals:
Given z = x² − y², x = r cos θ, y = r sin θ. Find ∂z/∂r in terms of r and θ.
Enter the coefficient of the simplified expression ∂z/∂r = ?·r (give the coefficient):
- ∂z/∂r = (2x)(cos θ) + (−2y)(sin θ)
- = 2r cos²θ − 2r sin²θ
- = 2r(cos²θ − sin²θ) = 2r cos 2θ
- The coefficient of r is 2 (times cos 2θ)
How many terms appear in the chain rule formula for dw/dt when w = f(x, y, z) and all three depend on t?
Find dz/dt at t = π/2 given z = sin x cos y, x = t, y = π − t.
- ∂z/∂x = cos x cos y, ∂z/∂y = −sin x sin y
- dx/dt = 1, dy/dt = −1
- dz/dt = cos x cos y·(1) + (−sin x sin y)(−1) = cos x cos y + sin x sin y = cos(x − y)
- Since y = π − t, x − y = t − (π − t) = 2t − π. At t = π/2: 2(π/2) − π = 0.
- dz/dt = cos(x − y) = cos(0) = 1
For F(x, y) = x³ − y³ + 6xy = 0, find dy/dx using the implicit formula.
Which of the following is the correct chain rule formula for ∂z/∂t when z = f(x,y), x = x(s,t), y = y(s,t)?
§ 08What to Study Next
The multivariable chain rule connects every major idea in multivariable calculus. To deepen your understanding, these pages build directly on what you have learned here:
- Partial Derivatives, the building blocks used in every chain rule computation. Ensure you are comfortable differentiating with respect to one variable while holding others constant.
- Gradient and Directional Derivatives, the gradient vector ∇f collects all partial derivatives into a single object, and the chain rule explains why it points in the direction of steepest ascent.
- Double Integrals, when changing variables in a double integral, the Jacobian determinant arises directly from the multivariable chain rule applied to coordinate transformations.
- Chain Rule (single variable), revisiting the single-variable version with fresh eyes often clarifies exactly how the multivariable formula generalises it.