• No results found

The General Eigenvalue Problem

2.9 Computation of Eigenvalues and Eigenvectors

2.9.1 The General Eigenvalue Problem

Almost all eigenvalue algorithms have in common that they consist in general of two phases. The

rst one is usually a preprocessing phase which can be carried out in a nite number of steps and which transforms the original matrix into a more structured form while preserving some or most of its properties. It is used primarily to speed up the following computation. The second phase, which would take theoretically an innite number of steps but is stopped after the result has converged to near machine accuracy, reveals the eigenvalues.

Before we can start with presenting the actual algorithms we will begin with some standard results from eigenvalue perturbation theory.

Theorem 2.9.1 (Bauer-Fike). Let A ∈ Matm(C) be diagonalisable, let δA ∈ Matm(C) be arbitrary, and let 1 ≤ p ≤ ∞. Furthermore, let V DV−1 be an eigendecomposition of A, where V ∈ GLm(C) and D ∈ Matm(C) is a diagonal matrix (compare Denition 2.5.18). If µ is an eigenvalue of A + δA, then there exists an eigenvalue ν of A such that the inequality

|ν − µ| ≤ κp(V ) kδAkp= kV kpkV−1kpkδAkp holds.

Proof. Let µ ∈ Λ (A + δA). We will rst consider the case where also µ ∈ Λ (A). Here we can choose ν = µ so the theorem is trivially true. From now on let us assume that µ /∈ Λ (A). This means that det (D − µIm) 6= 0 and det (A + δA − µIm) = 0. Then

0 = det (A + δA − µIm) = det(V−1) det (A + δA − µIm) det (V )

= det D − V−1δAV − µIm = det (D − µIm) det



(D − µIm)−1V−1δAV + Im

 . This means that det

(D − µIm)−1V−1δAV + Im

= 0 must hold. So

−1 ∈ Λ

(D − µIm)−1V−1δAV

 . By Theorem 2.3.65, we know that

1 ≤ k (D − µIm)−1V−1δAV kp ≤ k (D − µIm)−1kpkV−1kpkδAkpkV kp

= k (D − µIm)−1kpkδAkpκp(V ) .

Now, since (D − µIm)−1 is a diagonal matrix, it follows easily from the denition of the induced matrix normk·kp that

k (D − µIm)−1kp = maxn

k (D − µIm)−1xkp

x ∈ Cn with kxkp= 1o

= max

v∈Λ(A)

 1

|ν − µ|



= 1

v∈Λ(A)min |ν − µ|. Therefore, we can conclude that min

v∈Λ(A)

|ν − µ| ≤ κp(V ) kδAkp, which proves the theorem.

Example 2.9.2. Let us consider again Example 2.7.13 and let us briey recall the setting. The eigenvalues of the matrix

A = 1 1000

0.001 1

!

are (0, 2) and the eigenvalues of the matrix

A =˜ 1 1000

0 1

!

are (1, 1) .

We note that matrix A is diagonalisable and we can thus apply Theorem 2.9.1. Furthermore A = A + δA˜ with δA = 0 0

−0.001 0

!

. We compute an eigendecomposition of ˜A such that V DV−1 = ˜A. Let ν be an eigenvalue of ˜A then according to the theorem of Bauer-Fike there exists an eigenvalue µ of A, such that the bound |ν − µ| ≤ 1 holds. This result is in line with the actual eigenvalues of A and ˜A.

Remark 2.9.3. We know by Theorem 2.5.22 that a normal matrix A can be unitarily diagonal-ised. This means that in the theorem we can choose V satisfying kV k2 =

V−1

2 = κ2(V ) = 1 and consequently we obtain

|λ − µ| ≤ kδAk2.

Following [6, Subsection 7.2.4], we now present a theorem which concerns the sensitivity of eigen-spaces and eigenvectors to perturbations of the input data. This result will play an important role in Chapter 4 when we analyse the stability of the computed solutions of the ABM and the extended ABM algorithm.

Denition 2.9.4. Let A ∈ Matm(C) and B ∈ Matn(C). Then we dene the separation between both matrices as

sep (A, B) = min

X

kAX − XBkF kXkF with X ∈ Matm,n(C) \ {0m,n}.

Denition 2.9.5. Let S1 and S2 be linear subspaces of Cm such that dim (S1) = dim (S2). Let furthermore P1 be the orthogonal projector onto S1 and let P2 be the orthogonal projector onto S2. Then we let

dist (S1, S2) = kP1− P2k2 and call it the distance between S1 and S2.

Theorem 2.9.6. Let A ∈ Matm(C) and let

QAQ = T11 T12

0 T22

!

be a Schur decomposition of A with Q = 

