Fast Hessenberg QR Iteration for Companion Matrices

Similar documents
Index. for generalized eigenvalue problem, butterfly form, 211

Section 4.5 Eigenvalues of Symmetric Tridiagonal Matrices

Orthogonal iteration to QR

Numerical Methods in Matrix Computations

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

Numerical Methods I Eigenvalue Problems

Matrix decompositions

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

Elementary linear algebra

Lecture 2: Numerical linear algebra

APPLIED NUMERICAL LINEAR ALGEBRA

The Singular Value Decomposition

Numerical Methods - Numerical Linear Algebra

Linear Analysis Lecture 16

STAT 309: MATHEMATICAL COMPUTATIONS I FALL 2018 LECTURE 13

forms Christopher Engström November 14, 2014 MAA704: Matrix factorization and canonical forms Matrix properties Matrix factorization Canonical forms

Index. book 2009/5/27 page 121. (Page numbers set in bold type indicate the definition of an entry.)

LinGloss. A glossary of linear algebra

The Singular Value Decomposition

Eigenvalue problems. Eigenvalue problems

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

5 Selected Topics in Numerical Linear Algebra

Eigenvalues and Eigenvectors

LAPACK-Style Codes for Pivoted Cholesky and QR Updating. Hammarling, Sven and Higham, Nicholas J. and Lucas, Craig. MIMS EPrint: 2006.

Orthogonal iteration to QR

This can be accomplished by left matrix multiplication as follows: I

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

Nonlinear palindromic eigenvalue problems and their numerical solution

11.3 Eigenvalues and Eigenvectors of a Tridiagonal Matrix

The Future of LAPACK and ScaLAPACK

Orthonormal Transformations and Least Squares

LAPACK-Style Codes for Pivoted Cholesky and QR Updating

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

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

A Fast Implicit QR Eigenvalue Algorithm for Companion Matrices

Orthogonal iteration revisited

Chapter 6 Inner product spaces

Parallel Singular Value Decomposition. Jiaxing Tan

Linear Algebra in Actuarial Science: Slides to the lecture

Parallel Numerical Algorithms

I. Multiple Choice Questions (Answer any eight)

Ir O D = D = ( ) Section 2.6 Example 1. (Bottom of page 119) dim(v ) = dim(l(v, W )) = dim(v ) dim(f ) = dim(v )

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

Introduction to Numerical Linear Algebra II

Index. Copyright (c)2007 The Society for Industrial and Applied Mathematics From: Matrix Methods in Data Mining and Pattern Recgonition By: Lars Elden

Solving linear equations with Gaussian Elimination (I)

Solution of Linear Equations

ECS130 Scientific Computing Handout E February 13, 2017

A fast randomized algorithm for approximating an SVD of a matrix

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

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

Lecture 7: Positive Semidefinite Matrices

AMS526: Numerical Analysis I (Numerical Linear Algebra)

arxiv: v1 [math.na] 24 Jan 2019

1 Singular Value Decomposition and Principal Component

FAST CONDITION ESTIMATION FOR A CLASS OF STRUCTURED EIGENVALUE PROBLEMS

Eigenvalue and Eigenvector Problems

Krylov Subspace Methods that Are Based on the Minimization of the Residual

Double-shift QR steps

Why the QR Factorization can be more Accurate than the SVD

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

Least Squares. Tom Lyche. October 26, Centre of Mathematics for Applications, Department of Informatics, University of Oslo

5.3 The Power Method Approximation of the Eigenvalue of Largest Module

Linear Algebra Review. Vectors

Math Fall Final Exam

Eigenvalues and eigenvectors

Block Lanczos Tridiagonalization of Complex Symmetric Matrices

Applied Linear Algebra in Geoscience Using MATLAB

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

Fall TMA4145 Linear Methods. Exercise set Given the matrix 1 2

SUMMARY OF MATH 1600

Scientific Computing: An Introductory Survey

LARGE SPARSE EIGENVALUE PROBLEMS

1. The Polar Decomposition

From Matrix to Tensor. Charles F. Van Loan

G1110 & 852G1 Numerical Linear Algebra

Numerische Mathematik

Linear algebra & Numerical Analysis

Solving large scale eigenvalue problems

Solution of eigenvalue problems. Subspace iteration, The symmetric Lanczos algorithm. Harmonic Ritz values, Jacobi-Davidson s method

5.6. PSEUDOINVERSES 101. A H w.

Math 577 Assignment 7

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

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

Direct methods for symmetric eigenvalue problems

AMS526: Numerical Analysis I (Numerical Linear Algebra)

LARGE SPARSE EIGENVALUE PROBLEMS. General Tools for Solving Large Eigen-Problems

Lecture 5 Singular value decomposition

Orthonormal Transformations

Math 102 Final Exam - Dec 14 - PCYNH pm Fall Name Student No. Section A0

Lecture Notes for Inf-Mat 3350/4350, Tom Lyche

