---
title: "The Multivariable Chain Rule"
description: "Differentiate a composition when several inputs each depend on other variables, by summing one contribution per path through the dependency diagram."
canonical: https://lightmysky.com/learn/mathematics/the-multivariable-chain-rule-mt_CHSHdNxPmJ
source: https://lightmysky.com/learn/mathematics/the-multivariable-chain-rule-mt_CHSHdNxPmJ.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# The Multivariable Chain Rule

Differentiate a composition when several inputs each depend on other variables, by summing one contribution per path through the dependency diagram.

Subject: Mathematics · Area: Calculus & Analysis · Ages 19 to 20
Page: https://lightmysky.com/learn/mathematics/the-multivariable-chain-rule-mt_CHSHdNxPmJ

## Ready when they can

- Draw the dependency diagram, identify its derivative products and check the chain rule's differentiability assumptions
- Differentiate z = f(x, y) with x and y both functions of t
- Handle two intermediate variables and two independent ones

## Lesson: One term per path

The tangent plane adds first-order changes from x and y. Suppose f is differentiable at (x(t),y(t)) and both inputs are differentiable at t. Write f_x=∂f/∂x and f_y=∂f/∂y. For z=f(x,y), dz/dt=f_x dx/dt+f_y dy/dt. Evaluate outer partials at the input pair. Draw z above x,y, then t below; link z to both intermediates and each to t. Existing partials alone do not establish differentiability.

*(drawing: The cells list the two paths and their products. Add the products to obtain dz/dt.)*

**Example.** For z=x²+3y², the outer partials are 2x and 6y. Set x=2t and y=t. The inner derivatives are 2 and 1, so dz/dt=2x(2)+6y(1)=14t. At t=2 the rate is 28. Substitution checks this: z=7t². For z=Ax+By, use A dx/dt+B dy/dt. For z=xy, the outer partials are y and x, giving y dx/dt+x dy/dt.

For differentiable f,x,y with independent inputs s,t, use partial derivatives. Hold t fixed to find ∂z/∂s=f_x ∂x/∂s+f_y ∂y/∂s. Hold s fixed to find ∂z/∂t=f_x ∂x/∂t+f_y ∂y/∂t. Evaluate outer partials at (x(s,t),y(s,t)) and inner partials at (s,t). For example, ∂(st)/∂s=t and ∂(s+t)/∂s=1. Keep each intermediate paired with its own outer partial.

Use input values when evaluating f_x and f_y, not the pair of inner derivatives. Supplied local rates are enough to calculate the output rate. If f_x=3, f_y=-2, dx/dt=4 and dy/dt=1 at the same moment and position, then dz/dt=3(4)+(-2)(1)=10. Full formulas for f,x,y are unnecessary when these derivative values are known.

You can solve the chain-rule equation for an unknown inner rate. If f_y≠0, then ∂y/∂s=(∂z/∂s-f_x ∂x/∂s)/f_y. First subtract the known contribution, then divide by f_y. For example, f_x=2, f_y=3, ∂x/∂s=3 and ∂z/∂s=12 give 12=6+3 ∂y/∂s, so ∂y/∂s=2.

Use radians: (cos t)'=-sin t and (sin t)'=cos t. For z=x²+y², x=2cos t and y=2sin t, the two contributions are -8cos t sin t and 8sin t cos t. They cancel, giving dz/dt=0. Contributions can cancel even when neither is zero. A zero factor removes only its own term: for z=x+y, dx/dt=0 and dy/dt=2 give dz/dt=2.

The vector form uses ∇f=(f_x,f_y) and r'=(dx/dt,dy/dt). Their dot product is f_x dx/dt+f_y dy/dt, so dz/dt=∇f·r'. If f is temperature in °C, x,y are distances in cm and t is seconds, each product has units (°C/cm)(cm/s)=°C/s. Both contributions must have matching units before you add them.

**Recap.** Check differentiability, multiply along each path and add. Evaluate outer partials at the input values. With two independent inputs, hold the other input fixed.

*The lesson, questions, worked solutions and flashcards were written for this learning dataset.*

## Practice

16 questions on this page, each with its working shown.

## Needs first

- [Tangent Planes and Linear Approximation](https://lightmysky.com/learn/mathematics/tangent-planes-and-linear-approximation-mt_EYMcjChX_m)

## Optional connections

- [The Chain Rule](https://lightmysky.com/learn/mathematics/the-chain-rule-mt_kdhl4dmwJn)

## Opens up

- [Backpropagation: Assigning Blame for an Error](https://lightmysky.com/learn/computing/backpropagation-assigning-blame-for-an-error-mt_5bwaSWfF96)
- [Directional Derivatives and the Gradient](https://lightmysky.com/learn/mathematics/directional-derivatives-and-the-gradient-mt_LW_KckY5Ad)
