Orthogonal iteration revisited

Similar documents
Orthogonal iteration to QR

Orthogonal iteration to QR

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

Section 4.5 Eigenvalues of Symmetric Tridiagonal Matrices

Matrices, Moments and Quadrature, cont d

Eigenvalues and eigenvectors

THE QR METHOD A = Q 1 R 1

Lecture 3: QR-Factorization

ECS130 Scientific Computing Handout E February 13, 2017

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

4.8 Arnoldi Iteration, Krylov Subspaces and GMRES

Solving large scale eigenvalue problems

Chasing the Bulge. Sebastian Gant 5/19/ The Reduction to Hessenberg Form 3

Section 6.4. The Gram Schmidt Process

Worksheet for Lecture 25 Section 6.4 Gram-Schmidt Process

Lecture # 5 The Linear Least Squares Problem. r LS = b Xy LS. Our approach, compute the Q R decomposition, that is, n R X = Q, m n 0

Numerical Analysis Lecture Notes

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

EIGENVALUE PROBLEMS. EIGENVALUE PROBLEMS p. 1/4

6.1. Inner Product, Length and Orthogonality

Notes on Eigenvalues, Singular Values and QR

We will discuss matrix diagonalization algorithms in Numerical Recipes in the context of the eigenvalue problem in quantum mechanics, m A n = λ m

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

Lecture 4 Orthonormal vectors and QR factorization

Double-shift QR steps

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Singular Value Decomposition

Schur s Triangularization Theorem. Math 422

1 Last time: least-squares problems

Course Notes: Week 1

Eigenvalue and Eigenvector Problems

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

Eigenvalue Problems and Singular Value Decomposition

I. Multiple Choice Questions (Answer any eight)

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

Decomposition. bq (m n) R b (n n) r 11 r 1n

Numerical Methods I Eigenvalue Problems

1 Extrapolation: A Hint of Things to Come

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

AMS526: Numerical Analysis I (Numerical Linear Algebra)

EXAM. Exam 1. Math 5316, Fall December 2, 2012

Lecture 11. Linear systems: Cholesky method. Eigensystems: Terminology. Jacobi transformations QR transformation

Eigenvalues and Eigenvectors

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

Linear algebra & Numerical Analysis

Lecture 4 Eigenvalue problems

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

MATRICES ARE SIMILAR TO TRIANGULAR MATRICES

Introduction to Arnoldi method

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 9

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

Linear Algebra, part 3 QR and SVD

1 Vectors. Notes for Bindel, Spring 2017 Numerical Analysis (CS 4220)

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

Solutions to Final Exam

Eigenvalue problems. Eigenvalue problems

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

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

6.4 Krylov Subspaces and Conjugate Gradients

Assignment #9: Orthogonal Projections, Gram-Schmidt, and Least Squares. Name:

The Singular Value Decomposition

COMPUTER SCIENCE 515 Numerical Linear Algebra SPRING 2006 ASSIGNMENT # 4 (39 points) February 27

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

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Orthogonality. Orthonormal Bases, Orthogonal Matrices. Orthogonality

Review problems for MA 54, Fall 2004.

Unit 2, Section 3: Linear Combinations, Spanning, and Linear Independence Linear Combinations, Spanning, and Linear Independence

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

LINEAR ALGEBRA KNOWLEDGE SURVEY

18.06 Problem Set 8 - Solutions Due Wednesday, 14 November 2007 at 4 pm in

arxiv: v1 [math.na] 5 May 2011

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

Announcements Monday, October 29

Chapter 5. Eigenvalues and Eigenvectors

Lecture 18: The Rank of a Matrix and Consistency of Linear Systems

MATH 235: Inner Product Spaces, Assignment 7

EECS 275 Matrix Computation

Lecture 15, 16: Diagonalization

The QR Decomposition

Linear Algebra- Final Exam Review

MATH 304 Linear Algebra Lecture 20: The Gram-Schmidt process (continued). Eigenvalues and eigenvectors.

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

ECS231 Handout Subspace projection methods for Solving Large-Scale Eigenvalue Problems. Part I: Review of basic theory of eigenvalue problems

EECS 275 Matrix Computation

Dot product and linear least squares problems

Solving large scale eigenvalue problems

Cheat Sheet for MATH461

