Skip to main content

16  Krylov Subspaces and the Arnoldi Process

The QR algorithm of the referenced result computes every eigenvalue of a dense matrix in \(O(n^3)\) operations. Many applications instead require a few eigenvalues of a large sparse matrix, and the matrix is often available only through the product \(\bv\mapsto\bA\bv\). Power iteration (the referenced result) uses only such products, but at step \(k\) it retains only the last vector \(\bA^{k-1}\bv\) and discards the earlier ones.

The Arnoldi process retains the span of \(\bv,\bA\bv,...,\bA^{k-1}\bv\) through an orthonormal basis. We first define the subspace spanned by this sequence and explain why its natural basis is unusable in floating-point arithmetic. We then construct an orthonormal basis one vector at a time and derive the Arnoldi relation. The same relation underlies the Lanczos algorithm in the next section, the GMRES method for linear systems, and the Krylov approximation of the matrix exponential.

16.1 Krylov Subspaces

NoteDefinition: Krylov Subspace

Let \(\bA\in\fR^{n\times n}\) and let \(\bv\in\fR^n\) be nonzero. The \(k\)th Krylov subspace generated by \(\bA\) and \(\bv\) is \[ \begin{align} \mathcal{K}_k(\bA,\bv)=\operatorname{span}\{\bv,\bA\bv,...,\bA^{k-1}\bv\}. \end{align} \] Equivalently, \(\mathcal{K}_k(\bA,\bv)=\{p(\bA)\bv : p\in\mathcal{P}_{k-1}\}\), where \(\mathcal{P}_{k-1}\) denotes the polynomials of degree at most \(k-1\).

WarningExercise

For \(\bA=\operatorname{diag}(1,2,3)\) and \(\bv=(1,1,0)^T\), find the dimensions of \(\mathcal K_1\), \(\mathcal K_2\), and \(\mathcal K_3\). Find a polynomial of degree two for which \(p(\bA)\bv=\bzero\). Explain why no number of matrix products can recover the third coordinate direction from this starting vector.

WarningExercise

(Shift invariance) Show that \(\mathcal{K}_k(\bA-\sigma\bI,\bv)=\mathcal{K}_k(\bA,\bv)\) for every scalar \(\sigma\). Conclude that the Arnoldi iteration applied to \(\bA-\sigma\bI\) produces the same basis \(\bV_k\) and the Hessenberg matrix \(\bH_k-\sigma\bI\).

The \(k\)th power iterate is a multiple of \(\bA^{k-1}\bv\), so it lies in \(\mathcal{K}_k(\bA,\bv)\). Power iteration therefore selects one particular vector from the Krylov subspace, namely the one produced by the polynomial \(p(t)=t^{k-1}\). Any method that searches the whole subspace can do at least as well with the same number of matrix–vector products. the referenced section makes this comparison precise for symmetric matrices.

NoteLemma: Krylov Subspaces Stop Growing at an Invariant Subspace

If \(\mathcal{K}_{k+1}(\bA,\bv)=\mathcal{K}_k(\bA,\bv)\), then \(\mathcal{K}_k(\bA,\bv)\) is invariant under \(\bA\) in the sense of the referenced result, and \(\mathcal{K}_j(\bA,\bv)=\mathcal{K}_k(\bA,\bv)\) for every \(j\geq k\).

Write \(\mathcal K_j=\mathcal K_j(\bA,\bv)\).

  1. Every \(\bx\in\mathcal K_k\) can be written as \(\bx=\sum_{i=0}^{k-1}c_i\bA^i\bv\). Multiplying gives \[ \begin{align} \bA\bx=\sum_{i=0}^{k-1}c_i\bA^{i+1}\bv\in\mathcal K_{k+1}. \end{align} \] If \(\mathcal K_{k+1}=\mathcal K_k\), this image belongs to \(\mathcal K_k\). This is exactly the definition of invariance.

  2. The equality of the two spaces implies \(\bA^k\bv\in\mathcal K_k\). By invariance, applying \(\bA\) again gives \(\bA^{k+1}\bv\in\mathcal K_k\). Repeating this reasoning gives \(\bA^j\bv\in\mathcal K_k\) for every \(j\geq k\).

  3. For \(j\geq k\), all generators of \(\mathcal K_j\) now lie in \(\mathcal K_k\), so \(\mathcal K_j\subseteq\mathcal K_k\). The reverse inclusion follows because the generators of \(\mathcal K_k\) are among those of \(\mathcal K_j\). Therefore the spaces are equal.

TipRemark

(Ill-conditioned monomial basis) The vectors \(\bv,\bA\bv,...,\bA^{k-1}\bv\) form a basis of \(\mathcal{K}_k\) whenever the subspace has dimension \(k\), but this basis can be severely ill-conditioned. When a unique dominant eigendirection is present in the starting vector, the power-iteration argument shows that the normalized vectors \(\bA^j\bv/\|\bA^j\bv\|_2\) converge to the dominant eigenvector, so the later columns of the basis matrix become nearly parallel. The resulting near dependence makes the basis sensitive to rounding errors, which can destroy the information carried by the smaller components.

