Chapter 4

EIGENVALUE PROBLEM

The German word eigen is cognate with the Old English word ¯agen, which became owen in Middle English and “own” in modern English.

Given A ∈ Rn×n solve Ax = λx where λ ∈ C and 0 =6 x ∈ Cn.

4.1 Mathematics

4.2 Reduction to Upper Hessenberg Form

4.3 The Power Method

4.4 The QR Iteration

4.5 The Lanczos Method

4.6 Other Eigenvalue Algorithms

4.7 Computing the SVD

4.1 Mathematics

The adjacency of a directed graph is given by   00001    10100    00010  01000 00010

96 where aij is the number of arcs from i to j. The number of paths of length k joining i to j is k k given by (A )ij. Is there a closed form expression for A ? I.e., a more direct way of forming Ak?

4.1.1 Complex Values The properties of vectors and matrices of real numbers extends to vectors x ∈ Cm and matrices A ∈ Cm×n. We define the conjugate transpose by

AH = A¯T.

A satisfies AH = A and a U H = U −1. Cn is a vector space. The inner product for x, y ∈ Cn is xHy.

4.1.2 Eigenvalues and eigenvectors If Ax = λx where λ ∈ C and 0 =6 x ∈ Cn then λ is an eigenvalue1 and x is an eigenvector. Try solving for x in (A − λI)x =0. There exists a solution x =6 0 only if det(A − λI) = 0. Hence the eigenvalues λ are roots of the characteristic polynomial p(ζ):=det(ζI − A).   01 For example for A = 11   ζ −1 det(ζI − A)=det = ζ2 − ζ − 1. (4.1) −1 ζ − 1 √ λ λ2 − λ − ⇒ λ 1 ± 5 An eigenvalue satisfies 1=0 = 2 2 . In general the characteristic polynomial has n roots, counting multiplicities:

det(ζI − A)=(ζ − λ1)(ζ − λ2) ···(ζ − λn) .

Hence there are n eigenvalues. Because A is real, p(ζ) has real coefficients and thus each eigenvalue is either real or one of a complex conjugate pair.

1characteristic value

97 imaginary

real

Setting ζ = 0 in (4.1), we get n det(−A)=(−1) λ1λ2 ···λn, and since det(−A)=det((−1)A)=(−1)ndetA, we have

detA = λ1λ2 ···λn, ⇒ 0 is an eigenvalue of a singular matrix. Note that for an eigenpair (λ, x) A2x = A(λx)=λAx = λ2x, A−1Ax = A−1λx ⇒ A−1x = λ−1x, Amx = λmx. Moreover, if q(ζ)isapolynomial, q(A)x = q(λ)x.

For a block T with diagonal blocks T11,T22,...,Tpp we have

det(ζI − T )=det(ζI − T11)det(ζI − T22) ···det(ζI − Tpp). example   1 24 A =  0 20 0 12   20 det(ζI − A)=det(ζ − 1)det(ζI − )=(ζ − 1)(ζ − 2)2 . 12 This property of determinants follows immediately if we can show   A B det =detA · detC. 0 C This is shown by considering two cases:

98 (i) A singular,      AB A 0 IA−1B (ii) A nonsingular, in which case = . 0 C 0 I 0 C

4.1.3 Similarity transformations Return to the problem of a simpler form for Ak. Definition If detX =0,then6 X−1AX =: B is called a similarity transformation and we say that B is similar to A. First a couple of easy-to-prove facts: 1. If B is similar to A and C is similar to B,thenC is similar to A. Therefore similarity transformations can have several steps. 2. Similar matrices have identical eigenvalues including multiplicities. Note that Ak =(XBX−1)k = ···= XBkX−1. Can we find a simple B which is similar to A? For each of the eigenvalues λi we have

Axi = λixi for some xi =06 .

Hence AX = XΛ where X =(x1,x2,...,xn) and Λ = diag(λ1,λ2,...,λn). If the eigenvectors can be chosen to be linearly independent, then X is nonsingular and

X−1AX =Λ, in which case we say that A is diagonalizable. Otherwise A is defective. example   100 A =  012 001 Eigenvalues are 1, 1, 1. Eigenvectors must satisfy (A − I)x =0.     000 x1     002 x2 =0 ⇒ x3 =0 000 x 3   0   ⇒ x = x2 x3

99 where x2 and x3 are arbitrary but not both zero. Thus the eigenvectors corresponding to 1 lie in a 2-dimensional subspace. We do not have three linearly independent eigenvectors, so this matrix is defective. Theorem: A matrix having distinct eigenvalues is diagonalizable. Proof for n = 3. Suppose