5.3 The Power Method Approximation of the Eigenvalue of Largest Module

Lecture 4: Applications of Orthogonality: QR Decompositions

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 13

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

First of all, the notion of linearity does not depend on which coordinates are used. Recall that a map T : R n R m is linear if

Orthonormal Bases; Gram-Schmidt Process; QR-Decomposition

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

Lecture 6: Lies, Inner Product Spaces, and Symmetric Matrices

Linear Analysis Lecture 16

Scientific Computing: An Introductory Survey

Linear Algebra, part 3. Going back to least squares. Mathematical Models, Analysis and Simulation = 0. a T 1 e. a T n e. Anna-Karin Tornberg

18.06SC Final Exam Solutions

Transcription:

Week 10 11: Friday, Oct 30 and Monday, Nov 2 Orthogonal iteration revisited Last time, we described a generalization of the power methods to compute invariant subspaces. That is, starting from some initial subspace V (0), we defined the sequence V (k+1) = AV (k) = A k+1 V (0). Under some assumptions, the spaces V (k) asymptotically converge to an invariant subspace of A. In order to actually implement this iteration, though, we need a concrete representation of each of the subspaces in terms of a basis. In the case of the power method, we normalized our vector at each step to have unit length. The natural generalization in the case of subspace iteration is to normalize our bases to be orthonormal at each step. If the columns of V (k) form an orthonormal basis for V (k), then the columns of AV (k) form an orthonormal basis for V (k+1) ; and we can compute an orthonormal basis V (k+1) for V (k+1) by an economy QR decomposition: V (k+1) R (k+1) = AV (k). This orthogonal iteration gives us a sequence of orthonormal bases V (k+1) for the spaces V (k). We also mentioned in the last lecture that orthogonal iteration has the marvelous property that it runs subspace iteration for a sequence of nested subspaces. Using MATLAB notation, we have that for any l, V (k+1) (:, 1 : l)r (k+1) (1 : l, 1 : l) = AV (k) (:, 1 : l). So by running orthogonal iteration on an m-dimensional subspace, we magically also run orthogonal iteration on an l-dimensional subspaces for each l m. Recall that the Schur factorization AU = UT involves an orthonormal basis U such that for any l, U(:, 1 : l) spans an l-dimensional invariant subspace (this is from the triangularity of T ). So we might hope that if we ran orthogonal iteration on all of A, we would

eventually converge to the U matrix in the Schur factorization. starting from Q (0) = I, we iterate That is, (1) Q (k+1) R (k+1) = AQ (k) in the hopes that the columns of Q (k), since they span nested bases undergoing subspace iteration, will converge to the unitary factor U. Now, consider the first two steps of this iteration: Q (1) R (1) = A Q (2) R (2) = AQ (1) If we multiply the second equation on the right by R (1), we have (2) Q (2) R (2) R (1) = AQ (1) R (1) = A 2. Similarly, if we multiply Q (3) R (3) = AQ (3) by R (2) R (1), we have Q (3) R (3) R (2) R (1) = AQ (2) R (2) R (1) = A 3, where the last equality comes from (2). We can keep going in this fashion, and if we define the upper triangular matrix R (k) = R (k) R (k 1)... R (1), we have Q (k) R (k) = A k. That is, Q (k) is precisely the unitary factor in a QR decomposition of A k. This fact may be unsurprising if we consider that we derived this orthogonal iteration from the power method. From orthogonal iteration to the QR iteration Suppose we have the Schur form AU = UT, or equivalently T = U AU. Now, the matrices A (k) = (Q (k) ) A(Q (k) ) are each unitarily similar to A, and if the matrices Q (k) converge to U, then they A (k) must converge to T. More generally, if the first span of the first l columns of Q (k) converges to an invariant subspace basis of A, then A (k) should at least converge to a block upper triangular matrix with zeros below the leading l l block.

