Arnoldi iteration
In numerical linear algebra, the Arnoldi iteration is an eigenvalue algorithm and an important example of an iterative method. Arnoldi finds an approximation to the eigenvalues and eigenvectors of general matrices by constructing an orthonormal basis of the Krylov subspace, which makes it particularly useful when dealing with large sparse matrices.
The Arnoldi method belongs to a class of linear algebra algorithms that give a partial result after a small number of iterations, in contrast to so-called direct methods which must complete to give any useful results. The partial result in this case being the first few vectors of the basis the algorithm is building.
When applied to Hermitian matrices it reduces to the Lanczos algorithm. The Arnoldi iteration was invented by W. E. Arnoldi in 1951.
Krylov subspaces and the power iteration
An intuitive method for finding the largest eigenvalue of a given m × m matrix is the power iteration: starting with an arbitrary initial vector b, calculate Ab, A2b, A3b,… normalizing the result after every application of the matrix A.This sequence converges to the eigenvector corresponding to the eigenvalue with the largest absolute value,. However, much potentially useful computation is wasted by using only the final result,. This suggests that instead, we form the so-called Krylov matrix:
The columns of this matrix are not in general orthogonal, but we can extract an orthogonal basis, via a method such as Gram–Schmidt orthogonalization. The resulting set of vectors is thus an orthogonal basis of the Krylov subspace,. We may expect the vectors of this basis to span good approximations of the eigenvectors corresponding to the largest eigenvalues, for the same reason that approximates the dominant eigenvector.
The Arnoldi iteration
The Arnoldi iteration uses the modified Gram–Schmidt process to produce a sequence of orthonormal vectors, q1, q2, q3, …, called the Arnoldi vectors, such that for every n, the vectors q1, …, qn span the Krylov subspace. Explicitly, the algorithm is as follows:- Start with an arbitrary vector q1 with norm 1.
- Repeat for k = 2, 3, …
- *
- * for j from 1 to k − 1
- **
- **
- *
- *
The algorithm breaks down when qk is the zero vector. This happens when the minimal polynomial of A is of degree k. In most applications of the Arnoldi iteration, including the eigenvalue algorithm below and GMRES, the algorithm has converged at this point.
Every step of the k-loop takes one matrix-vector product and approximately 4mk floating point operations.
In the programming language python:
import numpy as np
def arnoldi_iteration:
"""Computes a basis of the -Krylov subspace of A: the space
spanned by.
Arguments
A: m × m array
b: initial vector
n: dimension of Krylov subspace, must be >= 1
Returns
Q: m x array, the columns are an orthonormal basis of the
Krylov subspace.
h: x n array, A on basis Q. It is upper Hessenberg.
"""
m = A.shape
h = np.zeros)
Q = np.zeros)
q = b / np.linalg.norm # Normalize the input vector
Q = q # Use it as the first Krylov vector
for k in range:
v = A.dot # Generate a new candidate vector
for j in range: # Subtract the projections on previous vectors
h = np.dot
v = v - h * Q
h = np.linalg.norm
eps = 1e-12 # If v is shorter than this threshold it is the zero vector
if h > eps: # Add the produced vector to the list, unless
q = v / h # the zero vector is produced.
Q = q
else: # If that happens, stop iterating.
return Q, h
return Q, h
Properties of the Arnoldi iteration
Let Qn denote the m-by-n matrix formed by the first n Arnoldi vectors q1, q2, …, qn, and let Hn be the matrix formed by the numbers hj,k computed by the algorithm:The orthogonalization method has to be specifically chosen such that the lower Arnoldi/Krylov components are removed from higher Krylov vectors. As can be expressed in terms of q1, …, qi+1 by construction, they are orthogonal to qi+2, …, qn,
We then have
The matrix Hn can be viewed as A in the subspace with the Arnoldi vectors as an orthogonal basis; A is orthogonally projected onto. The matrix Hn can be characterized by the following optimality condition. The characteristic polynomial of Hn minimizes ||pq1||2 among all monic polynomials of degree n. This optimality problem has a unique solution if and only if the Arnoldi iteration does not break down.
The relation between the Q matrices in subsequent iterations is given by
where
is an -by-n matrix formed by adding an extra row to Hn.
Finding eigenvalues with the Arnoldi iteration
The idea of the Arnoldi iteration as an eigenvalue algorithm is to compute the eigenvalues in the Krylov subspace. The eigenvalues of Hn are called the Ritz eigenvalues. Since Hn is a Hessenberg matrix of modest size, its eigenvalues can be computed efficiently, for instance with the QR algorithm, or somewhat related, Francis's algorithm. Also Francis's algorithm itself can be considered to be related to power iterations, operating on nested Krylov subspace. In fact, the most basic form of Francis's algorithm appears to be to choose b to be equal to Ae1, and extending n to the full dimension of A. Improved versions include one or more shifts, and higher powers of A may be applied in a single steps.This is an example of the Rayleigh-Ritz method.
It is often observed in practice that some of the Ritz eigenvalues converge to eigenvalues of A. Since Hn is n-by-n, it has at most n eigenvalues, and not all eigenvalues of A can be approximated. Typically, the Ritz eigenvalues converge to the largest eigenvalues of A. To get the smallest eigenvalues of A, the inverse of A should be used instead. This can be related to the characterization of Hn as the matrix whose characteristic polynomial minimizes ||pq1|| in the following way. A good way to get p small is to choose the polynomial p such that p is small whenever x is an eigenvalue of A. Hence, the zeros of p will be close to the eigenvalues of A.
However, the details are not fully understood yet. This is in contrast to the case where A is symmetric. In that situation, the Arnoldi iteration becomes the Lanczos iteration, for which the theory is more complete.
Implicitly restarted Arnoldi method (IRAM)
Due to practical storage consideration, common implementations of Arnoldi methods typically restart after some number of iterations. One major innovation in restarting was due to Lehoucq and Sorensen who proposed the Implicitly Restarted Arnoldi Method. They also implemented the algorithm in a freely available software package called ARPACK. This has spurred a number of other variations including Implicitly Restarted Lanczos method. It also influenced how other restarted methods are analyzed.Theoretical results have shown that convergence improves with an increase in the Krylov subspace dimension n. However, an a-priori value of n which would lead to optimal convergence is not known. Recently a dynamic switching strategy has been proposed which fluctuates the dimension n before each restart and thus leads to acceleration in the rate of convergence.