Axi = λixi,xi =06 ,i=1, 2, 3.

Suppose α1x1 + α2x2 + α3x3 =0. (4.2)

We need to show α1 = α2 = α3 =0. Without loss of generality it is enough to show α1 =0. Multiply (4.2) by (A − λ2I)(A − λ3I),

(A − λ2I)(A − λ3I)xi =(A − λ2I)(λi − λ3)xi =(λi − λ2)(λi − λ3)xi, and (4.2) becomes α1(λ1 − λ2)(λ1 − λ3)x1 =0.

Distinctness ⇒ α1 =0.2  01 √ √ Example Recall that has eigenvalues 1 + 5 , 1 − 5 . The corresponding eigen- 11 2 2 2 2  √   √    " √ # 1 5 1 5 1 5 − + − − 01 + 0 − vectors are 2 2 , 2 2 . So = X 2 2 √ X 1 where 1 1 11 0 1 − 5  √ √  2 2 − 1 + 5 − 1 − 5 X = 2 2 2 2 , so 11 " √ √ √ √ #  k 01 1 ( 1+ 5 )k−1 − ( 1− 5 )k−1 ( 1+ 5 )k − ( 1− 5 )k = √ 2 √ 2√ √ 2 2√ . 11 1+ 5 k − 1− 5 k 1+ 5 k+1 − 1− 5 k+1 5 ( 2 ) ( 2 ) ( 2 ) ( 2 ) For large k, Ak is dominated by the largest eigenvalue(s). Hence the spectral radius

ρ(A):=max|λi(A)|. 1≤i≤n Jordan canonical form. Any matrix can be transformed by means of a similarity trans- formation to the form diag(J1,J2,...,Jm)whereeachbasic Jordan block Jk has the form   λk 1  .   λ ..  J  k  . k =  .  .. 1 λk

The Cayley-Hamilton Theorem asserts that any matrix A satisfies p(A)=0wherep(ζ) is the characteristic polynomial of A.

100 4.1.4 Unitary similarity transformations   1+ε 1 The X needed to diagonalize a matrix can be very ill-conditioned, e.g., for A =     01 1 −1/ε 1+ε 0 we need X = to get X−1AX = . (For ε =0,A is defec- 01 01 tive.) However, to get eigenvalues (and eigenvectors) it is sufficient to have X−1AX = upper triangular. And it is possible to achieve this using an X with κ2(X)=1.Fora n×n −1 H unitary matrix U ∈ C , κ2(U)=kU k2kUk2 = kU k2kUk2 =1. THEOREM Schur decomposition If A ∈ Cn×n, then there exists a unitary matrix U ∈ Cn×n such that R = U HAU is upper triangular. Proof. By induction on n. True for n = 1. Assume true for n − 1. We will seek unitary P such that   λ bH P HAP = . 0 B for some λ, bH, B. In other words we want

H P AP e1 = λe1 or equivalently A(Pe1)=λ(Pe1).

Let λ be an eigenvalue of A and x an eigenvector with kxk2 =1. We are done if we can choose H unitary P so that Pe1 = x. Equivalently we want P x = e1. A generalized Householder reflection vvH P H = I − 2 ,v= x − e vHv 1 x eTx ≤ can be shown to work. To guard against division by zero, choose so that 1 0. There is unitary V such that V HBV =: R is upper triangular. Let   U P 1 . = V then   λ bH U HAU = . 2 0 R The construction in this proof is known as deflation: it depends on being able to find one eigenvalue of a matrix. If A is real and has only real eigenvalues then U and R may be chosen to be real. If A is real but has some imaginary eigenvalues (which must occur in pairs λ, λ¯), then neither U nor R can be real. Unfortunately complex arithmetic is expensive: double the storage, four times the computation. In the case of factoring polynomials we can avoid complex arithmetic by allowing the factors to be either linear or quadratic with two imaginary roots λ and λ¯. Analogously real matrices have a real Schur decomposition:

101 THEOREM Real Schur decomposition If A ∈ Rn×n, then there exists an Q ∈ Rn×n such that R = QTAQ is block upper triangular with diagonal blocks that either are 1 by 1 or are 2 by 2 with imaginary eigenvalues.

4.1.5 Symmetric matrices Theorem If A is real symmetric, then there exists a real orthogonal Q such that QTAQ = Λ= diag(λ1,λ2,...,λn), λi ∈ R. Proof. Consider the real Schur decomposition R = QTAQ. Then RT = QTATQ = QTAQ = R. Hence R is symmetric block diagonal with blocks that either are 1 by 1 or are symmetric and 2 by 2 with imaginary eigenvalues. However, a 2 by 2 cannot have imaginary eigenvalues, so R must be diagonal. 2 AQ = QΛ A(Qei)=(Qei)λi

