AI Engineer Path

Concept Lab · Week 4 · Prerequisites

The chain rule as a pipeline

Nudge the input and watch the change multiply through each stage.

The idea: Derivatives and the chain rule

The derivative f′(x)f'(x) is the slope of ff at xx: how much the output changes per tiny change in input. Rules worth knowing cold: power rule ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1}, exponentials ddxex=ex\frac{d}{dx}e^x = e^x, and the sigmoid's tidy derivative σ′(x)=σ(x)(1−σ(x))\sigma'(x) = \sigma(x)(1-\sigma(x)).

The chain rule: if y=f(g(x))y = f(g(x)), then dydx=f′(g(x))⋅g′(x)\frac{dy}{dx} = f'(g(x))\cdot g'(x). Wiggle xx; it moves gg by g′g'; that moves ff by f′f' times as much. Rates multiply along the chain.

A neural network is a long chain of functions. Backpropagation is nothing more than applying the chain rule from the loss backwards through every step, reusing intermediate results.

Open the full lesson in week 4

Next simulation: Gradient descent