Gradient Descent Playground

f(x) = ½ xTAx − bTx, gradient ∇f(x) = Ax − b, update xk+1 = xk − α∇f(xk).

Stopping criteria (stop at the first one met)

‖∇f(xk)‖ < εg, ‖xk+1 − xk‖ < εs, or k reaches the maximum. A run is also stopped if it clearly diverges.

The bowl: matrix A (symmetric) and vector b
Start x0 = (, )

You can also click or tap the picture to choose a start point.

Picture

Contour lines of f with the gradient descent path

    Theory for this A and α

      Iterates

      Gradient descent iterates
      kxₖf(xₖ)‖∇f(xₖ)‖step size