Qei is an eigenvector, and λi is eigenvalue. These eigenvectors form an orthonormal set. The eigenvalues are real. If A is s.p.d., the eigenvalues are positive.

4.1.6 Matrix norms THEOREM ρ(A) ≤kAk for a consistent matrix norm. Proof. There exists an x =0and6 |λ| = ρ(A) such that Ax = λx. |λ|kxk≤kAkkxk. 2

THEOREM The spectral norm p T kAk2 = ρ(A A).

Proof. √ xTATAx kAk2 =max √ . x=06 xTx Since ATA is real symmetric, there exists a real orthogonal Q and real diagonal Λ such that QT(ATA)Q =Λ. So xTQ QTx kAk2 Λ . 2 =max T x=06 x x

102 Let y = QTx:

yTΛy kAk2 2 =max T y=06 y y =maxλi (exercise) 1≤i≤n = ρ(ATA). 2

If Aissymmetric 2 1/2 kAk2 = ρ(A ) = ρ(A). THEOREM T kA k2 = kAk2. Proof. It is enough to show that ρ(AAT)=ρ(ATA), and for this it is enough to show that if λ =0then6

λ is an eigenvalue of AAT ⇔ λ is an eigenvalue of ATA.

Thus let AATx = λx λ =0,6 x =0.Then6 ATA(ATx)=λ(ATx). λ =06 ⇒ ATx =0,which6 means λ is an eigenvalue of ATA. Similarly, a nonzero eigenvalue of ATA is an eigenvalue of AAT. 2

4.1.7 ? Gerschgorin disks Useful information about eigenvalues is often provided by THEOREM (Gerschgorin)

λ(A) ⊂ D1 ∪ D2 ∪···∪Dn where X Di = {z : |z − aii|≤ |aij|} Gerschgorin disk. j=6 i Example   10.10.1 D1 : |z − 1|≤0.2   A = 0.11.10.1 D2 : |z − 1.1|≤0.2 0.10.12 D3 : |z − 2|≤0.2 D UD D complex 0 1 2 3 plane

103 Proof. λ ∈ λ(A) ⇒ Ax = λx for some x =06 . X (λ − aii)xi = aijxj. j=6 i X X |λ − aiikxi|≤ |aijkxj|≤kxk∞ |aij|. j=6 i j=6 i

Choose i so that |xi| = kxk∞, and divide by this. 2 THEOREM If k Gerschgorin disks of the matrix A are disjoint from the other disks, then exactly k eigenvalues of A lie in the union of the k disks. 2 Example (continued). Two eigenvalues lie in D1 ∪ D2; one lies in D3. Since similarity transformations do not change λ(A), consider D−1 =diag(1, 1,ε)and   10.10.1/ε D−1AD =  0.11.10.1/ε  . 0.1ε 0.1ε 2

D3 : |z − 2|≤0.2ε contains an eigenvalue as long as D3 and D1 ∪ D2 are disjoint:

2 − 0.2ε>1.2+0.1/ε e.g., ε =0.2. Hence |λ − 2|≤0.04 for some λ ∈ λ(A).

Review questions 1. For A ∈ Cm×n what is the meaning of AH?

2. What is a Hermitian matrix?

3. What is a unitary matrix?

4. What is the inner product of x and y for x, y ∈ Cn?

5. Define an eigenvalue and eigenvector.

6. What is the characteristic polynomial of a matrix?

7. Define the multiplicity of an eigenvalue.

8. What can we say about the eigenvalues of a real matrix?

9. What is the relationship between the determinant of a matrix and its eigenvalues?

104 10. Given eigenvalues and eigenvectors of a matrix A what can we say about those of f(A) where f(ζ) is a polynomial? where f(ζ)=ζ−1? 11. What can we say about the determinant of a block triangular matrix with diagonal blocks T11,T22,...,Tpp? 12. What can we say about the eigenvalues of a block triangular matrix with diagonal blocks T11,T22,...,Tpp? 13. Define a similarity transformation. 14. Show that being similar is an equivalence relation. 15. Show that similar matrices have the same eigenvalues including multiplicities. 16. What does it mean for a matrix to be diagonalizable? 17. What condition on the eigenvalues is sufficient for a matrix to be diagonalizable? Prove it. 18. What is a ? Give an example. 19. What condition on the eigenvalues of a matrix is sufficient for it to be diagonalizable? 20. How can one express the kth power of a matrix in terms of the kth power of scalars? 21. Define the spectral radius of a matrix? 22. What is a basic Jordan block? 23. What is a Jordan canonical form? 24. What can be proved about Jordan canonical forms? 25. What is the Cayley-Hamilton Theorem? 26. What is the condition number of a unitary matrix? 27. What is a Schur decomposition? 28. How many linearly independent eigenvectors must an n by n matrix have? 29. What is the name of the process called by which we “factor out” an eigenvalue and eigenvector of a matrix? 30. Under what condition can a Schur decomposition consist of real matrices? 31. To what extent can we factor a polynomial with real coefficients into lower degree polynomials with real coefficients?

