Why gradient descent works — derived from "I'm on a hill and I want to get down"
Forget the formula for a second. Here's the whole thing in plain language, and the math falls out on its own.
The setup. You're standing on a hill in thick fog. You can't see the bottom. You want to get to the lowest point. You're allowed exactly one superpower: you can feel the slope directly under your feet — which direction goes up, which goes down, and how steep.
Question: what's your strategy?
Obvious answer: take a step in the direction that goes down the steepest. Then check the slope again. Then step again. Repeat until the ground feels flat.
That's it. That's gradient descent. We're done. The rest is just writing that sentence in math.
Translating to symbols:
- "Where you are" → a point x.
- "The hill's height at your location" → a function f(x). (In ML this is the loss.)
- "The slope under your feet" → the gradient ∇f(x). It's a vector that points in the direction of steepest ascent.
- "Go downhill" → step in the opposite direction of the gradient: −∇f(x).
- "Take a step" → not a leap, not a millimeter. Multiply by a small number η (the learning rate).
Put it together:
▎ x_new = x_old − η · ∇f(x_old)
That's the update rule. Nobody invented it. It's just "go downhill, carefully" written down.
Why each piece has to be there:
- Minus sign? Because gradient points up. We want down.
- Why a small step η? Because the slope you feel is only accurate right where you're standing. Walk too far in one go and you might overshoot the valley, or even start climbing the opposite hill.
- Why repeat? Because after one step you're somewhere new, and the slope there is different. You have to re-check.
The thing nobody tells you: gradient descent doesn't "know" where the minimum is. It has no map. It only knows localslope. That's why it can get stuck in valleys that aren't the deepest one (local minima), why it crawls on flat plateaus (vanishing gradients), and why the learning rate matters so much (too big = overshoot, too small = takesforever).
Everything fancy — momentum, Adam, RMSProp, learning rate schedules — is just answering one of two questions: "how doI pick a smarter direction?" or "how do I pick a smarter step size?"
Once you see it as "blind person walking down a hill with a cane," the whole optimization literature stops feelinglike alchemy.
What did I get wrong / oversimplify? Where does this mental model break? That's exactly the kind of comment this sub is for.
Posted Jun 27, 2026, 7:24 AM UTC