Visual walkthrough — Gradient vector ∇f — definition, properties
Step 1 — A function of two variables is a landscape
WHAT. Take a rule that eats two numbers and returns one number, its "height". Call the height .
WHY. Before we can talk about "slope" or "steepest", we need something that has a slope. One input gives a curve; two inputs give a surface — a hill. We must picture the hill first, because every later idea is "how does the height change as I walk?"
PICTURE. Below, the input lives on the flat grey floor. Directly above each floor point, the height lifts up into a smooth hill. Follow the yellow dot: it sits at a floor point , and the vertical yellow stick measures its height .

Step 2 — Two special walks: along , along
WHAT. Freeze and walk only east (change ). The height traces a 1-D curve — a single slice of the hill. Its slope is the partial derivative . Do the same walking north (freeze ): its slope is .
WHY. A surface has infinitely many directions to walk in. That's too many to grasp at once. So we start with the two simplest walks — straight along each axis — because on those, the problem collapses to ordinary one-variable slope, which we already understand.
PICTURE. Two coloured slices cut through the yellow point. The blue slice runs east–west (only moves); its steepness at is . The green slice runs north–south (only moves); its steepness is . Each is just a hill-cross-section — an ordinary curve with an ordinary slope.

Step 3 — But we want to walk in ANY direction
WHAT. Pick any direction on the floor and call it . The little hat means it is a unit vector: its length is exactly , i.e. . We ask: how fast does height change if I walk this way?
WHY a unit vector? "Direction" and "how far" are two different questions. We want the pure rate of climb per metre walked. If our arrow were 2 metres long, we'd secretly be measuring two metres of walking and double-counting. Fixing the length to strips away the "how far" so only the "which way" remains.
PICTURE. From the yellow floor point, a red arrow of length points in some chosen direction. The blue () and green () axis-arrows are also length . Notice sits between them — any direction is a blend of "some east, some north".

Step 4 — Turn the 2-D walk into a 1-D walk
WHAT. Define a single-variable function — height as a function only of how far, , we've walked along the red arrow. Then : the slope of at the moment we set off.
WHY. We know one-variable calculus cold. The trick is to reduce the 2-D question to a 1-D one by parametrising the straight red path with one number . Now "rate of climb along " is literally "", an ordinary derivative.
PICTURE. The red path on the floor is lifted onto the hill (the red curve on the surface). Squash your view along that path and it becomes a plain 2-D graph of versus : an ordinary curve whose slope at is what we want.

Step 5 — The chain rule cracks it open
WHAT. As grows, the -coordinate is and the -coordinate is . The Chain rule (multivariable) says the total rate of height change is: (rate along ) × (how fast moves) + (rate along ) × (how fast moves).
Since and , this collapses to
WHY the chain rule and not something else? Walking along moves and at once. The chain rule is precisely the tool that says "when several inputs move together, add up each input's contribution (its own slope times its own speed)." No other rule bookkeeps simultaneous motion.
PICTURE. The red step of length casts two shadows on the floor: an eastward shadow of length and a northward shadow of length . Height climbs per eastward metre and per northward metre. Add the two climbs — that's the equation.

Step 6 — Recognise a dot product; the gradient is born
WHAT. The expression is "multiply matching entries, then add". That pattern is the dot product of two vectors: The first vector, , depends only on the hill (not on which way we chose to walk). It deserves a name: the gradient .
WHY name it? Because it factors cleanly: hill-info () times my-choice (). Once you separate "what the hill offers" from "what I choose", you can ask the hill's question — which choice is best? — without recomputing anything.
PICTURE. Two arrows drawn on the floor from : the fixed gradient (yellow) and my chosen (red). The dot product is the yellow arrow's shadow cast onto the red direction, times 's length ().

Step 7 — Which direction climbs fastest? (the payoff)
WHAT. A dot product also equals , where is the gradient's length, , and is the angle between and . So The only thing we control is . And is largest when .
WHY ? Because "how much of the gradient points along my walk" is a projection, and projection is of the angle between them. It answers exactly: what fraction of the full uphill push lands in my chosen direction?
PICTURE. As the red swings around the fixed yellow , watch the climb-rate : maximal () when they align, zero when perpendicular, most negative () when opposite.

Step 8 — The degenerate case:
WHAT. What if and ? Then is the zero vector: length , no direction. The formula gives for every .
WHY show this? The contract: never leave a scenario unpainted. At a flat spot — a hilltop, a valley floor, or a saddle — there is no uphill. "Steepest ascent" has no answer because gets multiplied by . The reader must know the formula still works; it just returns "flat, all ways".
PICTURE. Three flat-gradient landscapes: a rounded peak, a bowl valley, and a saddle. On each, the gradient arrow has shrunk to a dot — every walking direction has zero initial slope. (These are exactly the points Lagrange multipliers and optimisation hunt for.)

The one-picture summary
Everything in one frame: the hill, the yellow gradient arrow lying on the floor pointing straight uphill, a red chosen direction, its shadow (the dot product) giving the climb-rate, and the level curve the gradient stabs at a right angle.

Recall Feynman: the whole walk in plain words
You're standing on a foggy hill. First we noticed you can only feel two slopes directly: how steep it is if you step due east (), and how steep due north (). But you might want to walk diagonally. So we asked: if you take a tiny step in some direction, how much do you climb? We turned that diagonal walk into a straight-line stroll measured by one number , and the chain rule told us the climb is just "east-slope times how-much-you-go-east, plus north-slope times how-much-you-go-north". That sum is secretly a dot product — line up two lists, multiply, add. One of those lists depends only on the hill; we bottled it and called it the gradient, an arrow lying on the ground. The climb in any direction is the gradient's shadow on that direction. Shadows are longest when you face the arrow head-on — so the steepest way up is simply along the gradient itself, and its length is how steep. Walk across the arrow and its shadow vanishes: you stay level. And if the arrow ever shrinks to a dot, you're on flat ground — a peak, a valley, or a saddle — where no direction climbs at all.
Recall
Why must have length 1 in ? ::: To measure climb per unit distance; a longer vector would scale the answer by its length. What single object packs all directional slopes? ::: The gradient . Which rule converts the diagonal walk into ? ::: The multivariable chain rule. Why is the steepest-ascent direction? ::: is maxed at , i.e. aligned with . What does signal? ::: A first-order-flat point: peak, valley, or saddle — no steepest direction exists.
Connections
- Partial derivatives — the two entries of (Step 2).
- Directional derivative — the quantity we derived (Step 3).
- Chain rule (multivariable) — the engine of Step 5.
- Tangent plane and linearisation — the linear picture builds.
- Level curves and surfaces — the curve meets at a right angle (Step 7).
- Gradient descent — rides downhill.
- Lagrange multipliers — where or matters (Step 8).