DEN: Linear algebra numerical view (GEM: Gauss elimination method for reducing a full rank matrix to upper-triangular

Preface to Second Edition... vii. Preface to First Edition...

Linear Algebra (Review) Volker Tresp 2017

EIGENVALUE PROBLEMS. EIGENVALUE PROBLEMS p. 1/4

EECS 275 Matrix Computation

Math 407: Linear Optimization

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

Applied Mathematics 205. Unit II: Numerical Linear Algebra. Lecturer: Dr. David Knezevic

Transcription:

Fast Hessenberg QR Iteration for Companion Matrices David Bindel Ming Gu David Garmire James Demmel Shivkumar Chandrasekaran Fast Hessenberg QR Iteration for Companion Matrices p.1/20

Motivation: Polynomial root finding A standard algorithm: QR iteration on a companion matrix Robust software exists It s normwise backward stable It s used in Matlab But it takes O(n 3 ) time and O(n 2 ) storage Fast Hessenberg QR Iteration for Companion Matrices p.2/20

Companion matrices Given p(λ) = λ n + a n 1 λ n 1 +... + a 1 λ + a 0 Define a companion matrix C: a n 1 a n 2 a n 3... a 1 a 0 1 0 0... 0 0 C = 0 1 0... 0 0........ 0 0 0... 1 0 For matrix polynomials, replace a i by A i and 1 by I. Fast Hessenberg QR Iteration for Companion Matrices p.3/20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Hessenberg QR iteration 0 1 2 3 5 6 7 8 9 10 11 0 1 2 3 5 6 7 8 9 10 11 Fast Hessenberg QR Iteration for Companion Matrices p./20

Accelerating QR Have examples of how to do QR faster: Naive implementation = Hessenberg QR ridiagonal QR (symmetric and skew problems) Unitary Hessenberg QR Keys to fast QR: Find a structure preserved by the iteration Find a low-complexity representation for that structure Fast Hessenberg QR Iteration for Companion Matrices p.5/20

Rank symmetry Call A rank-symmetric if rank(a 12 ) = rank(a 21 ) for any 2-by-2 blocking of A with square A 11 and A 22. Examples: Symmetric matrices Skew-symmetric matrices Orthogonal matrices (by the CS decomposition) J-orthogonal matrices (by hyperbolic CS decomposition) Fast Hessenberg QR Iteration for Companion Matrices p.6/20

Rank symmetry Call A rank-symmetric if rank(a 12 ) = rank(a 21 ) for any 2-by-2 blocking of A with square A 11 and A 22. Examples: Symmetric matrices Skew-symmetric matrices Orthogonal matrices (by the CS decomposition) J-orthogonal matrices (by hyperbolic CS decomposition) Examples of rank-symmetric + low rank: Companion matrices Problems which lose self-adjointness at boundary Linear oscillators with low-rank damping Fast Hessenberg QR Iteration for Companion Matrices p.6/20

Rank symmetric + low rank h: For A rank symmetric and L with rank k, both square block 2-by-2: rank(a 12 + L 12 ) rank(a 21 + L 21 ) 2k Proof: rank(l ij ) k, so rank(a ij + L ij ) rank(a ij ) k. Note rank(a ij ) = rank(a ji ) and apply triangle inequality. Fast Hessenberg QR Iteration for Companion Matrices p.7/20

Off-diagonal rank Any matrix unitarily similar to C is orthogonal + rank 1. herefore: Hessenberg forms similar to C have rank(super-diagonal block) 3. Real Schur forms similar to C have rank(super-diagonal block) 2. (For polynomial matrices, make that 3d and 2d). Fast Hessenberg QR Iteration for Companion Matrices p.8/20

SSS structure Write Hessenberg matrices with low off-diagonal rank as narrow band matrix + SSS matrix. 0 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V 0 0 U 2 V3 U 2 W 3 V H = B + 0 0 0 U 3 V 0 0 0 0 Write H ij = U i W i+1... W j 1 V j for i < j where U i R m b 2k+1, V i R m b 2k+1, and W i R 2k+1 2k+1. Make the block size m b 2k + 1. otal storage cost: O(nk). Fast Hessenberg QR Iteration for Companion Matrices p.9/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V B 21 B 22 U 2 V3 U 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V B 21 B 22 U 2 V3 U 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V B 11 B 12 Û 1 V 3 B 21 B 22 Û 2 V 3 Û 1 W 3 V Û 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 V 2 U 1 W 2 V3 U 1 W 2 W 3 V B 21 B 22 U 2 V3 U 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Split blocks once bulge is within B 22 Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 ˆV 2 U 1 ˆV 3 U 1 W 2 W 3 V B 21 B 22 B 23 Û 2 V B 32 B 33 Û 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Split blocks once bulge is within B 22 Continue until Hessenberg form is restored Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 V2 U 1 W 2 V 3 B 21 B 22 U 2 V 3 U 1 W 2 W 3 V U 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Split blocks once bulge is within B 22 Continue until Hessenberg form is restored Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V B 11 U 1 V2 U 1 W 2 ˆV 3 U 1 W 2 ˆV B 21 B 22 U 2 ˆV 3 U 2 ˆV B 32 B 33 B 3 B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Split blocks once bulge is within B 22 Continue until Hessenberg form is restored Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 V 2 U 1 W 2 V 3 U 1 W 2 W 3 V B 21 B 22 U 2 V 3 U 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Split blocks once bulge is within B 22 Continue until Hessenberg form is restored Fast Hessenberg QR Iteration for Companion Matrices p.10/20

SSS structure transformed B 11 B 11 U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V U 1 V2 U 1 W 2 V3 U 1 W 2 W 3 V B 21 B 22 U 2 V3 U 2 W 3 V B 32 B 33 U 3 V B 3 B Start with an SSS representation Bulge chase in B 11 : changes B 11 and U 1 Merge first two blocks and chase bulge across boundary Split blocks once bulge is within B 22 Continue until Hessenberg form is restored Fast Hessenberg QR Iteration for Companion Matrices p.10/20

Row and column bases Define C j and G j by the recurrences C 1 = U 1 and C j = G n = V n and G j = [ ] C j 1 W j [ U j V v G j+1 W j for j > 1 ] for j < n. C j and G j are row and column bases for the submatrix left of block column j and above block row j. All C j orthonormal: left proper form. All G j orthonormal: right proper form. Fast Hessenberg QR Iteration for Companion Matrices p.11/20

Splitting blocks Start with C i 1 and G i+1 orthonormal. H 1,i... H 1,n.. = H i,i... H i,n [ C i 1 0 0 I ] [ Vi H ii W i U i ] [ 0 G i+1 I 0 ]. [ V j B jj W j U j ] Vj α Bjj αα B βα jj W α j V β j U α j V β j B ββ jj W α j W β j U α j W β j U β j Do pivoted [ QR ] or SVD decomposition to split U, V, W. Wj α Choose Uj α with orthonormal columns. Fast Hessenberg QR Iteration for Companion Matrices p.12/20

Balancing Want to balance matrix to improve accuracy. But general diagonal scaling destroys structure! However: C is a companion matrix with Perron vector: Let hen DCD 1 x i = λ i D = diag(x 1 i ) = diag(λ i ). Is optimally balanced in the -norm. Is λ orthogonal + low rank Is scaling the polynomial indeterminate by λ. Fast Hessenberg QR Iteration for Companion Matrices p.13/20

Implementation Modified DLAHQR (basic double-shift QR) to use the new data structure. Convert to right proper form. Choose shifts (logic from LAPACK). Bulge chase top to bottom / convert to left proper form. Check for convergence / deflate (logic from LAPACK). Most of the code accesses data in the band part of the structure. his text is identical to the standard code just change LDA. Fast Hessenberg QR Iteration for Companion Matrices p.1/20

Performance Compared against LAPACK DLAHQR and DHSEQR Compiled using g77/gcc with -O2 flag LAPACK with standard optimizations, ALAS BLAS P processor at 1.5 GHz Polynomials of degree 100-2000. Fast Hessenberg QR Iteration for Companion Matrices p.15/20

Performance: QR-based 600 500 Polynomial roots Fast DLAHQR (QR) DLAHQR DHSEQR 00 ime (s) 300 200 100 0 0 200 00 600 800 1000 1200 100 1600 1800 2000 Polynomial degree Fast Hessenberg QR Iteration for Companion Matrices p.16/20

Performance: QR-based 10 3 Polynomial roots Fast DLAHQR (QR) DLAHQR DHSEQR 10 2 10 1 ime (s) 10 0 10 1 10 2 10 2 10 3 10 Polynomial degree Fast Hessenberg QR Iteration for Companion Matrices p.17/20

Performance: SVD-based 600 500 Polynomial roots Fast DLAHQR (SVD) DLAHQR DHSEQR 00 ime (s) 300 200 100 0 0 200 00 600 800 1000 1200 100 1600 1800 2000 Polynomial degree Fast Hessenberg QR Iteration for Companion Matrices p.18/20

Performance: SVD-based 10 3 Polynomial roots Fast DLAHQR (SVD) DLAHQR DHSEQR 10 2 10 1 ime (s) 10 0 10 1 10 2 10 2 10 3 10 Polynomial degree Fast Hessenberg QR Iteration for Companion Matrices p.19/20

Conclusions Hessenberg({ symmetric, skew, unitary } + low rank) has low off-diagonal rank. Applies to (matrix) polynomial root finding, some damped vibration calculations. Can use low-rank structure for fast bulge-chasing. Can use-use most existing QR lore and code. Appears backward stable with SVD-based splitting. Fast Hessenberg QR Iteration for Companion Matrices p.20/20