16.2 The Arnoldi Process

The remedy is to orthonormalize the Krylov sequence as it is generated. If \(\bv_1,...,\bv_j\) is an orthonormal basis of \(\mathcal{K}_j\), we obtain a new direction by multiplying the latest basis vector by \(\bA\) instead of forming \(\bA^j\bv\). We then remove its components along the existing basis by Gram–Schmidt orthogonalization (the referenced result).

NoteDefinition: The Arnoldi Iteration

Let \(\bA\in\fR^{n\times n}\) and let \(\bv\in\fR^n\) be nonzero. Set \(\bv_1=\bv/\|\bv\|_2\). For \(j=1,2,...,k\):

  1. Compute \(\bw=\bA\bv_j\).

  2. For \(i=1,...,j\), compute \(h_{ij}=\bv_i^T\bw\) and update \(\bw\leftarrow\bw-h_{ij}\bv_i\).

  3. Compute \(h_{j+1,j}=\|\bw\|_2\).

  4. If \(h_{j+1,j}=0\), stop. Otherwise, set \(\bv_{j+1}=\bw/h_{j+1,j}\).

Step 2 is modified Gram–Schmidt. The coefficients \(h_{ij}\) are collected in the \(k\times k\) upper Hessenberg matrix \(\bH_k\) and in the \((k+1)\times k\) matrix \(\bar{\bH}_k\), which is \(\bH_k\) with the additional row \(h_{k+1,k}\be_k^T\).

NoteTheorem: The Arnoldi Relation

Suppose the Arnoldi iteration completes \(k\) steps with \(h_{j+1,j}\neq0\) for \(j=1,...,k\), and let \(\bV_k=(\bv_1\ \cdots\ \bv_k)\). Then:

  1. The columns of \(\bV_k\) are orthonormal and span \(\mathcal{K}_k(\bA,\bv)\).

  2. The matrices satisfy $$ \[\begin{align} \bA\bV_k=\bV_k\bH_k+h_{k+1,k}\bv_{k+1}\be_k^T=\bV_{k+1}\bar{\bH}_k. \end{align}\] $$

  3. The Hessenberg matrix is the projection of \(\bA\) onto the Krylov subspace, \(\bH_k=\bV_k^T\bA\bV_k\).

All assertions concern exact arithmetic. We verify orthogonality, the matrix identity, the span, and the projected matrix in that order.

  1. Assume \(\bv_1,...,\bv_j\) are orthonormal. At inner-loop position \(i\), replace the current \(\bw\) by \(\bw-h_{ij}\bv_i\), where \(h_{ij}=\bv_i^T\bw\). Its inner product with \(\bv_i\) becomes \(h_{ij}-h_{ij}\bv_i^T\bv_i=0\). For an earlier vector \(\bv_l\), \(l<i\), the inner product remains zero because \(\bv_l^T\bv_i=0\). Thus the final \(\bw\) is perpendicular to every previous basis vector. Dividing by its nonzero norm gives a new unit vector. The starting vector is unit by construction, so induction establishes orthonormality at every step.

  2. The inner loop subtracts \(\sum_{i=1}^jh_{ij}\bv_i\) from the original vector \(\bA\bv_j\). Its remaining vector is \(h_{j+1,j}\bv_{j+1}\). Consequently \[ \begin{align} \bA\bv_j=\sum_{i=1}^{j+1}h_{ij}\bv_i. \end{align} \] Putting the first \(k\) such equations side by side gives \(\bA\bV_k=\bV_{k+1}\bar{\bH}_k\). The coefficients in column \(j\) have no indices beyond \(j+1\), which is why the matrix is upper Hessenberg. Separating its final row gives the other form of the Arnoldi relation.

  3. The first vector spans \(\mathcal K_1\). Suppose the first \(j\) vectors span \(\mathcal K_j\). The column identity expresses \(\bv_{j+1}\) as a combination of \(\bA\bv_j\) and previous basis vectors. Each belongs to \(\mathcal K_{j+1}\), so \(\bv_{j+1}\) does too. There are \(j+1\) independent orthonormal vectors in this space, whose definition supplies at most \(j+1\) generators. Its dimension is therefore exactly \(j+1\), and these vectors span it.

  4. Multiply the Arnoldi relation by \(\bV_k^T\) on the left: \[ \begin{align} \bV_k^T\bA\bV_k &=\bV_k^T\bV_k\bH_k +h_{k+1,k}\bV_k^T\bv_{k+1}\be_k^T\\ &=\bI_k\bH_k+\bzero=\bH_k. \end{align} \] The two simplifications follow from orthonormality proved in the first step.

For the standard Arnoldi construction and its use in Krylov methods, see Saad (2003).

TipRemark

(Arnoldi cost) Step \(j\) requires one product with \(\bA\) and \(j\) inner products and vector updates of length \(n\). After \(k\) steps the iteration has used \(k\) matrix–vector products and \(O(k^2n)\) additional operations, and it stores \(k+1\) vectors of length \(n\). The orthogonalization cost and storage both grow with \(k\). For a symmetric matrix, the referenced section shows that most of the coefficients \(h_{ij}\) vanish and that the growth disappears.

