Calculus

The Chain Rule

Push one small step through two machines in a row. The first stretches it, the second stretches whatever comes out, and stretching twice means multiplying the two factors. That is the whole chain rule, and it also shows why the second factor has to be read at u = g(x).

0.300.003
u = g(x)
g stretches by g′(x)
f stretches by f′(u)
the two multiplied

All three bars are drawn to one scale, so a bar that comes out longer really did get stretched.

What to observe

  1. Press Push a step through. One step goes in at the top and comes out at the bottom having been stretched twice. The funnels are the two stretches; a chain rule is just those two numbers multiplied.
  2. Look at the second machine in the panel on the right. Its dot sits atu = g(x), never at x. The second machine has no idea what x was, it only ever sees what the first one handed it, which is exactly why the rule says f′(g(x)) and not f′(x).
  3. Shrink h. All three bars shrink together but the two funnels keep the same shape, and the multiplied number stops moving. A derivative is a magnification factor, and magnification does not care how small the thing being magnified is.
  4. On sin(x²) slide x to about 1.25, where f stretches by zero. The bottom bar collapses even though the middle one is still growing hard: a chain is as dead as its deadest link.
  5. Push past that point and one factor goes negative. Its funnel crosses over and the bar below flips to the other side. Two flips in a row cancel, exactly as multiplying two negatives promises.

Shortcuts: space run/pause · s step · r reset · f fullscreen