Now, let's consider:
$\begin{aligned}
K_m(A, x) &\equiv span \{x, Ax, A^2x, \dots A^m x \} \\
&= span \{ A^{-1} b, b, Ab, \dots A^{m-1} x \} \qquad \text{(substitute $x = A^{-1}b$)} \\
&= A span \{ A^{-1} b, b, Ab, \dots A^{m-1} b\} \qquad \text{(Invariance of Krylov subspace)} \\
&= span \{b, Ab, \dots A^m b\} \\
&= K_m(A, b)
\end{aligned}$

We learnt that $Ax = b$ has a solution in $K_m(A, b)$. Using this, we can build
solvers that exploit the Krylov subspace. We will describe GMRES and CG.
### § Generalized minimal residual --- GMRES

We wish to solve $Ax = b$ where $A$ is sparse and $b$ is normalized. The $n$th
Krylov subspace is $K_n(A, b) \equiv span~\{b, Ab, A^2b, \dots, A^nb \}$.
We approximate the actual solution with a vector $x_n \in K_n(A, b)$. We
define the *residual* as $r_n \equiv A x_n - b$.
### § Conjugate gradient descent