Docsity

Eigenvalue Algorithms and Schur Decomposition, Slides of Advanced Computer Architecture

Partial preview of the text

Download Eigenvalue Algorithms and Schur Decomposition and more Slides Advanced Computer Architecture in PDF only on Docsity!

  • Lecture

Overview

Eigenvalue algorithms

Schur decomposition

Power iteration

Eigenvalue solvers

Best general purpose eigenvalue algorithms are based on a different

principle: the computation of an eigenvalue revealing factorization of

A ∈ C

m×m where the eigenvalues appear as entries of one of the

factors

I (^) diagonalization: A = X ΛX −^1 (if and only if A is nondefective)

I (^) unitary diagonalization: A = QΛQH^ (if and only if A is normal)

I (^) unitary triangularization (Schur factorization): A = QTQH^ (no matter

whether A is defective or not)

Most of these direct algorithms proceed in two phases:

I (^) a preliminary reduction from full to structured form

I (^) an iterative process for the final convergence

Any eigenvalue solver must be iterative

The goal is to produce sequences of numbers that converge rapidly

towards eigenvalues

Schur factorization and diagonalization

Most of the general purpose eigenvalue algorithms in use today

proceed by computing the Schur factorization

A = QTQ

H Q

H AQ = T

Compute Schur factorization A = QTQ

H by transforming A using a

sequence of elementary unitary similarity transformation

X 7 → Q

H j XQj^ , so the product

Q

H j · · ·^ Q

H 2 Q

H 1 ︸ ︷︷ ︸

QH

A Q 1 Q 2 · · · Qj ︸ ︷︷ ︸ Q

converges to an upper triangular matrix T as j → ∞

Two phases of eigenvalue computation

In the first phase, a direct method is applied to produce an upper

Hessenberg matrix, i.e., a matrix with zeros below the first

subdiagonal

In the second phase, an iteration is applied to generate a formally

infinite sequences of Hessenberg matrices that converge to a

triangular form

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × ×

× × ×

× ×

× × × × ×

× × × ×

× × ×

× ×

×

A 6 = A

H H T

Two phases of eigenvalue computation (cont’d)

If A is Hermitian, the two phase approach becomes faster

The intermediate matrix is a Hermitian Hessenberg matrix, i.e.,

tridiagonal

The final result is a Hermitian triangular matrix, i.e., diagonal

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× ×

× × ×

× × ×

× × ×

× ×

×

×

×

×

×

A = A

H T D

Reduction by Householder transformations

The right strategy is to introduce zeros selectively

Select a Householder reflector Q

H 1 that leaves the first row unchanged

When multiplied on the left of A, it forms linear combinations of only

rows 2,... , m to introduce zeros into rows 3,... , m of the first

column

When multiplied on the right of Q

H 1 Q, it leaves the first column

unchanged, and forms linear combinations of columns 2,... , m so it

does not alter the zeros that have been introduced

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × × ×

× × × × ×

×    

×    

A Q

H 1 ·^ Q

H 1 A^ ·Q^1 Q

H 1 AQ^1

Reduction by Householder transformations

Same idea is repeated to introduce zeros into subsequent columns       × × × × ×

× × × × ×

× × × ×

× × × ×

× × × ×

× × × × ×

× × × × ×

× ×   

× ×   

×   

      Q

H 1 AQ^1 Q

H 2 Q

H 1 AQ^1 Q

H 2 Q

H 1 AQ^1 Q^2

Repeating this process m − 2 times, we have a product in Hessenberg

form (^) 

× × × × ×

× × × × ×

× × × ×

× × ×

× ×

      Q

H m− 1 · · ·^ Q

H 2 Q

H 1 A ︸ ︷︷ ︸

QH

A Q 1 Q 2 · · · Qm− 2 ︸ ︷︷ ︸ Q

= H

Rayleigh quotient and inverse iteration

Examine classical eigenvalue algorithms with real matrices

Rayleigh quotient of a vector x ∈ IR

m is the scalar

r (x) =

x

> Ax

x>x

If x is an eigenvector, then r (x) = λ is the corresponding eigenvalue

Given x, what scalar α acts most like an eigenvalue for x in the sense

of minimizing ‖Ax − αx‖ 2?

An m × 1 least squares of the form xα ≈ Ax (x is the matrix, α is the

unknown), and the solution is

α = (x

> x)

− 1 x

> (Ax) = r (x)

r (x) is a natural eigenvalue estimate to consider if x is close to, but

not necessarily equal to, an eigenvector

Gradient of Rayleigh quotient and eigenvector

Consider x ∈ IR

m as a variable so that r is a function: IR

m → IR

Interested in the local behavior of r (x) when x is near an eigenvector

One way to quantitatively approach this is to compute the partial

derivatives of r (x) with respect to the coordinate xj

∂r (x) ∂xj

∂ ∂xj

(x>Ax)

x>x

(x>Ax) ∂ ∂xj

(x>x)

(x>x)^2

=

2(Ax)j

x>x

(x>Ax)2xj

(x>x)^2

2 x>x

(Ax − r (x)x)j

Collect these partial derivatives into an m-vector, we get the gradient

of r (x),

∇r (x) =

x

> x

(Ax − r (x)x)

At an eigenvector x of A, the gradient of r (x) is the zero vector

Conversely, if ∇r (x) = 0 with x 6 = 0, then x is an eigenvector and

r (x) is the corresponding eigenvalue

Convergence rate

Let qJ be one of the eigenvectors of A, it can be shown

r (x) − r (qJ ) = O(‖x − qJ ‖

2 ) as x → qJ (1)

Expand x as a line combination of the eigenvectors q 1 ,... , qm of A,

x =

∑m

j=1 aj^ qj^ , then

r (x) =

∑m

j=1 a

2 j λj ∑m

j=1 a

2 j

Thus, r (x) is a weighted mean of the eigenvalues of A, with the

weights equal to the squares of the coordinates of x in the eigenvector

basis

Due to this squaring of the coordinates, if |aj /aJ | < ε for j 6 = J, then

r (x) − r (qJ ) = O(ε

2 )

Rayleigh quotient is a quadratically accurate estimate of an eigenvalue

Power iteration

Produce a sequence v

(i) that converges to an eigenvector

corresponding to the largest eigenvalue of A

Algorithm

Initialize v

(0) randomly with ‖v

(0) ‖ = 1

for k = 1, 2 ,... do

w = Av

(k−1) // apply A

v

(k)

w ‖w‖

//normalize

λ

(k) = (v

(k) )

> Av

(k) // Rayleigh quotient

end for

Let v

0 denote the linear combination of the orthonormal eigenvectors

qi , we can analyze power iteration

v

(0) = a 1 q 1 + a 2 q 2 + · · · + amqm

Since v

(k) is a multiple of A

k v

(0) , we have some constant ck

v

(k) = ck A

k v

(0)

= ck (a 1 λ

k 1 q^1 +^ a^2 λ

k 2 q^2 +^ · · ·^ +^ amλ

k mqm)

= ck λ

k 1 (a^1 q^1 +^ a^2 (λ^2 /λ^1 )

k q 2 + · · · + am(λm/λ 1 )

k qm)

Power iteration (cont’d)

Can be used to compute the spectral radius (supremum among the

absolute values of the spectrum) of a matrix

ρ(A) = sup{|λi |}

where λi is an eigenvalue of A

However, it has limited use

I (^) it can find only the eigenvector corresponding to the largest eigenvalue

I (^) the convergence is linear, reducing the error only by a constant factor

≈ |λ 2 /λ 1 | at each iteration I (^) the quality of this factor depends on having a largest eigenvalue that is

significantly larger than the others