
- •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.5 An error analysis of the unmodified Lanczos algorithm
- •9.6 Partial reorthogonalization
- •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
3.5. THE DOUBLE SHIFT QR ALGORITHM |
65 |
||||
H( 0) = |
[ -4.4529e-01 |
-1.8641e+00 |
-2.8109e+00 |
7.2941e+00] |
|
|
[ |
8.0124e+00 |
6.2898e+00 |
1.2058e+01 |
-1.6088e+01] |
|
[ |
0.0000e+00 |
4.0087e-01 |
1.1545e+00 |
-3.3722e-01] |
|
[ |
0.0000e+00 |
0.0000e+00 |
-1.5744e-01 |
3.0010e+00] |
H( 1) = |
[ |
3.0067e+00 |
1.6742e+00 |
-2.3047e+01 |
-4.0863e+00] |
|
[ |
5.2870e-01 |
8.5146e-01 |
1.1660e+00 |
-1.5609e+00] |
|
[ |
|
-1.7450e-01 |
3.1421e+00 |
-1.1140e-01] |
|
[ |
|
|
-1.0210e-03 |
2.9998e+00] |
H( 2) = |
[ |
8.8060e-01 |
-4.6537e-01 9.1630e-01 |
1.6146e+00] |
|
|
[ -1.7108e+00 |
5.3186e+00 |
2.2839e+01 |
-4.0224e+00] |
|
|
[ |
|
-2.2542e-01 |
8.0079e-01 |
5.2445e-01] |
|
[ |
|
|
-1.1213e-07 |
3.0000e+00] |
H( 3) = |
[ |
1.5679e+00 |
9.3774e-01 |
1.5246e+01 |
1.2703e+00] |
|
[ |
1.3244e+00 |
2.7783e+00 |
1.7408e+01 |
4.1764e+00] |
|
[ |
|
3.7230e-02 |
2.6538e+00 |
-7.8404e-02] |
|
[ |
|
|
8.1284e-15 |
3.0000e+00] |
H( 4) = |
[ |
9.9829e-01 |
-7.5537e-01 -5.6915e-01 |
1.9031e+00] |
|
|
[ -3.2279e-01 |
5.1518e+00 |
2.2936e+01 |
-3.9104e+00] |
|
|
[ |
|
-1.6890e-01 |
8.4993e-01 |
3.8582e-01] |
|
[ |
|
|
-5.4805e-30 |
3.0000e+00] |
H( 5) = |
[ |
9.3410e-01 |
-3.0684e-01 3.0751e+00 |
-1.2563e+00] |
|
|
[ |
3.5835e-01 |
3.5029e+00 |
2.2934e+01 |
4.1807e+00] |
|
[ |
|
3.2881e-02 |
2.5630e+00 |
-7.2332e-02] |
|
[ |
|
|
1.1313e-59 |
3.0000e+00] |
H( 6) = |
[ |
1.0005e+00 |
-8.0472e-01 -8.3235e-01 |
1.9523e+00] |
|
|
[ -7.5927e-02 |
5.1407e+00 |
2.2930e+01 |
-3.8885e+00] |
|
|
[ |
|
-1.5891e-01 |
8.5880e-01 |
3.6112e-01] |
|
[ |
|
|
-1.0026e-119 |
3.0000e+00] |
H( 7) = |
[ |
9.7303e-01 |
-6.4754e-01 -8.9829e-03 |
-1.8034e+00] |
|
|
[ |
8.2551e-02 |
3.4852e+00 |
2.3138e+01 |
3.9755e+00] |
|
[ |
|
3.3559e-02 |
2.5418e+00 |
-7.0915e-02] |
|
[ |
|
|
3.3770e-239 |
3.0000e+00] |
H( 8) = |
[ |
1.0002e+00 |
-8.1614e-01 -8.9331e-01 |
1.9636e+00] |
|
|
[ -1.8704e-02 |
5.1390e+00 |
2.2928e+01 |
-3.8833e+00] |
|
|
[ |
|
-1.5660e-01 |
8.6086e-01 |
3.5539e-01] |
|
[ |
|
|
0 |
3.0000e+00] |
The numerical example shows that the shifted Hessenberg QR algorithm can work very nicely. In this example the (4,3) element is about 10−30 after 3 steps. (We could stop there.) The example also nicely shows a quadratic convergence rate.
3.5The double shift QR algorithm
The shifted Hessenberg QR algorithm does not always work so nicely as in the previous example. If α in (3.8) is O(ε) then hn,n−1 can be large. (A small α indicates a near singular H1:n−1,1:n−1.)
Another problem occurs if real Hessenberg matrices have complex eigenvalues. We know that for reasonable convergence rates the shifts must be complex. If an eigenvalue
¯
λ has been found we can execute a single perfect shift with λ. It is (for rounding errors) unprobable however that we will get back to a real matrix.

