- •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
6.3. A NUMERICAL EXAMPLE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|||||
and |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sin( (x(k), e1)) = |
kx2(k)k |
= |
|
|
|
ky2(k)k |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
k |
x(k) |
k |
q| 1 |
(k) |
2 |
| |
k |
|
2 |
|
k |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
y |
(k) |
+ t y |
(k) |
|
2 + y |
(k) |
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
|
|
|
|
< |
|
|
|
ky2 k |
|
|
|
|
2 |
|
|
y(k) |
|
2( |
|
µ |
|
|
+ ε)k |
|
y(0) |
|
. |
|||
|
|
|
|
|
q41 |y1(k)|2 + 41 ky2(k)k2 |
≤ |
|
|
k |
2 |
k ≤ |
|
| |
|
2 |
| |
|
k |
2 |
k |
|
|||||||||
Since we can choose ε arbitrarily small, we have proved
Theorem 6.2 Let the eigenvalues of A Fn×n be arranged such that |λ1| > |λ2| ≥ |λ3| ≥ · · · ≥ |λn|. Let u1 and v1 be right and left eigenvectors of A corresponding to λ1, respectively. Then, the vector sequence generated by Algorithm 6.1 converges to u1 in the sense that
|
|
|
λ2 |
|
k |
|
|
|
|
|
|
(6.13) |
sin ϑ(k) = sin( (x(k), u1)) ≤ c · |
|
λ1 |
|
|
provided that v x(0) |
= 0. |
|
|
|
|
1 |
6 |
|
|
|
|
Proof. We only have to show the requirement v1x(0)2 6= 0. In the previous derivation we assumed y1(0) = 1. This was done for convenience since the iteration does not depend
on scalings. So, an equivalent assumption is y1(0) 6= 0. From this, we immediately obtain [1, −t ]x(0) 6= 0. But [1, −t ] is the left eigenvector of A in (6.4) corresponding to its largest eigenvalue. With the considerations after (6.3) this translates to the claimed condition
v1x(0) 6= 0.
Remark 6.4. The quantity µk in Algorithm 6.1 converges to |λ1|. The sign of λ1 can be found by comparing single components of y(k) and x(k−1). 
Remark 6.5. The convergence of the vector iteration is faster the smaller the quotient
|λ2|/|λ1| is. 
Remark 6.6. If v1x(0) = 0 then the vector iteration converges to an eigenvector corresponding to the second largest eigenvalue. In practice, rounding errors usually prevent this behaviour of the algorithm. After a long initial phase the x(k) turn to u1. 
Remark 6.7. In case that λ1 6= λ2 but |λ1| = |λ2| there may be no convergence at all. An
example is |
|
0 |
−1 |
, |
x(0) = |
β |
. |
A = |
|||||||
|
|
1 |
0 |
|
|
α |
|
6.3A numerical example
In the following MATLAB script we assume that A is upper triangular and that the largest eigenvalue (in modulus) is at position (1,1), i.e., |a1,1| > |aj,j | for all j > 1.
%Demo Simple Vector Iteration
%
n = 6; randn(’state’,0);
A = diag([n:-1:1]) + triu(randn(n),1) % upper triangular matrix
116 |
CHAPTER 6. VECTOR ITERATION (POWER METHOD) |
7 |
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
eigenvalue |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
angle(xk, u1) |
|
|
4 |
|
|
|
|
|
|
angle/old angle |
|
|
3 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
0 |
20 |
40 |
60 |
80 |
100 |
120 |
140 |
160 |
180 |
0 |
|||||||||
Figure 6.2: Plot of three important quantities: eigenvalue, angle between eigenvector approximation and exact eigenvector, convergence rate of eigenvector
x0 = rand(n,1); x0=x0/norm(x0) |
% initial vector |
e = eye(n,1); % Right eigenvector corresponding to largest
%eigenvalue A(1,1)
%----------------------------------------------------------
x=x0; ang = norm(x - e*(e’*x))
hist = [ang,nan,nan];
if ~exist(’tol’), tol = 100*eps; end oldang = nan;
while |
ang |
> tol |
|
|
|
x |
= A*x; |
|
|
||
mue |
= |
norm(x); |
% |
This is an approximation for the |
|
x |
= |
x/mue; |
% |
searched eigenvalue |
|
ang |
= |
norm(x - e*(e’*x)); |
|
|
|
hist = [hist; [mue,ang,ang/oldang]]; oldang = ang;
end
Because the solution is known, we can compute the angle between iterate and true solution. We can even use this angle in the stopping criterion. The matrix A is given by
A =
6.0000 |
1.1892 |
-0.5883 |
-0.0956 |
-0.6918 |
-0.3999 |
0 |
5.0000 |
2.1832 |
-0.8323 |
0.8580 |
0.6900 |
6.4. THE SYMMETRIC CASE |
|
|
|
117 |
|
0 |
0 |
4.0000 |
0.2944 |
1.2540 |
0.8156 |
0 |
0 |
0 |
3.0000 |
-1.5937 |
0.7119 |
0 |
0 |
0 |
0 |
2.0000 |
1.2902 |
0 |
0 |
0 |
0 |
0 |
1.0000 |
The development of three important quantities is given in Fig. 6.2. In Fig. 6.3 the case is depicted when the initial vector is chosen orthogonal to the left eigenvector corresponding to λ1 = 6. Initially, the approximated eigenvalue is 5. Because the stopping criterion
7 |
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
eigenvalue |
|
|
|
|
|
|
|
angle(xk, u1) |
|
||
|
|
|
|
|
|
|
||
|
|
|
|
|
|
angle/old_angle |
|
|
3 |
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
0 |
50 |
100 |
150 |
200 |
250 |
300 |
350 |
400 |
0 |
||||||||
Figure 6.3: Plot of three important quantities: eigenvalue, angle between eigenvector approximation and exact eigenvector, convergence rate of eigenvector. Here, the initial vector is chosen orthogonal to the left eigenvector corresponding to the largest eigenvalue
does not hold, the iteration continues until eventually rounding errors take e ect.
6.4The symmetric case
Let us now consider the Hermitian/symmetric case. We again assume the now real eigenvalues to be arranged as in (6.5). But now the Schur decomposition of A becomes its spectral decomposition,
(6.14) |
A = UΛU , |
U = [u1 |
, . . . , un], Λ = diag(λ1, . . . , λn). |
For the convergence analysis, we assume that A is diagonal, and that |
|||
(6.15) |
|
λ1 > λ2 |
≥ · · · ≥ λn ≥ 0. |
Therefore, in (6.4) we have s = 0 and S2 = diag(λ2, . . . , λn). In (6.6) we have t = 0, and in (6.8) we have x(k) = λk1y(k), i.e., x(k) equals y(k), up to scaling. Therefore, the convergence analysis for y(k) holds for x(k) as well.
In contrast to the general case, in the Hermitian case we approximate the eigenvalue by the Rayleigh quotient of x(k),
(6.16) |
λ(k) := x(k) Ax(k), |
kx(k)k = 1. |
118 |
CHAPTER 6. VECTOR ITERATION (POWER METHOD) |
Algorithm 6.2 Simple vector iteration for Hermitian matrices
1:Choose a starting vector x(0) Fn with kx(0)k = 1.
2:y(0) := Ax(0).
3:λ(0) := y(0) x(0).
4:k := 0.
5:while ky(k) − λ(k)x(k)k > tol do
6:k := k + 1;
7:x(k) := yk−1/kyk−1k;
8:y(k) := Ax(k);
9:λ(k) := y(k) x(k);
10:end while
The symmetric algorithm is given in Algorithm 6.2.
In order to investigate the convergence of the Rayleigh quotient we work with auxuliary vectors
(6.17) |
1 |
y(k) = |
|
|
y2(k) |
!
= 1 x(k).
|x(1k)|
Notice, that any ‘reasonable’ approximation of the first eigenvector e1 has a nonzero first component. For the Rayleigh quotients we have
ρ(y(k)) = ρ(x(k)).
Now,
(6.18) |
λ |
(k) |
= |
y(k) Ay(k) |
|
(e1 + y2(k)) A(e1 + y2(k)) λ1 + y2(k) Ay2(k) |
|||||||||||||
|
|
= |
|
|
|
|
|
|
|
= |
|
|
|
|
|||||
|
y(k) y(k) |
|
|
(k) |
k |
2 |
|
|
|
(k) |
k |
2 |
|||||||
|
|
|
|
|
|
|
|
|
1 + ky2 |
|
|
|
|
|
1 + ky2 |
|
|||
where we used that e y(k) |
= 0 and e Ay(k) = 0. Because, |
|
|
|
|
|
|||||||||||||
|
|
|
|
1 |
2 |
|
1 |
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tan ϑ(k) := tan( (y(k), e1)) = ky2(k)k |
|
|
|
||||||||||
and |
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 + tan2 |
(φ) = |
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
1 − sin2(φ) |
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
we get from (6.18) that |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
(6.19) |
λ(k) = (λ1 + y2(k) Ay2(k))(1 − sin2 ϑ(k)) = λ1 − λ1 sin2 ϑ(k) + y2(k) Ay2(k) cos2 ϑ(k). |
||||||||||||||||
Now, since λ1 > 0, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(6.20) |
0 ≤ λ1 − λ(k) = λ1 sin2 |
ϑ(k) − y2(k) Ay2(k) cos2 ϑ(k) |
|
|
|
|
|
||||||||||
|
≤ λ1 sin |
2 |
ϑ |
(k) |
(k) |
k |
2 |
cos |
2 |
ϑ |
(k) |
= (λ1 |
− λn) sin |
2 |
ϑ |
(k) |
. |
|
|
|
− λnky2 |
|
|
|
|
|
|||||||||
In summary, we have proved
Theorem 6.3 Let A be a symmetric matrix with spectral decomposition (6.14)–(6.15).
Then, the simple vector iteration of Algorithm 6.2 computes sequences λ(k) ∞ and
k=0
6.4. THE SYMMETRIC CASE |
|
|
|
|
|
|
119 |
|||||||||||
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
of A and the corre- |
|
x(k) ∞ |
that converge linearly towards the largest eigenvalue λ1 |
|||||||||||||||||
k=0 |
|
|
|
|
|
|
|
provided that the initial vector x(0) has a nonzero component in |
||||||||||
sponding eigenvector u |
|
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
1 |
|
6 |
|
|
|
|
|
|
the direction of u1, i.e., that u x(0) |
= 0. The convergence rates are given by |
|||||||||||||||||
|
|
sin ϑ(k) ≤ |
λ1 |
|
sin ϑ(0) |
, |
|λ1 − λ(k)| ≤ (λ1 − λn) |
λ1 |
|
|
sin2 ϑ(0). |
|||||||
|
|
|
|
|
|
|
λ2 |
|
k |
|
|
|
λ2 |
|
2k |
|||
|
(k) |
|
|
(k) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
where ϑ |
|
= |
(x |
|
, |
u |
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|||||
Thus, the speed of convergence is determined by the ratio of the two eigenvalues largest in modulus and the quality of the initial guess x(0). Both sequences λ(k) and x(k) converge linearly, but the decisive ratio appears squared in the bound for the approximation error in the eigenvalue. λ1 − λn is called the spread of the spectrum of A. Its occurance in the bound for λmax − λ(k) shows that a simple scaling of the matrix does not a ect the convergence behavior of the algorithm.
Example 6.4 Let’s compute the smallest eigenvalue and corresponding eigenvector of the one-dimensional Poisson matrix T = Tn of Example 2.7 with n = 40. Let us assume that we know an upper bound τ for the largest eigenvalue λn of T then the transformed matrix τI − T has the same eigenvectors as T and eigenvalues τ − λn < τ − λn−1 < · · · < τ − λ1. So, we apply vector iteration to compute the desired quantities.
We set τ = 4(n + 1)2/π2 a number that is easily obtained by applying Gerschgorin’s circle theorem. We performed a MATLAB experiment starting with a random vector.
>>n=40;
>>T = (4*((n+1)^2/pi^2))*eye(n) - ((n+1)^2/pi^2)*p_1d(n);
>>rand(’state’,0); x0=rand(n,1);
>>[x,lam,nit]=vit(T,x0,1e-4);
>>tau-lam
ans = 0.9995
>> nit nit =
1968
In as many as 1968 iteration steps we arrived at an eigenvalue approximation 0.9995. This number is correct to all digits. The di erence to the eigenvalue 1 of the continuous eigenvalue problem −u′′(x) = λu(x) is due to the discretization error. Figure 6.4 shows the convergence history of this calculation. The straight lines show the actual angle ϑ(k) between x(k) and u1 (above) and the actual error λ(k) − λ1. These quantities can of course not be computed in general. In this example we know them, see Ex. 2.7. The dotted lines show powers of q = (τ − λ2)/(τ − λ1) that indicate the convergence rates given by Theorem 6.3. Here, q = 0.9956. Clearly, the convergence is as predicted.
Example 6.5 We mentioned that a good initial vector can reduce the number of iteration steps. Remember that the smallest eigenfunction is sin x, a function that is positive on the whole interval (0, π). Let us therefore set x(0) to be the vector of all ones.
>>x0 = ones(n,1);
>>[x,lam,nit]=vit(T,x0,1e-4);
>>nit
nit =
866
120 |
CHAPTER 6. VECTOR ITERATION (POWER METHOD) |
102
100
10−2
10−4
10−6
10−8
10−10
0 |
200 |
400 |
600 |
800 |
1000 |
1200 |
1400 |
1600 |
1800 |
2000 |
Figure 6.4: Simple vector iteration with τI40 − T40
This is a surprisingly high reduction in the number of iteration steps. Figure 6.5 shows the convergence history of this calculation. Again the doted lines indicate the convergence
102
100
10−2
10−4
10−6
10−8
10−10
0 |
100 |
200 |
300 |
400 |
500 |
600 |
700 |
800 |
900 |
Figure 6.5: Simple vector iteration with τI40 − T40 and starting vector (1, 1, . . . , 1)T
rates that are to be expected. The actual convergence rates are evidently much better. How can that be?
The eigenvectors of Tn resemble the eigenfunctions sin kx of the continuous eigenvalue problem. Therefore the coe cients corresponding to eigenvectors corresponding to eigenfunctions antisymmetric with respect to the point π/2 vanish. In particular x2 = 0. Therefore the convergence rate is not q = (τ −λ2)/(τ −λ1) but qˆ = (τ −λ3)/(τ −λ1). This is verified by the numbers given in Fig. 6.6 where the assymptotic corrected convergence rates qˆ and qˆ2 are indicated.
