its corresponding diagonal projection matrix are computed. Notice $V$ remains orthonormal (or $P$-orthonormal in case of preconditioning). After restarting, eigCG continues to append the CG preconditioned residuals $z$ to $V$, and to extend $T_i$ with the same tridiagonal coefficients. The only exception is the first residual added after restart. It requires a set of inner products, $z^HAV$, to explicitly update the $i+1$ row of matrix $T$. As shown in step 11.8, a matrix vector product can be avoided if we remember the previous vector $t_{prev}$ (step 10.1) and note that $Az = Ap - \beta_j t_{prev}$. After this point, no other extra computation is needed until the next restart ($m-2nev$ iterations).

Computationally, eigCG requires storage for $m$ vectors, but no additional matrix-vector operations or other costs during the CG iterations except at restart. At restart, all operations that involve matrices of size $m$, which includes the orthogonalization at step 11.5, have negligible cost. The only two expenses are: step 11.7 which requires $O(2N\cdot m\cdot 2nev)$ flops for $V (QZ)$, and step 11.8 which requires $O(2N\cdot 2nev)$ flops for $z_j^HAV$. This expense occurs every $(m-2nev)$ iterations, for a total of $$O(4N\cdot nev\cdot (m+1)/(m-2nev)) \mbox{ flops per iteration.}$$ Interestingly, the average cost 