Conjugate Gradient for Quadratics

Below you can find the animation of the conjugate gradient method applied to a quadratic function for different condition numbers and a comparison with the gradient descent method and Chebyshev’s acceleration of gradient descent method.

Code