Tensor by Tensor

MODULE 01 · LESSON 05

Chain rule

The chain rule joins local slopes across connected calculations.

PLAIN-LANGUAGE INTRODUCTION

What is this?

The chain rule joins local slopes across connected calculations.

One simple example

Let u=3x and L=u² at x=2. Then dL/dx = 12×3 = 36.

What goes in?

Connected calculations and their starting value. Here, x=2.

What comes out?

The final change caused by the starting value. Here, dL/dx=36.

Why does it matter?

Backpropagation uses this rule to find every parameter’s effect on loss.

What is it not?

Backpropagation does not update parameters. It calculates their gradients.

WORK THROUGH THE IDEA

See the idea in more detail

  1. First compute forward: u = 3×2 = 6. Then L = 6² = 36.
  2. The local slope from x to u is du/dx = 3.
  3. The local slope from u to L is dL/du = 2u = 12.
  4. Multiply connected slopes: dL/dx = 12×3 = 36. Backpropagation repeats this backward.
  5. Common mistake: adding connected slopes gives 15. The chain rule multiplies them.
Open the detailed notes ↗