We can think of A (k) as being defined by the relation AQ (k) = Q (k) A (k). But we have seen the expression AQ (k) before, in the iteration equation (1). So we really have Q (k+1) R (k+1) = Q (k) A (k). Now, suppose we multiply the equation on the left by (Q (k) ) and define Q (k+1) = (Q (k) ) Q (k+1). Then Q (k+1) R (k+1) = A (k). So we can compute Q (k+1) and R (k+1) by a QR factorization of A (k), and from there compute Q (k+1) = Q (k+1) Q (k). What has this to do with anything? Let us consider what happens when we compute A (k+1 ) using these formulas: A (k+1) = (Q (k+1) ) A(Q (k+1) ) = (Q (k+1) ) (Q (k) ) A(Q (k) )(Q (k+1) ) = (Q (k+1) ) A (k) (Q (k+1) ) = R (k+1) Q (k+1). Putting things together, we have the remarkable QR iteration that goes from A (k) to A (k+1) : Q (k+1) R (k+1) = A (k) A (k+1) = R (k+1) Q (k+1). Under some restrictions on A, the matrices A (k) will ultimately converge to the triangular Schur factor of A. But we have two problems: 1. Each step of the QR iteration requires a QR factorization, which is an O(n 3 ) operation. This is rather expensive, and even in the happy case where we might be able to get each eigenvalue with a constant number of steps, O(n) total steps at a cost of O(n 3 ) each gives us an O(n 4 ) algorithm. Given that everything else we have done so far costs only O(n 3 ), an O(n 4 ) cost for eigenvalue computation seems excessive.

2. Like the power iteration upon which it is based, the basic iteration converges linearly, and the rate of convergence is related to the ratios of the moduli of eigenvalues. Convergence is slow when there are eigenvalues of nearly the same modulus, and nonexistent when there are eigenvalues with the same modulus. We now describe how to overcome these two difficulties. Hessenberg matrices and QR steps in O(n 2 ) A matrix H is said to be upper Hessenberg if it has nonzeros only in the upper triangle and the first subdiagonal. For example, the nonzero structure of a 5-by-5 Hessenberg matrix is. For any square matrix A, we can find a unitarily similar Hessenberg matrix H = Q AQ by the following algorithm (see for comparison the Householder QR code in lecture 18): function [H,Q] = lec27hess(a) % Compute the Hessenberg decomposition H = Q *A*Q using % Householder transformations. n = length(a); Q = eye(n); H = A; % Orthogonal transform so far % Transformed matrix so far for j = 1:n-2 % -- Find W = I-2vv to put zeros below H(j+1,j) u = H(j+1:end,j); u(1) = u(1) + sign(u(1))*norm(u); v = u/norm(u);

end % -- H := WHW, Q := QW H(j+1:end,:) = H(j+1:end,:)-2*v*(v *H(j+1:end,:)); H(:,j+1:end) = H(:,j+1:end)-(H(:,j+1:end)*(2*v))*v ; Q(:,j+1:end) = Q(:,j+1:end)-(Q(:,j+1:end)*(2*v))*v ; A Hessenberg matrix H is very nearly upper triangular, and so the Householder QR routine is very economical. The Householder reflection computed in order to introduce a zero in the (j + 1, j) entry needs only to operate on rows j and j + 1. Therefore, we have Q H = W n 1 W n 2... W 1 H = R, where W j is a Householder reflection that operates only on rows j and j + 1. Computing R costs O(n 2 ) time, since each W j only affects two rows (O(n) data). Now, note that RQ = R(W 1 W 2... W n 1 ); that is, RQ is computed by an operation that first mixes the first two columns, then the second two columns, and so on. The only subdiagonal entries that can be introduced in this process lie on the first subdiagonal, and so RQ is again a Hessenberg matrix. Therefore, one step of QR iteration on a Hessenberg matrix results in another Hessenberg matrix, and a Hessenberg QR step can be performed in O(n 2 ) time. Putting these ideas in concrete form, we have the following code function H = lec27hessqr(h) % Basic Hessenberg QR step via Householder transformations. n = length(h); V = zeros(2,n-1); % Compute the QR factorization for j = 1:n-1 % -- Find W_j = I-2vv to put zero into H(j+1,j) u = H(j:j+1,j);

end u(1) = u(1) + sign(u(1))*norm(u); v = u/norm(u); V(:,j) = v; % -- H := W_j H H(j:j+1,:) = H(j:j+1,:)-2*v*(v *H(j:j+1,:)); % Compute RQ for j = 1:n-1 end % -- H := WHW, Q := QW v = V(:,j); H(:,j:j+1) = H(:,j:j+1)-(H(:,j:j+1)*(2*v))*v ;