66 |
CHAPTER 3. THE QR ALGORITHM |
Since the eigenvalues come in complex conjugate pairs it is natural to search for a pair of eigenvalues right-away. This is done by collapsing two shifted QR steps in one double step with the two shifts being complex conjugates of each other.
Let σ1 and σ2 be two eigenvalues of the real matrix (cf. Wilkinson shift (3.9))
" (k−1)
G = hn−1,n−1
(k−1) hn,n−1
(k−1) #
hn−1,n R2×2. h(n,nk−1)
If σ1 C\R then σ2 = σ¯1. Let us perform two QR steps using σ1 and σ2 as shifts. Setting k = 1 for convenience we get
H0 − σ1I = Q1R1,
(3.10)
H1 = R1Q1 + σ1I,
H1 − σ2I = Q2R2,
H2 = R2Q2 + σ2I.
From the second and third equation in (3.10) we obtain
R1Q1 + (σ1 − σ2)I = Q2R2.
Multiplying this equation with Q1 from the left and with R1 from the right we get
Q1R1Q1R1 + (σ1 − σ2)Q1R1 = Q1R1(Q1R1 + (σ1 − σ2)I)
= (H0 − σ1I)(H0 − σ2I) = Q1Q2R2R1.
Because σ2 = σ¯1 we have
M := (H0 − σ1I)(H0 − σ¯1I) = H02 − 2Re(σ)H0 + |σ|2I = Q1Q2R2R1.
Therefore, (Q1Q2)(R2R1) is the QR factorization of a real matrix. We can choose (scale) Q1 and Q2 such that Z := Q1Q2 is real orthogonal. (Then also R2R1 is real.) By
consequence,
H2 = (Q1Q2) H0(Q1Q2) = ZT H0Z
is real.
A procedure to compute H2 by avoiding complex arithmetic could consist of three steps:
|
|
|
2 |
|
|
|
(k−1) |
|
1. Form the real matrix M = H0 |
− sH0 + tI with s = 2Re(σ) = trace(G) = hn−1,n−1 |
+ |
||||||
(k−1) |
and t = |σ| |
2 |
|
(k−1) |
(k−1) |
(k−1) (k−1) |
|
|
hn,n |
|
= det(G) = hn−1,n−1hn,n |
− hn−1,nhn,n−1 |
. Notice that M has |
||||
two lower o -diagonals, |
M = " |
# . |
|
|
||||
|
|
|
|
|
|
2.Compute the QR factorization M = ZR,
3.Set H2 = ZT H0Z.
This procedure is however too expensive since item 1, i.e., forming H2 requires O(n3) flops.
A remedy for the situation is provided by the Implicit Q Theorem.

3.5. THE DOUBLE SHIFT QR ALGORITHM |
67 |
Theorem 3.5 (The implicit Q theorem) Let A Rn×n. Let Q = [q1, . . . , qn] and
V = [v1, . . . , vn] be orthogonal matrices that both similarly transform A to Hessenberg form, H = QT AQ and G = V T AV . Let k denote the smallest positive integer for which hk+1,k = 0, with k = n if H is irreducible.
If q1 = v1 then qi = ±vi and |hi,i−1| = |gi,i−1| for i = 2, . . . , k. If k < n, then
gk+1,k = 0.
Proof. [5] Let W = V T Q. Clearly, W is orthogonal, and GW = W H.
We first show that the first k columns of W form an upper triangular matrix, i.e., wi = W ei span{e1, . . . , ei}, i ≤ k.
(Notice that orthogonal upper triangular matrices are diagonal.)
For i = 1 we have w1 = e1 by the assumption that q1 = v1. For 1 < i ≤ k we use the equality GW = W H. The (i−1)-th column of this equation reads
Xi
Gwi−1 = GW ei−1 = W Hei−1 = wj hj,i−1.
j=1
Since hi,i−1 6= 0 we have
Xi−1
wihi,i−1 = Gwi−1 − wj hj,i−1 span{e1, . . . ei}, j=1
as G is a Hessenberg matrix. Thus wi = ±ei, i ≤ k.
Since wi = ±V T Qei = V T qi = ±ei we see that qi is orthogonal to all columns of V except the i-th. Therefore, we must have qi = ±vi. Further,
hi,i−1 = eTi Hei−1 = eTi QT AQei−1 = eTi QT V GV T Qei−1 = wiT Gwi−1 = ±gi,i−1,
thus, |hi,i−1| = |gi,i−1|. If hk+1,k = 0 then
Xk
gk+1,k = eTk+1Gek = ± eTk+1GW ek = ± eTk+1W Hek = ± eTk+1 wj hj,k = 0. j=1
since eTk+1wj = ±eTk+1ej = 0 for j ≤ k.
Golub and van Loan [5, p.347] write that “The gist of the implicit Q theorem is that if QT AQ = H and ZT AZ = G are both unreduced Hessenberg matrices and Q and Z have the same first column, the G and H are “essentially equal” in the sense that G = DHD with D = diag(±1, . . . , ±1).”
We apply the Implicit Q Theorem in the following way: We want to compute the Hessenberg matrix Hk+1 = ZT Hk−1Z where ZR is the QR factorization of M = Hk2−1 − sHk−1 + tI. The Implicit Q Theorem now tells us that we essentially get Hk+1 by any orthogonal similarity transformation Hk−1 → Z1 Hk−1Z1 provided that Z1 HZ1 is Hessenberg and Z1e1 = Ze1.
Let P0 be the Householder reflector with
P0T Me1 = P0T (Hk2−1 − 2Re(σ)Hk−1 + |σ|2I) e1 = α e1.

