The chain rule
Differentiate a composition by multiplying the rates of change along the chain.
Builds on: Derivatives
What the animation says
A nudge through a chain
Often an output doesn't depend on x directly. x sets a middle quantity, u, and u sets the output, y. Real systems are long chains like this, each step feeding the next. You can read the rate of each single step. But nudge x at the start: how far does y move at the far end? Try it with money. One dollar buys zero point nine euros, and one euro buys a hundred sixty yen. So how many yen does one dollar buy?
Rates multiply
Multiply. Zero point nine times a hundred sixty is a hundred forty-four yen. Each step scales the nudge it receives. Now nudge x by a tiny amount. u moves by its rate times that nudge. That move is itself a nudge to u, so y moves by its own rate times it. So the rate of y per x is the rate of y per u, times the rate of u per x. That's the chain rule.
Where to measure the outer rate
Now a real case: y equals three x plus one, squared, at x equals one. Inner step: u is three x plus one. At x equals one, u is four. Its rate is three. Outer step: y is u squared. Its rate is two times u. But two u needs a number plugged in, and the outer step doesn't see x. It only sees u. Tap the value where the outer rate must be measured.
Multiply along the chain
The outer rate, measured at u equals four, is two times four: eight. The inner rate is three. Multiply along the chain: eight times three is twenty-four. So y should move about twenty-four times as much as x does. Let's test it. Nudge x by one thousandth. About how far does y move?
Check it, then remember
Run it. x becomes one point zero zero one, so u becomes four point zero zero three. Square that: y is sixteen point zero two four zero zero nine. It moved about zero point zero two four. That's twenty-four per unit, just as the chain rule said. To find how the end of a chain responds to a nudge at the start, multiply every step's rate. Measure each rate where that step currently is. Later, this one rule tells a long chain of calculations how each early setting affects the result.
Rates along a chain multiply
The chain rule
Worked: y = (3x + 1)² at x = 1
Remember
On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.
Bytewise
All courses