105 32. What is a real Schur decomposition of a real matrix?

33. What form does a real Schur decomposition of a real symmetric matrix take?

34. What can we say about the eigenvalues and eigenvectors of a real symmetric matrix?

35. What can be said about the eigenvalues and eigenvectors of a Hermitian matrix?

36. What is the relation between a consistent norm of a matrix and its eigenvalues?

37. Define the spectral norm and give a formula for it.

38. What is the spectral norm of a symmetric matrix?

39. What is the spectral norm of the transpose of a matrix?

Exercises   124 1. Find the eigenvectors of  020 . 012

2. Suppose A−2I is a singular matrix. What, in terms of the matrix A, is (special about) the null space of A − 2I?

3. (a) Show that if a real matrix A satisfies xHAx > 0 for all complex x =0,itmustbe6 symmetric positive definite. (b) Let A be a complex matrix. Show that if xHAx is real for all complex x,itmust be Hermitian.

4. A matrix is idempotent if A2 = A. Show that if A is idempotent, then its eigenvalues are zeros and ones.

5. Determine the eigenvalues of xyT where x and y are column vectors.   01 6. Show that is not diagonalizable. 00

7. (a) Let A ∈ Rn×n have the nonreal eigenvalue λ. Show that there exists X ∈ Rn×2, M ∈ R2×2 satisfying AX = XM where X has linearly independent columns and λ(M)={λ, λ¯}. (b) Show that there exists an orthogonal matrix Q and a nonsingular matrix T such that   I QTXT−1 = 2 . 0

106   BC (c) Show that QTAQ = where λ(P )={λ, λ¯}. Hint: obtain the first two 0 E columns by some matrix operation.

8. Show that if ρ(A) < 1thenI − A is nonsingular.

9. Show that a Hermitian matrix has real eigenvalues. You may use the fact that yHy ≥ 0 for any complex vector y and that λ2 ≥ 0 implies λ is real.

10. Show that the eigenvalues of a real symmetric positive definite matrix are positive.

11. Show that for a real D xTDx d . max T =max ii x=06 x x 1≤i≤n

12. Show that for a consistent matrix norm the condition number max |λ(A)| κ(A) ≥ . min |λ(A)|

13. Why can we be sure that all the eigenvalues of the following matrix are real? Give a complete answer.   20.50.20.1    040.4 −0.3   0.30.26 −0.1  0.1 −0.10.18

14. Show that the spectral radius of a matrix does not exceed the norm of the matrix for any matrix norm subordinate to some vector norm.   00 15. What is the spectral radius of ? What is the spectral norm of this matrix? 20

16. from BIT “(University of Uppsala, Second Course) The eigenvalues to the matrix   30.5 ε 0  0.51−ε 0  A(ε)=   ε −ε 2 −1  00−12

are separated for small enough ε. Localize the eigenvalues and determine how large ε can be and still guarantee that the eigenvalues are separated. Answer: The eigenvalues are close to 0.882, 1, 3 and 3.118. They are separated as long as |ε|≤0.04.” Hint: be willing to diagonalize 2 by 2 matrices.

107 17. What are the possible Jordan canonical forms for a real 4 by 4 matrix two of whose eigenvalues are both equal to i?

18. Extend the construction of the Householder reflection to include any complex vector x. That is, construct an elementary unitary matrix P such that Pxis a scalar multiple of e1. 19. What are the possible Jordan canonical forms for a real 4 by 4 matrix two of whose eigenvalues are both equal to i?

20.Giveanexampleofa2by2matrixA such that ρ(A)=0butkAk2 =1. 21. Extend the construction of the Householder reflection to include any complex vector x. That is, construct an elementary unitary matrix P such that Pxis a scalar multiple of e1.   cs c, s ∈ R c2 s2 λ c s 22. Let satisfy + = 1. The matrix −sc has eigenvalues 1 = +i and

