What is it?
Repeat : take a small step against the gradient. Cauchy proposed it in 1847; today it (and its stochastic, adaptive variants) trains essentially every neural network.
Why does it exist?
Setting and solving is impossible for a network with millions of parameters and a non-linear loss. But evaluating at one point is cheap (backpropagation), and the gradient says which direction decreases the loss fastest. Iterate.
Intuition
A ball rolling downhill in fog, one step at a time. The learning rate is the step length: too small and it crawls; too large and it overshoots, bouncing between valley walls or flying off. In a narrow valley the gradient points across the valley rather than along it, so the path zigzags — try the elongated bowl in the demo.
Formal definition
If is -Lipschitz and , then (descent lemma): the loss decreases at every step and . If is -strongly convex, convergence is linear with rate .
Formulas
- why it works: first-order Taylor
How is it computed?
θ = initial guess
for k in 1..K:
g = ∇L(θ) # backpropagation
θ = θ − η · g
if ‖g‖ < tol: break
Interactive visualization
Why does it matter?
It is the inner loop of the AI industry: trillions of gradient steps per day. Every optimizer used in practice (SGD, momentum, Adam) is a modification of this one line.
The mathematics behind it
Each step moves the parameter against the derivative of the loss: .
The update is the gradient, used as a direction.
The safe learning rate is set by the Lipschitz constant of the gradient: .
Convergence theorems guarantee under conditions on the step size.
Gradient descent stops where the derivative vanishes — at a critical point.
On strongly convex problems GD converges linearly, at a rate set by the condition number .
The first-order model is why a small step downhill decreases .
Among unit steps, minimizes : the justification of the method.
GD is explicit Euler on ; the learning rate is the time step and inherits its stability limit.
Strict minima are stable fixed points of GD exactly when .
With a small enough step the loss decreases monotonically and is bounded below, so the loss values converge.
Convergence proofs bound the decrease per step with the MVT applied to the gradient.
Where is it used?
Computing topics reachable from here, through the chain of ideas that leads to them:
What depends on it
Exercises
For , show that GD converges iff . What happens at ?
Solution
, which tends to 0 iff . With it jumps to the minimum in one step.