Gradients Through a Linear Layer

Multivariate calculus from first principles

A linear layer sends an input vector x through a weight matrix W, then adds a bias b (with the bias the map is technically affine, linear plus a shift, though ML universally calls it a linear layer). The forward calculation is short: z = Wx + b. Training needs the reverse calculation too, finding how the loss changes with every input, every weight, and every bias.

🔒 This is a Pro lesson — the interactive figure, worked examples, quiz and practice open with Pro access.

▶ Gradients Through a Linear Layer
← Computation GraphsStable Softmax & Log-Sum-Exp →