λ2 = c − is. Calculate the eigenvector x1 corresponding to λ1. xTx Calculate 1 1. xHx Calculate 1 1. 23. Let A be a 5 by 3 matrix with singular values 2, 1, 0. For the following questions it is enough to state the answer. What are the eigenvalues of ATA? of AAT?

24. Find and correct the subtle but fatal flaw in the following proof:

Theorem The eigenvalues of an orthogonal matrix have modulus 1. Proof. Let λ be an eigenvalue of an orthogonal matrix Q.ThenQx = λx and xTQT = λxT, whence

xTQTQx = λ2xTx xTx = λ2xTx 1=λ2 1=|λ|.

108 4.2 Reduction to Upper Hessenberg Form

In a finite number of arithmetic operations no algorithm can by similarity transformations triangularize A.Thebestwecandois   × × × ··· ··· ×    × × × ··· ··· ×     × × ··· ··· ×  upper QTAQ H   = =  .. .. .  Hessenberg  . . .  form  ××× ×× We can do this column by column. Suppose that elements in the first k −1 columns under the first subdiagonal have already been eliminated so that the matrix has the form  Hk Bk 0 ak Ak

where Hk is a k by k upper Hessenberg matrix and ak is an n − k by 1 column vector. To leave Hk unchanged, we seek an orthogonal transformation of the form       I H B I H B P˜ 0 k k 0 k k k . ˜T ˜ = T T 0 Pk 0 ak Ak 0 Pk 0 P˜k ak P˜k AkP˜k T Also, we want P˜k ak to be all zero except for its first element. This can be accomplished T with a Householder reflection, for which P˜k = P˜k. The cost of doing the kth column is as follows: T determine P˜k = I − βkv˜kv˜k n − k + 1 mults, 1 square root form P˜kAk  2(n − k) mults per column times (n − k) columns Bk form P˜k 2(n − k) mults per row times n rows Ak n − k +1+2(n − k)2 +2n(n − k) 5 n3 The total cost is 3 multiplications. In sum with   I 0 Pk := 0 P˜k we have P ··· P P AP P ··· P H. | n−2( {z( 2( }1 | 1) 2){z ) n−}2 =: QT Q If A is symmetric, then H is symmetric. symmetric + upper Hessenberg ⇒ tridiagonal 2 n3 Cost: 3 mults.

109 Review questions 1. What is an upper Hessenberg matrix?

2. How close can we come to upper triangularizing a matrix in a finite number of arith- metic operations?

3. Show how an orthogonal similarity transformation can be used to zero out all but the first two elements in the first column of a matrix. For the orthogonal matrix it is sufficient to state a previously obtained result.

4. If a A is reduced by a similarity transformation to an upper Hessenberg matrix H using Householder reflections P1, P2, ..., whatistheresultingfactorization of A?

5. What results if a symmetric matrix is reduced to upper Hessenberg form using orthog- onal similarity transformations?

6. How does the cost of reducing an n by n matrix to upper Hessenberg form using or- thogonal similarity transformations depend on n for a general matrix? for a symmetric matrix?

Exercises 1. By means of an orthogonal similarity transformation make the following matrix tridi- agonal:   421  242 . 124   x Note that the Householder reflection for a vector y is given by   xy − x x2 y2 −1/2 . sign( )( + ) y −x

2. Apply an orthogonal similarity transformation to the following matrix so that the (3,1) and (4,1) elements of the transformed matrix are both zero:   1132    −4010  0021 3510

You may leave your answer as a product of 4 by 4 matrices.

110 3. Reduction of a full 5 by 5 matrix A to upper Hessenberg form H can be accomplished by a similarity transformation

H = Pq ···P2P1AP1P2 ···Pq

where each Pk is a Householder reflection.

(a) How many reflections q are used? (b) In what order are the 2q matrix products computed? (You may use parentheses to show this.)

(c) Indicate the structure of P2 using the symbols 0, 1, × for elements of P2,where × represents an arbitrary value.

4. Determine an orthogonal similarity transformation that makes the following matrix tridiagonal:   134  3 −43 . 431      xy x (x2 + y2)1/2 Hint: (x2 + y2)−1/2 = . y −x y 0

4.3 The Power Method

Eigenvalues are the roots of the characteristic polynomial p(λ):=det(λI − A). Thus we expect no direct method; any method for finding eigenvalues must have an iterative part. The following algorithm is unstable:

form the characteristic polynomial; find the roots of the characteristic polynomial.

