- •1 Introduction
- •1.1 What makes eigenvalues interesting?
- •1.2 Example 1: The vibrating string
- •1.2.1 Problem setting
- •1.2.2 The method of separation of variables
- •1.3.3 Global functions
- •1.3.4 A numerical comparison
- •1.4 Example 2: The heat equation
- •1.5 Example 3: The wave equation
- •1.6 The 2D Laplace eigenvalue problem
- •1.6.3 A numerical example
- •1.7 Cavity resonances in particle accelerators
- •1.8 Spectral clustering
- •1.8.1 The graph Laplacian
- •1.8.2 Spectral clustering
- •1.8.3 Normalized graph Laplacians
- •1.9 Other sources of eigenvalue problems
- •Bibliography
- •2 Basics
- •2.1 Notation
- •2.2 Statement of the problem
- •2.3 Similarity transformations
- •2.4 Schur decomposition
- •2.5 The real Schur decomposition
- •2.6 Normal matrices
- •2.7 Hermitian matrices
- •2.8 Cholesky factorization
- •2.9 The singular value decomposition (SVD)
- •2.10 Projections
- •2.11 Angles between vectors and subspaces
- •Bibliography
- •3 The QR Algorithm
- •3.1 The basic QR algorithm
- •3.1.1 Numerical experiments
- •3.2 The Hessenberg QR algorithm
- •3.2.1 A numerical experiment
- •3.2.2 Complexity
- •3.3 The Householder reduction to Hessenberg form
- •3.3.2 Reduction to Hessenberg form
- •3.4 Improving the convergence of the QR algorithm
- •3.4.1 A numerical example
- •3.4.2 QR algorithm with shifts
- •3.4.3 A numerical example
- •3.5 The double shift QR algorithm
- •3.5.1 A numerical example
- •3.5.2 The complexity
- •3.6 The symmetric tridiagonal QR algorithm
- •3.6.1 Reduction to tridiagonal form
- •3.6.2 The tridiagonal QR algorithm
- •3.7 Research
- •3.8 Summary
- •Bibliography
- •4.1 The divide and conquer idea
- •4.2 Partitioning the tridiagonal matrix
- •4.3 Solving the small systems
- •4.4 Deflation
- •4.4.1 Numerical examples
- •4.6 Solving the secular equation
- •4.7 A first algorithm
- •4.7.1 A numerical example
- •4.8 The algorithm of Gu and Eisenstat
- •4.8.1 A numerical example [continued]
- •Bibliography
- •5 LAPACK and the BLAS
- •5.1 LAPACK
- •5.2 BLAS
- •5.2.1 Typical performance numbers for the BLAS
- •5.3 Blocking
- •5.4 LAPACK solvers for the symmetric eigenproblems
- •5.6 An example of a LAPACK routines
- •Bibliography
- •6 Vector iteration (power method)
- •6.1 Simple vector iteration
- •6.2 Convergence analysis
- •6.3 A numerical example
- •6.4 The symmetric case
- •6.5 Inverse vector iteration
- •6.6 The generalized eigenvalue problem
- •6.7 Computing higher eigenvalues
- •6.8 Rayleigh quotient iteration
- •6.8.1 A numerical example
- •Bibliography
- •7 Simultaneous vector or subspace iterations
- •7.1 Basic subspace iteration
- •7.2 Convergence of basic subspace iteration
- •7.3 Accelerating subspace iteration
- •7.4 Relation between subspace iteration and QR algorithm
- •7.5 Addendum
- •Bibliography
- •8 Krylov subspaces
- •8.1 Introduction
- •8.3 Polynomial representation of Krylov subspaces
- •8.4 Error bounds of Saad
- •Bibliography
- •9 Arnoldi and Lanczos algorithms
- •9.2 Arnoldi algorithm with explicit restarts
- •9.3 The Lanczos basis
- •9.4 The Lanczos process as an iterative method
- •9.6 Partial reorthogonalization
- •9.5 An error analysis of the unmodified Lanczos algorithm
- •9.7 Block Lanczos
- •9.8 External selective reorthogonalization
- •Bibliography
- •10 Restarting Arnoldi and Lanczos algorithms
- •10.2 Implicit restart
- •10.3 Convergence criterion
- •10.4 The generalized eigenvalue problem
- •10.5 A numerical example
- •10.6 Another numerical example
- •10.7 The Lanczos algorithm with thick restarts
- •10.8 Krylov–Schur algorithm
- •10.9 The rational Krylov space method
- •Bibliography
- •11 The Jacobi-Davidson Method
- •11.1 The Davidson algorithm
- •11.2 The Jacobi orthogonal component correction
- •11.2.1 Restarts
- •11.2.2 The computation of several eigenvalues
- •11.2.3 Spectral shifts
- •11.3 The generalized Hermitian eigenvalue problem
- •11.4 A numerical example
- •11.6 Harmonic Ritz values and vectors
- •11.7 Refined Ritz vectors
- •11.8 The generalized Schur decomposition
- •11.9.1 Restart
- •11.9.3 Algorithm
- •Bibliography
- •12 Rayleigh quotient and trace minimization
- •12.1 Introduction
- •12.2 The method of steepest descent
- •12.3 The conjugate gradient algorithm
- •12.4 Locally optimal PCG (LOPCG)
- •12.5 The block Rayleigh quotient minimization algorithm (BRQMIN)
- •12.7 A numerical example
- •12.8 Trace minimization
- •Bibliography
172 CHAPTER 9. ARNOLDI AND LANCZOS ALGORITHMS
√
Reorthogonalization takes place in the j-th Lanczos step if maxk(ωj+1,k) > macheps. qj+1 is orthogonalized against all vectors qk with ωj+1,k > macheps3/4. In the following iteration step also qj+2 is orthogonalized against these vectors. In Table 9.2 the base10 logarithms of the values |wi,j |/macheps obtained with this procedure are listed where |wi,j | = |qi qj |, 1 ≤ j ≤ i ≤ 50 and macheps ≈ 2.2 · 10−16. In Table 9.3 the base-10 logarithms of the estimates |ωi,j |/macheps are given. The estimates are too high by (only) an order of magnitude. However, the procedure succeeds in that the resulting {qk} are semi-orthogonal.
9.7Block Lanczos
As we have seen, the Lanczos algorithm produces a sequence {qi} of orthonormal vectors. These Lanczos vectors build an orthonormal basis for the Krylov subspace Kj (x) = span{q1, . . . , qj } Rn. The restriction of A to Kj (x) is an unreduced tridiagonal matrix. However the Lanczos algorithm cannot detect the multiplicity of the eigenvalues it computes. This limitation prompted the development of the block version of the Lanczos process (Block Lanczos algorithm), which is capable of determining multiplicities of eigenvalues up to the block size.
The idea is not to start with a single vector q1 Rn but with a set of mutually orthogonal vectors which we take as the columns of the matrix Q1 Rn×p with the block size p > 1.
Associated with Q1 is the ‘big’ Krylov subspace
(9.36) |
Kjp(Q1) = span{Q1, AQ1, . . . , Aj−1Q1}. |
(We suppose, for simplicity, that Aj−1Q1 has rank p. Otherwise we would have to consider variable block sizes.)
The approach is similar to the scalar case with p = 1: Let Q1, . . . , Qj Rn×p be pairwise orthogonal block matrices (Qi Qk = O for i 6= k) with orthonormal columns (Qi Qi = Ip for all i ≤ j). Then, in the j-th iteration step, we obtain the matrix AQj and orthogonalize it against matrices Qi, i ≤ j. The columns of the matrices are obtained by means of the QR factorization or with the Gram–Schmidt orthonormalization process. We obtained the following:
Algorithm 9.5 Block Lanczos algorithm
1: Choose Q1 Fn×p such that Q1Q1 = Ip. Set j := 0 and Fn×p V := 0.
ˆ
This algorithm generates a block tridiagonal matrix Tj with the diagonal blocks Ai,
i ≤ j, the lower diagonal blocks Bi, i < j, and the Krylov basis [Q1, . . . , Qj ] of Kjp(Q1).
2:for j ≥ 0 do
3:if j > 0 then
4:V =: Qj+1Bj ; /* QR decomposition */
5:V := −Qj Bj ;
6:end if
7:j := j + 1;
8:Aj := Qj V ;
9:V := V − Qj Aj ;
10:Test for convergence (Ritz pairs, evaluation of error)
11:end for
0 |
|
|
|
|
|
|
|
0 |
0 |
|
|
|
|
|
|
1 |
1 |
0 |
|
|
|
|
|
1 |
0 |
1 |
0 |
|
|
|
|
1 |
1 |
0 |
1 |
0 |
|
|
|
1 |
1 |
1 |
0 |
1 |
0 |
|
|
0 |
1 |
1 |
0 |
0 |
0 |
0 |
|
1 |
0 |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
2 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
2 |
1 |
2 |
1 |
0 |
2 |
1 |
2 |
1 |
2 |
2 |
2 |
1 |
1 |
2 |
2 |
2 |
2 |
2 |
2 |
1 |
2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6 |
6 |
6 |
6 |
5 |
5 |
4 |
4 |
3 |
3 |
0 |
2 |
0 |
|
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
7 |
6 |
7 |
6 |
7 |
7 |
7 |
7 |
8 |
7 |
7 |
7 |
7 |
7 |
7 |
6 |
6 |
6 |
6 |
5 |
5 |
3 |
3 |
0 |
2 |
0 |
Table |
9.3: |
|
MATLAB |
demo |
|
on |
the |
loss |
|
of |
orthogonality |
among |
Lanczos |
vectors: |
|
Lanczos |
with |
partial |
reorthogonalization. |
|
|
|
|||||||||||||||||||||||||||
round(log10(abs(I-W50)/eps))
9.8. EXTERNAL SELECTIVE REORTHOGONALIZATION |
175 |
||||||||
ˆ |
, . . . , Qj ] be the Krylov basis generated by Algorithm 9.5. Then, in |
||||||||
Let Qj := [Q1, Q2 |
|||||||||
|
|
|
|
|
|
|
|
ˆ |
|
this basis, the projection of A is the block tridiagonal matrix Tj |
|
||||||||
|
|
B1 |
A2 ... |
|
|
|
|
|
|
|
|
A1 |
B1 |
|
|
|
|
|
|
Qˆj AQˆj |
= Tˆj = |
|
... ... |
B |
|
, Ai, Bi Rp×p. |
|
||
|
|
|
|
|
j−1 |
|
|
|
|
|
|
|
B |
j−1 |
A |
j |
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
ˆ
If matrices Bi are chosen to be upper triangular, then Tj is a band matrix with bandwidth 2p + 1!
Similarly as in scalar case, in the j-th iteration step we obtain the equation
ˆ − ˆ ˆ ˆ
AQj Qj Tj = Qj+1Bj Ej + Fj ,
O
.
.
Ej = . ,
O
Ip
ˆ
where Fj accounts for the e ect of roundo error. Let (ϑi, yi) be a Ritz pair of A in Kjp(Q1). Then
ˆ |
ˆ |
yi = Qj si, |
Tj si = ϑisi. |
As before, we can consider the residual norm to study the accuracy of the Ritz pair (ϑi, yi) of A
|
Ayi |
|
ϑiyi |
|
= |
|
AQˆj si |
|
ϑiQˆj si |
|
Qj+1Bj Ej si |
|
= |
Bj |
|
.. |
. |
|
k |
|
− |
|
k |
|
k |
|
− |
|
k ≈ k |
|
k |
|
|
|
s |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sj(p−1)+1,i |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jp+1,i |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We have to compute the bottom p components of the eigenvectors si in order to test for convergence.
Similarly as in the scalar case, the mutual orthogonality of the Lanczos vectors (i.e.,
ˆ
the columns of Qj ) is lost, as soon as convergence sets in. The remedies described earlier are available: full reorthogonalization or selective orthogonalization.
9.8External selective reorthogonalization
If many eigenvalues are to be computed with the Lanczos algorithm, it is usually advisable to execute shift-and-invert Lanczos with varying shifts [4].
In each new start of a Lanczos procedure, one has to prevent the algorithm from finding already computed eigenpairs. We have encountered this problem when we tried to compute multiple eigenpairs by simple vector iteration. Here, the remedy is the same as there. In the second and further runs of the Lanczos algorithm, the starting vectors are made orthogonal to the already computed eigenvectors. We know that in theory all Lanczos vectors will be orthogonal to the previously computed eigenvectors. However, because the previous eigenvectors have been computed only approximately the initial vectors are not orthogonal to the true eigenvectors. Because of this and because of floating point errors loss of orthogonality is observed. The loss of orthogonality can be monitored similarly as with partial reorthogonalization. For details see [4].
