Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

momentum (optimization)

Accumulating a running "velocity" from past gradients so consistent directions speed up and oscillating ones cancel out.

Classical (heavy-ball) momentum carries a velocity v^{(k)} forward across iterations: v^{(k+1)} = \beta v^{(k)} - \alpha\nabla f(x^{(k)}), x^{(k+1)} = x^{(k)} + v^{(k+1)}, for a momentum coefficient \beta\in[0,1). Consecutive gradients pointing roughly the same way reinforce each other in v, accelerating progress; consecutive gradients that flip sign (as in a narrow valley's zig-zag) partially cancel, damping the oscillation. Nesterov momentum evaluates the gradient at the look-ahead point x^{(k)}+\beta v^{(k)} instead of x^{(k)} itself, correcting the step using where the accumulated velocity is already carrying it rather than where it started.

Read the full section →
Graph settings

Calculator