The Chain Rule
When and both depend on , changes for two reasons at once: because is moving and because is moving. Work out each effect (how sensitive is to that input, times how fast the input moves) and add them.
What the symbols mean
- Path through x
How much z changes because x is changing.
Explanation
The chain rule is simply the rule for how fast something changes when it depends on things that are themselves changing. It's called a "chain" because the effect passes along links: time moves your position, and your position changes the temperature you feel. The formula looks long, but it's two copies of one idea added together: (how much cares about , times how fast is moving) plus the same thing for . Two effects, added up. Bear with the notation; the idea is really that simple.
In one variable, the chain rule said that if depends on and depends on , then : rates multiply along the chain. Now depends on through two routes. Where does the plus sign come from? It's the differential from the last lesson. In a short time , moves by and moves by , and adds up their effects. Divide by and you have the formula.
Tree diagrams keep the bookkeeping straight. Draw at the top, branches down to and , and from each of those down to . Each route from down to contributes the product of the derivatives along it, and you add the routes. This scales to any number of variables, which is why it's worth the habit.
Several parameters. If and , then , and similarly for . It's the same tree; you just follow the routes that end at .
Implicit differentiation, made easy. Remember implicit differentiation from Calculus I, where you differentiated both sides of something like ? Here's a shortcut for it. A curve has secretly depending on . Differentiating with the chain rule gives , and solving for gives the formula above.
See it
Worked examples
, with and . Find .
- 1
Gather the four pieces: and , and and .
Practice
Type your answer and check it. Solve them all to complete the lesson.
with , . Find at .
with , . Find at .
Use on at .
At some point and . If and , find there at .
A rectangle's length is 10 cm and growing at 2 cm/s; its width is 6 cm and shrinking at 1 cm/s. How fast is the area changing?
A weather drone flies with velocity m/s through air where and °C per meter. How fast is the temperature it measures changing?
The hardest one here. Get it, and you've got this lesson.
Let with and . At the point where and , you know and . Find there.
Where it's used
Backpropagation in neural networks is this chain rule on a huge tree: each weight's effect on the loss is summed over every path through the network.