We derive an efficient three-term relation for the search directions .
Using the orthogonality conditions, we can derive an efficient three-term recurrent relation.
The search directions are conjugate. So this is, in fact, a type of QR decomposition of the matrix
using -orthogonality. Note that the search directions do not have norm 1. They are just conjugate.
Recall the algorithms to compute the QR factorization and the Lanczos process, . In both cases, we found the columns of using a recurrence and orthogonality. The same ideas can be applied here. Consider
and multiply to the left by , we get
From the orthogonality relations, we have that for :
and
So for , we get
and since is SPD. So , . We are only left with the term :
There is only one term left. Let us denote for convenience:
Multiply by and take a dot product with :
Theorem. The search directions in CG satisfy:
is the negative of the -projection of onto .
We find the new search direction by taking a vector in and making it conjugate to the previous .
is a linear combination of the residual and the previous search direction.