Reading and display settings

Appearance

System follows your operating system and keeps following it, even if you change it later. The header's sun, moon and monitor cycle the same three options.

Text size (%) 100%

Default. Scales every text size on the site, equations and tables included.

Reading width 70ch

How much text runs across one line of prose. Narrower is easier to track; wider fits more on screen.

Line spacing 1.6

The leading on body text. Taller leading helps a tired eye stay on the line.

Density

Padding and gaps around controls, cards, and tables — how much breathing room the layout leaves itself.

Motion

System follows your operating system. Reduced removes every transition on this site. Full keeps them on unless your system asks for less.

1

The product rule is a rectangle

Two quantities changing at once

Suppose two quantities $u(t)$ and $v(t)$ both change with time, and we want the rate of change of their product. Draw the product as a rectangle of width $u$ and height $v$, so its area is $uv$. When a small step of time passes, the width grows by $\Delta u$ and the height by $\Delta v$. The area gains three new pieces: a strip on the right of area $v\,\Delta u$, a strip on top of area $u\,\Delta v$, and a corner of area $\Delta u\,\Delta v$.

$$ \Delta(uv) \;=\; v\,\Delta u \;+\; u\,\Delta v \;+\; \Delta u\,\Delta v. $$

Divide by $\Delta t$ and let it shrink. The two strips are each proportional to a single small step, so they survive the limit; the corner is a product of two small steps, so it is second order and vanishes. What is left is the product rule.

$$ \frac{d(uv)}{dt} \;=\; u\,\frac{dv}{dt} \;+\; v\,\frac{du}{dt}. $$

The rectangle $uv$ (blue) plus the strip $v\,\Delta u$ (pink), the strip $u\,\Delta v$ (blue) and the corner $\Delta u\,\Delta v$ (dark). Drag the four sliders and watch the corner stay small compared with the strips.

💡 The corner is the point. If the product rule had one term instead of two, the corner would have to vanish without the strips — it cannot, because both strips are first order. The rule has two terms because area grows along two edges, and the corner is the second-order leftover that the limit discards.
2

The power rule

One family, one formula

State it first, derive the picture second: for any constant exponent $n$,

$$ \frac{d}{dx}\,x^n \;=\; n\,x^{\,n-1}. $$

This is the difference quotient from Part 3 applied to $x^n$. The top panel is the curve with its tangent at the current point; the bottom panel samples the slope numerically and lays the formula $n\,x^{\,n-1}$ on top. Dial in any $n$ and slide $x$: the numeric derivative and the formula agree to the precision of the central difference.

Top: $f(x)=x^n$ with the tangent at the current $x$. Bottom: the numerically measured derivative (solid) against the formula $n\,x^{\,n-1}$ (dashed).

3

The reciprocal rule

One over a function

Before dividing two functions, handle one over a function. If $g(x)=1/v(x)$, then

$$ g'(x) \;=\; -\frac{v'(x)}{v(x)^2}. $$

The minus sign is the surprise: as $v$ grows, $1/v$ falls, and it falls fastest where $v$ is small. The curve below is $1/(1+ax^2)$ — a bump — and the tangent at the marker has slope given by that formula. Change the width parameter $a$ or slide $x$ and compare the numeric slope with the formula.

The reciprocal curve with its tangent. The steeper the underlying $v$ grows, the more negative the slope of $1/v$.

4

The quotient rule

Divide and differentiate

Now let $f = u/v$. The quotient rule is the product rule applied to the product $u \cdot (1/v)$, with the reciprocal rule supplying the second factor:

$$ \left(\frac{u}{v}\right)' \;=\; u\left(\frac{1}{v}\right)' + \frac{u'}{v} \;=\; -\frac{u\,v'}{v^2} + \frac{u'\,v}{v^2} \;=\; \frac{u'v - u\,v'}{v^2}. $$

Take the concrete function $f(x)=x/(1+x^2)$. Here $u=x$ and $v=1+x^2$, so $u'v-uv' = 1\cdot(1+x^2) - x\cdot 2x = 1-x^2$, and the formula reads $(1-x^2)/(1+x^2)^2$. The bottom panel overlays the numerically measured derivative on that formula; the marker and the readout let you check any point.

Top: $f(x)=x/(1+x^2)$ with the tangent at the marker. Bottom: numeric derivative (solid) against the quotient-rule formula (dashed).

⚠️ Memory aid: low d-high minus high d-low, over low squared. The numerator is $u'v - uv'$, and the order matters — swapping it flips the sign.
5

The derivatives worth memorising

A small table, checked against numbers

The rules above generate these, but they are faster recalled than re-derived. Pick a function and slide $x$: the solid curve is the numerical derivative of the chosen $f$, and the dashed curve is the remembered formula. They coincide wherever the function is smooth.

The function (faint, dotted), its numeric derivative (solid) and the known formula (dashed). Switch functions and the axes rescale.

6

Where this shows up

The grammar that composes the vocabulary

Every rule here handles one operation: multiply, divide, raise to a power. The toolbox is still missing the operation that matters most — applying one function to the output of another — and that is the subject of Part 5, The chain rule. The chain rule is the one rule that composes all the others: differentiate a complicated expression and the product, quotient and power rules fire inside it in the order the chain rule dictates.

That ordering is also what makes a network trainable. Backpropagation is the chain rule run backwards through a composition, so the rules on this page are the pieces it multiplies together — see Backpropagation once the chain rule is in hand.

7

Rules to carry forward

RuleFormulaThe picture
Constant(c)' = 0A flat line has no slope
Power(xⁿ)' = n xⁿ⁻¹The difference quotient of xⁿ, Step 2
Sum(u + v)' = u' + v'Slopes add; the graph just tilts by both amounts
Constant multiple(cu)' = c u'A vertical stretch scales every slope by the same c
Product(uv)' = u'v + uv'The growing rectangle: two strips, Step 1
Reciprocal(1/v)' = −v'/v²The bump falls fastest where v is small, Step 3
Quotient(u/v)' = (u'v − uv')/v²Product rule on u · (1/v), Step 4
Chain(f(g(x)))' = f'(g(x)) g'(x)Gears in series: multiply the rates (Part 5)
sin(sin x)' = cos xNumeric slope lands on the cosine curve
cos(cos x)' = −sin xNumeric slope lands on the negated sine curve
exp(eˣ)' = eˣThe slope equals the height everywhere
ln(ln x)' = 1/xThe slope decays like a reciprocal, Step 5
8

Further reading

9

Check your understanding

0/4 answered