Final expressions

We can compute the residual iteratively as

$$ \begin{equation*} \hat{r}_{k+1}=\hat{b}-\hat{A}\hat{x}_{k+1}, \end{equation*} $$

which equals

$$ \begin{equation*} \hat{b}-\hat{A}(\hat{x}_k+\alpha_k\hat{r}_k), \end{equation*} $$

or

$$ \begin{equation*} (\hat{b}-\hat{A}\hat{x}_k)-\alpha_k\hat{A}\hat{r}_k, \end{equation*} $$

which gives

$$ \alpha_k = \frac{\hat{r}_k^T\hat{r}_k}{\hat{r}_k^T\hat{A}\hat{r}_k} $$

leading to the iterative scheme

$$ \begin{equation*} \hat{x}_{k+1}=\hat{x}_k-\alpha_k\hat{r}_{k}, \end{equation*} $$