Why backpropagation uses it
A neural network is a composition of functions. The chain rule propagates the loss derivative from the output through each layer to its parameters. Each local derivative contributes a factor; products that are consistently tiny or large can cause vanishing or exploding gradients. Activation choices, initialization, and normalization influence this behavior, but the chain rule itself is exact.
For several variables, the same idea uses Jacobian matrices: derivatives compose by matrix multiplication. See partial derivatives and gradients and Jacobians and Hessians.
Label the inner and outer changes
For y=(3x+1)², set u=3x+1 and y=u². The inner change is du/dx=3; the outer change is dy/du=2u. Multiplying gives dy/dx=(2u)(3)=6(3x+1), which is 24 at x=1. The outer derivative is evaluated at the current inner output; writing 2(3x+1) without multiplying by 3 misses how quickly the input to the square changes.
The rule extends to more nested functions by multiplying one local derivative for each link in the dependency chain. In multiple dimensions, those local derivatives are Jacobian matrices and composition multiplies Jacobians in the correct order. Neural-network backpropagation applies this rule from the loss back toward earlier layers. Repeated multiplication by derivatives smaller than one can shrink a gradient, while derivatives larger than one can amplify it; this is the source of vanishing or exploding gradients, not a flaw in the rule. See Jacobians and Hessians for the matrix form.
Try this above
Change the inner and outer rates separately. Notice that if either local derivative is zero, the derivative through the whole composition is zero at that point.
A useful check is to differentiate y=sin(x²). The outer derivative is cos(u), evaluated at u=x²; the inner derivative is 2x. Therefore dy/dx=2x cos(x²). At x=0 the inner rate is zero, so the composite function has zero derivative there even though sine itself is changing at the output. Keeping “outer derivative at inner value” and “inner derivative” separate avoids the common mistake of differentiating only the outside function.
The chain rule also explains units: if a car's position changes in metres as a function of time in seconds, and speed depends on position, multiplying the rate of speed change per metre by metres per second yields acceleration per second. The intermediate units cancel. When differentiating nested scientific formulas, track both the inner variable and its units; a missing factor often reveals itself dimensionally. A function with a kink may not have a derivative at that point, so the ordinary chain rule needs differentiability assumptions.