68 CHAPTER 3. THE QR ALGORITHM
Since only the first three elements of the first column Me1 of M are nonzero, P0 has the structure
|
|
|
|
|
|
× |
× |
× |
|
|
|
|
|
|
|
|
||
|
|
|
|
|
× |
× |
× |
|
|
|
|
|
|
|
||||
|
|
|
P0 = |
× |
× |
× |
1 |
|
|
|
. |
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
. |
.. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
× |
|
||||||||
|
|
|
|
|
|
|
|
× |
× × × × |
|||||||||
|
|
|
|
|
|
|
|
× |
× |
× |
× × × × |
|||||||
H′ |
|
|
:= P T H |
|
P |
|
= |
|
|
+ |
× |
× |
× × × × |
. |
||||
|
1 |
k−1 |
0 |
|
+ + |
|
|
|||||||||||
k |
− |
0 |
|
|
|
|
|
× |
× |
× |
× |
× |
|
|||||
|
|
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
× |
× |
× |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
× |
× |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
× |
We now reduce P0T Hk−1P0 similarly to Hessenberg form the same way as we did earlier, by a sequence of Householder reflectors P1, . . . , Pn−2. However, P0T Hk−1P0 is a Hessenberg matrix up to the bulge at the top left. We take into account this structure when forming the Pi = I − 2pipTi . So, the structures of P1 and of P1T P0T Hk−1P0P1 are
|
|
× × × |
|
|
|
|
|
|
|
|
|
|
|
× |
× × × |
× × × |
|||||||
|
|
1 |
|
, |
|
|
|
|
|
|
|
|
|
|
× |
× |
× × |
× |
× × |
|
. |
||
P = |
× × × |
|
H′′ |
1 |
= P T H′ |
|
1 |
P |
1 |
= |
0 |
+ |
|
|
|
|
|
|
|||||
1 |
|
× × × |
1 |
|
k |
− |
1 k |
− |
|
|
|
|
|
× × |
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
0 |
× |
× × × |
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× × |
× × × |
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
+ |
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
× |
× |
× |
|||||
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
× |
× |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× |
The transformation with P1 has chased the bulge one position down the diagonal. The consecutive reflectors push it further by one position each until it falls out of the matrix at the end of the diagonal. Pictorially, we have
|
|
|
|
|
× |
× |
|
× |
× |
|
× |
× |
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
× |
|
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
× |
× |
× |
× |
× |
|
× |
× |
|
|
|
|
|
|
|
|
|
|
|
|
H′′′ |
= P T H′′ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
P |
2 |
= |
|
0 |
× × × |
|
× × |
|
|
|
|
|
|
|
|
|
|
|||||||
k−1 |
2 k−1 |
|
|
|
0 |
|
|
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
+ |
× |
× |
|
× |
× |
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
× |
× |
|
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
|
|
|
|
|
× |
× |
|
× |
× |
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
+ |
× |
|
× |
× |
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
× × |
|
|
|
|
× × × |
× × × |
× |
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
× × × |
× × × |
× |
||||
|
|
|
|
|
|
|
|
|
H′′′′ |
= P T H′′′ |
|
P |
3 |
= |
|
× × |
× × × |
× |
|
|||||
|
|
|
|
|
|
|
|
|
k−1 |
|
3 |
k−1 |
|
|
|
× |
× × × |
× |
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
× |
× |
× |
× |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
× |
× |
× |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ |
+ |
× |
× |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|