Q1 Q2

 (compare Denition 2.5.9). The in-volved matrices have the following dimensions: Q1 ∈ Matm,r(C), Q2 ∈ Matm,m−r(C), T11 ∈ Matr,r(C), T12 ∈ Matr,m−r(C), T22 ∈ Matm−r,m−r(C). Now let δA ∈ Matm(C) be an arbit-rary matrix, which we partition via Q in the same way as A such that we obtain

QδAQ = E11 E12 E21 E22

! . If sep (T11, T22) > 0 and

kδAk2



1 + 5 kT12kE sep (T11, T22)



≤ sep (T11, T22) 5 then there exists P ∈ Matm−r,r(C) with

kP k2 ≤ 4 kE21k2 sep (T11, T22)

such that the columns of ˆQ1 = (Q1+ Q2P ) (Ir+ PP )12 form an orthonormal basis for an invariant subspace of A + δA. Additionally

dist



im(Q1), im( ˆQ1)



≤ 4 kE21k2 sep (T11, T22)

holds. Note, that the matrix (Ir+ PP )12 is the inverse of the square root of the symmetric positive denite matrix Ir+ PP (see [9, Subsection 4.2.10]).

Proof. Compare [6, Theorem 7.2.4 and Corollary 7.2.5].

In case a subspace is one-dimensional, it is possible to give the following more specialised result.

Corollary 2.9.7. If we let r = 1 and T11 = λ in the setting of Theorem 2.9.6 we obtain the inequality

dist (im (q1) , im (ˆq1)) ≤ 4 kE21k2 σmin(T22− λIm−1).

Proof. The claim follows from Theorem 2.9.6 together with the observation that sep (T11, T22) = min

x6=0m−1

kT11x − xT22kF

kxkF = min

x6=0m−1

kx (λIm−1− T22)kF kxkF

= min

x6=0m−1

kx (T22− λIm−1)kF

kxkF .

As x is a vector we can assume w.l.o.g. that kxkF = 1, so we obtain sep (T11, T22) = min

x6=0m−1

kx (T22− λIm−1)kF.

If x is a left-singular vector of T22−λIm−1 associated with a minimal singular value the expression kx (T22− λIm−1)kF becomes minimal and we arrive at

sep (T11, T22) = σmin(T22− λIm−1) .

This result shows that the stability of computing eigenspaces and -vectors with respect to per-turbations in the input data depends mostly on the initial separation of the subspaces together with the actual norm of the perturbation.

We will not discuss the algorithms which can be used to compute the eigenvalues and/or -vectors of a general matrix in detail. Of course they can also be applied to Hermitian matrices, however, more ecient algorithms exist for this special case. The most widely used algorithm today if all eigenvalues (and eigenvectors) of a dense unstructured matrix are desired is the QR algorithm and the Divide and Conquer algorithm if the input matrix is Hermitian.

The QR Algorithm

The basic idea behind the QR algorithm is to use the QR decomposition of a matrix A = QR and to multiply the factors in reverse order RQ. This has the consequence that the entries below the diagonal decrease normwise while the matrix product RQ remains similar to A. The procedure is repeated until the entries below the diagonal are below a specied tolerance. Thus a Schur decomposition of the matrix is computed. To accelerate the process the input matrix is

rst transformed via similarity transformations to so-called upper Hessenberg form which is as close to upper triangular form as can be achieved with a nite number of computation steps.

Denition 2.9.8. [Hessenberg form]

A square matrix A ∈ Matm(C) is said to be in upper Hessenberg form if it has only zero entries below the rst subdiagonal. Consequently, we say a square matrix A ∈ Matm(C) is in lower Hessenberg form if it has only zero entries above the rst superdiagonal.

Algorithm 7: Householder Hessenberg reduction Input: A square matrix A ∈ Matm(C)

Output: A matrix in upper Hessenberg form which is unitarily similar to A and the basic reectors

1 for i := 1 to m-2 do

// Householder reflectors are computed via Algorithm 3

2 vi:= householder(Ai+1:m,i);

3 if vi6= 0m−i then

4 Ai+1:m,i:m:=



Im− 2vvivi ivi



Ai+1:m,i:m;

5 A1:m,i+1:m:= A1:m,i+1:m



Im− 2vvivi ivi ;

6 end

7 end

8 return (A, v1, ..., vm−2);

Theorem 2.9.9. Given a matrix A ∈ Matm(C), the algorithm returns a matrix in upper Hessen-berg form which is unitarily similar to A. Additionally, the algorithm is backward stable.

Proof. This follows directly from the properties of the Householder reectors which are construc-ted in such a way that they introduce zeros below the rst subdiagonal when applied to A in line 5. The already introduced zeros remain untouched by line 6, which makes sure that the transformation is in fact a similarity transformation. The algorithm is backward stable because all applied similarity transformations are unitary.

Now that we know how to transform a given matrix to upper Hessenberg form it is possible to state a basic version of the QR algorithm.

Algorithm 8: Basic QR algorithm