This is because finding the roots of the polynomial can be much more ill-conditioned than finding eigenvalues; i.e., the results are much more sensitive to errors in the coefficients. On n n−1 the other hand the roots of λ + cn−1λ + ···+ c1λ + c0 = 0 are the eigenvalues of its   0 −c0  −c   10 1     .. −c   1 . 2   . . .  .  .. .. .     ..  . 0 −cn−2 1 −cn−1

111 It is reasonable to solve a polynomial equation by computing the eigenvalues of its companion matrix. The power method is good for a few eigenvalues and eigenvectors. If A is diagonalizable,

X−1AX =Λ, A[x1,x2,...,xn]=[x1,x2,...,xn]diag(λ1,λ2,...,λn).

Assume there is a unique eigenvalue of maximum magnitude:

|λ1| > |λ2|≥|λ3|≥···≥|λn|.

(What can we say about λ1?) Let z0 = initial guess for x1. Algorithm:

z1 = Az0,z2 = Az1, ..., zk+1 = Azk

k zk = A z0 −1 k =(XΛX ) z0 = XΛkX−1z 0     ! λ k λ k Xλk , 2 ,..., n X−1z = 1diag 1 0 λ1 λ1 !! λ k λkX e eT O 2 X−1z = 1 1 1 + 0 λ1 !! λ k λk x eTX−1z O 2 = 1 1( 1 0)+ λ1

eTX−1z 6 assuming 1 0 =0. The Rayleigh quotient ! zTAz λ k k k λ O 2 . T = 1 + zk zk λ1

The Rayleigh quotient is the value λ that satisfies zkλ ≈2 Azk.IfA is symmetric, then ! zTAz λ 2k k k λ O 2 . T = 1 + zk zk λ1

The power method is good only for the largest eigenvalue in magnitude. . Apply power method to A−1 to get smallest eigenvalue in magnitude assuming |λn| < |λn−1|. More generally consider

(A − σI)−1,σ∈ C,

112 which has eigenvalues 1 , 1 ,..., 1 . λ1 − σ λ2 − σ λn − σ 1 The largest of these is where λp is closest to σ. λp − σ

−1 zk+1 =(A − σI) zk use LU factorization

Note that Azk+1 = σzk+1 + zk is available, so use zT Az zT z λ ≈ k+1 k+1 σ k+1 k , p zT z = + zT z k+1 k+1 k+1 k+1

k k for which one can show the error is O(|λp − σ| /|λq − σ| )whereλq is the second closest eigenvalue to σ. To prevent overflow or underflow, form a normalized sequence:

yk = zk/kzkk2, −1 zk+1 =(A − σI) yk.

Then zT y λ ≈ σ k+1 k . p + zT z k+1 k+1

4.3.1 Rayleigh quotient iteration The idea is to use the latest Rayleigh quotient estimate to continually update the eigenvalue estimate λ∗ in inverse iteration.

−1 zk+1 =(A − σkI) yk

Rayleigh quotient estimate for A zT y σ σ k+1 k k+1 = k + zT z k+1 k+1 The order of convergence is quadratic in general

2 kyk+1 − (±xp)k = O(kyk − xpk ) and cubic for a symmetric matrix

3 kyk+1 − (±xp)k = O(kyk − xpk ).

If eigenvalue λp < 0, the signs will alternate.

113 Review questions 1. Given a polynomial, how does one construct a matrix whose eigenvalues are the roots of the polynomial? What do we call such a matrix?

2. What is the algorithm for the power method?

3. What limitation of floating-point arithmetic is a significant danger for the power method and how is this avoided?

4. Under what condition does the power method converge and what does it converge to?

5. Assuming the power method converges, how rapidly does it converge?

6. What is the Rayleigh quotient and what does it approximate?

7. How can we generalize the power method to estimate the eigenvalue closest to some given value σ?

8. Assuming inverse iteration with a (fixed) shift σ converges, how rapidly does it con- verge?

9. Explain in words the idea of Rayleigh quotient iteration. What is its order of conver- gence in general? for a symmetric matrix?

Exercises  T 1. Beginning with initial guess 001 , do two iterations of the power method for   10.10.1  0.11.10.1  . 0.10.12

Also form the Rayleigh quotients for the zeroth and first iterates.

2. If we applied the power method to (A − σI)−1, we could change σ from one iteration to the next using at each iteration a new and better approximation to an eigenvalue of A. There is a serious drawback, however. What is it? Secondly, what difficulty might we expect if σ is extremely close to an eigenvalue of A?

3. For the matrix   00001    10100    00010  01000 00010

114 do two iterations of the power method beginning with [1, 1, 1, 1, 1]T. (Renormalization is unnecessary.) Use the results of the two iterations to estimate the largest eigenvalue of the matrix.

