AMS526: Numerical Analysis I (Numerical Linear Algebra)

Similar documents
AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Eigenvalue and Eigenvector Problems

Eigenvalues and eigenvectors

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

EECS 275 Matrix Computation

AMS526: Numerical Analysis I (Numerical Linear Algebra)

arxiv: v1 [math.na] 5 May 2011

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra)

EIGENVALUE PROBLEMS. EIGENVALUE PROBLEMS p. 1/4

Last Time. Social Network Graphs Betweenness. Graph Laplacian. Girvan-Newman Algorithm. Spectral Bisection

Solving large scale eigenvalue problems

Numerical Methods I Eigenvalue Problems

Lecture 2: Numerical linear algebra

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 23: GMRES and Other Krylov Subspace Methods; Preconditioning

13-2 Text: 28-30; AB: 1.3.3, 3.2.3, 3.4.2, 3.5, 3.6.2; GvL Eigen2

Orthogonal iteration to QR

Computing Eigenvalues and/or Eigenvectors;Part 2, The Power method and QR-algorithm

Numerical Methods - Numerical Linear Algebra

5 Selected Topics in Numerical Linear Algebra

EIGENVALUE PROBLEMS (EVP)

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Lecture # 11 The Power Method for Eigenvalues Part II. The power method find the largest (in magnitude) eigenvalue of. A R n n.

QR-decomposition. The QR-decomposition of an n k matrix A, k n, is an n n unitary matrix Q and an n k upper triangular matrix R for which A = QR

Computing Eigenvalues and/or Eigenvectors;Part 2, The Power method and QR-algorithm

Lecture 13 Eigenvalue Problems

Eigenvalue Problems and Singular Value Decomposition

Matrices, Moments and Quadrature, cont d

Solving large scale eigenvalue problems

AMS526: Numerical Analysis I (Numerical Linear Algebra)

4.8 Arnoldi Iteration, Krylov Subspaces and GMRES

Eigenvalue Problems. Eigenvalue problems occur in many areas of science and engineering, such as structural analysis

Orthogonal iteration to QR

Scientific Computing: An Introductory Survey

Linear algebra & Numerical Analysis

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Course Notes: Week 1

Applied Mathematics 205. Unit V: Eigenvalue Problems. Lecturer: Dr. David Knezevic

AMS526: Numerical Analysis I (Numerical Linear Algebra)

In this section again we shall assume that the matrix A is m m, real and symmetric.

Numerical methods for eigenvalue problems

Numerical Solution of Linear Eigenvalue Problems

EECS 275 Matrix Computation

Lecture 10 - Eigenvalues problem

Lecture 4 Eigenvalue problems

MATH 423 Linear Algebra II Lecture 33: Diagonalization of normal operators.

Draft. Lecture 14 Eigenvalue Problems. MATH 562 Numerical Analysis II. Songting Luo. Department of Mathematics Iowa State University

Math 411 Preliminaries

Lecture 3: QR-Factorization

Computational Methods. Eigenvalues and Singular Values

Computation of eigenvalues and singular values Recall that your solutions to these questions will not be collected or evaluated.

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Math 504 (Fall 2011) 1. (*) Consider the matrices

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Direct methods for symmetric eigenvalue problems

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Math 405: Numerical Methods for Differential Equations 2016 W1 Topics 10: Matrix Eigenvalues and the Symmetric QR Algorithm

Eigenvalues and Eigenvectors

Numerical Analysis Lecture Notes

Schur s Triangularization Theorem. Math 422

Numerical Methods I: Eigenvalues and eigenvectors

5.3 The Power Method Approximation of the Eigenvalue of Largest Module

Section 4.5 Eigenvalues of Symmetric Tridiagonal Matrices

THE QR METHOD A = Q 1 R 1

The German word eigen is cognate with the Old English word āgen, which became owen in Middle English and own in modern English.

Matrix Theory, Math6304 Lecture Notes from September 27, 2012 taken by Tasadduk Chowdhury

Numerical Methods for Solving Large Scale Eigenvalue Problems

Synopsis of Numerical Linear Algebra

Inverses. Stephen Boyd. EE103 Stanford University. October 28, 2017

Notes on Eigenvalues, Singular Values and QR

Index. for generalized eigenvalue problem, butterfly form, 211

Preliminary Examination, Numerical Analysis, August 2016

I. Multiple Choice Questions (Answer any eight)

ACM106a - Homework 4 Solutions

Lecture notes: Applied linear algebra Part 1. Version 2

EIGENVALUE PROBLEMS. Background on eigenvalues/ eigenvectors / decompositions. Perturbation analysis, condition numbers..

MAA507, Power method, QR-method and sparse matrix representation.

G1110 & 852G1 Numerical Linear Algebra

Krylov subspace projection methods

Orthogonal iteration revisited

