Letβs consider each step of the naive CG algorithm with a preconditioner . This is the step where we multiply by the matrix:
This suggests using the following definition:
The following recurrence will work
Note that is missing on the left.
Then we have
with from our definition of .
Solution update step
The solution update step for is:
Recall that Letβs multiply the equation above by
This is just
Residual
Letβs focus on the residual update step. The definition of the residual for CG with symmetric preconditioning is
So:
Letβs see how we can update the residual.
Letβs rewrite this in terms of the residual :
We multiply by to the left to simplify and get our final expression:
Search direction
The search direction update is:
With our definition we get:
Multiply to the left by :
Letβs introduce the residual . Recall that:
So
We can substitute in the previous equation:
In PCG, we use a new temporary vector to reduce the time cost. We finally get:
Norm of residual
We are almost done. The last quantity we need is We again use the relation for the residual So
As desired, has disappeared in favor of !
We can even use our temporary work vector to simplify the expression further:
This is the last step in the Preconditioned CG algorithm!
Summary of PCG
All the steps above are summarized to form the PCG algorithm:
We see that this is only a very small modification of the original CG algorithm!