Calculus for ML
The Chain Rule: Why Backprop Exists
Derivatives of nested functions
A neural network isn't one function — it's functions inside functions, dozens deep: layer 3 eats layer 2's output, which ate layer 1's. So how does the loss respond to a weight buried in layer 1?
The chain rule answers: the derivative through nested functions is a product of intermediate slopes. If z depends on y and y depends on x, then 'z per x' = ('z per y') × ('y per x'). Rate through a pipeline is the product of the rates at each stage.
Elegant — and it stacks. A chain of 50 stages is a product of 50 slopes, computed efficiently by working backward from the output.
analogy
It's compound interest for sensitivity: each stage multiplies the signal a little. Pass through a 1.1× stage and then a 0.9×, and the total is 0.99× — the product of the chain.