16.3 Ritz Pairs and Breakdown

The matrix \(\bH_k\) is small, so its eigenvalues can be computed by the dense QR algorithm. Its eigenpairs, lifted back to \(\fR^n\) through \(\bV_k\), serve as approximate eigenpairs of \(\bA\). The Arnoldi relation measures their quality without any further products with \(\bA\).

NoteDefinition: Ritz Pairs

Let \(\bH_k\bs=\theta\bs\) with \(\|\bs\|_2=1\). The scalar \(\theta\) is a Ritz value and the unit vector \(\tilde{\bu}=\bV_k\bs\in\mathcal{K}_k(\bA,\bv)\) is the corresponding Ritz vector of \(\bA\) with respect to \(\mathcal{K}_k(\bA,\bv)\).

NoteTheorem: Residual of a Ritz Pair

Let \((\theta,\tilde{\bu})\) be a Ritz pair with \(\tilde{\bu}=\bV_k\bs\), and let \(s_k\) denote the last entry of \(\bs\). Then \[ \begin{align} \bA\tilde{\bu}-\theta\tilde{\bu}=h_{k+1,k}s_k\,\bv_{k+1}, \qquad \|\bA\tilde{\bu}-\theta\tilde{\bu}\|_2=h_{k+1,k}|s_k|. \end{align} \]

WarningExercise

Multiply the Arnoldi relation by \(\bs\) and use \(\bH_k\bs=\theta\bs\). Identify the single remaining term, and take its norm. Explain why this residual evaluation needs no new product with \(\bA\).

The residual norm depends only on \(h_{k+1,k}\) and the last entry of a \(k\)-dimensional eigenvector. We can therefore monitor convergence of every Ritz pair at each step and form \(\tilde{\bu}=\bV_k\bs\) only for the pairs that have converged. A small residual shows that \((\theta,\tilde{\bu})\) is an exact eigenpair of a nearby matrix. For a symmetric matrix, the referenced result then places an eigenvalue within the residual norm of \(\theta\). For a nonnormal diagonalizable matrix, the referenced result multiplies this distance by the condition number of the eigenvector basis, which can be large.

NoteCorollary: Breakdown Gives Exact Eigenvalues

If the Arnoldi iteration stops at step \(k\) because \(h_{k+1,k}=0\), then \(\mathcal{K}_k(\bA,\bv)\) is invariant under \(\bA\), and every Ritz pair is an exact eigenpair of \(\bA\).

At breakdown, the unnormalized vector remaining after orthogonalization is zero. A vector \(\bv_{k+1}\) is therefore not defined, but it is also unnecessary: the column equations give the shortened identity \[ \begin{align} \bA\bV_k=\bV_k\bH_k. \end{align} \]

  1. An arbitrary vector in the Krylov space has the form \(\bx=\bV_k\by\). Applying \(\bA\) gives \(\bA\bx=\bV_k\bH_k\by\), which is another linear combination of the columns of \(\bV_k\). Thus the space is invariant.

  2. Let \(\bH_k\bs=\theta\bs\) with \(\bs\neq\bzero\). Multiply by \(\bV_k\) and use the shortened identity: \[ \begin{align} \bA(\bV_k\bs)=\bV_k\bH_k\bs=\theta(\bV_k\bs). \end{align} \] The lifted vector is nonzero because \(\|\bV_k\bs\|_2=\|\bs\|_2>0\). It is therefore an eigenvector, not merely a zero vector satisfying the equation. Every Ritz pair is consequently exact.

WarningExercise

(Exact termination) Suppose \(\bv\) is a combination of exactly \(m\) eigenvectors of a diagonalizable matrix \(\bA\), with nonzero coefficients and distinct eigenvalues. Prove that \(\dim\mathcal{K}_k(\bA,\bv)=\min(k,m)\), and use the referenced result and the referenced result to conclude that the Arnoldi iteration stops at step \(m\) with those \(m\) eigenvalues as its Ritz values.

16.4 Further Exercises

WarningExercise

(Monomial versus Arnoldi basis) Let \(\bA=\operatorname{diag}(1,2,...,100)\) and \(\bv=(1,...,1)^T\). For \(k=5,10,15,20\), compute the condition number of the matrix with columns \(\bv,\bA\bv,...,\bA^{k-1}\bv\), and the quantity \(\|\bV_k^T\bV_k-\bI\|_2\) for the Arnoldi basis. Explain the growth of the first quantity using power iteration.

WarningExercise

(Implementing Arnoldi) Implement the referenced result for a function that applies \(\bA\) to a vector. Test it on a random \(200\times200\) nonsymmetric matrix by checking \(\|\bA\bV_k-\bV_{k+1}\bar{\bH}_k\|_2\) and by comparing the residuals of the referenced result with directly computed residuals \(\|\bA\tilde{\bu}-\theta\tilde{\bu}\|_2\).