Conjugate-gradient residual orthogonality (source code)

= Conjugate-gradient residual orthogonality
{c}

At iteration $m$ of the conjugate gradient method,
$$
x_m-x_0\in\mathcal K_m(A,r_0),
\qquad
r_m\perp\mathcal K_m(A,r_0),
$$
and $r_m$ itself lies in $\mathcal K_{m+1}(A,r_0)$. These Galerkin conditions imply finite termination once the Krylov subspace becomes invariant under $A$.