ft-uiowa-math2550 Assignment NOTRequiredJustHWformatOfQuizReviewForExam3part2 due 12/31/2014 at 07:10pm CST

Matrix Algorithms. Volume II: Eigensystems. G. W. Stewart H1HJ1L. University of Maryland College Park, Maryland

Applied Numerical Linear Algebra. Lecture 8

Computational Methods CMSC/AMSC/MAPL 460. Eigenvalues and Eigenvectors. Ramani Duraiswami, Dept. of Computer Science

The QR Algorithm. Marco Latini. February 26, 2004

Section 4.4 Reduction to Symmetric Tridiagonal Form

Lecture 10: Eigenvectors and eigenvalues (Numerical Recipes, Chapter 11)

Numerical Linear Algebra Homework Assignment - Week 2

Today: eigenvalue sensitivity, eigenvalue algorithms Reminder: midterm starts today

Numerical Methods. Elena loli Piccolomini. Civil Engeneering. piccolom. Metodi Numerici M p. 1/??

Numerical Methods I Non-Square and Sparse Linear Systems

1 Last time: least-squares problems

Math 108b: Notes on the Spectral Theorem

18.06SC Final Exam Solutions

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

ECE 595, Section 10 Numerical Simulations Lecture 7: Optimization and Eigenvalues. Prof. Peter Bermel January 23, 2013

Applied Mathematics 205. Unit V: Eigenvalue Problems. Lecturer: Dr. David Knezevic

Bindel, Spring 2016 Numerical Analysis (CS 4220) Notes for

Transcription:

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 16: Reduction to Hessenberg and Tridiagonal Forms; Rayleigh Quotient Iteration Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical Analysis I 1 / 25

Outline 1 Schur Factorization (NLA 26) 2 Reduction to Hessenberg and Tridiagonal Forms (NLA 26) 3 Rayleigh Quotient Iteration (NLA 27) Xiangmin Jiao Numerical Analysis I 2 / 25

Obvious Algorithms Most obvious method is to find roots of characteristic polynomial p A (λ), but it is very ill-conditioned Another idea is power iteration, using fact that x x, Ax Ax, A 2 x A 2 x, A 3 x A 3 x,... converge to an eigenvector corresponding to the largest eigenvalue of A in absolute value, but it may converge very slowly Xiangmin Jiao Numerical Analysis I 3 / 25

Obvious Algorithms Most obvious method is to find roots of characteristic polynomial p A (λ), but it is very ill-conditioned Another idea is power iteration, using fact that x x, Ax Ax, A 2 x A 2 x, A 3 x A 3 x,... converge to an eigenvector corresponding to the largest eigenvalue of A in absolute value, but it may converge very slowly Instead, compute a eigenvalue-revealing factorization, such as Schur factorization A = QTQ by introducing zeros, using algorithms similar to QR factorization Xiangmin Jiao Numerical Analysis I 3 / 25

A Fundamental Difficulty However, eigenvalue-revealing factorization cannot be done in finite number of steps: Any eigenvalue solver must be iterative To see this, consider a general polynomial of degree m p(z) = z m + a m 1 z m 1 + +a 1 z + a 0 There is no closed-form expression for the roots of p: (Abel, 1842) In general, the roots of polynomial equations higher than fourth degree cannot be written in terms of a finite number of operations Xiangmin Jiao Numerical Analysis I 4 / 25

A Fundamental Difficulty Cont d However, the roots of p A are the eigenvalues of the companion matrix 0 a 0 1 0 a 1 A = 1....... 0 am 2 1 a m 1 Therefore, in general, we cannot find the eigenvalues of a matrix in a finite number of steps In practice, however, there are algorithms that converge to desired precision in a few iterations Xiangmin Jiao Numerical Analysis I 5 / 25