Input: A square matrix A ∈ Matm(C), error tolerance ε ∈ R+ Output: The m eigenvalues of A

1 [H, U ] := HessenbergReduction(A) (e.g. via Algorithm 7);

2 while Pmi=1Pm

j=i+1|Hj,i| > ε do

3 [Q, R] := QRDecomposition(H) (e.g. via Algorithm 4);

4 H := RQ;

5 end

6 return (H1,1, ..., Hm,m);

Theorem 2.9.10. Let A ∈ Matm(C) be such that A has no two distinct eigenvalues with equal absolute value. The Basic QR algorithm computes a Schur decomposition of A such that A = (U Q) H (U Q), where Q ∈ Matm(C) and U ∈ Matm(C) are unitary matrices and H ∈ Matm(C) is an upper triangular matrix. Thus H is (unitarily) similar to A and reveals the eigenvalues of A on its diagonal.

Proof. We will only sketch why this algorithm produces a series of matrices Hi which essentially

converges (i.e. the elements on the diagonal converge while the super-diagonal elements may dier by units in each iteration) to an upper triangular matrix which is similar to A. A full proof can be found in [13, Section 11]. First the matrix A is transformed into Hessenberg form;

the resulting matrix H is similar to A. The central steps of the algorithm are computing the QR decomposition of H and then multiplying both factors in reverse order. Each computed matrix H is unitarily similar to A as Hi = Ri−1Qi−1 = Qi−1Hi−1Qi−1 with Hi,Qi, and Ri

denoting the values of H ,Q, and R during the i-th iteration of the while loop.

Theorem 2.9.11. The Basic QR algorithm is backward stable.

Proof. The claim follows essentially from the fact that only unitary transformations are used to compute the Hessenberg form of the input matrix, followed by a sequence of unitary similarity transformations to compute the solution. A more detailed analysis can, for instance, be found in [6, Subsection 7.5.6].

In practice more advanced versions of the algorithm are used which achieve faster convergence by applying shifts during each step of the computation and by only implicitly computing the QR decomposition in each iteration step. One such algorithm, the Francis QR algorithm, is discussed and analysed in [6, Subsection 7.5.6]. The algorithm requires about 10m3 ops if only the eigenvalues are desired and the unitary transformations are not accumulated, otherwise it requires about 25m3 ops. Additionally, state of the art implementations of the QR algorithm (e.g. the one in LAPACK [17]) guarantee convergence to a Schur decomposition for essentially all input matrices A ∈ Matm(C).

Power Iteration

The technique of power iteration is in itself not often applied directly, but the ideas underlying it form the basis for more advanced techniques like inverse iteration. It is capable to compute the eigenvector associated with the eigenvalue of a matrix A which has the largest absolute value.

Let us denote the eigenvalues of a matrix A ∈ Matm(C) by λ1, ..., λm and let us further assume without loss of generality that |λ1| ≥ |λ2| ≥ ... ≥ |λm|. The algorithm only works properly if |λ1| is reasonably larger than |λ2|.

Algorithm 9: Power Iteration

Input: A matrix A ∈ Matm(C) , n ∈ N

Output: An eigenvector estimate corresponding to the eigenvalue λ1 of A

1 v(0) := random vector in Cm\{0m}; guess has components in the direction of q1, where q1 is the eigenvector associated with λ1, then this algorithm produces a sequence v(i) of eigenvector estimates for q1. The following bound for the iterates v(i) can be established:

Proof. We only present the proof for the case that A is diagonalisable as this is the situation most relevant to us. A proof for general matrices can be found in [16, Theorem 4.1]. Let q1, ..., qm be an orthonormal basis of eigenvectors with corresponding eigenvalues λ1, ..., λm for A. Let us additionally assume that |λ1| > |λ2| ≥ ... ≥ |λm|. Then we can express v(0) as a linear combination of those basis vectors such that

v(0)=

m

X

k=1

ckqk

with ck∈ C. Now for some constant ni ∈ R which arises because of the normalisation in each iteration we obtain

A direct consequence of this equation is that our eigenvector estimate will converge linearly to a multiple of q1 depending on the ratio

Remark 2.9.13. For suciently large values of i we obtain

v(i)−

eiq1 ∈ O

λ2 λ1

i!

where ei ≈

λ1

1|

i

. For instance, if λ1 is real and positive this means that v(i) converges to q1. Remark 2.9.14. If A ∈ Matm(R) the condition that |λ1| > |λ2| implies that λ1 ∈ R.

Proof. Let A ∈ Matm(R) and let us assume that λ1 ∈ C \ R is a complex eigenvalue of A.

Then we know that λ2 = ¯λ1 has to be another complex eigenvalue of A. This would imply that

1| = |λ2| which contradicts our assumptions.

More details about the algorithm and applications can, for example, be found in [5, Lecture 27]

