Log inStart free
LESSON 2.09 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Partial derivatives and gradients

Watch one slope per input combine into an arrow that points uphill.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 2.09 · GRADIENT BAYF(1, 1) = 4
01
Stage 1 of 6 · Two inputs
f takes two inputs and gives one number: f(1, 1) = 4. A contour line joins points of equal f.
Explain it simply

Think of f as a map of hills: each point (x, y) has a height. The gray lines are contour lines, like on a hiking map. Every point on one line has the same height. P sits at (1, 1), where f is 4. A model's loss works the same way, with millions of inputs.

A contour map of f(x, y) = x² + 3y² for x and y from −3 to 3. The point P = (1, 1) has f = 4. A bold contour line passes through P.

inputs x, y and point Pnudge hvalues of fslopes and the gradientcontour lines
map of f(x, y) = x² + 3y²−3−3−2−2−1−100112233xy612P (1, 1) f = 4map of f(x, y) = x² + 3y²−3−3−2−2−1−100112233xy612P (1, 1) f = 4
Toy: f(x, y) on a 6 × 6 map · one point P · 16 directions
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
f(x, y): R2→R\sy{f}{out}{f}(\sy{x}{data}{x},\ \sy{y}{data}{y}):\ \mathbb{R}^2 \to \mathbb{R}
f(1, 1)=12+3⋅12=4f(1,\ 1) = 1^2 + 3\cdot 1^2 = 4

A function of two inputs gives one output number.

Common mix-ups

MYTHWalking against the gradient leads straight to the minimum.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01As h shrinks, what does the estimate of ∂f/∂x approach?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.