Schur Factorization and Diagonalization Most eigenvalue algorithms compute Schur factorization A = QTQ by transforming A with similarity transformations Qj Q2Q 1 A Q 1 Q 2 Q j, }{{}}{{} Q Q where Q i are unitary matrices, which converge to T as j Note: Real matrices might need complex Schur forms and eigenvalues Question: For Hermitian A, what matrix will the sequence converge to? Xiangmin Jiao Numerical Analysis I 6 / 25

Schur Factorization and Diagonalization Most eigenvalue algorithms compute Schur factorization A = QTQ by transforming A with similarity transformations Qj Q2Q 1 A Q 1 Q 2 Q j, }{{}}{{} Q Q where Q i are unitary matrices, which converge to T as j Note: Real matrices might need complex Schur forms and eigenvalues Question: For Hermitian A, what matrix will the sequence converge to? Xiangmin Jiao Numerical Analysis I 7 / 25

Outline 1 Schur Factorization (NLA 26) 2 Reduction to Hessenberg and Tridiagonal Forms (NLA 26) 3 Rayleigh Quotient Iteration (NLA 27) Xiangmin Jiao Numerical Analysis I 8 / 25

Two Phases of Eigenvalue Computations General A: First convert to upper-hessenberg form, then to upper triangular A A Phase 1 upper-hessenberg Phase 2 triangular Hermitian A: First convert to tridiagonal form, then to diagonal A=A Phase 1 tridiagonal Phase 2 diagonal In general, phase 1 is direct and requires O(m 3 ) flops, and phase 2 is iterative and requires O(m) iterations, and O(m 3 ) flops for non-hermitian matrices and O(m 2 ) flops for Hermitian matrices Xiangmin Jiao Numerical Analysis I 9 / 25

Introducing Zeros by Similarity Transformations First attempt: Compute Schur factorization A = QTQ by applying Householder reflectors from both left and right A Q 1 x x x x x 0 x x x x 0 x x x x 0 x x x x 0 x x x x Q 1 A Q 1 x x x x x x x x x x x x x x x x x x x x x x x x x Q 1 AQ 1 Unfortunately, the right multiplication destroys the zeros introduced by Q 1 This would not work because of Abel s theorem However, the subdiagonal entries typically decrease in magnitude Xiangmin Jiao Numerical Analysis I 10 / 25

The Hessenberg Form Second attempt: try to compute upper Hessenberg matrix H similar to A: A Q 1 x x x x x 0 x x x x 0 x x x x 0 x x x x Q 1 A Q 1 x x x x x x x x x x x x x x x x x x x x Q 1 AQ 1 The zeros introduced by Q1 A were not destroyed this time! Continue with remaining columns would result in Hessenberg form: Q2 x x x x 0 x x x 0 x x x Q 2 Q 1 AQ 1 Q 2 x x x x x x x x x x x x x x x Q 2 Q 1 AQ 1 Q 2 Xiangmin Jiao Numerical Analysis I 11 / 25

The Hessenberg Form After m 2 steps, we obtain the Hessenberg form: Q m 2 Q 2 Q 1 A Q 1 Q 2 Q m 2 = H = }{{}}{{} Q Q For Hermitian matrix A, H is Hermitian and hence is tridiagonal Xiangmin Jiao Numerical Analysis I 12 / 25

Householder Reduction to Hessenberg Householder Reduction to Hessenberg Form for k = 1 to m 2 x = A k+1:m,k v k = sign(x 1 ) x 2 e 1 + x v k = v k / v k 2 A k+1:m,k:m = A k+1:m,k:m 2v k (v k A k+1:m,k:m) A 1:m,k+1:m = A 1:m,k+1:m 2(A 1:m,k+1:m v k )v k Note: Q is never formed explicitly. Operation count m 2 k=1 4(m k) 2 + 4m(m k) 4m 3 /3+4m 3 4m 3 /2 = 10m 3 /3 Xiangmin Jiao Numerical Analysis I 13 / 25

Reduction to Tridiagonal Form If A is Hermitian, then Qm 2 Q2Q 1 A Q 1 Q 2 Q m 2 = H = }{{}}{{} Q Q......... For Hermitian A, operation count would be same as Householder QR: 4m 3 /3 First, taking advantage of sparsity, cost of applying right reflectors is also 4(m k) k instead of 4m(m k), so cost is m 2 k=1 8(m k) 2 8m 3 /3 Second, taking advantage of symmetry, cost is reduced by 50% to 4m 3 /3 Xiangmin Jiao Numerical Analysis I 14 / 25

Stability of Hessenberg Reduction Theorem Householder reduction to Hessenberg form is backward stable, in that Q H Q = A+δA, δa A = O(ǫ machine ) for some δa C m m Note: Similar to Householder QR, Q is exactly unitary based on some ṽ k Xiangmin Jiao Numerical Analysis I 15 / 25

Outline 1 Schur Factorization (NLA 26) 2 Reduction to Hessenberg and Tridiagonal Forms (NLA 26) 3 Rayleigh Quotient Iteration (NLA 27) Xiangmin Jiao Numerical Analysis I 16 / 25

Solving Eigenvalue Problems All eigenvalue solvers must be iterative Iterative algorithms have multiple facets: 1 Basic idea behind the algorithms 2 Convergence and techniques to speed-up convergence 3 Efficiency of implementation 4 Termination criteria We will focus on first two aspects Xiangmin Jiao Numerical Analysis I 17 / 25

Simplification: Real Symmetric Matrices We will consider eigenvalue problems for real symmetric matrices, i.e. A = A T R m m, and Ax = λx for x R m Note: x = x T, and x = x T x A has real eigenvalues λ 1,λ 2,..., λ m and orthonormal eigenvectors q 1, q 2,..., q m, where q j = 1 Eigenvalues are often also ordered in a particular way (e.g., ordered from large to small in magnitude) In addition, we focus on symmetric tridiagonal form Why? Because phase 1 of two-phase algorithm reduces matrix into tridiagonal form Xiangmin Jiao Numerical Analysis I 18 / 25

Rayleigh Quotient The Rayleigh quotient of x R m is the scalar r(x) = xt Ax x T x For an eigenvector x, its Rayleigh quotient is r(x) = x T λx/x T x = λ, the corresponding eigenvalue of x For general x, r(x) = α that minimizes Ax αx 2. x is eigenvector of A r(x) = 2 (Ax r(x)x) = 0 with x 0 x T x r(x) is smooth and r(q j ) = 0 for any j, and therefore is quadratically accurate: r(x) r(q J ) = O( x q J 2 ) as x q J for some J Xiangmin Jiao Numerical Analysis I 19 / 25

Power Iteration Simple power iteration for largest eigenvalue Algorithm: Power Iteration v (0) =some unit-length vector for k = 1,2,... w = Av (k 1) v (k) = w/ w λ (k) = r(v (k) ) = (v (k) ) T Av (k) Termination condition is omitted for simplicity Xiangmin Jiao Numerical Analysis I 20 / 25

Convergence of Power Iteration Expand initial v (0) in orthonormal eigenvectors q i, and apply A k : v (0) = a 1 q 1 + a 2 q 2 + +a m q m v (k) = c k A k v (0) = c k (a 1 λ k 1q 1 + a 2 λ k 2q 2 + +a m λ k mq m ) = c k λ k 1(a 1 q 1 + a 2 (λ 2 /λ 1 ) k q 2 + +a m (λ m /λ 1 ) k q m ) If λ 1 > λ 2 λ m 0 and q1 Tv(0) 0, this gives ( v (k) (±q 1 ) = O λ 2 /λ 1 k), λ (k) λ 1 = O ( λ 2 /λ 1 2k) where ± sign is chosen to be sign of q T 1 v(k) It finds the largest eigenvalue (unless eigenvector is orthogonal to v (0) ) Error reduces by only a constant factor ( λ 2 /λ 1 ) each step, and very slowly especially when λ 2 λ 1 Xiangmin Jiao Numerical Analysis I 21 / 25

Inverse Iteration Apply power iteration on (A µi) 1, with eigenvalues {(λ j µ) 1 } If µ λ J for some J, then (λ J µ) 1 may be far larger than (λ j µ) 1, j J, so power iteration may converge rapidly Algorithm: Inverse Iteration v (0) =some unit-length vector for k = 1,2,... Solve (A µi)w = v (k 1) for w v (k) = w/ w λ (k) = r(v (k) ) = (v (k) ) T Av (k) Converges to eigenvector q J if parameter µ is close to λ J v (k) µ λ J (±q J ) = O( k) (, λ (k) µ λ J λ J = O µ λ K µ λ K where λ J and λ K are closest and second closest eigenvalues to µ Standard method for determining eigenvector given eigenvalue 2k ) Xiangmin Jiao Numerical Analysis I 22 / 25

Rayleigh Quotient Iteration Parameter µ is constant in inverse iteration, but convergence is better for µ close to the eigenvalue Improvement: At each iteration, set µ to last computed Rayleigh quotient Algorithm: Rayleigh Quotient Iteration v (0) =some unit-length vector λ (0) = r(v (0) ) = (v (0) ) T Av (0) for k = 1,2,... Solve (A λ (k 1) I)w = v (k 1) for w v (k) = w/ w λ (k) = r(v (k) ) = (v (k) ) T Av (k) Cost per iteration is linear for tridiagonal matrix Xiangmin Jiao Numerical Analysis I 23 / 25

Convergence of Rayleigh Quotient Iteration Cubic convergence in Rayleigh quotient iteration v (k+1) (±q J ) = O( v (k) (±q J ) 3 ) and λ (k+1) λ J = O ( λ (k) λ J 3) In other words, each iteration triples number of digits of accuracy Proof idea: If v (k) is close to an eigenvector, v (k) (±q J ) ǫ, then accuracy of Rayleigh quotient estimate λ (k) is λ (k) λ J = O(ǫ 2 ). One step of inverse iteration then gives v (k+1) q J = O( λ (k) λ J v (k) q J ) = O(ǫ 3 ) Rayleigh quotient is great in finding largest (or smallest) eigenvalue and its corresponding eigenvector. What if we want to find all eigenvalues? Xiangmin Jiao Numerical Analysis I 24 / 25

Operation Counts In Rayleigh quotient iteration, if A R m m is full matrix, then solving (A µi)w = v (k 1) may take O(m 3 ) flops per step if A R m m is upper Hessenberg, then each step takes O(m 2 ) flops if A R m m is tridiagonal, then each step takes O(m) flops Xiangmin Jiao Numerical Analysis I 25 / 25