or in [6, Section 8.2.1].

Inverse Iteration

Power iteration has two signicant shortcomings. One disadvantage is that it is only capable of

nding the eigenvector corresponding to the largest eigenvalue and additionally its convergence rate largely depends on the ratio of |λ12|. We will now discuss how Algorithm 9 can be modied to provide an eective method to determine the eigenvectors of a matrix if good estimates of the eigenvalues are known in advance. This method is particularly useful if only a subset of the eigenvectors is needed. This could, for instance, be the eigenvector corresponding to the smallest eigenvalue.

Let A ∈ Matm(C) be nonsingular and let λ ∈ C be an eigenvalue estimate for ˜λ ∈ Λ (A) such that λ /∈ Λ (A). First we observe that det (A − λIm) 6= 0, which implies that the matrix A−λIm

is invertible. Then the eigenvectors of A associated with ˜λ are the same as the eigenvectors of (A − λIm)−1 which correspond to the eigenvalue (˜λ − λ)−1 of (A − λIm)−1. In order to prove this claim let x ∈ Cm be an eigenvector of A which is associated with the eigenvalue ˜λ. Then the equation Ax = ˜λx holds and additionally

(A − λIm)−1(A − λIm) x = x ⇐⇒

(A − λIm)−1(˜λ − λ)x = x ⇐⇒

(A − λIm)−1x = (˜λ − λ)−1x.

As we know, the rate of convergence for the power iteration algorithm is about

λ2

λ1

. If we choose λ to be an eigenvalue estimate the gap between the largest and second largest eigenvalue of (A − λIm)−1 will broaden tremendously and in this way accelerate convergence. So the essential idea behind inverse iteration is to apply power iteration to the inverse of A − λIm. Note that the matrix (A − λIm)−1 is not computed explicitly. We rather solve a system of linear equations in each round which is more economic. Obviously, the matrix (A − λIm)−1 becomes more ill-conditioned the closer λ gets to an exact eigenvalue of A. Fortunately though, the

occurring error has a dominant component in the direction of the true eigenvector. A more detailed explanation of this behaviour can be found in [5, Lecture 27 and Algorithm 27.2].

Algorithm 10: Inverse Iteration

Input: A matrix A ∈ Matm(C), an eigenvalue estimate λ ∈ C of A, n ∈ N Output: An eigenvector estimate corresponding to the eigenvalue λ of A

1 v(0) := random vector in Cm\{0m};

2 v(0) := kvv(0)(0)k ;

3 for i := 1 to n do

4 Solve (A − λI) v(i) = v(i−1) for v(i);

5 v(i) := v(i) kv(i)k ;

6 end

7 return v(n);

In practice the input matrix is transformed to Hessenberg form rst, for example, via Algorithm 7.

As this is a common preprocessing technique used also in the QR algorithm, most of the time the Hessenberg form is readily available without additional cost.

If the input matrix is in Hessenberg form the cost of inverse iteration is in O m2

per eigenvector, which is essentially the cost for solving the system of linear equations in line 4 (compare [6, Section 7.6.1]).

Reduction to (upper) bidiagonal form

Before we can start, we will rst state what we mean by a bidiagonal matrix.

Denition 2.9.15. [Bidiagonal matrix]

We say a matrix A ∈ Matm(C) is upper bidiagonal if all its entries below the diagonal and above the rst superdiagonal are zero. Consequently, a matrix A ∈ Matm(C) is called lower bidiagonal if all its entries above the diagonal and below the rst subdiagonal are zero.

The following algorithm reduces a matrix to upper bidiagonal form and is used, for instance, as a rst preprocessing step inside the Golub-Kahan algorithm for the computation of a SVD of a matrix. Given a matrix A ∈ Matm,n(C), the algorithm computes a series of 2n − 2 Householder transformations U1,V1,U2,V2,...,Vn−2,Un−1,Un and applies them alternately to the left and right-hand side of A such that UBAVB = (U1...Un)A (V1...Vn−2) is upper bidiagonal, with Ui∈ Matm(C) and Vi ∈ Matn(C).

Algorithm 11: Golub-Kahan Bidiagonalisation Input: A matrix A ∈ Matm,n(C)

Output: The matrix A in upper bidiagonal form and the generating Householder reectors

1 for i := 1 to n do

2 ui := householder(Ai:m,i) (e.g. via Algorithm 3);

3 if ui6= 0m−i+1 then Ai:m,i:n :=



Im−i+1− 2uuiui iui



Ai:m,i:n ;

4 if i < n − 1 then

5 vi := householder

Ai,i+1:n ;

6 if vi 6= 0n−1 then Ai:m,i+1:n := Ai:m,i+1:n

In−i− 2vvivi ivi ;

7 end

8 end

9 return (A, u1, ..., un, v1, ..., vn−2);