4.4 The QR Iteration

What if we try to make A upper triangular rather than upper Hessenberg? Consider the 2 × 2case   ab A . = cd Then  √  after   a +sign(a) a2 + c2 −sign(a) ac v = much P = √ . c a2 c2 c −a algebra + For example,

    our 2 −1 −1 21 T A = ,P= √ =: Q orthogonal 10 1 −2 1 5 matrix     8 9 T −1 5 −2 T Q A √ , Q AQ 5 5 A . 1 = − but 1 1 = − 1 2 =: 1 5 0 1 5 5 After postmultiplication it is no longer upper triangular, but the (2,1) element has been reduced. Using A1     1 8 − 1 18 − 25 QT −q 5 5 ,A QTA Q 13 13 . 2 = − 1 − 8 2 := 2 1 2 = 1 8 13 5 5 13 13 5

The (2,1) element is still smaller.     1 18 1 32 49 QT −q 13 13 ,A QTA Q 25 25 3 = 1 − 18 3 := 3 2 3 = − 1 18 25 13 13 25 25 13

And still smaller. However convergence becomes very slow. (Eigenvalues are 1, 1.) For       01 T 01 T 01 A = ,Q= , and Q AQ = 10 1 10 1 1 10 there is no convergence. (Eigenvalues are 1, −1.)

115 More generally for an n × n matrix

A0 := A, A QT A Q k+1 :=| ( k+1{z k}) k+1 upper triangular QT n − k →∞ A where k+1 is a sequence of 1 Householder reflections. As , k becomes a block upper triangular matrix. The first block contains eigenvalues of largest magnitude, the second block contains eigenvalues of next to largest magnitude, ..., the last block contains eigenvalues of least magnitude. If |λ | > |λ | > ···> |λn|,  1 2  λ1 × ··· ×  λ ··· ×   2  Schur Ak →  . .   .. .  form λn If A ∈ Rn×n, this is possible only if all eigenvalues are real. Rate of convergence depends on k eigenvalue ratios, in particular (Ak)ij = O(|λi/λj| ) for j

116 2 Assume that Ak is upper Hessenberg with nonzero subdiagonal elements and that Ak − σk+1I = Qk+1Rk+1 where Qk+1 is orthogonal and Rk+1 is upper triangular. Then Ak+1 = Rk+1Qk+1 + σk+1I is upper Hessenberg. Thus we should choose

A0 =(Pn−2(···((P1A)P1) ···))Pn−2 upper Hessenberg.

If A is symmetric, then Ak is symmetric and therefore tridiagonal.

Review questions 1. What does one QR iteration do to the eigenvalues of a matrix? A QT A Q Q 2. In the QR iteration k+1 = k+1 k k+1 what is special about k+1? Give a complete answer. A QT A Q 3. What does one QR iteration k+1 = k+1 k k+1 do to the eigenvectors of a matrix?

4. If Ak is a sequence of square matrices produced by a QR iteration, under what as- sumption do the elements below the diagonal converge to zero? Under this assumption what do the diagonal elements converge to?

5. Give the formula for one iteration of a shifted QR iteration and explain how the Q matrixischosen.

6. What does one shifted QR iteration do to the eigenvalues of a matrix?

7. What preprocessing step is recommended before doing a QR iteration?

8. How does the cost of a QR iteration for an n by n matrix depend on n for a general matrix? for an upper Hessenberg matrix?

9. Name some computationally significant properties that are preserved by a QR iteration using Householder reflections or Givens rotations.

Exercises 1. Show that a single QR iteration is enough to transform the square matrix xyT to a right triangular matrix. Assume x =0and6 y1 =6 0. Hint: what can you prove about a rank one upper triangular matrix?

2. Prove that the shifted QR iteration preserves an upper Hessenberg form for a matrix with nonzero subdiagonal elements. Hints:

2If a subdiagonal element is zero, the eigenvalue problem divides into two smaller problems.

117 (i)Doa(1,n−1) by (n−1, 1) partitioning of of Ak −σk+1I and Qk+1 and an (n−1, 1) by (n−1, 1) partitioning of Rk+1,andshowthatQk+1 must be upper Hessenberg.

(ii) Do not use the fact that Qk+1 is orthogonal.

4.5 The Lanczos Method

The Lanczos method computes an approximation to the extreme eigenvalues of a symmetric matrix. The generalization to a nonsymmetric matrix is known as the Arnoldi method. The most direct way of presenting this method is to consider the transformation of a symmetric matrix A to tridiagonal form

