Conjugate gradient method and iterations

If we choose the conjugate vectors \( \hat{p}_k \) carefully, then we may not need all of them to obtain a good approximation to the solution \( \hat{x} \). We want to regard the conjugate gradient method as an iterative method. This will us to solve systems where \( n \) is so large that the direct method would take too much time.

We denote the initial guess for \( \hat{x} \) as \( \hat{x}_0 \). We can assume without loss of generality that $$ \begin{equation*} \hat{x}_0=0, \end{equation*} $$ or consider the system $$ \begin{equation*} \hat{A}\hat{z} = \hat{b}-\hat{A}\hat{x}_0, \end{equation*} $$ instead.