Machine learning

Stage 2 · Lesson 4 of 9

The chain rule

The maths you need

gives the derivative of a function inside another function. If y = f(g(x)), then dy/dx = f'(g(x)) × g'(x): you multiply the rates of change along the chain. For y = (3x + 1)², the outer part gives 2(3x + 1) and the inner part gives 3, so dy/dx = 6(3x + 1).

A neural network is a long chain of functions like this. , the way networks learn, is the chain rule applied from the loss back through every , reusing each result it has already worked out. This makes easy to picture: multiply many numbers smaller than 1 and the product shrinks towards zero.

Common trapmemorising the formula without being able to trace it through a small , a diagram of each step in a calculation.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Keep handy

Also worth your time

Mark this stage as not done?