AQ = QT (4.3)

where Q =[q1q2 ···qn] is an orthogonal matrix and T is a symmetric   α1 β1  .   β α ..  T =  1 2  .  .. ..  . . βn−1 βn−1 αn

For large sparse matrices, most of whose elements are zeros, it is impractical to compute all of this. As a heuristic the Lanczos method computes only the upper left m by m block of T ,callitTm,    T 0   m   βm    T  .. ..  , =  β . .   m . . .   0 ......  ...... and computes its extreme eigenvalues as an approximation to those of T . The algorithm operates by satisfying eq. (4.3) column by column. Taking the first column of this equation gives Aq1 = α1q1 + β1q2.

Together with the condition that q1, q2 be an orthonormal multiset, this constitutes n +3 equations for 2n + 2 unknowns. It happens that the factorization (4.3) is not unique, and we arefreetochooseq1 to be an arbitrary normalized vector. We are left with n +2equations for n + 2 unknowns. We obtain

q2 =(Aq1 − α1q1)/β1

118 where α1 is obtained by the orthogonality of q1, q2 and β1 by normalization of q2. Taking the kth column of eq. (4.3) gives

qk+1 =(Aqk − αkqk − βk−1qk−1)/βk.

Orthogonality of qk+1 with qj for j ≤ k − 1 is automatic, orthogonality with qk determines αk, and normalization determines βk.

Review questions 1. What distinguishes the Lanczos method from the Arnoldi method?

2. Which eigenvalues of a matrix does the Lanczos method find?

Exercises 1. Show that if the is carried to completion, the last column of eq. (4.3) can be satisfied.

2. Fill in the blanks for Lanczos method:

q1 = arbitrary normalized vector; p = Aq1; α1 = ; p = p − α1q1; β1 = ; q2 = ; for k =2,...,n− 1 { p = Aqk; αk = ; p = p − αkqk − βk−1qk−1; βk = ; qk+1 = ; } αn = ;

4.6 Other Eigenvalue Algorithms

4.6.1 Jacobi The Jacobi method is applicable to symmetric matrices. The idea is to use a Givens rotation in a similarity transformation to zero out a designated element of the matrix. To zero out

119 the (i, j)th element of a matrix, j

4.6.2 Bisection Let A be a symmetric tridiagonal matrix without any nonzeros in its subdiagonal. (If there is a zero, then the matrix is block diagonal and the eigenvalues of each block can be found independently.) By constructing what is known as a Sturm sequence, it is possible to count the number of eigenvalues of A that are less than any given real number σ. This information can be used by the bisection method to isolate eigenvalues. The method relies upon the fact that the leading principal submatrices of A have strictly interlacing eigenvalues; more specifically, (strictly) between any two successive eigenvalues of the kth order leading principal submatrix Ak is exactly one eigenvalue of Ak−1. A Sturm sequence d0, d1, ..., dn is defined by setting d0 =1anddk =det(Ak − σI) for k ≥ 1. These determinants can be calculated efficiently. The eigenvalues of Ak − σI, k =1, 2,...,n are strictly interlacing. We can use this fact together with the fact that dk is the product of the eigenvalues of Ak − σI to count the number of negative eigenvalues νk of Ak − σI.Setν0 = 0 and suppose that νk−1 is known. Then the interlacing property implies that νk is either νk−1 or νk−1 +1. If dk−1 and dk are both positive or both negative, then νk = νk−1. If they are of (strictly) opposite sign, then νk = νk−1 + 1. The case of a zero value in the Sturm sequence is left as an exercise. The result of such a calculation is a count νn of the number of negative eigenvalues of A − σI or equivalently the number of eigenvalues of A which are less than σI.

Exercise

1. Explain in the cases where dk−1 and/or dk is zero whether or not to increment the count of negative eigenvalues.

4.7 Computing the SVD

Consider the case A ∈ Rm×n, n ≤ m.

120 1. eigenvalues, eigenvectors of ATA, AAT:

ATA Ve σ2 Ve , ( )( i)=i ( i) 2 T σi (Uei),i≤ n, (AA )(Uei)= 0,i≥ n +1.

2. Golub–Kahan algorithm   b11 b12 0    .  B  b ..  I. U TAV = B =  22  0 0 0  ..  . bn−1,n 0 bnn U TBV II. 1 1=Σ1 Therefore   U Σ A = U 1 1 V TV T. 0 I 0 1 0

Review question 1. Show how to transform the problem of computing a singular value decomposition into problems of diagonalizing matrices.

Exercise 1. Let A ∈ Rm×n, n

121