Matrix Algorithms Volume II Eigensystems TQW - Darksiderg

Download as pdf or txt
Download as pdf or txt
You are on page 1of 490

Matrix Algorithms

This page intentionally left blank

Matrix Algorithms
Volume II: Eigensystems

G. W. Stewart
University of Maryland College Park, Maryland

Society for Industrial and Applied Mathematics Philadelphia

siam

Copyright 2001 by the Society for Industrial and Applied Mathematics. 1098765432 1 All rights reserved. Printed in the United States of America. No part of this book may be reproduced, stored, or transmitted in any manner without the written permission of the publisher. For information, write to the Society for Industrial and Applied Mathematics, 3600 University City Science Center, Philadelphia, PA 19104-2688. MATLAB is a registered trademark of The MathWorks, Inc., 3 Apple Hill Dr., Natick, MA 01760-2098, USA, tel. 508-647-7000, fax 508-647-7001, [email protected], http://www. mathworks. com. The Library of Congress has catalogued Volume I as follows: Library of Congress Cataloging-in-Publication Data Stewart, G. W. (Gilbert W.) Matrix algorithms / G. W. Stewart. p. cm. Includes bibliographical references and index. Contents: v.1. Basic decompositions ISBN 0-89871-414-1 (v. 1 : pbk.) 1. Matrices. I. Title. QA188.S714 1998 512.9'434-dc21 0-89871-414-1 (Volume I) 0-89871-503-2 (Volume II) 0-89871-4184 (set)
siam ELLEUTL is a registered trademark.

98-22445

CONTENTS
Algorithms Preface 1 Eigensystems 1 The Algebra of Eigensystems 1.1 Eigenvalues and eigenvectors Definitions. Existence of eigenpairs: Special cases. The characteristic equation and the existence of eigenpairs. Matrices of order two. Block triangular matrices. Real matrices. 1.2 Geometric multiplicity and defective matrices Geometric multiplicity. Defectiveness. Simple eigenvalues. 1.3 Similarity transformations 1.4 Schur Decompositions Unitary similarities. Schur form. Nilpotent matrices. Hermitian matrices. Normal matrices. 1.5 Block diagonalization and Sylvester's equation From block triangular to block diagonal matrices. Sylvester's equation. An algorithm. Block diagonalization redux. 1.6 Jordan form 1.7 Notes and references General references. History and Nomenclature. Schur form. Sylvester's equation. Block diagonalization. Jordan canonical form. 2 Norms, Spectral Radii, and Matrix Powers 2.1 Matrix and vector norms Definition. Examples of norms. Operator norms. Norms and rounding error. Limitations of norms. Consistency. Norms and convergence. 2.2 The spectral radius Definition. Norms and the spectral radius. 2.3 Matrix powers Asymptotic bounds. Limitations of the bounds.
v

xv xvii 1 1 2

6 8 10 15 20 23

25 25

30 33

vi

CONTENTS
2.4 Notes and references Norms. Norms and the spectral radius. Matrix powers. 3 Perturbation Theory 3.1 The perturbation of eigenvalues The continuity of eigenvalues. Gerschgorin theory. Hermitian matrices. 3.2 Simple eigenpairs Left and right eigenvectors. First-order perturbation expansions. Rigorous bounds. Qualitative statements. The condition of an eigenvalue. The condition of an eigenvector. Properties of sep. Hermitian matrices. 3.3 Notes and references General references. Continuity of eigenvalues. Gerschgorin theory. Eigenvalues of Hermitian matrices. Simple eigenpairs. Left and right eigenvectors. First-order perturbation expansions. Rigorous bounds. Condition numbers. Sep. Relative and structured perturbation theory. 36 37 37

44

52

2 The QR Algorithm 1 The Power and Inverse Power Methods 1.1 The power method Convergence. Computation and normalization. Choice of a starting vector. Convergence criteria and the residual. Optimal residuals and the Rayleigh quotient. Shifts and spectral enhancement. Implementation. The effects of rounding error. Assessment of the power method. 1.2 The inverse power method Shift-and-invert enhancement. The inverse power method. An example. The effects of rounding error. The Rayleigh quotient method. 1.3 Notes and references The power method. Residuals and backward error. The Rayleigh quotient. Shift of origin. The inverse power and Rayleigh quotient methods. 2 The Explicitly Shifted QR Algorithm 2.1 The QR algorithm and the inverse power method Schur from the bottom up. The QR choice. Error bounds. Rates of convergence. General comments on convergence. 2.2 The unshifted QR algorithm The QR decomposition of a matrix polynomial. The QR algorithm and the power method. Convergence of the unshifted QR algorithm. 2.3 Hessenberg form

55 56 56

66

69

71 72

75

80

CONTENTS
Householder transformations. Reduction to Hessenberg form. Plane rotations. Invariance of Hessenberg form. 2.4 The explicitly shifted algorithm Detecting negligible subdiagonals. Deflation. Back searching. The Wilkinson shift. Reduction to Schur form. Eigenvectors. 2.5 Bits and pieces Ad hoc shifts. Aggressive deflation. Cheap eigenvalues. Balancing. Graded matrices. 2.6 Notes and references Historical. Variants of the QR algorithm. The QR algorithm, the inverse power method, and the power method. Local convergence. Householder transformations and plane rotations. Hessenberg form. The Hessenberg QR algorithm. Deflation criteria. The Wilkinson shift. Aggressive deflation. Preprocessing. Graded matrices. 3 The Implicitly Shifted QR Algorithm 3.1 Real Schur form Real Schur form. A preliminary algorithm. 3.2 The uniqueness of Hessenberg reduction 3.3 The implicit double shift A general strategy. Getting started. Reduction back to Hessenberg form. Deflation. Computing the real Schur form. Eigenvectors. 3.4 Notes and references Implicit shifting. Processing 2x2 blocks. The multishifted QR algorithm. 4 The Generalized Eigenvalue Problem 4.1 The theoretical background Definitions. Regular pencils and infinite eigenvalues. Equivalence transformations. Generalized Schur form. Multiplicity of eigenvalues. Projective representation of eigenvalues. Generalized shifting. Left and right eigenvectors of a simple eigenvalue. Perturbation theory. First-order expansions: Eigenvalues. The chordal metric. The condition of an eigenvalue. Perturbation expansions: Eigenvectors. The condition of an eigenvector. 4.2 Real Schur and Hessenberg-triangular forms Generalized real Schur form. Hessenberg-triangular form. 4.3 The doubly shifted QZ algorithm Overview. Getting started. The QZ step. 4.4 Important miscellanea Balancing. Back searching. Infinite eigenvalues. The 2x2 problem. Eigenvectors. Vol II: Eigensystems

vii

94 104

110

113 113 116 117

128 129 130

143 147 152

viii
4.5 Notes and References The algebraic background. Perturbation theory. The QZ algorithm.

CONTENTS
155

3 The Symmetric Eigenvalue Problem 1 The QR Algorithm 1.1 Reduction to tridiagonal form The storage of symmetric matrices. Reduction to tridiagonal form. Making Hermitian tridiagonal matrices real. 1.2 The symmetric tridiagonal QR algorithm The implicitly shifted QR step. Choice of shift. Local convergence. Deflation. Graded matrices. Variations. 1.3 Notes and references General references. Reduction to tridiagonal form. The tridiagonal QR algorithm. 2 A Clutch of Algorithms 2.1 Rank-one updating Reduction to standard form. Deflation: Small components of z. Deflation: Nearly equal di. When to deflate. The secular equation. Solving the secular equation. Computing eigenvectors. Concluding comments. 2.2 A Divide-and-conquer algorithm Generalities. Derivation of the algorithm. Complexity. 2.3 Eigenvalues and eigenvectors of band matrices The storage of band matrices. Tridiagonalization of a symmetric band matrix. Inertia. Inertia and the LU decomposition. The inertia of a tridiagonal matrix. Calculation of a selected eigenvalue. Selected eigenvectors. 2.4 Notes and References Updating the spectral decomposition. The divide-and-conquer algorithm. Reduction to tridiagonal form. Inertia and bisection. Eigenvectors by the inverse power method. Jacobi's method. 3 The Singular Value Decomposition 3.1 Background Existence and nomenclature. Uniqueness. Relation to the spectral decomposition. Characterization and perturbation of singular values. First-order perturbation expansions. The condition of singular vectors. 3.2 The cross-product algorithm Inaccurate singular values. Inaccurate right singular vectors. Inaccurate left singular vectors. Assessment of the algorithm. 3.3 Reduction to bidiagonal form The reduction. Real bidiagonal form.

157 158 158

163

169

171 171

181 186

201

203 203

210

215

CONTENTS
3.4 The QR algorithm The bidiagonal QR step. Computing the shift. Negligible superdiagonal elements. Back searching. Final comments. 3.5 A hybrid QRD-SVD algorithm 3.6 Notes and references The singular value decomposition. Perturbation theory. The cross-product algorithm. Reduction to bidiagonal form and the QR algorithm. The QRD-SVD algorithm. The differential qd algorithm. Divide-and-conquer algorithms. Downdating a singular value decomposition. Jacobi methods. 4 The Symmetric Positive Definite (S/PD) Generalized Eigenvalue Problem 4.1 Theory The fundamental theorem. Condition of eigenvalues. 4.2 Wilkinson's algorithm The algorithm. Computation of R-T A R - 1 . Ill-conditioned B. 4.3 Notes and references Perturbation theory. Wilkinson's algorithm. Band matrices. The definite generalized eigenvalue problem. The generalized singular value and CS decompositions. 4 Eigenspaces and Their Approximation 1 Eigenspaces 1.1 Definitions Eigenbases. Existence of eigenspaces. Deflation. 1.2 Simple eigenspaces Definition. Block diagonalization and spectral representations. Uniqueness of simple eigenspaces. 1.3 Notes and references Eigenspaces. Spectral projections. Uniqueness of simple eigenspaces. The resolvent. 2 Perturbation Theory 2.1 Canonical angles Definitions. Computing canonical angles. Subspaces of unequal dimensions. Combinations of subspaces. 2.2 Residual analysis Optimal residuals. The Rayleigh quotient. Backward error. Residual bounds for eigenvalues of Hermitian matrices. Block deflation. The quantity sep. Residual bounds. 2.3 Perturbation theory The perturbation theorem. Choice of subspaces. Bounds in terms of E. The Rayleigh quotient and the condition of L. Angles between the subspaces. 2.4 Residual bounds for Hermitian matrices Vol II: Eigensystems

ix
217

226 226

229 229 231 234

239 240 240 244

247

248 248

251

258

262

CONTENTS
Residual bounds for eigenspaces. Residual bounds for eigenvalues. 2.5 Notes and references General references. Canonical angle. Optimal residuals and the Rayleigh quotient. Backward error. Residual eigenvalue bounds for Hermitian matrices. Block deflation and residual bounds. Perturbation theory. Residual bounds for eigenspaces and eigenvalues of Hermitian matrices. 3 Krylov Subspaces 3.1 Krylov sequences and Krylov spaces Introduction and definition. Elementary properties. The polynomial connection. Termination. 3.2 Convergence The general approach. Chebyshev polynomials. Convergence redux. Multiple eigenvalues. Assessment of the bounds. Non-Hermitian matrices. 3.3 Block Krylov sequences 3.4 Notes and references Sources. Krylov sequences. Convergence (Hermitian matrices). Convergence (non-Hermitian matrices). Block Krylov sequences. 4 Rayleigh-Ritz Approximation 4.1 Rayleigh-Ritz methods Two difficulties. Rayleigh-Ritz and generalized eigenvalue problems. The orthogonal Rayleigh-Ritz procedure. 4.2 Convergence Setting the scene. Convergence of the Ritz value. Convergence of Ritz vectors. Convergence of Ritz values revisited. Hermitian matrices. Convergence of Ritz blocks and bases. Residuals and convergence. 4.3 Refined Ritz vectors Definition. Convergence of refined Ritz vectors. The computation of refined Ritz vectors. 4.4 Harmonic Ritz vectors Computation of harmonic Ritz pairs. 4.5 Notes and references Historical. Convergence. Refined Ritz vectors. Harmonic Ritz vectors.

264

266 266

269

277 279

280 281

284

289

292 295

5 Krylov Sequence Methods 1 Krylov Decompositions 1.1 Arnoldi decompositions The Arnoldi decomposition. Uniqueness. The Rayleigh quotient. Reduced Arnoldi decompositions. Computing Arnoldi

297 297 298

CONTENTS
decompositions. Reorthogonalization. Practical considerations. Orthogonalization and shift-and-invert enhancement. 1.2 Lanczos decompositions Lanczos decompositions. The Lanczos recurrence. 1.3 Krylov decompositions Definition. Similarity transformations. Translation. Equivalence to an Arnoldi decomposition. Reduction to Arnoldi form. 1.4 Computation of refined and Harmonic Ritz vectors Refined Ritz vectors. Harmonic Ritz vectors. 1.5 Notes and references Lanczos and Arnoldi. Shift-and-invert enhancement and Orthogonalization. Krylov decompositions. 2 The Restarted Arnoldi Method 2.1 The implicitly restarted Arnoldi method Filter polynomials. Implicitly restarted Arnoldi. Implementation. The restarted Arnoldi cycle. Exact shifts. Forward instability. 2.2 Krylov-Schur restarting Exchanging eigenvalues and eigenblocks. The Krylov-Schur cycle. The equivalence of Arnoldi and Krylov-Schur. Comparison of the methods. 2.3 Stability, convergence, and deflation Stability. Stability and shift-and-invert enhancement. Convergence criteria. Convergence with shift-and-invert enhancement. Deflation. Stability of deflation. Nonorthogonal bases. Deflation in the Krylov-Schur method. Deflation in an Arnoldi decomposition. Choice of tolerance. 2.4 Rational Krylov Transformations Krylov sequences, inverses, and shifts. The rational Krylov method. 2.5 Notes and references Arnoldi's method, restarting, and filter polynomials. ARPACK. Reverse communication. Exchanging eigenvalues. Forward instability. The Krylov-Schur method. Stability. Shift-and-invert enhancement and the Rayleigh quotient. Convergence. Deflation. The rational Krylov transformation. 3 The Lanczos Algorithm 3.1 Reorthogonalization and the Lanczos algorithm Lanczos with reorthogonalization. 3.2 Full reorthogonalization and restarting Implicit restarting. Krylov-spectral restarting. Convergence and deflation. 3.3 Semiorthogonal methods

xi

306 308

314 315

316 317

325

332

342

344

347 348 351

352

Vol II: Eigensystems

xii

CONTENTS
Semiorthogonal bases. The QR factorization of a semiorthogonal basis. The size of the reorthogonalization coefficients. The effects on the Rayleigh quotient. The effects on the Ritz vectors. Estimating the loss of orthogonality. Periodic reorthogonalization. Updating HK. Computing residual norms. An example. 3.4 Notes and references The Lanczos algorithm. Full reorthogonalization. Filter polynomials. Semiorthogonal methods. No reorthogonalization. The singular value decomposition. Block Lanczos algorithms. The bi-Lanczos algorithm. 4 The Generalized Eigenvalue Problem 4.1 Transformation and convergence Transformation to an ordinary eigenproblem. Residuals and backward error. Bounding the residual. 4.2 Positive definite B The B inner product. Orthogonality. B-Orthogonalization. The B-Arnoldi method. The restarted B-Lanczos method. The B-Lanczos method with periodic reorthogonalization. Semidefmite B. 4.3 Notes and references The generalized shift-and-invert transformation and the Lanczos algorithm. Residuals and backward error. Semidefinite B.

365

367 368 370

379

6 Alternatives 1 Subspace Iteration 1.1 Theory Convergence. The QR connection. Schur-Rayleigh-Ritz refinement. 1.2 Implementation A general algorithm. Convergence. Deflation. When to perform an SRR step. When to orthogonalize. Real matrices. 1.3 Symmetric matrices Economization of storage. Chebyshev acceleration. 1.4 Notes and references Subspace iteration. Chebyshev acceleration. Software. 2 Newton-Based Methods 2.1 Approximate Newton methods A general approximate Newton method. The correction equation. Orthogonal corrections. Analysis. Local convergence. Three approximations. 2.2 The Jacobi-Davidson method The basic Jacobi-Davidson method. Extending Schur decompositions. Restarting. Harmonic Ritz vectors. Hermitian

381 381 382 386 391 394 395 396

404

CONTENTS
matrices. Solving projected systems. The correction equation: Exact solution. The correction equation: Iterative solution. 2.3 Notes and references Newton's method and the eigenvalue problem. Inexact Newton methods. The Jacobi-Davidson method. Hermitian matrices. Appendix: Background 1 Scalars, vectors, and matrices 2 Linear algebra 3 Positive definite matrices 4 The LU decomposition 5 The Cholesky decomposition 6 The QR decomposition 7 Projectors References Index

xiii

418

421 421 424 425 425 426 426 427 429 451

Vol II: Eigensystems

This page intentionally left blank

ALGORITHMS
Chapter 1. Eigensystems 1.1 Solution of Sylvester's Equation Chapter 1.1 1.2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.1 3.2 3.3 3.4 4.1 4.2 2. The QR Algorithm The shifted power method The inverse power method Generation of Householder transformations Reduction to upper Hessenberg form Generation of a plane rotation Application of a plane rotation Basic QR step for a Hessenberg matrix Finding deflation rows in an upper Hessenberg matrix Computation of the Wilkinson shift Schur form of an upper Hessenberg matrix Right eigenvectors of an upper triangular matrix Starting an implicit QR double shift Doubly shifted QR step Finding deflation rows in a real upper Hessenberg matrix Real Schur form of a real upper Hessenberg matrix Reduction to Hessenberg-triangular form The doubly shifted QZ step 18 64 67 83 85 90 90 93 96 98 99 103 120 122 124 125 146 151

Chapter 3. The Symmetric Eigenvalue Problem 1.1 Reduction to tridiagonal form 161 1.2 Hermitian tridiagonal to real tridiagonal form 164 1.3 The symmetric tridiagonal QR step 166 2.1 Rank-one update of the spectral decomposition 172 2.2 Eigenvectors of a rank-one update 180 2.3 Divide-and-conquer eigensystem of a symmetric tridiagonal matrix . . 184 2.4 Counting left eigenvalues 192 2.5 Finding a specified eigenvalue 194 2.6 Computation of selected eigenvectors 199 3.1 The cross-product algorithm 211 3.2 Reduction to bidiagonal form 216
xv

xvi
3.3 3.4 3.5 3.6 4.1 4.2 Complex bidiagonal to real bidiagonal form Bidiagonal QR step Back searching a bidiagonal matrix Hybrid QR-SVD algorithm Solution of the S/PD generalized eigenvalue problem The computation of C = R - T A R - 1

ALGORITHMS
218 221 225 226 232 234 304 308 313 321 322 330 341 344 349 357 360 361 387 405 410 413 415 419

Chapter 5. Krylov Sequence Methods 1.1 The Arnoldi step 1.2 The Lanczos recurrence 1.3 Krylov decomposition to Arnoldi decomposition 2.1 Filtering an Arnoldi decomposition 2.2 The restarted Arnoldi cycle 2.3 The Krylov-Schur cycle 2.4 Deflating in a Krylov-Schur decomposition 2.5 The rational Krylov transformation 3.1 Lanczos procedure with orthogonalization 3.2 Estimation of uTK+1uj 3.3 Periodic orthogonalization I: Outer loop 3.4 Periodic reorthogonalization II: Orthogonalization step Chapter 6. Alternatives 1.1 Subspace iteration 2.1 The basic Jacobi-Davidson algorithm 2.2 Extending a partial Schur decomposition 2.3 Harmonic extension of a partial Schur decomposition 2.4 Solution of projected equations 2.5 Davidson's method

PREFACE
This book, Eigensystems, is the second volume in a projected five-volume series entitled Matrix Algorithms. The first volume treated basic decompositions. The three following this volume will treat iterative methods for linear systems, sparse direct methods, and special topics, including fast algorithms for structured matrices. My intended audience is the nonspecialist whose needs cannot be satisfied by black boxes. It seems to me that these people will be chiefly interested in the methods themselves how they are derived and how they can be adapted to particular problems. Consequently, the focus of the series is on algorithms, with such topics as roundingerror analysis and perturbation theory introduced impromptu as needed. My aim is to bring the reader to the point where he or she can go to the research literature to augment what is in the series. The series is self-contained. The reader is assumed to have a knowledge of elementary analysis and linear algebra and a reasonable amount of programming experience about what you would expect from a beginning graduate engineer or an advanced undergraduate in an honors program. Although strictly speaking the individual volumes are not textbooks, they are intended to teach, and my guiding principle has been that if something is worth explaining it is worth explaining fully. This has necessarily restricted the scope of the series, but I hope the selection of topics will give the reader a sound basis for further study. The subject of this volume is computations involving the eigenvalues and eigenvectors of a matrix. The first chapter is devoted to an exposition of the underlying mathematical theory. The second chapter treats the QR algorithm, which in its various manifestations has become the universal workhorse in this field. The third chapter deals with symmetric matrices and the singular value decomposition. The second and third chapters also treat the generalized eigenvalue problem. Up to this point the present volume shares the concern of the first volume with dense matrices and their decompositions. In the fourth chapter the focus shifts to large matrices for which the computation of a complete eigensystem is not possible. The general approach to such problems is to calculate approximations to subspaces corresponding to groups of eigenvalueseigenspaces or invariant subspaces they are called. Accordingly, in the fourth chapter we will present the algebraic and analytic theory of eigenspaces. We then return to algorithms in the fifth chapter, which treats Krylov sequence methodsin particular the Arnoldi and the Lanczos methods. In xvii

xviii

PREFACE

the last chapter we consider alternative methods such as subspace iteration and the Jacobi-Davidson method. With this second volume, I have had to come to grips with how the the volumes of this work hang together. Initially, I conceived the series being a continuous exposition of the art of matrix computations, with heavy cross referencing between the volumes. On reflection, I have come to feel that the reader will be better served by semi-independent volumes. However, it is impossible to redevelop the necessary theoretical and computational material in each volume. I have therefore been forced to assume that the reader is familiar, in a general way, with the material in previous volumes. To make life easier, much of the necessary material is slipped unobtrusively into the present volume and more background can be found in the appendix. However, I have not hesitated to reference the first volumeespecially its algorithmswhere I thought it appropriate. Many methods treated in this volume are summarized by displays of pseudocode (see the list of algorithms following the table of contents). These summaries are for purposes of illustration and should not be regarded as finished implementations. In the first place, they often leave out error checks that would clutter the presentation. Moreover, it is difficult to verify the correctness of algorithms written in pseudocode. Wherever possible, I have checked the algorithms against MATLAB implementations. However, such a procedure is not proof against transcription errors. Be on guard! A word on organization. The book is divided into numbered chapters, sections, and subsections, followed by unnumbered subsubsections. Numbering is by section, so that (3.5) refers to the fifth equations in section three of the current chapter. References to items outside the current chapter are made explicitlye.g., Theorem 2.7, Chapter 1. References to Volume I of this series [265] are preceded by the Roman numeral Ie.g., Algorithm 1:3.2.1. While I was writing this volume, I posted it on the web and benefited greatly from the many comments and suggestions I received. I should like to thank K. M. Briggs, Austin Dubrulle, David Dureisseix, Mei Kobayashi, Daniel Kressner, Andrzej Mackiewicz, Nicola Mastronardi, Arnold Neumaier, John Pryce, Thomas Strohmer, Henk van der Vorst, and David Watkins for their comments and suggestions. I am indebted to the Mathematical and Computational Sciences Division of NIST for the use of their research facilities. Special thanks go to the editors of Templates for the Solution of Algebraic Eigenvalue Problems, who allowed me access to their excellent compendium while it was in preparation. SIAM publications and its people, past and present, have aided the writing and production of this book. Vickie Kearn first encouraged me to start the project and has helped it along too many ways to list. Kelly Thomas and Sam Young have seen the present volume through production. Special mention should be made of my long-time copy editor and email friend, Jean Anderson. As usual, she has turned an onerous job into a pleasant collaboration. In 1997, as I was preparing to write this volume, Richard Lehoucq invited me to a

PREFACE

xix

workshop on large-scale eigenvalue problems held at Argonne National Laboratory. I was stunned by the progress made in the area since the late sixties and early seventies, when I had worked on the problem. The details of these new and improved algorithms are the subject of the second half of this volume. But any unified exposition makes it easy to forget that the foundations for these advances had been laid by people who were willing to work in an unexplored field, where confusion and uncertainty were the norm. Naming names carries the risk of omitting someone, but any list would surely include Vel Kahan, Shmuel Kaniel, Chris Paige, Beresford Parlett, and Yousef Saad. This book is dedicated to these pioneers and their coworkers. G. W. Stewart College Park, MD

Vol II: Eigensystems

This page intentionally left blank

1
ElGENSYSTEMS

In 1965 James Hardy Wilkinson published his classic work on numerical linear algebra, The Algebraic Eigenvalue Problem. His purpose was to survey the computational state of the art, but a significant part of the book was devoted to the mathematical foundations, some of which had been developed by Wilkinson himself. This happy mixture of the theoretical and computational has continued to characterize the area computational advances go hand in hand with deeper mathematical understanding. The purpose of this chapter is to provide the mathematical background for the first half of this volume. The first section consists of an exposition of the classic algebraic theory of eigensy stems. The predominant theme of this section is the systematic reduction of matrices to simpler forms by similarity transformations. One of these forms the Schur decompositionis the goal of the QR algorithm, the workhorse of dense eigenvalue computations. The second and third sections are devoted to the analysis of eigensystems. The second section concerns norms and the their relation to the spectrum of a matrix. Here we will pay special attention to the asymptotic behavior of powers of matrices, which are important in the analysis of many matrix algorithms. The third section is devoted to perturbation theoryhow eigensystems behave when the original matrix is perturbed. This is a large subject, and we will only be able to survey the basics. The majority of eigenvalue problems involve real matrices, and their reality often results in computational savings. However, the theory of eigensystems is best treated in terms of complex matrices. Consequently, throughout this chapter: Unless otherwise stated A is a complex matrix of order n.

1. THE ALGEBRA OF EIGENSYSTEMS


In this section we will develop the classical theory of eigenvalues, eigenvectors, and reduction by similarity transformations, with an emphasis on the reduction of a matrix by similarity transformations to a simpler form. We begin with basic definitions and their consequences. We then present Schur's reduction of a triangular matrix to triangular form by unitary similarity transformationsa decomposition that serves as
1

CHAPTER 1. EIGENSYSTEMS

a springboard for computing most others. Further reduction to block diagonal form is treated in 1.5. The reduction depends on our ability to solve a matrix equation called Sylvester's equation, which we investigate in some detail. Finally in 1.6 we present the Jordan canonical form. 1.1. EIGENVALUES AND EIGENVECTORS Definitions This volume has two heroes: the eigenvalue and its companion the eigenvector. Since the two are inseparable, we will formalize their pairing in the following definition. Definition 1.1. Let A be of order n. The pair (A, x) is called an EIGENPAIR or a RIGHT EIGENPAIR of A if

The scalar X is called an EIGENVALUE of A and the vector x is called an EIGENVECTOR. The pair (A, y) is called a LEFT EIGENPAIR ify is nonzero and yHA = Xy11. The multiset of eigenvalues of A is called the SPECTRUM of A and is denoted by A( A). Here are some comments on this definition. The unqualified terms "eigenpair" and "eigenvector" refer to right eigenpairs and right eigenvectors. Left eigenpairs and eigenvectors will always be qualified. If (A, x) is an eigenpair and r ^ 0, then (A, rx) is also an eigenpair. To remove this trivial nonuniqueness, one often specifies a normalization ofx. For example, one might require that XHXx = 1 or that some component of x be equal to one. In any event, when the eigenvector corresponding to an eigenvalue is unique up to a scalar multiple, we will refer to the one we are currently interested in as the eigenvector. Eigenvalues can be repeated. For example, it is natural to regard the identity matrix of order n as having n eigenvalues, all equal to one (see Theorem 1.2). To keep track of multiplicities we define the spectrum of a matrix to be a multiset, i.e., a set in which a member may be repeated. Perhaps the best way to think of an eigenvector x of a matrix A is that it represents a direction which remains invariant under multiplication by A. The corresponding eigenvalue A is then the representation of A in the subspace spanned by the eigenvector x. The advantage of having this representation is that multiplication by A is reduced to a scalar operation along the eigenvector. For example, it is easy to show that if Ax = Xx then Thus, the effect of a power of A along x can be determined by taking the corresponding power of A.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS Existence of eigenpairs: Special cases

In a moment we will show that any matrix has an eigenpair. However, before we formally establish the existence of eigenpairs, it will be convenient to examine three important cases in which a matrix must by its nature have eigenpairs. Singular matrices. If A is singular, then A has a null vector, i.e., a vector x / 0 for which Ax = 0. It follows that (0, x) is an eigenpair of A. Diagonal matrices. If A is diagonal and e; denotes the z'th unit vector (i.e., the vector whose th component is one and whose other components are zero), then

Thus (a;;, e{) is an eigenpair of A. Triangular matrices. Let A be a triangular matrix partitioned in the form

where AH is of order k. If no diagonal element of AH is equal to akk, then ctkklAH is nonsingular, and it is easily verified that

is an eigenvector of A corresponding the the eigenvalue akk- Since any diagonal element of A must have a first appearance on the diagonal, it follows that the diagonal elements of A are eigenvalues of A. Conversely, if (A, x) is an eigenvector of A it must have a last nonzero component, say &. It then follows from the equation

that akkk = ^k or A = akk- Thus the eigenvalues of a triangular matrix are precisely its diagonal elements. The characteristic equation and the existence of eigenpairs We now turn to the existence of eigenpairs. If (A, x) is an eigenpair of A, then \x Ax = 0, or equivalently (\I-A)x = Q. Since x is nonzero, A/ - A must be singular. Conversely, if XI - A is singular, then it has a null vector x, and (A, x) is an eigenpair of A. Thus the eigenvalues of A are Vol II: Eigensystems

CHAPTER 1. EIGENSYSTEMS

the scalars for which A/ A is singular. Since a matrix is singular if and only if its determinant is zero, the eigenvalues of A are the scalars for which

The function ^(A) is a monic polynomial of degree n called the characteristic polynomial of A. We have thus shown that the eigenvalues of A are the roots of the characteristic equation (1.3). Since a polynomial of degree n has exactly n roots, a matrix of order n has n eigenvalues. More precisely, from the fundamental theorem of algebra we have the following theorem. Theorem 1.2. Let A be of order n, andletpA(^) = det(A/ A) be its characteristic polynomial Thenpp(X) can be factored uniquely in the form

where the numbers A; are distinct and

The eigenvalues of A are the scalars A,, which are said to have ALGEBRAIC MULTIPLICITY mi. Thus, counting algebraic multiplicities every matrix of order n has n eigenvalues. This theorem and the accompanying definition has two consequences. It is important to keep track of the algebraic multiplicity of the eigenvalues. To do so, we have already defined A( A) to be a multiset. We will also use the phrase "counting multiplicities" as a reminder that multiplicities count. It follows from the theorem that we do not need to distinguish between "right" and "left" eigenvalues. For if A/ A is singular, then, in addition to a right null vector, it has a left null vector yH. Equivalently, yHA = Ay H ; i.e., t/H is a left eigenvector corresponding to A. Thus every eigenvalue has both a left and right eigenvector. Matrices of order two In many applications it is useful to have the the characteristic polynomial of a 2x2 matrix, say,

For this matrix

An easily memorized equivalent is

7.16]

WIENER-HOPF METHOD

329

derivative of the field in the aperture. Characterize this normal derivative by an integral equation. Compare this result with diffraction by a thin disk of the shape of the aperture (with vanishing field on the disk.) 7.52 Consider steady diffusion in an absorbing medium. The absorption coefficient is the constant k2 outside the bounded region R and a function k2 - kl(x) inside R. A point source is located at x0 in the exterior of JR. The concentration u satisfies

Express u everywhere in terms of its values inside R and derive an integral equation for u(x), x in R.

FIGURE 7.22 7.53 Figure 7.22 is a cross-sectional view of two parallel plates with a screen obstructing in part the plane z = 0. The boundary condition on the plates and on the screen is that the normal derivative of the field vanishes. If the screen were absent, the plane wave elv/Az could propagate in the channel. In the presence of the screen this plane wave is diffracted. The total field u can be written where us(x, z) satisfies

CHAPTER 1. EIGENSYSTEMS

of a real matrix have a special structure that we can exploit to eliminate the use of complex arithmetic. Specifically, if A is real, then its characteristic polynomial is real. Now the complex zeros of a real polynomial occur in conjugate pairs. It follows that the complex eigenvalues of a real matrix occur in conjugate pairs, and such pairs have the same algebraic multiplicity. Actually, we can say more. For if Ax Xx, where A is complex, then on taking conjugates we find that Ax = Xx. It follows that or is an eigenvector of A corresponding to A. Thus, if we have computed a complex eigenpair, we have effectively computed the conjugate eigenpair. Moreover, the real and imaginary parts of the eigenvector x corresponding to a complex eigenvalue A are linearly independent. To see this write x = y + i z and assume that, say, y is nonzero. Then for y and z to be linearly dependent, we must have z = ry for some real scalar r. It follows that the vector

is real and nonzero. Hence on multiplying the relation Ax = \x by 1 i r, we get Ax = Ax. Since A and x are real and x ^ 0, A is also reala contradiction. We may summarize these results in the following theorem. Theorem 13. The complex eigenvalues of a real matrix A occur in conjugate pairs of equal algebraic multiplicity. If (A, x) is a complex eigenpairofA, then so is (A, x). Moreover, the real and imaginary parts ofx are linearly independent

1.2. GEOMETRIC MULTIPLICITY AND DEFECTIVE MATRICES Geometric multiplicity


The fact that we refer to the multiplicity of an eigenvalue as a root of the characteristic equation as its algebraic multiplicity suggests that there is another kind of multiplicity. The following theorem sets the stage for defining it. Its proof is left as an exercise. Theorem 1.4. Let X be an eigenvalue of A. Then the set of all eigenvectors corresponding to A together with the zero vector is the null space of XI A. The theorem shows that the set of eigenvectors corresponding to an eigenvalue along with the zero vector forms a subspace. The dimension of that subspace is the maximal number of linearly independent eigenvectors associated with the eigenvalue. This suggests the following definition. Definition 1.5. The GEOMETRIC MULTIPLICITY of an eigenvalue A is the dimension of the subspace spanned by its eigenvectors orequivalentlym\l(XI A). It is natural to conjecture that the algebraic and geometric multiplicities of an eigenvalue must be the same. Unfortunately, that need not be true. The geometric multiplicity is never greater than the algebraic multiplicity (see the notes following Theorem 1.12), but it can be less, as the following example shows.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS


Example 1.6. Let

The characteristic equation of J2(0) is A2 = 0, from which it follows that 0 is an eigenvalue of algebraic multiplicity two. On the other hand, the null space of J2(0) is spanned by ei. Hence the geometric multiplicity of the eigenvalue 0 is one. Defectiveness The matrix J2(0) is an example of a Jordan block. It is also an example of a defective matrix. Specifically, we say that an eigenvalue whose algebraic multiplicity is less than its geometric multiplicity is defective. A matrix with one or more defective eigenvalues is also said to be defective. Defectiveness introduces two practical difficulties. First, a defective matrix has too few eigenvectors. To see why this is a problem, let us agree to say that the matrix A has a complete system of eigenvectors if it has n linearly independent eigenvectors Xi corresponding to eigenvalues Az-. (We also say that the eigenpairs (A,-, x z ) form a complete system.) Then any vector y can be expressed in the form

An expansion like this is particularly useful in numerical computations. For example, since AkXi X^Xi (i 1,... , n), it follows that

Thus we can replace the process of computing Aky by multiplication of y by A with the less expensive process of taking the powers of the eigenvalues and summing their products with their eigenvectors. Unfortunately, Example 1.6 shows that not all matrices have complete systems of eigenvectors. The second difficulty with defective matrices is that defective eigenvalues are very sensitive to perturbations in the matrix elements, as the following example shows. Example 1.7. The matrix

differs from J2(0) by a perturbation ofe in its (2, l)-element. But its eigenvalues are V/e. This represents a dramatic perturbation of the eigenvalue. If, for example, 6 10~16, the perturbed eigenvalues are 10~8eight orders of magnitude greater than the perturbation in the matrix.

VolII: Eigensystems

CHAPTER 1. EIGENSYSTEMS

Because rounding a defective matrix will generally cause its eigenvalues to become simple, it is sometimes argued that defective matrices do not exist in practice. However, a matrix that is near a defective matrix is not much better than a defective matrix. It may have a complete system of eigenvectors, but those eigenvectors will be nearly linearly dependent, which makes the computation of expansions like (1.6) problematic. Moreover, the perturbed eigenvalues, though distinct, are just as sensitive as the original multiple eigenvalues. Thus defectiveness is a phenomenon we will have to live with. In some cases, where defectiveness is only incidental to the problem, we can work around itfor example, by using a Schur decomposition (Theorem 1.12). In other cases we must come to grips with it. We could wish our tools were sharper. Simple eigenvalues We have just seen that multiple eigenvalues may be accompanied by theoretical and practical difficulties that do not affect their nonmultiple brethren. To distinguish this latter class of eigenvalues, we will say that an eigenvalue is simple if it has algebraic multiplicity one. We will also say the the corresponding eigenvector and eigenpair are simple. 1.3. SIMILARITY TRANSFORMATIONS A key strategy in matrix computations is to transform the matrix in question to a form that makes the problem at hand easy to solve. The class of transformations and the final form will depend on the problem. For example, in transforming the least squares problem of minimizing 11 yX b \ \ 2 one uses orthogonal matrices because they preserve the 2-norm. In fact, one of the most successful algorithms for solving least squares problems is based on the orthogonal reduction of X to triangular form. For the eigenvalue problem, the transformations of choice are called similarity transformations. Definition 1.8. Let A be of order n and let U be nonsingular. Then the matrices A and B = U~1AU are said to be SIMILAR. We also say that B is obtained from A by a
SIMILARITY TRANSFORMATION.

The following is an important example of a similarity transformation. Example 1.9. Let the matrix A have a complete system ofeigenpairs (A,-, Xi) (i 1,... ,n). Let

The the individual relations Ax{ A t # t - can be combined in the matrix equation

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS

Because the eigenvectors Xi are linearly independent, the matrix X is nonsingular. Hence we may write

Thus we have shown that a matrix with a complete system ofeigenpairs can be reduced to diagonal form by a similarity transformation, whose columns are eigenvectors of A. Conversely, by reversing the above argument, we see that if A can be diagonalized by a similarity transformation X~l AX, then the columns ofX are eigenvectors of A, which form a complete system. A nice feature of similarity transformations is that they affect the eigensystem of a matrix in a systematic way, as the following theorem shows. Theorem 1.10. Let A be of order n and let B - U~1AU be similar to A. Then the eigenvalues of A and B are the same and have the same multiplicities. If (A, or) is an eigenpair of A, then (A, U~lx) is an eigenpair of B.

Thus A and B have the same characteristic polynomial and hence the same eigenval ues with the same multiplicities. If (A, x) is an eigenpair of A, then

so that (A, U lx) is an eigenpair of B. In addition to preserving the eigenvalues of a matrix (and transforming eigenvectors in a predictable manner), similarity transformations preserve functions of the eigenvalues. The determinant of a matrix, which is the product of its eigenvalues, is clearly unchanged by similarity transformations. The following theorem shows that the trace is also invariant. Theorem 1.11. Let A be of order n. The trace of A, i.e.,

is the sum of the eigenvalues of A counting multiplicities and hence is unchanged by similarity transformations. VolII: Eigensystems

10

CHAPTER 1. EIGENSYSTEMS

Proof. Let the eigenvalues of A be A i , . . . , A n . The characteristic polynomial of A can be written in two ways:

By expanding the determinant on the right, we find that the coefficient of A n 1 is the negative of the sum of the diagonal elements of A. From the expression on the left, we find that the same coefficient is the negative of the sum of the eigenvalues of A. This result is invaluable in debugging matrix algorithms that proceed by similarity transformations. Just print out the trace after each transformation. If it changes significantly, there is a bug in the code. We have seen (Example 1.9) that a matrix with a complete system of eigenpairs can be reduced to diagonal form by a similarity transformation. Unfortunately, not all matrices can be so reduced; and even when one can, its matrix of eigenvectors may be nearly singular. Consequently, we will now investigate the existence of intermediate forms that stop before full diagonality. 1.4. SCHUR DECOMPOSITIONS Unitary similarities This subsection is devoted to the reduction of matrices by unitary and orthogonal similarities. Unitary transformations play a leading role in matrix computations. They are trivial to invert, so that a unitary transformation can easily be undone. They have spectral norm one, so that they do not magnify errors. More important, if, say,

where U is unitary and we perturb B by an error to get B = B -f F, we can write

Moreover, \\E\\2 = \\F\\2 [see (2.1.7)]. Thus we can throw an error made in a computed transformation back on the original matrix without magnification. For example, if we set a small element of B to zerosay when an iteration is deemed to have convergedit is equivalent to making a perturbation of the same size in A. For an example, see (2.26), Chapter 2. Schur form In asking how far one can reduce a matrix by a class of transformations, it is useful to ask how many degrees of freedom the transforming matrices possesses. A unitary matrix has n2 elements. But these elements are constrained by n(n+l)/2 conditions: n(n-l)/2 orthogonality conditions and n normality conditions. This leaves n(nl)/2 degrees of freedom. Since a triangular matrix has n(n-l)/2 zero elements, we can hope to reduce a matrix A to triangular form by a unitary similarity. The following theorem shows that this hope is realized.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS

11

Theorem 1.12 (Schur). Let A be of order n. Then there is a unitary matrix U such that

where T is upper triangular. By appropriate choice ofU, the eigenvalues of A, which are the diagonal elements of T, may be made to appear in any order. Proof. Let AI ,... , Xn be an ordering of the eigenvalues of A. Let x\ be an eigenvector corresponding to AI and assume without loss of generality that Z H X = 1. Let the matrix X (x\ X^) be unitary. Then

the last equality following from the relation Ax\ \\x\. Because X is unitary we h a v e x ^ x i 1 a n d x ^ X i 0. Hence

Now by (1.5), the eigenvalues of M are A 2 , . . . , A n . By an obvious induction, we may assume that there is a unitary matrix V such that V^MV T^ where T^. is an upper triangular matrix with the eigenvalues A 2 , . . . , An appearing on its diagonal in the prescribed order. If we set

then it is easily verified that

which has the required form. Here are some comments on this theorem. The decomposition A = UTU11 is called a Schur decomposition of A. It is not unique because it depends on the order of the eigenvalues in T. In addition multiple eigenvalues can cause the decomposition not to be uniquee.g., there may be more Vol II: Eigensystems

12

CHAPTER 1. EIGENSYSTEMS

than one choice of the eigenvector x\ in the proof of Theorem 1.12. Unique or not, the columns of U are called Schur vectors. Given the eigenpair (Ai, xi), the unitary matrix X = (xj ^2) in the proof can be constructed as a Householder transformation [see (2.19), Chapter 2]. The proof of Theorem 1.12 is not constructive, since it requires a ready supply of eigenpairs. However, if one has an eigenpair at hand, it provides a constructive method for reducing the eigenvalue problem to a smaller one in which the eigenpair has been removed [see (1.8)]. This process is known as deflation and is an important technique in eigencalculations. When A has a complete system of eigenvectors, the Schur vectors bear an interesting relation to the eigenvectors. Let X be the matrix of eigenvectors of A, so that

where A is the diagonal matrix of eigenvalues. Let

be the QR decomposition of X. Then (1.9) is equivalent to

The right-hand side of this relation is upper triangular with the eigenvalues of A on its diagonal. Hence UHAU is a Schur decomposition of A. In other words, the Schur vectors are the columns of the Q-factor of the matrix of eigenvectors arranged in the prescribed order. Schur decompositions can often replace other, more complicated forms in theoretical and computational applications. For example, the Jordan canonical form, to be treated later, shows that the geometric multiplicity of an eigenvalue cannot exceed its algebraic multiplicity. To prove the same fact via the Schur decomposition, let A have algebraic multiplicity k. Let the first k diagonals of T = UHAU be A, so that all the others are distinct from A. Then it is easy to show that the last nk components of any eigenvector corresponding to A must be zero [see (1.2)]. It follows that the eigenvectors corresponding to A are confined to a subspace of dimension k and cannot span a subspace of dimension greater than k. Nilpotent matrices We now turn to applications of the Schur decomposition, beginning with an analysis of nilpotent matrices. A matrix A is nilpotent if Ak = 0 for some fc > 1. The zero matrix is a trivial example of a nilpotent matrix. A nontrivial example is the matrix </2(0) of Example 1.7, whose square is zero. In general, if T is an upper triangular matrix of order n with zeros on its diagonal, then the diagonal and first k-l superdiagonals of Tk are zero, as can easily be verified. Hence Tn = 0. The following theorem generalizes the above observations.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS

13

Theorem 1.13. A matrix A of order n is nilpotentifand only if its eigenvalues are all zero. In this case,

Proof. Let Ak = 0 and let (A, x) be an eigenpair of A. Then from (1.1),

and it follows that A = 0. Conversely, suppose that the eigenvalues of A are all zero. Then any Schur decomposition of A has the form

where T has zeros on its diagonal. It follows that

Hermitian matrices The elementary facts about Hermitian matrices can be obtained almost effortlessly from the Schur form. Specifically, if A is Hermitian and T = U^AU is a Schur form of A, then

so that T itself is Hermitian. Thus T is both upper and lower triangular and hence is diagonal, say,

Since the diagonal elements of a Hermitian matrix are real, the Az are real. Moreover, from the relation

we see that if ttt- denotes the ith column of U then (A,-, ttt-) is an eigenpair of A. To summarize: If A is Hermitian, its eigenvalues are real, and it has a complete orthonormal system of eigenvectors. We call the decomposition

the SPECTRAL DECOMPOSITION OF A

Vol II: Eigensystems

14
Normal matrices

CHAPTER 1. EIGENSYSTEMS

The key observation in establishing (1.10) is that the triangular factor in any Schur decomposition of a Hermitian matrix is diagonal. This property is true of a more general class of matrices. Definition 1.14. A matrix A is NORMAL if A H A = AA H . The three naturally occurring examples of normal matrices are Hermitian matrices, skew Hermitian matrices (matrices for which AH = A), and unitary matrices. A key fact about normal matrices is contained in the following theorem, which uses the Frobenius norm || ||p to be introduced in 2.1. Theorem 1.15. Let the normal matrix A be partitioned in the form

Then Proof. By computing the (l,l)-blocks of each side of the relation A H A = AAH we find that

Since for any matrix B

it follows that

If A is a normal matrix and U is unitary, then UHAU is also normal. Consequently, if T is the triangular factor in a Schur decomposition of A, the matrix T is normal. We claim that T is also diagonal. To see this, partition

By Theorem 1.15, t12 = 0. It then follows from the relation TET = TTH that ^22^22 = ^22^22, so that T22 is normal. An obvious induction now establishes the claim. It follows that: A normal matrix has a complete orthonormal system ofeigen vectors. (1 -11)

We add for completeness that the eigenvalues of a unitary matrix have absolute value one. The eigenvalues of a skew Hermitian matrix are zero or purely imaginary.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS 1.5. BLOCK DIAGONALIZATION AND SYLVESTER'S EQUATION

15

A Schur decomposition of a matrix A represents a solution of the eigenvalue problem in the sense that the eigenvalues of the matrix in question can be obtained by inspecting the diagonals of the triangular factor. But only the first Schur vectorthe first column of the orthogonal factoris an eigenvector. We have seen (Example 1.9) that if we can diagonalize A, then the diagonalizing transformation provides a complete set of eigenvectors. Unfortunately, a defective matrix, which has no complete system of eigenvectors, cannot be diagonalized. Thus to proceed beyond Schur form we must look to coarser decompositions, such as a block diagonal form. From block triangular to block diagonal matrices Let A have the block triangular form

where L and M are square. Such a matrix could, for example, be obtained by partitioning a Schur decomposition, in which case L and M would be upper triangular. But we make no such assumption. Suppose that we wish to reduce A to block diagonal form by a similarity transformationpreferably a simple one. We must, of course, preserve the block upper triangularity of A, which can be accomplished by making the transformation itself block upper triangular. We can make the transformation even simpler by requiring its diagonal blocks to be identity matrices. Thus we are led to a transformation of the form

whose inverse is

Applying this transformation to A we get

Thus to achieve block diagonality we must have

This equation is linear in the elements of Q. If we can solve it, we can block diagonalize A. However, we must first investigate conditions under which the equation has a solution. Vol II: Eigensystems

16
Sylvester's equation

CHAPTER 1. EIGENSYSTEMS

Let us consider the general problem of solving an equation of the form

where A and B are square, say of orders n and m. This equation is called a Sylvester equation, and it occurs in many important applications. Here we will be concerned with sufficient conditions for the existence of a solution. If we introduce the Sylvester operator S: defined by

then we may write Sylvester's equation in the form

1 he operator ^ is linear in X . Hence, our problem reduces to that ot determining when S is nonsingular. It turns out that the nonsingularity depends on the spectra of A and B. Specifically, we have the following theorem. Theorem 1.16. The Sylvester operator S is nonsingular if and only if the spectra of A and B are disjoint, i.e., if and only if

Proof. To prove the necessity of the condition, let (A, x) be a right eigenpair of A and let (//, y] be a left eigenpair of B. Let X = xyH. Then

Hence if we can choose A = // that is, if A and B have a common eigenvalue then X is a "null vector" of S, and S is singular. To prove the converse, we use the fact that an operator is nonsingular if every linear system in the operator has a solution. Consider the sy stem SX C. The first step is to transform this system into a more convenient form. Let T = VHBV be a Schur decomposition of B. Then Sylvester's equation can be written in the form

If we set and

we may write the transformed equation in the form

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS


Let us partition this system in the form

17

The first column of this system has the form

Now tn is an eigenvalue of B and hence is not an eigenvalue of A. Thus A t\\I is nonsingular, and the first column of Y is well defined as the solution of the equation (A-tuI)yi = di. From the second column of the system (1.13) we get the equation

Because y\ is well defined the right-hand side of this system is well defined. Moreover, as argued above, A - till is nonsingular. Hence 3/2 is well defined. In general, suppose that we have found 3/1,... , yk-\- From the fcth column of (1.13) we get

The right-hand side of this equation is well defined and the matrix on the left is nonsineular. Hence vi. is well defined. We have found a solution Y of the equation Hence is a solution of We may restate this theorem in a way that will prove useful in the sequel. Let SX = crX, so that (<r, X) is an eigenpair of S. Equivalently, (A aI)X - XB = 0 so that the Sylvester operator X >-> (A <?I)X XB is singular. It follows from Theorem 1.16 that this can be true if and only if there is a A A( A) and \i A() such that A - a = //, or equivalently a = X /z. Conversely, if A A( A) and \L A(B), then (1.12) shows that (A /*) A(S). Thus we have the following corollary. Corollary 1.17. The eigenvalues of S are the differences of the eigenvalues of A and B.

Vol II: Eigensystems

18

CHAPTER 1. EIGENSYSTEMS

Given matrices A C n x n and B C m x m , this algorithm solves Sylvester's equation


AX - XB = C.

In the code below all partitionings are by columns. 1. 2. 3. 4. 5. 6. 7. Compute a Schur decomposition A USU^ Compute a Schur decomposition B = VTVH D = UHCV for k = 1 to ro Solve the triangular system (S-tkkI)yk k = dk + X^i" tikl/i end for k * = UYVH Algorithm 1.1: Solution of Sylvester's Equation o An algorithm Theorem 1.16 and its corollary are sufficient for our immediate purposes. But it is instructive to reflect on the the second part of the proof. If we have a method for computing Schur decompositions, the procedure of transforming the Sylvester equation into the form AY - YT = D and solving columnwise for Y represents an algorithm for solving Sylvester's equation. As it stands, it involves solving m systems whose matrices are (A - r^/). For a general matrix A these systems would require O(mn3) operations to solve. Unless m is quite small, this operation count is prohibitive. However, by a further transformation of the problem we can reduce the count for solving the systems to O(mn2). Specifically, let S = UHAU be a Schur decomposition of A. Then we can write Sylvester's equation in the form

or equivalently

where Y = UHXV and D = UHCV. If we now solve columnwise for y, as in the proof of Theorem 1.16, the systems have upper triangular matrices of the form S tkkl, which can be solved in 0(n 2 ) operations. These observations form the basis for one of the best algorithms for solving dense Sylvester equations. It is summarized in Algorithm 1.1. More details are given in the notes and references.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS


Block diagonalization redux Let us now return to our original goal of block diagonalizing the matrix

19

We have seen that a sufficient condition for a diagonalizing similarity to exist is that the equation LQ - QM = H have a solution. Moreover, a sufficient condition for this Sylvester equation to have a solution is that L and M have disjoint spectra. Hence we have the following theorem. Theorem 1.18. Let

and suppose that

Then there is a unique matrix Q satisfying

such that

The importance of this theorem is that it can be applied recursively. Suppose, for example, that A( A) can be partitioned into the union C\ U.. .Ufc of disjoint multisets. By the Schur decomposition theorem (Theorem 1.12) we can find a unitary matrix X such that T = XHAX is upper triangular with the eigenvalues of A appearing in the order of their appearance in the multisets C\,... , *: Partition

where A(i) = LI . Then the eigenvalues of LI are disjoint from those of M, and by Theorem 1.18 we can reduce T to the form

In the same way we may apply Theorem 1.18 to M to cut out a block L^ corresponding to 2- And so on, to give the following theorem. Vol II: Eigensystems

20

CHAPTER 1. EIGENSYSTEMS

Theorem 1.19. Let A(A) be the union C\ U . . . U Ck of disjoint multisets. Then there is a nonsingularmatrix X such that

where If the sets ; correspond to the distinct eigenvalues of A, we obtain the following corollary. Corollary 1.20. Let the matrix A of order n have distinct eigenvalues AI, ... , \k with multiplicities mi,... , ra^. Then there is a nonsingular matrix X such that X-lAX = di&g(Ll,...,Lk), where Li is of order raz and has only the eigenvalue A,-. Finally, if all the eigenvalues of A are distinct, then the blocks Li in this corollary are scalars. Hence: If A has distinct eigenvalues, A is diagonalizable and has a complete system of eigenvectors. The decompositions in Theorem 1.19 and its corollaries enjoy a certain uniqueness. Let X (Xi Xk) be partitioned conformally with the pardon of A( A) and let X~l = (Yi - Yk) also be partitioned conformally. Then the spaces spanned by the Xi and Yi are unique (this fact is nontrivial to prove; see p. 246). However, if Si is nonsingular, we may replace X^ Yi, and Li in Theorem 1.19 by XiSi, YiS~^, and S^lL{Si. This lack of uniqueness can be useful. For example, it allows us to assume, say, that Yi is orthonormal.
TJ

1.6. JORDAN FORM The reports of my death are greatly exaggerated. Mark Twain We have seen that any matrix can be reduced to triangular form by a unitary similarity transformation. It is natural to ask how much further we can go by relaxing the requirement that the transformation be unitary. The answer is the classical Jordan canonical form, which is the topic of this subsection. We begin with a definition.

SEC. l. THE ALGEBRA OF EIGENSYSTEMS


Definition 1.21. A JORDAN BLOCK Jm(X) isa matrix of order m of the form

21

From an algebraic point of view a Jordan block is as defective as a matrix can be. The eigenvalue A of the matrix J m (A) has algebraic multiplicity m. But rankfAJ J m (A)] is m-1, so A has geometric multiplicity one. The Jordan canonical forma decomposition of a matrix into Jordan blocksis described in the following theorem. Theorem 1.22. Let AeCnXn have k distinct eigenvalues AI, ... , A^ of algebraic multiplicities m i , . . . , mk- Then there are unique integers m,j (i = 1,... , &, j = 1,... ,/,-) satisfying

and a nonsingular matrix X such that (1.14) where (1.15) Here are some comments about this theorem. The proof of the theorem is quite involved. It begins with a reduction to block diagonal form, each block corresponding to a distinct eigenvalue of A. The hard part is reducing the individual blocks to the J; in (1.14) and (1.15). For more see the notes and references. The Jordan canonical form has a limited uniqueness. The multiplicities rat and the numbers m,-j along with their associated eigenvalues are characteristic of the matrix A. Any reduction of A into Jordan blocks will result in the same number of blocks of the same order having the same eigenvalues. The spaces spanned by the Xi are unique. However, the columns of the Xi are not. Principal vectors may be chosen in different ways. But in spite of this nonuniqueness, we still speak of the Jordan canonical form of a matrix.

Vol II: Eigensystems

22

CHAPTER l. EIGENSYSTEMS

We can partition X at several levels corresponding to levels in the decomposition. First partition

in conformity with (1.14). It then follows from the relation AX = XJ that

i.e., the action of A on the matrix Xi is entirely specified by the matrix Jt. The spaces spanned by the columns of the Xi are examples of eigenspaces (to be treated in Chapter 4). If we now partition X{ in the form

in conformity with (1.15), it can be shown that

Thus the actions of A on the matrices Xij are specified by the individual Jordan blocks in the decomposition. Finallv. if we write

then the vectors

satisfy

A set of vectors satisfying (1.17) is called a sequence of principal vectors of A. Note that the first and only the first principal vector associated with a Jordan block is an eigenvector. Nonetheless the simple relations (1.17) make calculations involving principal vectors quite easy. The Jordan canonical form is now less frequently used than previously. The simplicity of its blocks make it a keen tool for conjecturing new theorems and proving them. Against this must be set the fact that the form is virtually uncomputable. Perturbations in the matrix send the eigenvalues flying, so that, in principle, the matrix becomes diagonalizable (Example 1.7). If we know the nature of the defectiveness in the original matrix, then it may be possible to recover the original form. But otherwise attempts to compute the Jordan canonical form of a matrix have not been very successful. Under the circumstances there is an increasing tendency to turn whenever possible to friendlier decompositionsfor example, to the Schur decomposition. However, as a mathematical probe the Jordan canonical form is still useful, and reports of its death are greatly exaggerated.

SEC. 1. THE ALGEBRA OF EIGENSYSTEMS


1.7. NOTES AND REFERENCES General references

23

The algebra and analysis of eigensystems is treated in varying degrees by most books on linear and applied linear algebra. There are too many of these books to survey here. Special mention, however, should be made of Bellman's classic Introduction to Matrix Analysis [18] and Horn and Johnson's two books on introductory and advanced matrix analysis [118,119]. They contain a wealth of useful information. More or less systematic treatments of eigensystems are found in books on matrix computations. The classics of the field are Householder's Theory of Matrices in Numerical Analysis [121] and Wilkinson's Algebraic Eigenvalue Problem [300]. Golub and Van Loan's Matrix Computations [95] is the currently definitive survey of the field. Trefethen and Bau's Numerical Linear Algebra [278] is a high-level, insightful treatment with a stress on geometry. Datta's Numerical Linear Algebra and Applications [52] is an excellent text for the classroom, as is Watkins's Fundamentals of Matrix Computations [288]. Chatelin's Eigenvalues of Matrices [39] and Saad's Numerical Methods for Large Eigenvalue Problems: Theory and Algorithms [233] are advanced treatises that cover both theory and computation. Special mention should be made of Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide edited by Bai, Demmel, Dongarra, Ruhe, and van der Vorst [10]. It consists of sketches of all the important algorithms for large eigenproblems with brief treatments of the theoretical and computational background and an invaluable bibliography. It is a perfect complement to this volume and should be in the hands of anyone seriously interested in large eigenproblems. History and Nomenclature A nice treatment of the history of determinants and matrices, including eigenvalues, is given by Kline [147, Ch. 33]. He makes the interesting point that many of the results we think of as belonging to matrix theory were derived as theorems on determinants and bilinear and quadratic forms. (Matrices were introduced by Cayley in 1858 [32], but they only gained wide acceptance in the twentieth century.) The nontrivial solutions of the equations Ax = Xx were introduced by Lagrange [155, 1762] to solve systems of differential equations with constant coefficients. In 1829 Cauchy [31] took up the problem and introduced the term "characteristic equation," not for the polynomial equation but for the system Ax Xx. Our term "eigenvalue" derives from the German Eigenwert, which was introduced by Hilbert [116, 1904] to denote for integral equations the reciprocal of our matrix eigenvalue. At some point Hilbert's Eigenwerte inverted themselves and became attached to matrices. The nomenclature for integral equations remains ambiguous to this day; for example, see [213, p. 96]. Eigenvalues have been called many things in their day. The term "characteristic value" is a reasonable translation of Eigenwert. However, "characteristic" has an inconveniently large number of syllables and survives only in the terms "characteristic Vol II: Eigensystems

24

CHAPTER 1. EIGENSYSTEMS

equation" and "characteristic polynomial." (For symmetric matrices the characteristic equation and its equivalents are also called the secular equation owing to its connection with the secular perturbations in the orbits of planets.) Other terms are "latent value" and "proper value" from the French valeur propre. The day when purists and pedants could legitimately object to "eigenvalue" as a hybrid of German and English has long since passed. The German eigen has become a thoroughly naturalized English prefix meaning having to do with eigenvalues and eigenvectors. Thus we can use "eigensystem," "eigenspace," or "eigenexpansion" without fear of being misunderstood. The term "eigenpair" used to denote an eigenvalue and eigenvector is a recent innovation. The earliest use I can find is in Parlett's Symmetric Eigenvalue Problem [206]. Schur form The proof of the existence of Schur decompositions is essentially the one given by Schur in 1909 [234] an early example of the use of partitioned matrices. The decomposition can be computed stably by the QR algorithm (see 2-3, Chapter 2), and it can often replace more sophisticated decompositionsthe Jordan canonical form, for examplein matrix algorithms. Sylvester's equation Sylvester's equation is so called because J. J. Sylvester considered the homogeneous case AX - XB = 0 [273, 1884]. For A and B of order two he showed that the equation has a nontrivial solution if and only if A and B have a common eigenvalue (essentially Theorem 1.16) and then stated that it easily generalizes. The linearity of the Sylvester operator means that it has a matrix representation once a convention is chosen for representing X as a vector. The customary representation is vec(X) in which the columns of X are stacked atop one another in their natural order. In this representation the Sylvester equation becomes

where is the Kronecker product defined by

Algorithm 1.1 is a stripped down version of one due to Bartels and Stewart [14]. The difference is that a real Schur form is used to keep the arithmetic real. Golub, Nash, and Van Loan [90] have proposed a Hessenberg-Schur variant that saves some operations. Higham [114, Ch. 15] devotes a chapter to Sylvester's equation, which contains error and perturbation analyses, historical comments, and an extensive bibliography.

SEC. 2. NORMS, SPECTRAL RADII, AND MATRIX POWERS


Block diagonalization

25

Although rounding error prevents matrices that are exactly defective from arising in practice, one frequently encounters matrices with very ill-conditioned systems of eigenvectors. Block diagonalization would seem to be an attractive way out of this problem. The idea is to generate clusters of eigenvalues associated with nearly dependent eigenvectors, find bases for their eigenspaces, and reduce the matrix to block diagonal form. If the blocks are small, one can afford to lavish computation on their subsequent analysis. Unfortunately, this sensible-sounding procedure is difficult to implement. Leaving aside the possibility that the smallest cluster may consist of all the eigenvalues, the problem is to find the clusters. Example 1.7 shows that eigenvalues that should be clustered do not have to lie very close to one another. Consequently, schemes for automatically block diagonalizing a matrix by a well-conditioned similarity transformation have many ad hoc features. For more see [17, 57,60,61,99]. Jordan canonical form The Jordan canonical form was established in 1874 by Camile Jordan [136]. The characteristic polynomials of the Jordan blocks of a matrix A are called the elementary divisors of A. Thus to say that A has linear elementary divisors is to say that A is nondefective or that A is diagonalizable. All the above comments about computing block diagonal forms of a matrix apply to the Jordan formand then some. See [96,139,140, 218] for the issues.

2. NORMS, SPECTRAL RADII, AND MATRIX POWERS


Eigenpairs are defined by a nonlinear equation and hence are creatures of analysis. But once the existence of eigenpairs is established, an algebra of eigensy stems can be erected on the definition. The first section of this chapter was devoted to that algebra. We now turn to the analytic properties of eigensystems. We begin with a brief review of matrix and vector norms, which measure the size of matrices and vectors. In the next subsection we study the relation of norms to the magnitude of the largest eigenvalue of a matrixthe spectral radius of the matrix. The results are then applied to determine the behavior of powers of a matrix, a topic which will often recur in the course of this volume. For more on norms see 1:4.1.

2.1. MATRIX AND VECTOR NORMS Definition


Analysis happens when a metric meets an algebraic structure. For matrices the metric is generated by a norm, a function that in some sense measures the size of a matrix. It is a generalization of the absolute value of a scalar, as the following definition shows.

Vol II: Eigensystems

26

CHAPTER 1. EIGENSYSTEMS

Definition 2.1. A MATRIX NORM ON C mxn is a function \\-\\: C m x n -> ]R satisfying the following three conditions:

The first two conditions are natural properties of any measure of size. The third conditioncalled the triangle inequality specifies the interaction of the norm with the matrix sum. It is frequently used in the equivalent form

In this work we will always identify C n x l with the space of n-vectors C n , and we call a norm on either space a vector norm. Examples of norms The norms most widely used in matrix computations are the 1-norm, the Frobenius norm, and the oo-norm defined by

Each of these norms is actually a family of matrix norms in the sense that each is defined for matrices of all orders. In particular, these norms are defined for vectors, in which case their definitions take the following forms:

The Frobenius norm has the useful characterization

which in the case of a vector reduces to

The Frobenius vector norm is also called the Euclidean norm because in E2 and R3 the quantity \\x\\p is the ordinary Euclidean length x. The Frobenius norm of a vector x is usually written \\x\\2, for reasons that will become evident shortly.

SEC. 2. NORMS, SPECTRAL RADII, AND MATRIX POWERS


Operator norms

27

Let ^ be a vector norm on C m and v be a vector norm on C n . Then it is easily verified that the function || ||M)I/ defined on C m x n by

is a matrix norm. It is called the operator norm generated by fj, and v or the matrix norm subordinate to IJL and v. We have already seen examples of operator norms. The vector 1-norm generates the matrix 1-norm and the vector co-norm generates the matrix oo-norm. The vector 2-norm generates a new norm called the matrix 2-norm or the spectral norm. It is written || |J2- Unlike the 1-norm, the oo-norm, and the Frobenius norm, it is difficult to calculate. Nonetheless it is of great importance in the analysis of matrix algorithms. Here is a list of some of its properties.

Because of property 7, we say that the 2-norm is unitarily invariant. The Frobenius norm is also unitarily invariant. Norms and rounding error As an example of the use of norms, let us examine what happens when a matrix A is rounded. Specifically, suppose that the machine in question has rounding unit eM roughly the largest number for which fl(l + e) = 1, where fl denotes floating point evaluation. Denote by fl( A) the result of rounding the elements of A. Then elementwise

where

In terms or matrices, we have n(A) = A + h, where the elements ot L are o^ et-j. It follows that

Vol II: Eigensystems

28

CHAPTER l. EIGENSYSTEMS

Thus in any norm that satisfies 11 \A\ \\ = \\A\\ (such a norm is called an absolute norm), wehave|||| < \\A\\cM or

The left-hand side of (2.2) is called the normwise relative error in fl( A). What we have shown is that: In any absolute norm, rounding a matrix produces a norm wise relative error that is bounded by the rounding unit. Incidentally, the commonly used one, Frobenius, and infinity norms are absolute norms. Unfortunately, the 2-norm is not; although (2.2) is still a good approximation. Limitations of norms We have just shown that if the elements of a matrix have small relative error, then the matrix as a whole has a small normwise relative error. Unfortunately the converse is not true, as the following example shows. Example 2.2. Let

Then it is easily verified that

so that x has low normwise relative error. On the other hand, the relative errors in the components vary. It is 10~5 for the first component, 10~2 for the second, and 1 for the third, which has no accuracy at all. In general, with balanced norms like the oo-norm, a small normwise relative error guarantees a similar relative error only in the largest elements of the matrix; the smaller elements can be quite inaccurate. Now in many applications the accuracy of small elements is unimportant. But in others it is, and in such applications one must either scale the problem to fit the norm or use a norm that gives greater weight to small elements. Consistency The triangle inequality provides a useful way of bounding the norm of the sum of two matrices. The property of consistency does the same thing for the product of two matrices.

SEC. 2. NORMS, SPECTRAL RADII, AND MATRIX POWERS

29

Definition 2.3. Let \\ - \\itTn, || ||m,n, and || ||/tn be matrix norms defined on <C /Xm , C m X n , a n d C / x n . These norms are CONSISTENT if for all A eC / x m and#e<C m X n we have

Four comments on this definition. An important special case is a matrix norm || || defined on 7 nxn . In this case consistency reduces to

Matrix norms do not have to be consistent. For example, the function denned by

is a norm. But it is not a consistent norm. For example, if

then The 1-, 2-, and oo-norms as well as the Frobenius norm are consistent in the sense that for p = 1,2, oo, F,

whenever the product AB is defined. The Frobenius and 2-norms are consistent in the sense that

Given a consistent matrix norm || || on C n x n it is natural to ask if there is a vector norm */ on C n that is consistent with || ||. In fact there are many such norms. For let y 6 Cn be nonzero. Then it is easily verified that the function i> defined by

is a vector norm. But

Vol II: Eigensystems

30
Thus we have shown that:

CHAPTER 1. EIGENSYSTEMS

Any consistent matrix norm onCnxn has a consistent vector norm.

(2-4)

Another useful construction is to define a norm by multiplying by a matrix. The proof of the following theorem is left as an exercise. Theorem 2.4. Let \\-\\bea norm onCHXn.IfUis nonsingular, then the functions

are norms. If\\ || is consistent, then so is Vsim(A). For a proof see Theorem 1:4.4.6. Norms and convergence Given a matrix norm || || on C m x n , we may define the distance between two matrices A and B by \\A B\\. This distance function can in turn be used to define a notion of convergence for matrices. Specifically, if {Ak} is a sequence of matrices, we write

At first glance, this definition of convergence appears to depend on the choice of the norm || ||. But in fact, if a sequence converges in one norm, then it converges in any norm. This is an immediate consequence of the following theorem on the equivalence of norms. Theorem 2.5. Let \JL and v be norms on C m x n . Then there are positive constants a and T such that for allAemxn

Thus it does not matter which norm we choose to define convergence. In particular, it is easy to see that \\Ak - B\\p - 0 if and only if |aj^ - 6f/| - 0 (i = 1,... , m, j = 1,... , n). Thus convergence in any norm is equivalent to the componentwise convergence of the elements of a matrix. Although all norms are mathematically equivalent, as a practical matter they may say very different things about a converging sequence, at least in the initial stages. For an example, see the discussion following Example 2.11.

2.2. THE SPECTRAL RADIUS Definition


In this subsection we will explore the relation of the largest eigenvalue of a matrix to its norms. We begin with a simple but far-reaching definition.

SEC. 2. NORMS, SPECTRAL RADII, AND MATRIX POWERS

31

Definition 2.6. Let A be of order n. Then the SPECTRAL RADIUS of A is the number

We call any eigenpair (A, x) for which |A| = p(A) a DOMINANT EIGENPAIR. The eigenvalue A is called a DOMINANT EIGENVALUE and its eigenvector is called a DOMINANT EIGENVECTOR. Thus the spectral radius is the magnitude of the largest eigenvalue of A. It gets its name from the fact that it is the radius of the smallest circle centered at the origin that contains the eigenvalues of A. Norms and the spectral radius The spectral radius has a normlike flavor. If it is large, the matrix must be large. It also tracks the powers of a matrix with greater fidelity than a norm. Specifically, p(Ak) = p(A)k, whereas the best we can say for a consistent norm is that || Ak\\ < \\A\f. We begin our investigation of norms and spectral radii with a trivial but important theorem. Theorem 2.7. Let A be of order n, and let \\ || be a consistent norm on C n x n . Then

Proof. Let i/ be a vector norm consistent with the matrix norm || || [see (2.4)]. If (A, x) is an eigenpair of A with j/(z) = 1, then

Since A is an arbitrary eigenvalue of A,

In general, a consistent norm will exceed the spectral radius of A. For example, the Jordan block

has spectral radius zero, but ||/o(0)||oo = 1. In fact, something worse is true. Since J2(0) is nonzero, any norm of J2(0) must be positive. In other words, there is no norm that reproduces the spectral radius of J2(0). However, there are norms that approximate it, as the following theorem shows. Theorem 2.8. Let A be of order n. Then for any e > 0 there is a consistent norm II IU,e (depending on A and e) such that

Vol II: Eigensystems

32

CHAPTER 1. EIGENSYSTEMS

If the dominant eigenvalues of A are nondefective, then there is a consistent norm \\-\\A (depending on A) such that

Proof. Let

be a Schur form of A in which A is diagonal and N is strictly upper triangular. For 77 > 0, let

Then for i < j the (i,j)-element of D 1ND is Vijrf *. Since for i < j we have TJJ~I -> 0 as T? -> 0, there is an 77 such that HD"1 JVjD||oo < c. It follows that

If we now define || \\A,e by

then by Theorem 2.4 the norm || \\^t is consistent, and by (2.7) it satisfies (2.6). If the dominant eigenvalues of A are nondefective, we can reduce A to the form

where AI is a diagonal matrix containing the dominant eigenvalues of A, A2 is a diagonal matrix containing the remain eigenvalues of A, and N is strictly upper triangular. Specifically, by Theorem 1.19 we can reduce A to the form diag(i?i, B?), where B\ contains the dominant eigenvalues of A and BI contains the others. Since B\ is not defective, we can diagonalize it to get the matrix AI . We can then reduce BI to Schur form to get the matrix A2 + N. Since the diagonals of A2 are strictly less than p(A), we can choose a diagonal matrix DJJ diag(/, D^) as above so that

The norm \\-\\A defined by

SEC. 2. NORMS, SPECTRAL RADII, AND MATRIX POWERS


now does the job.

33

Theorem 2.8 shows that the spectral radius of a matrix can be approximated to arbitrary accuracy by some consistent norm. We will see that this norm may be highly skewed with respect to the usual coordinate systemsee the discussion following Example (2.11). Nonetheless, it can be used to establish valuable theoretical results, as we shall show in the next subsection.

2.3. MATRIX POWERS


Many matrix processes and algorithms are driven by powers of matrices. For example, the errors in certain iterative algorithms for solving linear systems increase decrease as the powers of a matrix called the iteration matrix. It is therefore important to have criteria for when we observe a decrease. Equally important, we need to know the rate of decrease. For this reason, we now turn to the asymptotic behavior of the powers of a matrix. Asymptotic bounds The basic result is contained in the following theorem. Theorem 2.9. Let A be of order n and let e > 0 be given. Then for any norm \ \ - \ \ there are positive constants cr (depending on the norm) and TA,(. (depending on A, e, and the norm) such that

If the dominant eigenvalues of A are nondefective, we may take e = 0. Proof. We will first establish the lower bound. Let (A, x) be a dominant eigenpair of A with ||a:||2 = 1. Then

It follows that || Ak\\2 > p(A)h. By the equivalence of norms, there is a constant a > 0 such that \\B\\ > o-\\B\\2 for all B. Hence

For the upper bound, let || \\A,e be a consistent norm such that || A||4ie < p( A) + e. Then

Again by the equivalence of norms, there is a constant TA,Z > 0 such that ||J?|| < TA,c|||U, for all B. Then

Vol II: Eigensystems

34

CHAPTER 1. EIGENSYSTEMS

If the dominant eigenvalues of A are nondefective, we can repeat the proof of the upper bound with a consistent norm || \\A (whose existence is guaranteed by Theorem 2.8) for which \\A\\A = p(A). The theorem shows that the powers of A grow or shrink essentially as p(A)k. We have to add "essentially" here because if a dominant eigenvalue is defective, the bound must be in terms of of p(A) + , where c can be arbitrarily small. It is instructive to look at a simple case of a defective dominant eigenvalue. Example 2.10. The powers of the Jordan block J2(0.5) are

Hence

and

The ratios in (2.9) are called LOCAL CONVERGENCE RATIOS because they measure the amount by which the successor of a member of the sequence is reduced (or increased). Fork = 1, the convergence ratio is |, so that the norms decrease from the outset. The local convergence ratios are never quite as small as the asymptotic ratio one-half, but they quickly approach it. For k = 10, e.g., the ratio is about 0.55. A matrix whose powers converge to zero is said to be convergent. It follows immediately from Theorem 2.9 that: A matrix is convergent if and only if its spectral radius is less than one. Limitations of the bounds One should not be lulled by the behavior of J2(0.5)fc, whose norms decrease monotonically at a rate that quickly approaches 2~k. Here is a more extreme example. Example 2.11. The co-norm of the powers of J?f 0.99) are

The upper graph in Figure 2.1 (called the hump) plots these norms against the power k. Instead of decreasing, the norms increase to a maximum of about 37 when k = 99. Thereafter they decrease, but they fall below their initial value of 1.99 only when k = 563. The lower plot shows the natural logarithms of the local convergence ratios, which eventually approximate the asymptotic value of log 0.99 = -0.01. From these graphs we see that the powers of J2(0.99) not only take a long time to assume their asymptotic behavior, but they exhibit a hellish transient in the process.

SEC. 2. NORMS, SPECTRAL RADII, AND MATRIX POWERS

35

Figure 2.1: The hump and convergence ratios Which example2.10 or 2.11is typical? The answer is: It depends. Many people will go through life powering matrices and never see anything as dramatic as J2(0.99)fc. However, such examples do occur, and sometimes their effects are rather subtle. Be on guard. The bound (2.8) gives no hint of the ill behavior of J2(0.99), and it is instructive to see why. If we choose e = 0.001, so that />[J2(0.99)] + e is near p[J2(0.99)], then the norm || \\A,C given by Theorem 2.8 has the form

The (2,2)-element of J2 (0.99)fc, which accounts for the hump, is damped by the factor 0.001, so that the norm remains small. Of course the norm of a general matrix would be unnaturally large, because the (2, l)-element is multiplied by 1000. But the (2,1)element of /2(0.99)* is zero and hence is not magnified by this factor. There is a lesson to be learned from this. In matrix analysis one frequently introduces a norm designed to make a construction or a proof easy. Mathematically, this VolII: Eigensystems

36

CHAPTER 1. EIGENSYSTEMS

is sound practice. But unless the norm bears a reasonable relation to the coordinate system one is working in (the usual unit vectors for Example 2.11), the results may be disappointing or misleading.

2.4. NOTES AND REFERENCES Norms


For treatments of matrix and vector norms see the general references in 1.7 or in 1:1.4.1 of this series. The reader should be aware that some authors include consistency in the definition of a matrix norm. A matrix norm and a consistent vector norm are sometimes called compatible norms. Norms and the spectral radius In his Solution of Equations and Systems of Equations Ostrowski [ 194,1960] attributes Theorem 2.7 to Frobenius, though he gives no reference. In the same book Ostrowski gives essentially Theorem 2.8, stating that it "is unpublished." Ostrowski's proof is an elegant and amusing application of the Jordan form. Let A be the diagonal matrix of eigenvalues of A and let X~l(t~l A)X = e"1 A + N be the Jordan form of ~l A. Since the only nonzero elements of N are ones on its superdiagonal, we have

Matrix powers For a detailed treatment of matrix powersexact and computedsee [ 114, Ch. 17]. The existence of the hump illustrated in Figure 2.1 has lead to various attempts to bound maxfc || Ak\\, which are described in [114, 17.1]. When computed in finite precision, the powers of a matrix can exhibit erratic behavior, and a nominally convergent matrix can even diverge. There is no one, simple explanation, but the gist of what is happening this. The computed jth column of Ak satisfies where ||"j||/m|| is of order of the rounding unit. If A has a defective eigenvalue near one, the perturbations Ei may create eigenvalues of magnitude greater than one, in which case the asymptotic behavior will not be described by Theorem 2.9. An important approach to this problem is the pseudospectrum In many instances, the location of the pseudospectrum in the complex plane explains the behavior of the matrix powers. In the example of the last paragraph, the defective eigenvalue near one will, for sufficiently large e, cause the pseudospectrum to extend outside the unit circle. However, the approach has the disadvantage that one must choose a suitable value for the free parameter not an easy problem.

SEC. 3. PERTURBATION THEORY

37

Although the pseudospectrum has been introduced independently several times, the current high state of the art is largely due to L. N. Trefethen [276, 277, 279]. For more see the Pseudospectra Gateway: http://web.comlab.ox.ac.uk/projects/pseudospectra/

3. PERTURBATION THEORY
In this section we will be concerned with the sensitivity of eigenvalues and eigenvectors of a matrix to perturbations in the elements of the matrix. There are two reasons for studying this problem. First, the results are often of use in the design and analysis of algorithms. Second, many of the algorithms we will consider return approximate eigenpairs (A,x) that satisfy (A + E)x = Xx, where ||||/||yl|| is of the order of the rounding unit for the computer in question. A knowledge of the sensitivity of the eigenpair will enable us to predict the accuracy of the computed eigenvalue. The perturbation theory of eigenvalues and eigenvectors is a very large subject, and we will only be able to skim the most useful results. In 3.1 we will consider the perturbation of individual eigenvalues, and in 3.2 we will consider the perturbation of eigenpairs. Most of the results in 3.2 generalize to eigenspace. We will treat these generalizations in Chapter 4.
3.1. THE PERTURBATION OF EIGENVALUES

This subsection is concerned with the problem of assessing the effects of a perturbation of a matrix on its eigenvalues. We will consider three topics. The first is a bound that establishes the continuity of the eigenvalues of a matrix. The second topic is Gerschgorin's theorem, a useful tool for probing the sensitivity of individual eigenvalues. We conclude with results on the perturbation of the eigenvalues of Hermitian matrices and the singular values of general matrices. The continuity of eigenvalues A fundamental difficulty with the perturbation of eigenvalues is that they need not be differentiable functions of the elements of their matrix. For example, the eigenvalues of the matrix

are 1 ^/e, and this expression is not differentiable at e = 0. Nonetheless, the eigenvalues are continuous at = 0. In fact, the eigenvalues of any matrix are continuous functions of the elements of the matrix, as the following theorem shows.

VolII: Eigensystems

38

CHAPTER 1. EIGENSYSTEMS

Theorem 3.1 (Eisner). Let A the (possibly multiple) eigenvalues be A i,... , A n . Let the eigenvalues of A A + E be A j , . . . , A n . Then there is a permutation j\,..., jn of the integers 1,... , n such that

There are three points to be made about this theorem. i_ The exponent in the factor \\E\\% is necessary. For example, the eigenvalues of

are

where u; is the primitive nth root of unity. Thus a perturbation of order e has the potential of introducing a perturbation of order e in the eigenvalues of a matrix. However, it is important to stress that this example is extremethe eigenvalue in question is totally defective. Garden variety eigenvalues are more likely to suffer a perturbation that is linear in the error, though perhaps magnified by a large order constant. For this reason, the bound (3.1) is used more in theory than in practice. The theorem establishes the continuity of eigenvalues in a very strong sense. It is fairly easy to show that for every eigenvalue A of A there must be an eigenvalue A of A satisfying the bound (3.1), and vice versa. However, this does not preclude the possibility of two eigenvalues of A attaching themselves to a simple eigenvalue of A and vice versa. Theorem 3.1, on the other hand, pairs up the eigenvalues of A and A in such a way that each pair satisfies the bound (3.1). In particular, to an eigenvalue A of multiplicity m of A there correspond m eigenvalues of A, each satisfying the bound (3.1). The theorem has a useful implication for the behavior of the simple real eigenvalues of a real matrix under real perturbations. Let A be such an eigenvalue and let E be small enough so that the right-hand side of (3.1) is less than half the distance between A and its neighbors. Then there is exactly one eigenvalue A of A satisfying the bound (for otherwise there would be too few eigenvalues of A to pair up with the other eigenvalues of A). Moreover, A cannot be complex, since if it were its complex conjugate would also be an eigenvaluea second eigenvalue that satisfies the bound. Hence: The simple real eigenvalues of a real matrix remain real under sufficiently small real perturbations.

SEC. 3. PERTURBATION THEORY


Gerschgorin theory

39

The problem with the bound in Theorem 3.1 is that it bounds the perturbation of all the eigenvalues of any matrix. It must therefore be large enough to accommodate the worst possible case, which makes it too large for everyday work. A cure for this problem is to derive bounds for individual eigenvalues. Gerschgorin's theorem provides a method for doing this. Theorem 3.2 (Gerschgorin). Let A be of order n and let the GERSCHGORIN DISKS of A be defined by

Then

Moreover, if the union ofk of the setsQi are disjoint from the others, then that union contains exactly k eigenvalues of A. Proof. Let (A, x) be an eigenpair of A. Let & be a component of x with maximum modulus, and assume without loss of generality that t = 1. From the ith row of the equation Ax = Xx we have

or

Taking absolute values and remembering that |j| < 1, we find that

which says that A 6 (/,-. The statement about the disjoint union can be established by a continuity argument. Let A = D + B, where D diag(an,... , ann). Let Qi(t) be the Gerschgorin disks for A(t) = D + tB. The eigenvalues of A(Q) are the diagonal elements a,-,-, and they lie in the the (degenerate) disks ft(0). As t proceeds from zero to one, the radii of the disks Qi(i) increase monotonically to the radii of the Gerschorin disks of A. Now suppose that, say, (Jt=i Q^ is disjoint from the other disks. Then for 0 < t < 1, U(i) = \Ji=i Gji(t) is also disjoint from the other disks Qi(i). Initially the union VolII: Eigensystems

40

CHAPTER 1. EIGENSYSTEMS

/(0) contains exactly k eigenvalues of A(0). Moreover, as t increases, U(t) can neither lose nor acquire eigenvalues. For that would require an eigenvalue to jump between U(i) and the union of the other disks, which violates continuity. Hence, U( 1) = U?=i GK contains exactly k eigenvalues of A. Gerschgorin's theorem is a general-purpose tool that has a variety of uses. In perturbation theory, it is especially useful in obtaining bounds on clusters of eigenvalues. Example 3.3. Consider the matrix

The radii of the Gerschgorin disks for this matrix are 2.4e-03, 1.5e-03, 1.2e-03, 4.0e-03. The first disk is disjoint from the others, from which we conclude that A has an eigenvalue AI that satisfies\Xi 1| < 2.4-10"3. The remaining three disks are centered at 2 and are not disjoint. Hence, A has three eigenvalues \2, AS, and A4 that satisfy

At first glance this would appear to be a perfectly satisfactory result. If A is regarded as a perturbation of diag(l, 2,2,2), then the above examples show that the eigenvalues of A lie near its diagonal elements, and their deviation is approximately the size of the error. However, the actual deviations are 1.3e-06, 1.7e-03, -7.4e-04, -9.6e-04. Thus the Gerschgorin disks locate the eigenvalues near two fairly well, but they badly overestimate the deviation of the eigenvalue near one. We can remedy this defect by the method of diagonal similarities, which is illustrated in the following example. Example 3.4. Let A be the matrix of Example 3.3, and let P = diag(l(T3,1,1,1). Then

SEC. 3. PERTURBATION THEORY


and the radii of the Gerschgorin disks are

41

2.4e-06, 6.1e-02, 9.7e-02, 8.4e-01.


The similarity transformation DAD~l has reduced the radius of the first disk while increasing the radii of the others. Nonetheless, the first disk remains disjoint from the others. Hence we know that A, whose eigenvalues are the same as DAD~l, has an eigenvalue within 2.4-10"6 of one. On the other hand, from (3.3) we know that the remaining eigenvalues are within 4.(MO~3 of (wo. There are two comments to be made about this example. Although we have proceeded informally, choosing the matrix D by inspection, it is possible to formalize the method of diagonal similarities. For more, see the notes and references. The matrix in Example 3.3 is an off-diagonal perturbation of a diagonal matrix. What we have shownat least for this matrixis that if a diagonal element is well separated from the other diagonal elements then an off-diagonal perturbation moves the eigenvalue by a small amount that is generally proportional to the square of the perturbation. Hermitian matrices In this subsection we will state without proof some useful results on the eigenvalues of Hermitian matrices. The first result is a far-reaching characterization of the eigenvalues of a Hermitian matrix. Theorem 3.5 (Fischer). Let the Hermitian matrix A have eigenvalues

Then

and

The formulas (3.4) and (3.5) are called respectively the min-max and the max-min characterizations. They have far-reaching consequences. A trivial but useful consequence is that

Another important consequence is the following interlacing theorem. VolII: Eigensystems

42

CHAPTER 1. EIGENSYSTEMS

Theorem 3.6. Let A beHermitian of order n with eigenvalues

U Let U e Cnxm be orthonormal and let the eigenvalue ofUHAU be

Then

The theorem is called the interlacing theorem because when m = n-1, the eigenvalues \i and //; satisfy

i.e., they interlace. If U consists of m columns of the identity matrix, then U^AU is a principal submatrix of A of order m. Hence we have the following corollary. Corollary 3.7. If B is a principal submatrix of A of order m, then the eigenvalues m of B satisfy (3.6). The final consequence of Fischer's theorem is the following theorem on the perturbation of eigenvalues. Theorem 3.8. Let A and A = A + E be Hermitian. Let the eigenvalues of A, A, and Ebe

Then

Consequently,

It is noteworthy that like Theorem 3.1 this theorem is about pairs of eigenvalues. The inequality (3.7) gives an interval in which the ith eigenvalue must lie in terms of the smallest and largest eigenvalues of E. However, there is a difference. In Theorem 3.1 the pairing is not explicitly given. In Theorem 3.8, the pairing is explicitly determined by the order of the eigenvalues. In the terminology of perturbation theory, (3.8) says that the eigenvalues of a Hermitian matrix are perfectly conditionedthat is, a perturbation in the matrix makes a

SEC. 3. PERTURBATION THEORY

43

perturbation that is no larger in the eigenvalues. The perfect condition of the eigenvalues of a Hermitian matrix does not, unfortunately, imply that all the eigenvalues ar determined to high relative accuracy. In fact, the relative error in At is

A rule of thumb says that if the relative error in a quantity is about 10 *, then the quantity is accurate to about k decimal digits. Thus (3.9) implies that the smaller th eigenvalue the fewer the accurate digits, as the following example shows. Example 3.9. The matrix

has eigenvalues 1,10"1,10~2, andlO"3. (We have reported only the first five figures of the element of A.) If we perturb A by a matrix E of2-norm 10~4 we get a matrix whose eigenvalues are l.OOOOe+00, 1.0002e-01, 9.9839e-03, 1.0180e-03. The relative errors in these eigenvalues are 2.8e-07, 1.9e-04, 1.6e-03, 1.8e-02. It is seen that the relative errors become progressively larger as the eigenvalues get smaller. The example not only illustrates the relative sensitivity of the smaller eigenvalues, but it shows the limitations of bounds based on norms. The absolute errors in the eigenvalues, 2.8e-07, 1.9e-05, 1.6e-05, 1.8e-05,

are in general smaller than the bound would lead one to expect. Since the Frobenius norm of a matrix is greater than or equal to its 2-norm, The orem 3.8 holds for the Frobenius norm. However, a stronger result is also true. Theorem 3.10 (Hoffman-Wielandt). In the notation of Theorem 3.8,

Vol II: Eigensystems

44 3.2. SIMPLE EIGENPAIRS

CHAPTER 1. EIGENSYSTEMS

Up to now we have been concerned with eigenvalues. In this section we will examine the sensitivity of eigenvectors to perturbations in the matrix. It turns out that the perturbation theory for an eigenvector goes hand in hand with that of its eigenvalue, and we will actually treat the perturbation of eigenpairs. We will restrict ourselves to a simple eigenpair (A, x). This insures that (up to a scalar factor) we have a unique eigenvector to study. Left and right eigenvectors Let (A, z) be a simple eigenpair of A. By Theorem 1.18 there is a nonsingular matrix (x X) with inverse (y y)H such that

It is easily seen by writing

that yRA Aj/H and Y^A = MYE. In particular, y is the left eigenvector of A corresponding to A. The angle between x and y will play an important role in the perturbation theory to follow. From the Cauchy inequality we know that

where 7 < 1 with equality if and only if x and y are linearly dependent. In R2 and R3 it is easy to see that the constant 7 is the cosine of the angle between the lines subtended by x and y. In general we define the angle between nonzero vectors x and y by

Since in (3.10) above (x X) * = (y YE)H, we have yHx = 1. It follows that: If (A, x) is a simple eigenpair of A, then there is a left eigenvector y of A such thatyHx = 1. In this case

A corollary of this assertion is that if x is a simple eigenvector then its left eigen vector y is not orthogonal to x.

SEC. 3. PERTURBATION THEORY


First-order perturbation expansions

45

We now turn to the perturbation theory of simple eigenpairs. Specifically, we are given a simple eigenpair (A, x) of A, and a small perturbation A = A -f E. It can be shown (Theorem 3.11 below) that if E is small enough, then there is a simple eigenpair (A, x) that approaches (A, x) as E approaches zero. Before establishing that fact, we will firs address the problem of approximating the perturbed eigenpair. We will suppose that A has been block-diagonalized as in (3.10). The first order of business is to find suitable representations of A and x. Since A is a scalar, we can write

where (p is to be determined. The problem of representing x is complicated by the fact that x is determined only up to a scalar factor. Thus to get a unique representation we must impose a normalization on x. Here we will require that yHx = 1. This is easily seen to be equivalent to representing x in the form

where p is to be determined. We must now set up an equation from which (p and p may be determined. The natural equation is Ax Xx, or

Since Ax = Ax, we have

Unfortunately this equation is nonlinear in the parameters (p and p. The key to a first-order analysis is to note that since (p and p approach zero along with Et products of these terms will become negligible when E is small enough. Ignoring such products, we get the linearized equation

We must now solve the linearized equation for (p and p. To solve for <p, multiply by yE. Since yHX = 0, we have yHAXp = XyHXp = 0 and yHXp = 0. Since yHx = 1, we have

To solve for p multiply (3.13) by Y H , and use the facts that

Vol II: Eigensystems

46

CHAPTER l. EIGENSYSTEMS

to get Mp + YHEx = \p. Since A is a simple eigenvalue, the eigenvalues of M are not equal to A. Hence AJ M is nonsingular and

In summary: The first-order expansion of the eigenpair (A, a;) under the perturbation A + E of A is

Rigorous bounds We have derived approximations to the perturbed eigenpair. However, we have not established that a perturbed pair exists to be approximated; nor have we shown how good the approximations actually are. The following theorem, which we give without proof, fills in these gaps. For more, see the notes and references. Theorem 3.11. Let (A, x) be a simple eigenpair of A. Let (x X) be a nonsingular matrix such that

where

and set

Let || || be a consistent norm and define

If

then there is a scalar (p and a vector p such that

is an eigenpair of A with

SEC. 3. PERTURBATION THEORY


Moreover,

47

and

There are many things to be said about this theorem, enough to give a subsubsection to each. Qualitative statements The bounds in Theorem 3.11 say very specific things about how a simple eigenpair behaves under perturbation. But to orient ourselves, we will first describe the qualitative behavior. Specifically, we have that |y?n|, ||/12||, ||/||, and ||F||22 are all 0(||||). Moreover from (3.18) it follows that \\p\\ is also O(||E||). Turning first to the eigenvalues, since <p = A A, it follows from (3.20) that

In other words, the simple eigenvalues are not only continuous, but they do not exhibit the 0(|| ||*) behavior that we have observed in defective matrices [see (3.2)] Again by (3.20) our first-order approximation yHEx to (p is accurate up to terms of 0(||.E||2). Since A + yuEx = yEAx, we can write

The quantity yHAx in (3.21) is called a Rayleigh quotient. Generalizations of this scalar quantity will play an important role in algorithms for large eigenproblems. Equation (3.20) implies that A is a differentiable function of the elements of its matrix. For if we take E = ee^e,, so that E represents a perturbation of size e in the (i, j)-element of A, then

From this it follows that dX/daij

is y{Xj. In matrix terms:

If (A, 2) is a simple eigenpair of A and y is the corresponding left eigenvector, normalized so that yHx = 1, then

VolII: Eigensystems

48

CHAPTER 1. EIGENSYSTEMS
Turning now to the eigenvector x, since x x = Xp, we have

so that the eigenvector is also continuous. Moreover, from (3.19) it follows that

Thus we can expect x -f X(\I - M) The condition of an eigenvalue

/2i to be a very good approximation to x.

Turning now to more informative bounds, we begin with the eigenvalue A. Since A = A + yHEx + (<p- yHEx), we have from (3.20)

By (3.12), we know that ||x||2||y||2 = sec ^-(x-> y}- Hence

Ignoring the 0(|| JE?||2) term in (3.23), we see that the secant of the angle between x and y is a constant that mediates the effect of the error E on the eigenvalue A. Such numbers are called condition numbers. If a condition number for a quantity is large, the quantity is said to be /// conditioned. If it is small, the quantity is said to be well conditioned. (For a general discussion of condition numbers see 1:2.4.) Thus: The condition number of a simple eigenvalue is the secant of the angle between its left and right eigenvectors. /^ 24)

Two caveats apply to condition numbers in general. First, they are useful only to the extent that the bound that generates them is sharp. In our case, the bound on A was derived by taking norms in a sharp approximation to the perturbed eigenvalue A. Hence the bound will generally be in the ballpark, and the condition number will be an accurate reflection of the sensitivity A. Keep in mind, however, that it is easy to contrive large perturbations that leave A unchanged. Second, the condition number changes with the norm. In particular, if we had not chosen the 2-norm, we would not have ended up with as elegant a condition number as the secant of the angle between the left and the right eigenvectors. On the other hand, for most norms in common use the secant gives a reasonable idea of the sensitivity. The condition of an eigenvector Theorem 3.11 is useful in establishing the existence of a perturbed eigenpair, and, as we have just seen, it provides a meaningful condition number for the perturbed eigenvalue. But it does not directly provide a condition number for the perturbed eigenvector. The reason is that the vector p can be large, even when the perturbation in the directions between x and x is small.

SEC. 3. PERTURBATION THEORY

49

To see this, let S be nonsingular. Then we can replace X in the block diagonal reduction (3.15) by XS and Y by YS~H, so that the block diagonal form becomes diag(A, S~1MS). It then follows that the approximation p to p in (3.14) becomes S~lp. By choosing S appropriately, we can make p as large as we like compared to The cure for this problem is to bound the angle between x and x. We begin by choosing a distinguished basis for the reduction (3.15) to block diagonal form. Specifically, we will, as above, replace X by XS and Y by Y5~~H, with S chosen so that the new Y is orthonormal. For the rest of this subsection we will assume that this change has been made. Although we defined the angle between two vectors in terms of the cosine, we will actually calculate the sine of the angle. The following lemma shows how do do this. Lemma 3.12. Let x and x be nonzero, and let Y be an orthonormal basis for 7(x)-1. Then

\\E\\-

Proof. Without loss of generality assume that ||or||2 = \\x\\z = 1. Then the matrix (x Y) is unitary. From the unitary invariance of || |J2, we have

But \XHX\ = cos(z,). Hence

We are now in a position to bound the sine of the angle between x and x. Theorem 3.13. In Theorem 3.11 assume thatY is orthonormal, and that the condition (3.17) is satisfied in the 2-norm. Then

Proof. We have (A + E)x = \x or

Multiplying this relation by Yu and recalling that YHA = MYU, we have

Since A 4 M,

VolII: Eigensystems

50

CHAPTER l. EIGENSYSTEMS

and by Lemma 3.12 and the definition (3.16)

From Theorem 3.11 it follows that A A as E -* 0. Hence we may rewrite (3.25) in the form

Consequently, sep l (A, M) is a condition number for the eigenvector x. We will now consider some of the properties of the functions sep. Properties of sep The first and most natural question to ask of sep is how it got its name. The answer is that it is a lower bound on the separation of A from the spectra of M. Specifically, we have the following theorem. Theorem 3.14. In any consistent norm,

Proof. By Theorem 2.7

The result now follows on inverting this relation. Thus sep(A, M) is a lower bound on the separation of A and the eigenvalues of M. Otherwise put if an eigenvalue of M is near A we can expect the eigenvector x to be sensitive to perturbations in A. Actually, this is just common sense. For if an eigenvalue of M is near A, then a small perturbation of A could make them equal and turn the one-dimensional space spanned by x into a two-dimensional space. Unfortunately, sep( A, M) can be far smaller than the separation of A from the spectrum of M, as the following example shows. Example 3.15. Let A = 0 and let M = Wm be themxm upper triangular matrix

SEC. 3. PERTURBATION THEORY

51

Since all the eigenvalues ofWm are one, the distance between A and the spectrum of Wm is one. On the other hand, in the co-norm

But

sothatyw-^loo = 2 m - J . Hence
which, with increasing m, goes quickly to zero in spite of the excellent separation of A = 0 from the eigenvalues ofWm. This example suggests the possibility that an eigenvector whose eigenvalue is well separated from its companions can still be sensitive to perturbations in its matrix. It is an instructive exercise to use Wm to construct an example of this phenomenon. Hermitian matrices If A is Hermitian then the right eigenvector x corresponding to the eigenvalue A is also the left eigenvector y. It follows that the angle between x and y is zero, and sec Z(z, y) = 1the smallest possible value. Thus the simple eigenvalues of a Hermitian matrix are optimally conditioned. This result, of course, is weaker than (3.8), which shows that any eigenvalue of a Hermitian matrix, whatever its multiplicity, is perfectly conditioned. The simple eigenvectors of a Hermitian matrix also behave nicely, as a consequence of the following theorem, whose proof is left as an exercise. [Hint: See (3.26).] Theorem 3.16. Let A be real and M Hermitian. Then in the 2-norm,

Now in the decomposition (3.15) of Theorem 3.11, we may take X = Y, so that M is Hermitian. It follows that if a; is an eigenvector of A and x is the corresponding eigenvector of A = A + E, then

Thus for Hermitian matrices the physical separation of eigenvaluesas distinguished from the lower bound sepindicates the condition of its eigenvectors. VolII: Eigensystems

52
3.3. NOTES AND REFERENCES General references

CHAPTER 1. EIGENSYSTEMS

Most texts on numerical linear algebra contain at least some material on the perturbation of eigenvalues and eigenvectors (especially [121] and [300]). Books whose titles include the words "matrix analysis" or "matrix inequalities" usually contain material on perturbation theorye.g., [18], [20], [39] [118], [119], [168], [177]. There are several books devoted more or less exclusively to perturbation theory. Kato's Perturbation Theory for Linear Operators [146] presents the theory as seen by a functional analyst (although it includes a valuable treatment of the finite-dimensional case). Bhatia [22] treats the perturbation of eigenvalues with special emphasis on Hermitian and normal matrices. In his subsequent Matrix Analysis [23] he treats eigenspaces of Hermitian matrices. Both books are a valuable source of references. The approach taken in this section is along the line of Stewart and Sun's Matrix Perturbation Theory [269]. Continuity of eigenvalues For an extensive survey of general results on the perturbation of eigenvalues of nonnormal matrices, see Bhatia's Matrix Analysis [23, Ch. VIII]. Theorem 3.1 is due to Eisner [69,70] as improved by Bhatia, Eisner, and Krause [24]. Gerschgorin theory Gerschgorin's theorem [82, 1931] is a consequence of the fact that a strictly diagonally dominant matrix is nonsingular. This fact has been repeatedly rediscovered, leading Olga Taussky to write a survey entitled "A Recurring Theorem on Determinants" [274]. Gerschgorin also showed that an isolated union of k disks contains exactly k eigenvalues and introduced the use of diagonal similarities to reduce the radii of the disks. The technique is quite flexible, as Wilkinson has demonstrated in his Algebraic Eigenvalue Problem [300]. For a formalization of the procedure see [175,285]. Eigenvalues of Hermitian matrices Much of the material presented here can be found in 1:1.4.4 of this series. Also see [23,118,119, 269] for further references and historical notes. Simple eigenpairs The results in this subsection were, for the most part, developed for eigenspaces, which will be treated in 2, Chapter 4. Left and right eigenvectors The fact that left and right eigenvectors corresponding to a simple eigenvalue cannot be orthogonal is well known and can be easily deduced from a Schur decomposition.

SEC. 3. PERTURBATION THEORY

53

The converse is not truea multiple eigenvalue can fail to have nonorthogonal left and right eigenvectors, although for this to happen the eigenvalue must be defective. An analytic version of the result, also deducible from a Schur decomposition, is that if the left and right eigenvectors of a matrix are nearly orthogonal, then the matrix must be near one with a multiple eigenvalue [303]. First-order perturbation expansions First-order perturbation expansions have long been used in the physical sciences to linearize nonlinear differential equations. A classroom example is the behavior of the pendulum under small oscillations. They have also been used to generate iterations for solving nonlinear equations; Newton's method is the prototypical example. In matrix analysis first-order expansions are useful in three ways. First, the approximations they furnish are often used in deriving and analyzing matrix algorithms. Second, formulas for derivatives can often be read off from a perturbation expansion [the assertion (3.22) is an example]. Third, in perturbation theory a first-order expansion can yield very sharp asymptotic bounds. In fact, a first-order expansion is often the best way to get a handle on the perturbation theory of a new object. Rigorous bounds Theorem 3.11 is a consequence of more general theorems due to the author [250,252]. We will return to these bounds when we treat eigenspaces in Chapter 4. Condition numbers Wilkinson [300, pp. 68-69] introduces the quantity s = yEx, where x and y are normalized right and left eigenvectors corresponding to a simple eigenvalue A, and on the basis of a first-order perturbation analysis notes that the sensitivity of A is determined by l/|s|. I/ \s\ is, of course, the secant of the angle between x and y. Ifx and y are normalized so that yHx = 1, the matrix xyH is the spectral projector corresponding to A. It is so called because (xy^)z is the projection of z on 'Jl(x) along ^(y)1-. Since ||a:yH||2 = IHMMh = sec/(#,?/), the condition of a simple eigenvalue is the norm of its spectral projection. This result generalizes to representations of a matrix on an eigenspace [see (2.26), Chapter 4]. Theorem 3.13 is a generalization to non-Hermitian matrices of the sin# theorem of Davis and Kahan [54]. If Y is not orthonormal, the bound becomes

where
Sep

The justification for the introduction of sep to replace the actual separation of eigenvalues in the complex plane is the simplicity of bounds it produces. Its drawback is Vol II: Eigensystems

54

CHAPTER 1. EIGENSYSTEMS

that sep is by no means a simple quantity, as Example 3.15 shows. On the other hand it has the nice property that

where || || is the norm used to define sep. Thus, a small perturbation in the arguments of sep makes an equally small perturbation in its value. Relative and structured perturbation theory Example 3.9 suggests that the small eigenvalues of a symmetric matrix are not well conditioned in a relative sense under perturbations of the matrix. This is generally true of normwise perturbation; however, if the perturbations are structured, small eigenvalues may be well conditioned. Consider, for example, the matrix

whose eigenvalues are (to five figures) 2.0000 and 5.0000-10 7. If we replace A by

we get eigenvalues 1.9995 and 4.995740 '. In other words, the smallest eigenvalue is insensitive to small relative perturbations in the elements of A, even though the perturbation in the (1, l)-element is larger than the eigenvalue itself. This phenomenon is unexplained by our perturbation theory. Over the last two decades researchers have begun to investigate these and related problems. The subject is still in flux, and it is impossible to survey it here. But we can discern some trends. 1. Relative perturbation of eigenvalues: Determine the relative error in eigenvalues resulting from perturbations in the matrix. Generally, the matrix and its perturbations must have some special structure. 2. Componentwise perturbation of eigenvectors: Determine the error (preferably relative) in the individual components of eigenvectors resulting from perturbations in the matrix. 3. Perturbation theory for matrices with structured nonzero elements: e.g,, bidiagonal matrices, tridiagonal matrices, etc. 4. Perturbation theory for graded matrices. 5. Multiplicative perturbations: i.e., perturbations of the form (/ + E) A(I + F), where E and F are small. The above categories are not disjoint, but overlapoften considerably. It is also impossible to present a complete bibliography. The following references emphasize surveys or papers with extensive bibliographies: [56, 58, 112, 113, 125, 165,166,173, 266].

2
THE QR ALGORITHM

All general-purpose eigenvalue algorithms are necessarily iterative. This statement is a consequence of Abel's famous proof that there is no algebraic formula for the roots of a general polynomial of degree greater than four. Specifically, to any polynomial p(x) = xn an-ixn~l aix ao there corresponds a companion matrix

whose characteristic polynomial is p. Thus if we had a noniterative general-purpose eigenvalue algorithm, we could apply it to the companion matrix of an arbitrary polynomial to find its zeros in a finite number of stepsin effect producing a formula for the roots. Thus the history of eigenvalue computations is the story of iterative methods for approximating eigenvalues and eigenvectors. An important theme in this story concerns methods based on powers of a matrix. The climax of that theme is the QR algorithmthe great success story of modern matrix computations. This algorithm, with proper attention to detail, can compute a Schur form of a general matrix in 0(n3) operations. It can be adapted to reduce a real matrix in real arithmetic to a real variant of the Schur form. Other forms of the algorithm compute the eigenvalues of and eigenvectors of a Hermitian matrix, the singular value decomposition of a general matrix, and the generalized Schur form of a matrix pencil. And the underlying theory of the method continues to suggest new algorithms. The purpose of this chapter is to describe the QR algorithm and its variants. The algorithm is closely related to two algorithms that are important in their own rightthe power method and the inverse power method. We will therefore begin with an exposition of those methods. In 2 we will present the general algorithm in the form generally used for complex matrices, and in the following section we will present the implicitly

55

56

CHAPTER 2. THE QR ALGORITHM

shifted form for real matrices. Finally, in 4 we treat the generalized eigenvalue problem. The symmetric eigenvalue problem and the singular value decomposition will be treated separately in the next chapter. A word on the algorithms. The QR algorithm is a complicated device that generates a lot of code. Nonetheless, its various manifestations all have a family resemblance. For this reason we will lavish attention on one variantthe explicitly shifted QR algorithm for complex matricesand sketch the other variants in greater or lesser detail as is appropriate.

1. THE POWER AND INVERSE POWER METHODS


The power and inverse power methods are extremely simple methods for approximating an eigenvector of a matrix. In spite of their simplicity, they have a lot to teach us about the art of finding eigenvectors. For this reason and because of the connection of the methods to the QR algorithm, we devote this subsection to a detailed treatment of the algorithms. We begin with the power method.
1.1. THE POWER METHOD

The basic idea behind the power is simple. Let A be a nondefective matrix and let (A,, ,-)( = 1,... , n) be a complete set of eigenpairs of A. Since the Xi are linearly independent, any nonzero vector u0 can be written in the form

Now Akxi = X+Xi, so that

If |Ai| > |A,-1 (i > 2) and 71 ^ 0, then as k > oo, the first term in (1.1) dominates, so that Aku becomes an increasingly accurate approximation to a multiple of the dominant eigenvector x\. Although the basic idea of the power method is simple, its implementation raises problems that will recur throughout this volume. We will treat these problems in the following order. 1. Convergence of the method 2. Computation and normalization 3. Choice of starting vector 4. Convergence criteria and the residual 5. The Rayleigh quotient 6. Shifts of origin 7. Implementation 8. The effects of rounding error

SEC. 1. THE POWER AND INVERSE POWER METHODS

57

Convergence In motivating the power method, we made the simplifying assumption that A is nondefective. In fact, all that is needed is that A have a single dominant eigenpair ( AI , x\) in the sense of Definition 2.6, Chapter 1. Since this eigenvalue is necessarily simple, by Theorem 1.19, Chapter 1, we can find a nonsingular matrix X = (x\ X^) such that

Without loss of generality we may assume that

Since x and the columns of X form a basis for C n , we can write any vector UQ in the form

In this notation we have the following theorem. Theorem 1.1. Let A have a unique dominant eigenpair(\i, x\) and let A be decomposed in the form (1.2), where X = (x\ X^) satisfies (1.3). Let UQ be a nonzero starting vector, decomposed in the form (1.4). 1/71 ^ 0, then

In particular for any e > 0, there is a constant a such that

where p(M) is the spectral radius ofM. Proof. It is easy to verify that

Let the columns of Y form an orthonormal basis for the subspace orthogonal to x\. Then by Lemma 3.12, Chapter 1,

But

Vol II: Eigensystems

58
and

CHAPTER 2. THE QR ALGORITHM

IfriA?*! + X2Mkc2\\2 > |7l||A?| - ||Mfc||2||C2||2. Substituting these inequalities in (1.7) and dividing by |7i||Ai|, we get (1.5). The inequality (1.6) follows directly from Theorem 2.9, Chapter 1. Three comments on this theorem. Equation (1.5) shows that the error in the eigenvector approximation produced by thepower method behaves like [IIM^I^/IAil^]. Since p(M) < |Ai|, the error conK,

k verges to zero at an asymptotic rate of[p(M)/\\i\] ,

a statement made precise by

(1.6). However, if the powers of M are badly behaved, we may have to wait a long time to observe this asymptotic convergence; see Example 2.11, Chapter 1. By Theorem 2.9, Chapter 1, if M is nondefective then we may take e = 0 in (1.6). For example, if A has a complete system of eigenvectors with its eigenvalues ordered so that |Ai| > |A2| > > |An|, then the convergence is as |A 2 /Ai| fc . From (1.6), we see that if 71 is small in comparison to c2, then the convergence will be retarded, although its asymptotic rate will be unchanged. In this case we say that UQ is deficient in\\. We will return to this point later. Computation and normalization We have written the kth iterate u^ in the power method in the form ilk = Akv,Q. If we were to naively implement this formula, we would end up first computing Bk Ak and then computing wjt = BkUQ. This procedure requires about kn3 flam to compute Uka grotesquely large operation count. An alternative is to observe that iik+i = Auk- This suggests the following algorithm. 1. k = 0 2. while (not converged) 3. uk+i = Auk (1.8) 4. k = k+l 5. end while For a dense matrix, each iteration of this program requires about n2 flam, where a flam denotes a pair of floating-point additions and multiplications. However, this operation count does not tell the entire story. In many applications the matrix A will be large and sparsethat is, it will have many zero elements. If the matrix is represented by an appropriate data structure, it may take far fewer than n2 flam to compute its product with a vector. Let us consider the example of a tridiagonal matrix. Example 1.2. A tridiagonal matrix of order n has the form illustrated below for n =

SEC. 1. THE POWER AND INVERSE POWER METHODS


6:

59

If the nonzero diagonals of T are stored as indicated above in arrays a, b, and c, then the following program computes y = Tx. 1. 2. 3. 4. 5. y[l] = a[l]*a:[l] + 6[l]*a:[2] for z = 2 to n1 y[i] c[il]*x[i1] + a[i]*^[z] + 6[z]*x[z'4-l] end for t y[n] = c[n-I]*x[n-l] + a[n]*z[n]

This program has an operation count of In fladd+3n flmlt. Thus we have reduced the work to form the product Ax from 0(n2) to O(n). We shall not always get as dramatic improvement in operation counts as we did in the above example. But it serves to show that algorithms based on matrix-vector multiplies can often be economized. As it stands the program (1.8) will tend to overflow or underflow. For example, suppose that A! = 10. Then asymptotically we have Uk 10*70^0; i.e., the magnitude of Uk increases by a factor of ten for each iteration. Such a process cannot continue long without overflowing the machine on which it is run. Similarly, if AI = 0.1, the vectors Uk will quickly underflow. The cure for this problem is to note that only the direction of the vector Uk matters: its size has no relevance to its quality as an approximate eigenvector. We can therefore scale iik to form a new vector Uk that is within the bounds of the machine. Usually, Uk is scaled so that \\Uk\\ = 1 in some relevant norm. This can be done in the course of the iteration as the following program shows.

1.
2. 3.

k=Q
while (not converged) Mfc+i = Auk

4. 56.
7.

k = k+l (T = 1/KH Ui auk


end while

Since floating-point divides are expensive compared to multiplies, we do not divide Uk by \\uk\\. Instead we multiply it by l/||tifc||. In most cases the savings will be small compared to the work in forming Auk- In the sequel we will dispense with such minor economies and write, e.g., Uk = Uk/'\\Uk\\> Vol II: Eigensystems

60
Choice of a starting vector

CHAPTER 2. THE QR ALGORITHM

The ratio ||c2||/|7i| from the expansion UQ = jiXi + X^c? is a measure of how far the starting vector UQ is from the dominant eigenvector x\. It it not surprising that a small value of 71, which makes the ratio large, can retard convergence. In fact this ratio appears explicitly in the convergence bound (1.5). It is therefore important that the starting vector UQ should have a substantial value of 71. In some cases one will have at hand an approximation to the eigenvector x\. For example, if we are trying to find the dominant eigenvectors of a sequence of nearby matrices A\, A 2 ,.. -, then the dominant eigenvector of Ak will furnish a good starting approximation to the dominant eigenvector of Ak+i. Such approximations are natural starting values for the power method. When no approximation to x i is available, it is customary to take UQ to be a random vectorusually a vector of random normal deviates. The reasoning is as follows. If we write (x i X2) = (y\ YI) , then it can be shown that
-I TT

Since 7j = y^UQ and c^ - Y^UQ, if UQ is random, we may expect the ratio ||c2/7i ||2 to vary about the quantity

Lacking special knowledge about x\, this is about as good as we can expect. As a rule, one should avoid starting vectors consisting of small integers in a pattern e.g., a vector whose elements alternate between plus and minus one. The problem is that a highly structured problem may have such a patterned eigenvector. If that eigenvector is not the dominant eigenvector, then 71 will be zero. On the other hand, the structure of the problem may actually dictate such a choice. For example, the vector e consisting of all ones is often a good choice for a matrix whose elements are positive. Convergence criteria and the residual The chief problem with determining the convergence of a sequence of vectors u^ is that the limitin our case x\ is unknown. Thus we cannot simply quit when the norm of error ek = Uk x\ is sufficiently small. If the sequence converges swiftly enough, a natural criterion is to stop when \\Uk Uk-i\\ is sufficiently small. For example, if ||eJ| < alle^-ill, where 0 < a < l,then

or

SEC. 1. THE POWER AND INVERSE POWER METHODS

61

When a is, say, 0.5, \\ek\\ can be no larger than twice ||Uk Uk_i ||. But if a is near one the error can be large when \\Uk Uk-i \\ is small. Only if we have an estimate of a which is tricky to obtain on the fly can we relate the distance between successive approximations to the error. An alternative is to compute the residual

where ^ is a suitable approximation to AI, and stop when r/t is sufficiently small. Although the residual does not give us a direct estimate of the error, it gives us something almost as good, as the following theorem shows (for generality we drop the iteration subscripts). Theorem 1.3. Let

Then there is a matrix

such that

and

If A is Hermitian and

then there is a Hermitian matrix

satisfying (1.12). Moreover,

Vol II: Eigensystems

62

CHAPTER 2. THE QR ALGORITHM

Proof. The proof in the non-Hermitian case is a matter of direct verification of the equalities (1.11) and (1.12). For the Hermitian case we use the fact that the choice (1.13) of IJL makes r orthogonal to u, from which (1.12) follows immediately. For the norm of E, note that

From this it follows that r and u are orthogonal eigenvectors of EEE with eigenvalues IHH/IHII- Since the remaining eigenvalues are zero, the equalities (1.14) follow from the fact that \\E\\\ is the largest eigenvalue of E^E and ||.E||p is the sum of the eigenvalues of ERE. The theorem says that if the residual is small, then the pair (//, u) is an exact eigenpair of a nearby matrix A + E. It suggests that we stop iterating when the residual is sufficiently small. The justification for this criterion is the following. In most problems we will not be given a pristine matrix A; instead A will be contaminated with errors. For example, A may be computed, in which case A will be contaminated with rounding errorerrors of order of the rounding unit. Again, A may be measured, in which case A will have errors that are, in general, much larger than the rounding unit. Now if the residual norm is smaller than the error level, then any errors in the approximate eigenvector can be accounted for by a perturbation of A that is smaller than the errors already in A. In other words, if your results are inaccurate, the inaccuracy is no greater than that induced by the error already present. This is not the whole story. In many applications the matrix A will be sparse. Now the zeros in a sparse matrix usually arise from the underlying problem and are not subject to perturbation. But the matrix E in (1.10) will not generally share the sparsity pattern of Ain fact it is likely to be dense. Thus Theorem 1.3 gives a backward perturbation E that is unsuitable for sparse matrices. Fortunately, there is more than one E that will make (/^, u) an exact eigenpair of A. For example, we may take

so that E alters only the diagonal elements of A. For general results on such structured backward perturbations see the notes and references. Optimal residuals and the Rayleigh quotient In computing the residual r = A ufj,u to determine convergence of the power method, we naturally take the vector u to be the fcth iterate Uk- However, we have not specified how to choose //. A natural choice is the value of \i that minimizes the residual in some norm. As is often the case, the problem is most easily solved when the norm in question is the 2-norm.

SEC. l. THE POWER AND INVERSE POWER METHODS

63

Theorem 1.4. Letu ^ 0 and for any yu setr M = Au ^LU. Then ||rM||2 is minimized when

In this case r^ J_ u. Proof. Without loss of generality we may assume that 11 u \ \2 = 1. Let (u U) be unitary and set

Then

Since || ||2 is unitarily invariant, This quantity is clearly minimized when fj, v WH Au. The orthogonality of r and fj, is established by direct verification. A brief comment, then on to the main point. The proof characterizes the norm of the optimal residual as the norm of g in the partition (1.16). This characterization of the optimal residual norm will prove useful in the sequel. The quantity WH Au/u^u is an example of a Rayleigh quotient. We have already seen another Rayleigh quotient in (3.21), Chapter 1. There it had the form yH(A + E)x where x and y (normalized so that yHx = 1) were left and right eigenvectors corresponding to a simple eigenvalue Xof A. This Rayleigh quotient provides a highly accurate approximation to the corresponding eigenvalue of A + E. Generalizing from these two Rayleigh quotients, we make the following definition. Definition 1.5. Let u and v be vectors with v^u ^ 0. Then the quantity

is called a RAYLEIGH QUOTIENT. If either u or v is an eigenvector corresponding to an eigenvalue A of A, then the Rayleigh quotient reproduces that eigenvalue. By continuity when u or v is near an eigenvector, the Rayleigh quotient will approximate the corresponding eigenvalue. Thus in the power method, the Rayleigh quotients u^Auk/u^Uk provide a sequence of increasingly accurate approximations to A. We will return to Rayleigh quotients in 2.2, Chapter 4, where we will treat the approximation of eigenspaces and their eigenblocks. Vol II: Eigensystems

64

CHAPTER 2. THE QR ALGORITHM

Given matrix A, a shift AC, a convergence criterion e, and a nonzero starting vector x, this algorithm iterates the shifted power method to convergence, returning the approximate eigenpair (/z, x}. 1. Anorm = \\A\\p 2. x = x/\\x\\2 3. while (true) 4. y Ax 5. /j, = x^y 6. r = y /j,x 7. x = y KX 8. ar = ar/||ar||2 9. if (11 r 112 /Anorm < e) leave while fi 10. end while Algorithm 1.1: The shifted power method o Shifts and spectral enhancement If A is nondefective and the eigenvalues of A satisfy

then the power method almost always converges to the dominant eigenvector x\ with rate |A 2 /Ai|. If this ratio is near one, the convergence will be slow. Sometimes we can improve the rate of convergence by working with the matrix A AC/, whose eigenvalues \\ AC, ..., \n K are shifted by the constant K. For example, if the eigenvalues of A are 1,0, and 0.99, then the powermethod converges with ratio 0.99. If we shift A by AC = 0.5, the eigenvalues become 1.5, .5, and -0.49, and the convergence ratio becomes | a dramatic improve This shifting of the matrix to improve the disposition of its eigenvalues is an example of spectral enhancement. Shifting has the advantage that it is cheap: we can calculate (A - K!)U in the form Au KU at little additional cost. But it can only improve performance by so much. In the above example, 1/3 is nearly the best convergence ratio we can obtain by shifting. In the next subsubsection we will consider a very powerful spectral enhancementthe shift and invert operation. However, we pay for this power in the coin of increased computational costs. Implementation Algorithm 1.1 implements the shifted power method. There are three things to say about this straightforward program. Both the residual and the next iterate are computed from the intermediate vector

SEC. 1. THE POWER AND INVERSE POWER METHODS

65

y = Ax to avoid an extra multiplication by A. Similarly, the norm of A is computed outside the loop. This parsimonious style of coding may seem natural, but it is easy to forget when one is writing in a high-level language like MATLAB. On termination the algorithm returns an approximate eigenvector (//, x). However, our convergence test is based on the pair (/x, x), where x is the previous iterate. From Theorem 1.3 we know that (//, x) is an exact eigenpair of A + E, where the relative error ||||p/|| A||p is less than or equal to the convergence criterion e. Strictly speaking, we cannot say the same thing about (//, x). Nonetheless, we return the vector x because it is almost certainly more accurate. In a working implementation one would specify a maximum number of iterations, and the code would give an error return when that number was exceeded. The effects of rounding error We must now consider the effects of rounding error on the power method. We will suppose that the computations are performed in standard floating-point arithmetic with rounding eM. For definiteness we will assume that ||ujb||2 = 1 and ||A||p = 1 in the following discussion. The major source of error in the method is the computation of the product AukAn elementary rounding-error analysis shows that for a dense matrix

where

Equation (1.17) and the bound (1.18) imply that at each stage the power method is trying to compute the dominant eigenvector of a slightly perturbed matrix. This perturbations induces an error in the eigenvector x\, and we cannot expect the power method to compute xi to an accuracy greater than that error. In particular, by Theorem 3.13, Chapter 1, we can expect no greater accuracy in the angle between the computed vector and xi than roughly neM||.A||p/sep(Ai, M). This is only n times as large as the error we could expect from simply rounding the matrix [see (2.2), Chapter 1]. The limiting accuracy of the power method is therefore quite satisfactory. But can the limit be attained? The answer is not easy surprisingly, in view of the simplicity of the convergence proof for the power method. However, we can say that rounding error not only changes the vector Ax to (A + E)x, but it also changes the residuals corresponding to these vectors. Moreover, the change is very small, of the order of the rounding unit. Thus, if the residual corresponding to Ax is reduced far enough (and that need not be very far), then the computed residual corresponding to(A + E)x will also be reduced. Thus we can expect to see a steady decrease in the residual until the limiting accuracy is attained. VolII: Eigensystems

66
Assessment of the power method

CHAPTER 2. THE QR ALGORITHM

The advantages of the power method are that it requires only matrix-vector multiplications and that it is essentially globally convergent, provided the matrix has a single, simple dominant eigenvalue. It has the disadvantages that it only computes the dominant eigenvector, and the convergence can be very slow if the dominant eigenvalue is near in magnitude to the subdominant one. Moreover, if a real matrix has a complex dominant eigenvalue, then its conjugate is also an eigenvalue with the same absolute value, and the power method cannot converge. For these reasons, the power method in its natural form is little used these days. However, it plays an implicit role in the QR algorithm, and a variantthe inverse power methodis widely used. We now turn to that variant.
1.2. THE INVERSE POWER METHOD

The difficulties with the power method can be overcome provided we can find a spectral enhancement that makes an eigenvalue of interest the dominant eigenvalue of the matrix. The traditional enhancement for doing this is called the shift-and-invert enhancement, and its combination with the power method is called the inverse power method. We begin with the enhancement. Shift-and-invert enhancement Let A have eigenvalues AI ,... , A n in no particular order, and suppose that Aj is simple. If we have an approximation K to AI, then the eigenvalues of the matrix (A At/)"1 are

Now as K, * AI, /^i > oo. On the other hand, for i > 1 the m approach (A; A) , which are finite quantities. Thus by choosing K sufficiently near A! we can transform AI into a dominant eigenvalue, and that dominance can be made as large as we like. This spectral enhancement is called the shift-and-invert enhancement. The inverse power method The inverse power method is simply the power method applied to the enhanced matrix (.4 - K!)~I. Specifically, given a vector x and a shift K we generate a new iterate in the form

In principle, we could use Algorithm 1.1 to carry out the inverse power method. However, owing to the nature of the shift-and-invert enhancement, we can compute a residual almost for free.

SEC. 1. THE POWER AND INVERSE POWER METHODS

67

Given a matrix A, a shift K, a convergence criterion e, and a nonzero starting vector x, this algorithm iterates the inverse power method to convergence, returning an approximate eigenpair (//, or). 1. 2. 4. 5. while (true) Solve the system (A-Kl)y = x w = x/\\y\\2 p x^w

3-

% = y/\\y\\2
p. = K + p

6.
7. 8. 9. 10.

r = w px x=x if (||r||2/||A||F < c) leave while fi end while


Algorithm 1.2: The inverse power method o

Specifically, let

Since (A Kl)y = x, we have

If we set

then the optimal residual for x is (see Theorem 1.4)

Note that as x converges to an eigenvector, the Rayleigh quotient fi = K + p = xHAx converges to the corresponding eigenvalue of A. Algorithm 1.2 implements this scheme. It is evident that the major work in the algorithm consists in solving the system (A - K,I)y x in statement 2, and some care must be taken not to inadvertently increase this work. Most linear system solvers first compute a decomposition and then use the decomposition to solve the system. We will say that this process requires a factorization. With dense systems, the decomposition is usually an LU decomposition computed by Gaussian elimination with partial pivoting, which costs about ^n3 flam. The subsequent solution of the linear system, on the other hand, requires only ra2 flam. It is therefore important that the computation of the decomposition be placed outside the while Vol II: Eigensystems

68

CHAPTER 2. THE QR ALGORITHM

loop in Algorithm 1.2. In particular, one should avoid software that solves a linear system by invisibly computing a decomposition. When A is sparse, the operations counts for computing a decomposition or factorization may be less than O(n3). Nonetheless, they are usually an important, if not dominant, part of any calculation involving shift-and-invert enhancement. We will return to this point repeatedly in the second half of this volume, where the concern is with large eigenproblems. An example The convergence of the inverse power method can be stunningly fast when the shift is near the eigenvalue in question. For example, the matrix 3.022e+00 6.298e-01 -3.470e+00 2.209e+00 -1.079e-01 1.907e+00 3.399e+00 4.475e+00 -1.814e+00 7.095e-01 4.699e+00 -2.307e+00 -1.833e+00 -3.820e-02 4.158e-01 -1.513e+00 -6.487e-01 9.776e-01 1.877e-01 1.274e+00 8.906e-01 -5.765e+00 -2.184e+00 2.510e+00 2.606e+00 (shown only to four figures) has eigenvalues 1,2,3,4,5. In the following experiment, we took K = 1.01 and took x to be a normalized random vector. The errors in th Rayleigh quotients and the residual norms for several iterations of Algorithm 1.2 were 9.2e-03 7.7e-05 7.5e-07 7.6e-09 7.7e-ll 7.8e-13 8.4e-15 4.4e-04 3.2e-06 3.3e-08 3.4e-10 3.4e-12 3.4e-14 3.4e-16

It is seen that each iteration adds about two significant figures of accuracy to the eigenvalue until the eigenvalue is calculated to working accuracy (M = 10~16). On the other hand if we take K = 1 + 10~8, we get the following results. 9.2e-09 4.4e-10 1.3e-16 3.1e-18 The iteration converges to working accuracy in two iterations. If K approximates AI to working accuracy, the iteration converges in one iteration. This behavior is typical of the inverse power method applied to a well-conditioned eigenpair. The effects of rounding error The nearer the shift K is to an eigenvalue, the faster the inverse power method converges. But if K is near an eigenvalue, then A K! is nearly singular, and the system

SEC. 1. THE POWER AND INVERSE POWER METHODS

69

(A K,I)y x in statement 2 will be solved inaccurately. In fact if AC approximates A to working accuracy, the solution will be completely inaccurate. Yet the method still converges. Why? The answer to this question is furnished by the rounding-error analysis of the solution of linear systems (see 1:3.4). If a stable algorithm (e.g., Gaussian elimination with partial pivoting) is used to solve the system (A AC/)?/ x, then the computed solution will satisfy

where ||||F/||A||F is of the order of the rounding unit. If the eigenpair we are looking for is well conditioned, this perturbation in A - AC/ changes it only insignificantly. Thus the inverse power method moves toward an approximate eigenpair that is for practical purposes indistinguishable from the exact eigenpair.
To put the matter in another way, when AC is near an eigenvalue, the vector y is

indeed computed inaccurately, but most of the inaccuracy is in the direction of the eigenvector being approximated. Since we are only concerned with the direction of the eigenvector, this error in y does not introduce any significant errors in the approximate eigenvector. The Rayleigh quotient method We have seen that as we proceed with the inverse power method, it produces Rayleigh quotients \i that are generally more accurate than the shift AC. Since the rate of convergence depends on the accuracy of AC, we can improve convergence by replacing AC wit ju. This amounts to adding the statement AC = /z after statement 8 in Algorithm 1.2 The result is called the Rayleigh quotient iteration. It can be shown that once it starts converging to a simple eigenvalue, it converges at least quadratically. The main difficulty with the Rayleigh quotient method is that each time the shift changes, one must decompose the matrix A AC/ to solve the system (A AC/)?/ = x. Thus for full, dense matrices the Rayleigh quotient method takes O(n3) operations for each iteration, which accounts for the fact that the Rayleigh quotient iteration in its natural form is not much used. However, in a disguised form it reappears in the QR algorithm, which is the subject of the rest of this chapter.
1.3. NOTES AND REFERENCES The power method

As an explicit method for computing a dominant eigenpair, the power method goes back at least to 1913 [182]. Hotelling in his famous paper on variance components [120,1933] used it to compute his numerical results. Aitken [2,1937] gave an extensive analysis of the method. Many people who use the power method do so unknowingly. For example, a simulation of a discrete-time discrete-state Markov chain amounts to applying the power method to the matrix of transition probabilities. Vol II: Eigensystems

70

CHAPTER 2. THE QR ALGORITHM

For a time, before the advent of the QR algorithm, the power method was one of the standard methods for finding eigenvalues and eigenvectors on a digital computer. Wilkinson, working at the National Physical Laboratory in England, honed this tool to as fine an edge as its limitations allow. A particularly important problem was to deflate eigenvalues as they are found so that they do not get in the way of finding smaller eigenvalues. For more see The Algebraic Eigenvalue Problem [300, pp. 570-599] and [295]. Residuals and backward error The use of a residual to determine convergence is inevitable in most problems, since seldom will we have the wherewithal to determine the accuracy of the current approximation to an eigenvalue or eigenvector. Theorem 1.3, which says that a small residual implies a small backward error, provides a justification for tests based on the size of a suitably scaled residual. The first part is due to Wilkinsone.g., see [299, p. 141] The result for Hermitian matrices in a more general form is due to Powell [214], whose application was optimization. The justification of a convergence criterion by appeal to a backward error result is part of the paradigm of backward rounding-error analysis. For further discussion of this matter see any general textbook on numerical linear algebrae.g., [62, 95,262, 278, 299, 300]. The failure of the backward perturbation in Theorem 1.3 to respect the zero structure of a sparse matrix is a drawback only if the eigenpair in question is especially sensitive to perturbations in the zero elements. Even in this case one can apply a very general theorem of Oettli and Prager [185], which allows one to specify the relative sizes of the elements in the backward error. Whether this result can be generalized to Hermitian matrices is an open question. The Rayleigh quotient The Rayleigh quotient is due to Lord Rayleigh (J. W. Strutt), who defined it for symmetric matrices. Some of its many generalizations will appear throughout this volume. The fact that the Rayleigh quotient gives an optimal residual is due to Wilkinson [300, p. 172]. Shift of origin Wilkinson used shifting to good effect at the National Physical Laboratory. The shift was actually entered by machine operators in binary by switches at the console before each iteration [300, p. 577]. The inverse power and Rayleigh quotient methods The inverse power method is due to Wielandt [294, 1944]. Ipsen [124] gives a survey of the method and its properties, along with an extensive list of references. The

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

71

method is chiefly used to compute eigenvectors of matrices whose eigenvalues can be approximated by other means (e.g., see Algorithm 2.6, Chapter 3).
The fact that A AC/ is ill conditioned when AC is near an eigenvalue of A makesT

certain that the vector in the inverse power method will be inaccurately calculated. The analysis given here, which shows that the inaccuracies do no harm, is due to Wilkinson (e.g., see [300, pp. 619-622]). It is important to use the Rayleigh quotient to compute the optimal residual in Algorithm 1.2. An obvious reason is that if we use the constant shift AC, the residual can never converge to zero. A more subtle reason is the behavior of the residual when the matrix is strongly nonnormalthat is, when the off-diagonal part of its Schur form dominates the diagonal part [111]. In that case, the first residual will generally be extremely small and then will increase in size before decreasing again. The use of the Rayleigh quotient to compute the optimal residual mitigates this problem. For more see [96] and [124]. The Rayleigh quotient iteration has been analyzed extensively in a series of papers by Ostrowski [188,189,190,191,192]. For additional results on the symmetric case, see [206, 4.6-4.9].

2. THE EXPLICITLY SHIFTED QR ALGORITHM


The QR algorithm is an iterative method for reducing a matrix A to triangular form by unitary similarity transformations. Its shifted form can be written simplyand crypticallyas follows. Let AQ = A. 1. for A: = 0,1,2,... 2. Choose a shift AC^ 3. Factor AkKkl QkRk, where Q is orthogonal and R is upper triangular 4. Ak+i = RkQk+KkI 5. end for k In other words, to get from one iterate to the next i.e., to perform one QR step subtract the shift from the diagonal, compute a QR factorization, multiply the factors in reverse order, and add back the shift to the diagonal. The method is called the explicitly shifted QR algorithm because the shift is explicitly subtracted from the diagonal of A and added back at the end of the process. The matrices produced by the algorithm (2.1) satisfy

Thus Ak+i is unitarily similar to Ak- However, this fact alone is not sufficient reason for performing this sequence of operations. Why, then, is the algorithm worth considering? Vol II: Eigensy stems

72

CHAPTER 2. THE QR ALGORITHM

The answer is that the algorithm is an elegant way of implementing the inverse power method with shift K^. At the same time it is a variant of the power method. These relationships go far toward explaining the remarkable effectiveness of the algorithm, and the next two subsections are devoted to laying them out in detail. The remaining subsections are devoted to the practical implementation of the algorithm.

2.1. THE QR ALGORITHM AND THE INVERSE POWER METHOD


In this subsection we will show how the QR algorithm is related to the inverse power method. This relation allows us to investigate the convergence of the algorithm. For brevity we will drop the iteration subscripts and denote the current matrix by A and the next QR iterate by A. Schur from the bottom up In establishing the existence of Schur decompositions (Theorem 1.12, Chapter 1) we showed that if we have knowledge of an eigenvector we could deflate the corresponding eigenvalue of the matrix by a unitary similarity transformation. A step of the QR algorithm can be regarded as an approximation to such a deflation, with the difference that the deflation occurs at the bottom of the matrix. Specifically, let Q (Q* q) be unitary and write

If (A, q) is a left eigenpair of A, then

It follows that

Thus we have deflated the problem. If we repeat the procedure inductively on B, we obtain an alternate proof of Schur's theoremone in which the reduction is accomplished from the bottom up by left eigenvectors. The QR choice The above reduction is not an effective computational procedure because it requires that one be given eigenvectors of A, B, etc. If, however, we choose q to be an approximate eigenvector of A, then g in (2.2) will be small because ||#||2 is the norm of the optimal residual qu A - ftq11 (see Theorem 1.4). The QR algorithm implicitly chooses g to be a vector produced by the inverse power method with shift K.

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

73

To see this, let us rewrite the QR factorization of the shifted matrix A AC/ in the form

where because of the triangularity of R we have

The last row of (2.4) is qH(A - AC/) = rnnej. Hence

Equation (2.5) shows that the last column of the matrix Q generated by the QR algorithm is the result of the inverse power method with shift K applied to the vector ej. If AC is close to an eigenvalue of A, then we can expect q to be a good approximation to a left eigenvector of A and hence #H in (2.2) to be small. The above analysis also suggests a choice of shift. Partition A in the form

Then (//, e n ) is an approximate left eigenpair whose residual norm is \\g\\2- Hence if g is small, \i should approximate an eigenvalue of A and is a natural choice for a shift. This shift is called the Rayleigh quotient shift because fj, is the Rayleigh quotient eT A e
n -^-"n

Error bounds To show that the QR algorithm converges to a deflated matrix, we must show that the vector g in (2.6) converges to zero. We begin by giving a bound that relates the norms of g and g in successive iterates. The key to the derivation is to work with a partitioned form of the relation of A AC/ = QR. Specifically, let us write

and also write the relation A AC/ = RQ in the form

From these partitions we proceed in stages. Since Q is unitary, the norms of its last row and last column must be one. Hence and

Vol II: Eigensystems

74

CHAPTER 2. THE QR ALGORITHM

Next we want to show that e is small when g is small. Computing the (2,1)-block of (2.7), we get #H eH S. If we assume that S is nonsingular and set

then

We now need a bound on p. If we use the fact that Q is unitary to rewrite (2.7) in the form

then we find that p = ftth + x((j, - K). Hence from (2.9) and (2.10) and the fact that

Finally, from (2.8) we find that #H = peH. Hence from (2.10) and (2.11) we get

This is our final bound. Rates of convergence Let us restore our iteration subscripts and write the bound (2.12) in the form

This bound can be used to show that if go is sufficiently small and //o is sufficiently near a simple eigenvalue A of A then the iteration with Rayleigh quotient shift converges in the sense that (/jt -> 0 and fik -> A. However, the proof is tedious and not particularly informative. We will therefore assume that the iteration converges and determine the rate of convergence. We will assume that we have constants T? and a such that

Since the A* are orthogonally similar, we can simply take rj = ||A2||2. The fact that ak can be bounded is a nontrivial corollary of the formal proof of convergences. We may now replace (2.13) by

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

75

(the second term vanishes because the Rayleigh quotient shift takes Kjt = Hk)- Thus when the QR algorithm converges to a simple eigenvalue, the norm of gk+i is bounded by a quantity proportional to the square of the norm of gk- We say that \\gk\\2 converges at least quadratically to zero. Quadratic convergence, once it sets in, is very fast. For example, if a2?/ = 1 and ||0o||2 = 10"1, then

Thus four iterations are sufficient to reduce the error by a factor corresponding to the IEEE double-precision rounding unit. If AQ is Hermitian, then so are the iterates Ak- In particular, we have hk = gk, so that we may replace 77 by \\gk\\2- Thus our bound becomes This type of convergence is called cubic, and it is blindingly fast. General comments on convergence Our convergence analysis seems to depend on the hypothesis that //^ is converging to a simple eigenvalue A. For example, if A is multiple, the matrices S^1 can be unbounded, so that our uniform upper bound a no longer exists. (It is a good exercise to see why this happens.) Nonetheless, if A is nondefective, the convergence of the QR algorithm remains quadratic, whatever its multiplicity. In addition, if A is Hermitian, A is necessarily nondefective, and the convergence remains cubic. If A is defective on the other hand, the convergence may be only linear. For more on these points see the notes and references. We have used the Rayleigh quotient shift in our analysis, which removes the term 0k\Hk - Kjb|||flr/b||2 in (2.13). However, any shift for which \pk - Kk\ = O(||0||fc) will give us quadratic convergence. In particular, this is true of the Wilkinson shift defined by Algorithm 2.7 below. The complete convergence analysis is local; that is, it assumes that fj,Q is sufficiently near a simple eigenvalue of A. There are no theorems for the global convergence of the QR algorithm applied to a general matrix. The typical behavior seems to be that the algorithm spends its first few iterations floundering and then homes in on an eigenvalue. Subsequent eigenvalues are found with fewer and fewer iterations. Why this happens is partly explained by the relation of the QR algorithm to the power method, which we turn to now.

2.2. THE UNSHIFTED QR ALGORITHM


The relation of the QR algorithm to the inverse power method explains its ability to converge swiftly to a particular eigenvalue. In practice, however, the algorithm also Vol II: Eigensystems

76

CHAPTER 2. THE QR ALGORITHM

produces approximations to the other eigenvalues, albeit more slowly. The reason for this is that the QR algorithm is also related to the power method. The explication of this relation is the subject of this subsection. We begin with a far-reaching characterization of the ArthQR iterate. The QR decomposition of a matrix polynomial Each step of the QR algorithm consists of a unitary similarity transformation Ajt+i = Q^AQk- When the algorithm has finished its work, we will need a single transformation that moves us from the initial matrix A = AQ to the final matrix Ak+i - This can be accomplished by multiplying the transformations together as we go along, a process called accumulating the transformations. The result is a matrix

satisfying

The matrix Qk has another useful characterization Theorem 2.1. Let Q0,... ,Qk and RQj... , Rk be the orthogonal and triangular matrices generated by the QR algorithm with shifts KQ, ... , Kk starting with the matrix A. Let

Then

Proof. We have

Postmultiplying this relation by Rk-i, we get

Hence

An obvious induction on the product

completes the proof.

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM Theorem 2.1 can be interpreted as follows. Let

77

be a polynomial of degree k whose zeros are i,..., Kk- We can then define p( A) by either of the formulas

(It is a good exercise to verify that these forms are equivalent.) These formulas give us two ways of evaluating the QR factorization of p( A). If we use the first formula, we simply formp(A) and calculate the QR decomposition of the result, say by Householder triangularization. However, if we know the zeros AC; of p(r), then we can simply apply the shifted QR algorithm with shifts KI ,..., Kk, accumulating the transformations Q j and the product of the triangular matrices Rj. The result is the QR factorization QkRk ofp(A). The QR algorithm and the power method Theorem 2.1 has more than one application. For the present, we are interested in what it says about the relation of the QR algorithm to the power method. Let us say that a sequence of QR steps is unshified if the shifts Kk are zero. Then by (2.15), the matrices Qk and Rk from the unshifted QR algorithm satisfy

Multiplying this relation by ei and recalling that Rk is upper triangular, we have

Thus the first column of Qk is the normalized result of applying k iterations of the power method to ei. Now if the conditions for convergence of the power method are met, the vectors q[ ' approach the dominant eigenvector of A. It follows that if we partition

then gk 0 and /^ > AI, where AI is the dominant eigenvalue of A. Convergence of the unshifted QR algorithm The relation of the QR algorithm to the power method is a special case of a more general theoremunder appropriate conditions the unshifted QR algorithm actually triangularizes A. Vol II: Eigensystems

78
Theorem 2.2. Let

CHAPTER 2. THE QR ALGORITHM

where

Suppose that X l has anLU decomposition X l = LU, where L is unit lower triangular, and letX = QR be the QR decomposition o f X . If Ak has the QR decomposition Ah = Qk&k, then there are diagonal matrices Dk with \Dk\ = I such that QkDk -> Q. Proof. We have

Now for i > j the (z,.;)-element of A fc A k is lij(\i/Xj)h, which by (2.16) approaches zero i.e., A.kLA~k approaches the identity matrix. Write A*IA-fc = I + Ek, where Ek -> 0. Then

Let QkRkbe the QR decomposition of / + REkR

- Then

Since / -f REkR 1 > /, by the continuity of the QR factorization Qk > /. Let the diagonals of RRAkU be 61,... , 6nt and set

Then the triangular factor in the decomposition

has positive diagonal elements. It follows by the uniqueness of the QR decomposition that Qk = QQkD~\and

Four comments on this theorem. We know [see (1.9), Chapter 1 ] that the columns of the Q-factor of X are the Schur vectors of A corresponding to the eigenvalues in the order (2.16). Consequently, with

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

79

its columns suitably scaled the matrix Q k converges to the orthogonal part of the Schur decomposition of A. It follows that the QR iterates Ak = Q^AQk must converge to the triangular factor of the Schur decomposition of A. Thus under the conditions of Theorem 2.2 the unshifted QR algorithm produces a sequence of matrices tending to a triangular matrix, which is what we set out to show. We have assumed that the matrix X of right eigenvectors has a QR decomposition and that the matrix X~l of left eigenvectors has an LU decomposition. The former decomposition always exists, but the latter need not. For example, if A diag(0.5,1.0), then

so that the matrix X that orders the eigenvalues in descending order, and

has no LU decomposition. It is easily verified that the unshifted QR algorithm converges actually it is stationary in this example to a matrix whose eigenvalues are not in descending order. This phenomenon is called disorder in the eigenvalues. It should be kept in mind that disorder is a creature of exact computations. Rounding error will generally cause the eigenvalues to be found in descending order. But the QR algorithm can be very slow in extricating itself from disorder. We can get further information about the behavior of the unshifted algorithm by partitioning the matrices involved in the proof of Theorem 2.2. Specifically, write

If 4fc)H> J+i,i, and ^ - are zero, the product R(AkLA~k)(AkU)

has the form

This product is block upper triangular, and hence its Q-factor has the form

Vol II: Eigensystems

80

CHAPTER 2. THE QR ALGORITHM

NowA f c = Q^AQk = Q%QHAQQk = Q^TQk, where T is the upper triangular factor of the Schur decomposition of A. It follows that

i.e., Ak decouples at its ith diagonal element. The block triangularization in (2.18) occurs only whenilL' , L\^ l, and i\^ i in r (2.17) are exactly zero. Now in the unshifted algorithm these matrices tend to zero, and by continuity Ak will tend toward a matrix of the form (2.18) at the same rate as these matrices approach zero. By inspection, we see that the most slowly converging elements are l\ ^ and i\^ t-, which converge to zero as \\i/\i_i\k and \Xi+i/\i\k respectively. It follows that: Under the hypotheses of Theorem 2.2, the (i, i)-element of Ak converges to A; while the other elements of the submatrix Ak[i:n, l:i] converge to zero. The rate of convergence is at least as fast as the approach of max{ | A;/ A;_i |, | \i+i/ \i \}k to zero. Theorem 2.2 explicitly assumes that the eigenvalues of A are distinct and have distinct absolute values. However, by considering a suitable partitioning of the matrices in question, the proof of the theorem can be adapted to show that if there are groups of eigenvalues of equal magnitude, the QR iterates Ak tend to a block triangular form, whose diagonal blockswhich themselves may not converge contain the equimodular eigenvalues. The foregoing does not make an impressive case for the unshifted QR algorithm. Its convergence is unreliable; and even when the conditions of Theorem 2.2 are satisfied, the convergence can be slow. Nonetheless, the results on the unshifted algorithm give us insight into how the shifted algorithm behaves. Specifically, suppose that the shifted algorithm is converging to an eigenvalue A, so that the last row is going swiftly to zero. As the shifts & converge, we are in effect applying the unshifted algorithm to the matrix A K&/. Hence we may expect some reduction in the subdiagonal elements of A other than those in the last row. This reduction may not be much, but for a large matrix, on which we must perform many iterations, its cumulative effect may be significant. This, in fact, is what happens in practice.

2.3. HESSENBERG FORM


We now turn to the practical implementation of the QR algorithm. The first point to note is that one step of the algorithm requires the computation of a QR decomposition

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

81

of Ak- The computation of this decomposition requires 0(n3) floating-point operations. Since at least one QR step is needed to compute a single eigenvalue, the operation count to find all the eigenvalues is O(n4). (This is true even if we take advantage of the fact that as the matrix deflates, we work with ever smaller submatrices.) Such an operation count is far too high for the algorithm to be practical. The cure to this problem is to first reduce the matrix A to a form in which the algorithm is cheaper to apply. The natural form, it turns out, is upper Hessenberg form', that is, a matrix of the form illustrated below forn = 6:

(This representation, in which an 0 stands for a zero element and an X stands for an element that may be nonzero, is called a Wilkinson diagram.} As we shall see later, a QR step preserves Hessenberg form. Moreover, a QR step for a Hessenberg matrix requires only 0(n 2 ) operations. This brings the total operation count down to an acceptable 0(n3). Householder transformations The reduction to Hessenberg form is traditionally effected by a class of transformations called Householder transformations. Real Householder transformations have been widely treated in the literature and in textbooks (in particular, in 1:4.1 in this series). Here we will give a brief treatment of the basics, emphasizing the complex case. A Householder transformation or elementary reflector is a matrix of the form

where

It is easy to see that a Householder transformation is Hermitian and unitary. The product of a Householder transformation and a matrix A can be cheaply computed. Specifically,

This equation suggests the following algorithm, which overwrites A with HA.

Vol II: Eigensystems

82

CHAPTER 2. THE QR ALGORITHM

If A is rax n, this algorithm requires about 2mn flam. A similar algorithm will compute the product AH. Householder transformations are useful because they can introduce zeros into a matrix. We begin with the special case of a vector. Theorem 23. Let a be a vector such that \\a\\2 = 1 and a\ is real and nonnegative. Let

Then

The proof of this theorem is purely computational and is left as an exercise. The condition that the vector a have norm one and that its first component be nonnegative is rather restrictive. However, to reduce a general vector a to a multiple of ei we can replace a by

where p is a scalar of absolute value one that makes the first component of a nonnegative. This observation leads to Algorithm 2.1, which generates a Householder transformation that reduces a vector a to a multiple of ei. Five comments. If a = 0, the routine returns u = \/2, which makes H the identity with its (1,1)element changed to 1. There is no danger of cancellation in statement 11 because the preceding statement forces u[l] to be nonnegative. If a is a row vector, the algorithm returns a row vector u such that a(I - UHU) i/ef. Since we generally represent row vectors as aH, W H , and so on, we will always invoke housegen in the form

In this case our Householder transformation is J - uu , as usual. If a is of order n and we replace the index 1 in housegen with n, we obtain a new function

that produces a Householder transformation H = I - WWH such that

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

83

This algorithm takes a vector a and produces a vector u that generates a Householder transformation H = I WWH such that Ha = I/GI. 1. 2.
3.

housegen(a, w, t>) w=a


^=N|2

4. if (v = 0) tt[l] = \/2; return ; fi 5. if([l]/0) 6. p = [l]/|ti[l]| 7. else 8. p= 1 9. end if 10. u (p/v)*u 11. [!] = ! + [!] 12. - u/v/ttpl 13. i/ = pv 14. end housemen Algorithm 2.1: Generation of Householder transformations o For an example of housegen2 applied to a row vector, see Algorithm 1.3, Chapter 5. Whenaisreal, soisw. However, in this case such constructions as p = [l]/|u[l]| are unnecessarily elaborate, and the generation of Householder transformations for real vectors is usually done somewhat differently (see Algorithm 1:4.1.1). Nonetheless, in this volume we will regard housegen as a generic program, applicable to both real and complex vectors. Reduction to Hessenberg form We have already mentioned that the principal use of Householder transformations is to introduce zeros into a matrix. We will illustrate the technique with the reduction by unitary similarities of a matrix to Hessenberg form. Let A be of order n and partition A in the form

Let HI be a Householder transformation such that

Vol II: Eigensystems

84

CHAPTER 2. THE QR ALGORITHM

Figure 2.1: Reduction to upper Hessenberg form o If we set HI = diag(l, H I ) , then

Thus we have annihilated all the elements in the first column below the first subdiagonal. For the general step, suppose that we have generated Householder transformations HI , . . . , Hk-i such that

where AH is a Hessenberg matrix of order k 1. Let Hk be a Householder transformation such that

If we set Hk = diag(/A;, JYjt), then

which reduces the elements below the subdiagonal of the fcth column to zero. Figure 2.1 illustrates the course of the reduction on a matrix of order five. The elements with hats are the ones used to generate the Householder transformation that

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

85

This algorithm reduces a matrix A of order n to Hessenberg form by Householder transformations. The reduced matrix is returned in the matrix H, and the transformations are accumulated in the matrix Q. 1.
2. 3.

hessreduce( A,H,Q) Reduce A H =A for k = I to ra-2 Generate the transformation housegen(H[k+l:n, Ar], u, H[k+l, k]) Q[k+l:n,k] = u Premultiply the transformation VE = uH*H[k+l:n,k+l:n] H[k+l:n, k+l:n] = H[k+l:n, k+l:n] - U*VH ^[^+2:71,^ = 0 Postmultiply the transformation v = H[l:n,k+l:n]*u H[l:n, k+l:n] = H[l:n, k+l:n] - V*UH end k Accumulate the transformations
Q[:,n] = e n ;Q[:,n-l]=.e n _i

4. 5. 6. 1. 8. 9. 10. 11.
12.

13. forfc = n - 2 t o l b y - l 14. u = Q[k+l:n,k] 15. VH = H*Q[fc+l:n, k+l:n] 16. Q[k+l:n, k+l:n] - Q[k+l:n,k+l:n] - W*VH 17. Q[:,k] = ek 18. end for fc 19. end hessreduce Algorithm 2.2: Reduction to upper Hessenberg form o

VolII: Eigensystems

86

CHAPTER 2. THE QR ALGORITHM

produces the next matrix. Note that after three (i.e., n2) transformations, the reduction is complete. Algorithm 2.2 implements the reduction to upper Hessenberg form. There are several comments to make about it. The matrix Q is the product H\H2 -Jfn-2- The natural way to accumulate the transformations is to set Q = /, and then accumulate the transformations in the order

((((g#i)#2)#3)--0#n-2.
This has the advantage that the reduction and the accumulation can be done in a single loop. However, since HI is almost full, we will have to apply the subsequent Hf. to the array Q[l:n, fc+1, n]. An alternative is to save the vectors generating the Householder transformations and accumulate them after the reduction in the order
#l(---(#n-4(#n-3(#n-2g)))--')-

It is easy to see that this order fills up Q from the southeast to the northwest, so that the application of Hj, only affects Q[k+l:n, k+l:n]. In this implementation we have saved the generating vectors in Q itself and initialize Q to the identity column by column as the loop regresses. An operation count for the algorithm can be obtained as follows. The generation of the transformations is negligible. At the Arth stage the premultiplication requires about (n-fc) 2 floating-point additions and multiplications (flams) to compute v and a like number to update H. Thus the count for the premultiplication is about

The postmultiplication at the k stage requires about 2n(nk) flam, which gives a total of n3 flam. The operation count for the accumulation of Q is the same as for the premultiplication. Hence:
The* /^r\frotif^n fnimf fr\r A Irmnthm 1 O ic

flam for the redcatiof of a

flam for the accumulatiof oif Q

As mentioned above, the term flam is an abbreviation for "floating-point addition and multiplication." When A is real, the flam actually represents a floating-point addition and multiplication on the machine in question. When A is complex, however, additions and multiplications are composite operations. Specifically, a complex addition requires two ordinary floating-point additions, and a complex multiplication requires two additions and four multiplications. Thus in complex arithmetic the flam is

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

87

equivalent to four ordinary flams, and the operation counts above must be adjusted by a factor of four. In the sequel we will report operation counts in terms of the arithmetic operationsreal or complexin the algorithm and leave the conversion to machine operations to the reader. The algorithm generates H in situ. If we replace H by A, then the algorithm overwrites A with its Hessenberg form. Most packages choose this option to save storage. An extremely important observation is the following.
the first column of the orthogonal kmatrix ! generated by Algo
rithm 2.2 is e1.

This fact can be verified directly from the algorithm. We will use it later in deriving the implicit shift version of the QR algorithm. The algorithm is backward stable. Specifically, let Hk be the exact Householder transformation generated from the computed Ak and let Q = HI - #n-2 Then there is a matrix E satisfvine

such that the computed Hessenberg matrix H satisfies

Here 7n is a slowly growing function of n. In other words, the computed Hessenberg form is the exact Hessenberg form of A + E, where ||E\\ is of the order of the rounding unit compared to \\A\\. For the implications of this result see the discussion following Theorem 1.3. The stability result just cited is typical of many algorithms that proceed by a sequence of orthogonal transformations. For later reference, we make the following definition. Definition 2.4. Let the sequence AI, A^,..., Am be generated by the recursion

where Rk and Sk are unitary matrices generated from Ak. Here fl denotes floatingpoint computation with rounding unit eM and includes any errors made in generating and applying Rk and Sk- Set

P = Rm-i'"Ri and Q = Si~-Sm-i.


Then we say that the sequence (2.22) is STABLE IN THE USUAL SENSE if there is a matrix E and a slowly growing function 7m such that

Vol II: Eigensystems

88
and Am = P(Al+E)Q.
Plane rotations

CHAPTER 2. THE QR ALGORITHM

We have mentioned that a QR step leaves a Hessenberg matrix invariant. The proof is constructive and involves the use of 2x2 unitary transformations. We could easily use Householder transformations for this purpose, but it is more efficient to use another class of transformationthe plane rotations. A plane rotation (also called a Givens rotation) is a matrix of the form

where

The transformation is called a rotation because in the real case its action on a two vector x is to rotate x clockwise through the angle 9 = cos"1 c. Plane rotations can be used to introduce zeros into a 2-vector. Specifically, let a and 6 be given with a ^ 0. If we set v = ^/\a\2 + |6|2 and

then (note that c is real)

We can apply plane rotations to a matrix to introduce zeros into the matrix. Specifically, a plane rotation in the (t, j)-plane is a matrix of the form

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

89

In other words, a rotation in the (i, j)-plane is an identity matrix in which a plane rotation has been embedded in the submatrix corresponding to rows and columns i and jTo see the effect of a rotation in the (i, .;)-plane on a matrix, let X be a matrix and let

If X and Y are partitioned by rows, then

Thus premultiplication by a rotation in the (i,j)-plane combines rows i and j and leaves the others undisturbed. By an appropriate choice of c and s we can introduce a zero anywhere we want in the zth or jth row. Postmultiplication by P^ affects the columns in a similar way, and we can introduce a zero anywhere in the it\\ or jth column. Algorithm 2.3 generates a plane rotation satisfying (2.24). Four comments on this algorithm. If b is zero, then the routine returns the identity rotation. If a is zero, the routine returns the rotation that exchanges two components of a vector. The constant r defined in statement 9 is a scaling factor designed to avoid overflows in statement 10 while rendering underflows harmless. For the sake of exposition we have stayed close to the formulas (2.23). These formulas can be considerably economized (for example, we could replace r by | Re(a)| + | Im(a)| + | Re(a)| +1 Im(a)|, thus avoiding some multiplications and a square root in statement 9). They can also be simplified when a and 6 are real. The final values of the application of the rotation to a and 6 are returned in a and 6. Because our pseudocode can alter the arguments of routines this means that if a and 6 are elements of a matrix then those elements are reset to the values they would assume if the rotation were applied. A simpler and in many ways more natural definition of c and s is

which makes the final value of a equal to v. The definition we have chosen makes c real, which saves work when we apply the rotation to a matrix. Since the application of a rotation to a matrix alters only two rows of the matrix, a simple routine to combine two vectors will serve to implement the general application VolII: Eigensystems

90

CHAPTER 2. THE QR ALGORITHM

The following algorithm generates a plane rotation satisfying (2.24) from the quantities a and b. The cosine of the rotation is real. The program overwrites a with its final value and b with zero. 1. rotgen(a, 6, c, s) 2. if (6 = 0) 3. c = 1; s = 0; return 4. end if 5. If(a = 0) 6. c = 0; s = 1; a = 6; 6 = 0 return 7. end if 8. ^ = a/\a\ 9r = H+l&l 10. v = rHVIa/rp+lfc/rl 2 11. c=|a|/i/ 12. 5 = /j,*b/v 13. a = z/*// 14. 6= 0 15. end rot gen Algorithm 2.3: Generation of a plane rotation o

This algorithm takes a plane rotation P specified by c and s and two vectors x and y and overwrites them with

1. 2. 3. 4. 5.

rotapp(c,s,x,y] = c*x-f5*2/ y = c*ys*x ar = * end rotapp Algorithm 2.4: Application of a plane rotation o

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

91

of plane rotations. Algorithm 2.4 is such a routine. Here are some comments on the routine. The routine rotapp has many applications. Suppose that P is a rotation in the (i, j)plane defined by c and s. Then the following table gives the calling sequences for four distinct applications of P to a matrix X. PX :rotapp(c,s,X{i,'],X[j,']} pKX:wtapp(c,-s,X(i,^X(j,:}) XP : wtapp(c, -s, X[:, t], X [ : , j ] ) XPR:rotapp(c,s,X[:,i],X[:,j]) The routine rotapp uses a vector t to contain intermediate values. A practical implementation would do something (e.g., write out the operations in scalar form) to insure that a storage allocator is not invoked every time rotapp is invoked. Because the cosine is real, the cost of combining two components of x and y is 12 flmlt + 8 fladd. In the real case the count becomes 4 flmlt + 2 fladd. In some algorithms, we must multiply real rotations by complex vectors, in which case the count for each pair of elements is 8 flmlt -f 4 fladd. We will often refer to these counts collectively as a flrot, leaving context to decide the actual count. Transformations that can introduce a zero into a matrix also have the power to destroy zeros that are already there. In particular, plane rotations are frequently used to move a nonzero element around in a matrix by successively annihilating it in one position and letting it pop up elsewherea process called bulge chasing. In designing algorithms like this, it is useful to think of the transformations as a game played on a Wilkinson diagram. Here are the rules for one step of the game. Begin by selecting two rows of the matrix (or two columns): 1 2 3 4 5
X X 0 X X 0 X 0 0 X

Then after the transformation the situation is as follows. 1. 2. 3. 4. The element of your choice becomes zero (X in column 2). A pair of X's remains a pair of X's (column 1). A pair of O's remains a pair of O's (column 3). A mixed pair becomes a pair of X's (columns 4 and 5).

Thus our transformed pair of rows is 1 2 3 4 5 X 0 0 X X X X 0 X X In this example we have actually lost a zero element. Vol II: Eigensystems

92

CHAPTER 2. THE QR ALGORITHM

Figure 2.2: Reduction to triangular form in QR step

Invariance of Hessenberg form The reason for reducing a matrix to Hessenberg form before applying the QR algorithm is that the form is invariant under a QR step and the operation count for performing a QR step is 0(n2). To establish these facts, we will use plane rotations to implement the basic QR step. Since shifting the step consists only of altering the diagonal elements at the beginning and end of the step, we consider only the unshifted step. Let H be the upper Hessenberg matrix in question. The QR step is divided into two parts. In the first part, we determine rotations Pi2,..., Pn-i,n with Pk,k+i acting in the (fc, fc-|-l)-plane so that T = Pn-i,n ' Pi^H is upper triangular. This step is illustrated by the Wilkinson diagrams in Figure 2.2. Note that if <2H = -Pn-i,n -Pi2, then Q is the Q-factor of H i.e., the unitary Q of the QR algorithm. The second step is to form H - TQ = TP^ P*J_i, n so that H is the result of the single, unshifted QR step. Figure 2.3 illustrates this postmultiplication step. The point to observe is that the postmultiplication by P^-+1 introduces a nonzero in the (i+1, t)-element but leaves the other zero elements undisturbed. Thus the final matrix H is in Hessenberg form, and we have shown:
If a Qr step is performed on an upper GHessenberg matrix, the resul;t is upper Hessenberg.

Algorithm 2.5 implements these two steps. Two comments are in order. The application of plane rotations dominates the calculation. It is easy to see that the algorithm requires about n2 flrot. Whether the matrix is real or complex, this translates into O(n2) operations. Thus we have shown that a QR step preserves upper Hessenberg form and requires 0(n 2 ) operations. The pre- and postmultiplications can be interleaved. Specifically, after the secon

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

93

Figure 2.3: Back multiplication in QR step


/s

This algorithm applies one unshifted QR step to an upper Hessenberg matrix H. 1. 2. 3. 4. 5. 6. 7. for k = 1 ton1 rotgen(H[k, k], H[k+l, k], ck, $k) rotapp(ck, sk, H[k, k+l:n], H[k+l, k+l:n]) end for k fork = lton-l rotapp(ck, sk, H[l:k+l,k], H[l:k+ltk+l]) end for k Algorithm 2.5: Basic QR step for a Hessenberg matrix o

Vol II: Eigensystems

94

CHAPTER 2. THE QR ALGORITHM

rotation (P^ in Figure 2.2) has been premultiplied we can postmultiply by PJ^. The process continues with the generation and application of Pk,k+i being followed by the application of P^_1 ^. The method is stable in the usual sense (Definition 2.4).
2.4. THE EXPLICITLY SHIFTED ALGORITHM

Algorithm (2.5) exists primarily to show the invariance of upper Hessenberg form under a QR step. In this subsection we will work our way to a practical algorithm for reducing an upper Hessenberg matrix H to Schur form. Detecting negligible subdiagonals From the convergence theory in 2.1 we have reason to expect that when the shifted QR algorithm is applied to an upper Hessenberg matrix H the element /&n,n-i will tend rapidly to zero. At the same time, the results in 2.2 suggest that other subdiagonal elements may also tend to zero, albeit slowly. If any subdiagonal element can be regarded as negligible, then the problem deflates, and we can save computations. However, to claim this bonus, we must first decide what it means for a subdiagonal element to be negligible. A natural criterion is to choose a small number e and declare /it+i?l negligible provided

where A is the matrix we started with. To see why, let us examine the consequences of setting /&,+!,, to zero. To simplify the discussion, we will assume that the current value A of A has been computed without error, so that there is an orthogonal matrix Q such that QHAQ A. Now setting'/,-+!,,- to zero amounts to replacing A by A = A - /&,-+! ,,-ei+ieJ1. If we set

then

Moreover, if hi+i^ satisfies (2.26), then

In other words, setting /&*_!,, to zero amounts to making a normwise relative perturbation in A of size e. When e equals the rounding unit M, the perturbation E is of a size with the perturbation due to rounding the elements of A. If the elements of A are roughly the same

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

95

size, then this is as small a perturbation as we can reasonably expect. For more on this point see the discussion following Theorem 1.3. It is worth observing that we used the Frobenius norm in (2.26) only because its unitary invariance made the bound (2.27) easy to derive. In practice, one can replace \\A\\p by any reasonably balanced normsay the 1- or oo-norm. When the elements of A are not balancedsay when the matrix shows a systematic grading from larger to smaller elements as we pass from the northwest corner to the southeastthe backward error argument for the criterion (2.26) becomes less compelling. In such cases, the matrix frequently has small eigenvalues that are insensitive to small relative perturbations in its elements. In this case it is important that we set /i;_i>z to zero only if it is small compared to the nearby elements of the matrix, something the criterion (2.26) does not insure. The usual cure for this problem is to adopt the criterion

If by chance |/i;>t-| + |/i;+i)Z-+i| is zero, one can revert to (2.26). Deflation Once a subdiagonal element has been deemed insignificant, we can deflate the problem. In the shifted QR algorithm subdiagonal elements will usually deflate beginning with the (n, n1)-element and proceeding backward one element at a time. As the algorithm progresses, however, subdiagonal elements in other positions may also deflate. A typical situation is illustrated by the following Wilkinson diagram:

Here the seventh, eighth, and ninth subdiagonal elements have become negligible, revealing three eigenvalues at the eighth, ninth, and tenth diagonal elements. The third subdiagonal element has also become negligible, so that the remaining eigenvalues are contained in the leading principal submatrix of order three and in the principal submatrix of order four whose elements are labeled 6. If we decide to treat the latter first, then we need only perform QR steps between rows and columns four and seven. In applying the rotations, however, we must distinguish two cases. The first is when we only wish to find the eigenvalues of A. In that case we need only transform Vol II: Eigensystems

96

CHAPTER 2. THE QR ALGORITHM

This algorithm takes a Hessenberg matrix H of order n and an index i (1 < t < n) and determines indices il, i2 < t such that one of the following two conditions holds. 1. 1 < il < i2 < I, in which case the matrix deflates at rows il and 12. 2. 1 = il = i2, in which case all the subdiagonal elements of H in rows 1 through I are zero. 1. 2. backsearch(H', ^, z'7, *2) /7 = i2 = l

3. 4. 5. 6. 7.

while (*7>1) if (#[i7, i7-l] is negligible) #[i7,i7-l] = 0 if(il = i2) i2 = il = il-l

8. else 9. leave while 10. end if 11. else 12. il = il-l 13. end if 14. end while 15. end backsearch Algorithm 2.6: Finding deflation rows in an upper Hessenberg matrix o the elements labeled b in (2.29). On the other hand, if we wish to compute a Schur decomposition of A, we must apply the transformations to the entire matrix. In particular, the transformations must be premultiplied into the elements labeled 6 and c and postmultiplied into the elements labeled 6 and d. In this case the transformations must also be accumulated into the matrix Q from the initial reductions to Hessenberg form. For details see Algorithm 2.8. Back searching In (2.29) we can determine by inspection the rowscall them il and /2that define where the QR step is to be applied. In practice, we must determine them on the fly by applying whatever criterion we choose to decide if a subdiagonal element is zero. This is usually done by searching back along the subdiagonal from the current value of i2. Algorithm 2.6 implements such a loop. It either returns distinct indices il and i'2, in which case the QR step is to be taken between these indices; or the matrix is completely deflated, and the QR algorithm is finished. Negligible subdiagonal elements are set to

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM


zero as they are detected. The Wilkinson shift

97

Once we have found a range [il, 12] within which to perform a QR step, we must choose a shift. The natural candidate is the Rayleigh-quotient shift K = H[i2, i2], since it gives local quadratic convergence to simple eigenvalues. However, if H is real, the Rayleigh-quotient shift is also real and cannot approximate a complex eigenvalue. The cure is to use the Wilkinson shift, which is defined as the eigenvalue of the matrix

that is nearest H[i2, i2}. This shift can move the QR iteration into the complex plane. Moreover, as the method convergesthat is, as H [/2, i2 1] approaches zero, the shift approaches the Rayleigh-quotient shift so that we retain the quadratic convergence of the latter. The computation of the shift requires the solution of a 2x2 eigenvalue problem. The procedure is to compute the eigenvalues from the characteristic polynomial using the usual formula for the roots of a quadratic equation. However, some care must be taken to insure the stability of the resulting algorithm. To simplify our notation, we will consider the matrix

Thus we want the eigenvalue of B nearest to d. The problem simplifies if we work with the shifted matrix

The Wilkinson shift then becomes K = A + d, where A is the smallest eigenvalue of B-dl. The characteristic eauation of B dl is

The roots of this equation are

To avoid cancellation we should not compute the smallest root directly from this formula. Instead we should compute the largest root Amax first and then compute the smallest root A^n from the relation AminAmax = q. To determine the largest root, note that

Vol II: Eigensystems

98
Given the elements of the matrix

CHAPTER 2. THE QR ALGORITHM

B a

=( 5)
\c dj

wilkshifi returns the eigenvalue of B that is nearest d. 1. wilkshift(a, 6, c, d, K) 2. K=d 3. 5 = |o| + |6| + |c| + |d| 4. if (5 = 0) return fi 5. 9 = (b/s)*(c/s) 6. if(g^O) 7. p = 0.5*((a/s) - (d/s)) 8. r = -y/p2 + g 9. if (Re(p)* Re(r) + Im(* Im(r) < 0) r = -r fi 10. AC = AC - s*(<jf/(p+r)) 11. end if 12. end wilkshift Algorithm 2.7: Computation of the Wilkinson shift o Consequently we want to choose the sign so that the middle term in (2.30) is positive. Algorithm 2.7 implements the computation described above. To avoid overflow, the algorithm scales B so that its largest element is one in magnitude. This scaling factor can be replaced by the sum of the absolute values of the real and imaginary parts of the elements of B, which is cheaper to compute. Reduction to Schur form We can now assemble the algorithmic fragments developed previously into an algorithm for the unitary triangularization of an upper Hessenberg matrix. Algorithm 2.8 computes the Schur form of an upper Hessenberg matrix by the QR algorithm. Here are some comments on the algorithm. The routine hqr combined with hessreduce (Algorithm 2.2) gives an algorithm for computing the Schur form of a general matrix. The routine hqr is stable in the usual sense (Definition 2.4), provided an appropriate deflation strategy is used. The convergence theory developed in 2.1 says that once hqr starts converging to a simple eigenvalue, it will converge quadratically. Unfortunately, there is no theory

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

99

Given an upper Hessenberg matrix H, hqr overwrites it with a unitarily similar triangular matrix whose diagonals are the eigenvalues of H. The similarity transformation is accumulated in Q. The routine gives an error return if more than maxiter iterations are required to deflate the matrix at any eigenvalue. 1. hqr(H, Q, maxiter) 2. il = 1; i2 = n 3. iter - 0 4. while (true) 5. iter iter+1 6. if (iter > maxiter) error return; fi 7. oldi2 = 12 8. backsearch(H', /2, z7, z'2) 9. if (i2 = 1) leave fc^rfi 10. if(i2^0W/2)iter=Ofi 11. wi7jbfc//r(#[*2-l,/2-l], #[/2-l,z2], JI[i2,i2-l], JT[i2,i2],K) 12. #[z7,i7] = ^T[i7,i7]~K 13. fori = /7toi2-l 14. ro?gen( .H" [z,], 5" [t+1, i], cj, 5t-) 15. H[i+l, i+1] = H[i+l, i+1] - K 16. rotapp(ci, st-, ^T[z, i+l:n], 5"[i+l,i+l:n])

17.

end for i

18. 19. 20. 21.

for i = i/toi2-l rotapp(ci, st-, Jf [!:+!,], fT[l:t+l,+l]) rotapp(ci, s,-, Q[l:n, t], Q[l:n, i+1]) ^[i,i] = 5r[i,*] +

22.
23. 24. 25.

end for z
#[i2,i2] = ^[i2,/2] + end while end /i<7r Algorithm 2.8: Schur form of an upper Hessenberg matrix o

VolII: Eigensystems

100

CHAPTER 2. THE QR ALGORITHM

that says that the algorithm is globally convergent. Typically, hqr takes several iterations to deflate the first eigenvalue, somewhat less to compute the second eigenvalue, and so on. Eventually the subdiagonals of H become small enough so that quadratic convergence is seen from the outset. Still later, if the matrix is large enough, the matrix deflates at the upper end, so that il > 0, which gives further savings. To guard against the possibility of nonconvergence, hqr gives an error return when in the course of computing any one eigenvalue a maximum iteration count is exceeded. Most real-life implementations do not return immediately but instead try an ad hoc shift to get the algorithm back on track. For more see 2.5. The operation count is dominated by the application of plane rotations. Given il < 12, the pre- and postmultiplication of H requires about n(i2 il) flrot. The accumulation of the transformations in Q requires the same amount of work to bring the total to 2ra(i2-i2) flrot. An overall operation count depends on the number of iterations to convergence and the behavior of the ranges [j7, i'2], neither of which is known a priori. We can derive an upper bound by assuming that il = 1 and that it takes k iterations to find an eigenvalue. The bound is approximately

If we are only interested in computing the eigenvalues of H, we may restrict the range of our transformations to the elements labeled 6 in the Wilkinson diagram (2.29). Moreover, we no longer need to accumulate the transformations. This reduces the operation count for a QR step in the range [i7, i2] to 2(i2 - il)2 flrot, and the upper bound (2.31) becomes f fcn3 flrot. Eigenvectors We have now seen how to compute the Schur decomposition of a general matrix A. In some applications a Schur decomposition is all we need. In most applications, however, what is wanted is not the Schur vectors but the eigenvectors of A. It should be stressed that the eigenvalue-eigenvector decomposition is not a stable decompositionin fact, if A is defective it does not exist. Nonetheless, the demand for eigenvectors is so great that all packages have an option for their computation. If A = QTQU is the Schur decomposition of A and X is the matrix of right eigenvectors of T, then the matrix of right eigenvectors of A is QX. Thus we can compute the eigenvectors of A by computing the eigenvectors of T and transforming them by We have already derived a formula for eigenvectors of a triangular matrix (see p. 3). Specifically, if we partition

Q^

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM and Tkk is a simple eigenvalue of T, then

101

is an eigenvector of T. It follows that if we write the fcth eigenvector in the form

(k} then we can obtain x\ ' by solving the upper triangular system

To derive an algorithm for solving (2.32), let us drop subscripts and superscripts and consider a general algorithm for solving the equation (T ///)# = 6. If we partition this equation in the form

then the second row of the partition gives the equation (r - //) = (3, from which we get

From the first row of (2.33) we have (T* - fil)x* + t* = &*, whence

This is a system of order one less than the original, which we further reduce by a recursive application of the same procedure. All this gives the following algorithm.
1. x = b 2. for j = nto 1 by -1 3. x(j] = x x[j}/(T(jJ}-) 4. z[l:j-l] = a[l:j-l] - x[j]*T[l:j-l,j] 5. end for k

This is essentially the algorithm we will use to compute eigenvectors. However, it has two drawbacks. First, in our final algorithm the shift /^ will be a diagonal of our original matrix T, as in (2.32). If T has multiple eigenvalues, then some diagonal of TU may be equal to Tkk, in which case our algorithm will terminate attempting to divide by zero. The cure Vol II: Eigensystems

102

CHAPTER 2. THE QR ALGORITHM

for this problem is to not allow T[k, &]// to be too small. In Algorithm 2.9 below we restrict it to be greater than 6M/^ unless that number is itself too small, in which case we replace it with a number whose reciprocal is safely below the overflow point. Many people are somewhat nervous about replacing an essentially zero quantity by an arbitrary quantity of an appropriate size. However, by projecting the error made back to the original matrix A [see the discussion leading to (2.27)], we see that the replacement corresponds to a small perturbation in A. This means that for the procedure to introduce great inaccuracies in the computed eigenvector, the eigenvector itself must be sensitive to small perturbations in Ai.e., it must be ill conditioned. The second problem is that in some applications eigenvectors can have elements of widely varying sizes. In such cases, the attempt to compute the eigenvectors can result in overflow. Since simple eigenvectors are determined only up to a scalar factor, we are free to scale the solution. In particular, if a component of the solution is in danger of overflowing, we may scale the vector so that the offending component has modulus one. This may result in the underflow of very small components; however, if underflows are set to zero, the results will generally be satisfactory. Algorithm 2.9 computes the right eigenvectors of a triangular matrix. Here are some comments. As we mentioned above, the diagonal element is adjusted to keep the divisor d from becoming too small. The strategy is a variant of one found in LAPACK, in which smallnum is taken to be ^underflow, where underflow is a number just above the underflow point. If there is no rescaling, the algorithm has an operation count of |n3flam. The cost of rescaling can be comparatively large. For example, if scaling is done at every step in the computation of every eigenvector, the cost is ^n3 flmlt, which is larger than the cost of the unsealed algorithm. For this reason the algorithm rescales only when there is a serious danger of of overflow specifically, when the component to be computed would be bigger than a number near the overflow point of the computer. The algorithm is column oriented in the sense that the matrix T is traversed along its columns. This orientation is to be preferred for programming languages like FORTRAN that store arrays by columns. There is a row-oriented version of the basic algorithm for solving triangular systems, which can be adapted to compute right eigenvectors. This algorithm is to be preferred in languages like C that store their arrays by rows. For a further discussion of these matters see 1:2.3. The algorithm is stable in the following sense. Each eigenvector Xi satisfies

where ||jE",||/||TJ| < *yM for some modest constant 7. This implies that if the eigenvector is not ill conditioned then it will be accurately computed. It is worth remem-

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

103

Given an upper triangular matrix T, this routine returns an upper triangular matrix X of the right eigenvectors of X. The columns of X are normalized to have 2-norm one. 1. righteigvec(T, X) 2. smallnum = a small number safely above the underflow point 3. bignum = a number near the overflow point 4. for k n to 1 by -1 5. X[l:k-l,k] = -T[l:k-l,k] 6. X[kjk] = l 7. X[k+l:n,k] = Q 8. dmin = max{ eM * | T [k, k] \, smallnum} 9. forj = fc-ltolby-1 10. d = T\j,j]-T[k,k] 11. if (\d\ < dmin) d = dmin fi 12. if(\X[j,k]\/bignum>\d\) 13. s = \d\/\X{j,k]\ 14. X [ l : k , k ] = 3*X[l:k,k] 15. end if

16.

X\j,k] = X\j,k]/d

17. X[l:j-l, k] = X[l:j-l, k} - X ( j , *]*T[l:j-l, j] 18. endforj 19. X[l:k,k] = X[l:k,k]/\\X[l:k,k]\\2 20. end for k 21. end righteigvec Algorithm 2.9: Right eigenvectors of an upper triangular matrix o

Vol II: Eigensystems

104

CHAPTER 2. THE QR ALGORITHM

bering that Ei is different for each eigenvector zt-, so that as a whole the eigenvalueeigenvector decomposition is not necessarily stable. It follows from (2.34) that the residual T{ Txi taxi satisfies

Thus the norm of the scaled residual for each computed eigenvector is near the rounding unit. This fact, which continues to hold for the eigenvectors of the original matrix, provides an easy diagnostic for routines that purport to compute eigenvectors: compare the scaled residual against the rounding unit. Although we have chosen to compute the entire upper triangular array of eigenvectors, essentially the same algorithm could be used to compute a few selected eigenvectors. A similar algorithm can be derived to compute left eigenvectors. Specifically if we partition T as usual in the form

and assume that Tkk is a simple eigenvector of T, then

is a left eigenvector of T corresponding to Tkk- Thus we can also find left eigenvectors by solving triangular systems. However, there is an alternative. If X is the matrix of right eigenvectors of a diagonal matrix, then FH = X~l is the matrix of left eigenvectors. Thus we can also obtain the left eigenvectors of a matrix by inverting the matrix of right eigenvectors. Unfortunately, the methods are not numerically equivalent. If we compute the left eigenvectors separately, the resulting matrix may not be the inverse of the matrix of right eigenvectors we say that the right and left eigenvectors have lost biorthogonality. If biorthogonality is required, then directly inverting the matrix of right eigenvectors will give better results. But this will not work in cases where we want only a few left and right eigenvectors.
2.5. BITS AND PIECES

The algorithm sketched in the last subsection is an effective method for finding the eigenvalues (and eigenvectors, if desired) of a general complex matrix. However, there are modifications and extensions that can improve the performance of the algorithm. A detailed treatment of these topics would lengthen this chapter beyond reasonable

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

105

bounds. Instead, we will give a brief survey of the following topics: the ad hoc shift, deflation at consecutive small subdiagonal elements, sorting for eigenvalues, and balancing. The subsection concludes with a discussion of graded matrices. Ad hoc shifts Convergence of the Hessenberg QR algorithm is not guaranteed, even with the Wilkinson shift. The problem usually manifests itself by the algorithm exceeding a preset limit on the number of iterations (see statement 6 in Algorithm 2.8). In such an event the natural action is to give an error return. An alternative is to restart the iteration with a new shift, commonly referred to as an ad hoc shift. If that fails one can either try again or give an error return. It does not make much sense to try more than one or two ad hoc shifts. There is little general theory to guide the choice of ad hoc shifts (which is why they are called ad hoc). The LAPACK routine CGEEV takes the shift to be | Re(/^;_i)| + | Re(/ij_i >2 _2)|, where i is the row where the problem is supposed to deflate. Aggressive deflation If two consecutive subdiagonals of H are small but neither is small enough to permit deflation, we can sometimes start the QR step at the diagonal to the right of the first small element. Specifically, consider the Wilkinson diagram

where the upper-left-hand x represents the (i2, il)-element of H. For purposes of illustration we will assume that the elements in this diagram are real and that d is positive. Suppose we begin the QR step at row i. After the reduction to triangular form, we have the following diagram.

where

and
Vol II: Eigensystems

106

CHAPTER 2. THE QR ALGORITHM

The postmultiplication by the rotations does not change elements in the second column. Now suppose that 2 is so small that ft(d2+2) = d2. Then the computed value of c will be one, and the computed value of the element ccj will simply be 1 unchange from the original. Moreover, the computed value of the element sci = ei^/1' is i 2/d. Consequently, if the product 162 is so small that it is negligible by whatever deflation criterion is in force, we can ignore it. Thus for c\ and e2 sufficiently small, we can assume that the matrix is deflated at the element ej at least for the purpose of starting a QR step. Note that it is the square of ei and the product 162 that says whether we can start a QR step. Since the product of two small numbers is much smaller than either, we may be able to start the QR step even when e\ or 2 are not small enough to deflate the matrix. Cheap eigenvalues If the original matrix A is highly structured, it is possible that some eigenvalues are available almost for free. For example, if A has the form

then the single nonzero element in the second row is an eigenvalue. It takes at most n2 comparisons to isolate such a row, if it exists. At an additional cost of O(n2} operations, this matrix can be permuted so that it has the form

We can then repeat the process on the leading principal matrix of order ra-1, and so on until it fails to isolate an eigenvalue. The result is a permutation of A that has the form

where T is upper triangular.

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM


Turning now to A, if it has, say, the form

107

then it can be permuted to the form

Proceeding as above, we can permute A into the form

where S is upper triangular. Thus we have deflated the problem at both ends. Properly implemented the process requires only 0(n2) operations per eigenvalue, the same as for a single QR step. Because of its cheapness, the process is usually made an option in matrix packages. Balancing Many applications generate matrices whose elements differ greatly in size. In some cases these disparities are a a consequence of the structure of the underlying problem. In others, however, they are accidental, caused, for example, by a poor choice of units of measurement. In this case balance can often be restored by the following procedure. We proceed by balancing the elements of a matrix one row and column at a time. Let us consider the case of the first row and column. Let p ^ 0, and let

Then (for n = 4)

If we now require that p be chosen so that the first row and column are balanced in the sense that

Vol II: Eigensystems

108
then we find that

CHAPTER 2. THE QR ALGORITHM

Having balanced the first row and column, we can go on to balance the second, the third, and so on, cycling back to the first if necessary. Although the balancing of one row and column undoes the balancing of the others, the method can be shown to converge to a matrix in which all the rows and columns are balanced. The balancing procedure is relatively inexpensive. Each step of the iteration requires only 0(n) operations. Moreover, a very loose convergence criterion will be sufficient to effectively balance the matrix. Balancing often improves the accuracy of computed eigenvalues and eigenvectors. However, at times it can make things worse. For this reason, any package that incorporates balancing should include an option to turn it off. Graded matrices Loosely speaking, a matrix is graded if it shows a systematic decrease or increase in its elements as one proceeds from one end of the matrix to the other. For example, the matrix

exhibits a symmetric grading from large to small as we proceed along the diagonals. We therefore say that A is graded downward by diagonals. If we set

then

is graded downward by rows,while

is graded downward by columns. It turns out that the QR algorithm usually works well with matrices that are graded downward by diagonals. For example, the computed eigenvalues of A are 5.1034150572761617e-33 1.0515156210790460e-16 -1.5940000000000001e+00

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM

109

which are almost fully accurate. On the other hand, the algorithm does not do as well with other forms of grading. For example, reverse the rows and columns of A to get the matrix

which is graded upward by diagonals. If we compute the eigenvalues of B, we get the following results. 6.6859999999999994e-33 1.0515156534681920e-16 -1.5940000000000005e+00 The relative errors in these eigenvalues are 3.1e-01, 3.1e-08, 2.8e-16, from which it is seen that the smallest eigenvalue has no accuracy at all, the second smallest is accurate to only eight decimal digits, and the largest is correct to working precision. Row and column grading can also cause the algorithm to fail. The computed eigenvalues of D~1AD have relative errors of l.Oe+16, 2.3e+00, 1.4e-16, while the computed eigenvalues of DAD~l have relative errors of 1.3e+00, 3.4e-01, O.Oe+00. The two smaller eigenvalues of both matrices have no accuracy. There is no formal analysis of why the algorithm succeeds or fails on a graded matrix. However, inspection of special cases will often show that the algorithm causes a loss of important information by combining large and small elements. For example, consider the first column of B and the corresponding first column of the Hessenberg form of B: 6.6859999999999994e-33 6.6859999999999994e-33 1.2900000000000000e-24 -7.1190000000000004e-17 7.1189999999999992e-17 O.OOOOOOOOOOOOOOOOe+00 This display shows that the first column of the Hessenberg form is the same as the one obtained by first setting the element 1.290e-24 to zero. This is a small error compared to the norm of B, but the smallest eigenvalue of B is quite sensitive to it. In particular the relative errors in the eigenvalues of the altered matrix B are 1.6e+00, 2.3e-16, O.Oe+00. Vol n: Eigensystems

110

CHAPTER 2. THE QR ALGORITHM

Balancing can help in this case. For example, balancing DAD l and D 1AD estores the lost accuracy. On the other hand, balancing B has no effect, since it cannot change the direction of the grading. This suggests the following rule of thumb.

When dealing with a graDED MATRIX ARRANGE THE GERsding downward


BY TOWS COLUMNS, OR DDIGONALS AND BALANCE THE MATRRIX,.

We do not claim that this strategy is foolproof, and therefore anyone employing it should take a hard look at the results to see if they make sense.
2.6. NOTES AND REFERENCES Historical

The lineage of the QR algorithm can be traced back to a theorem of Konig [ 151,1884], which states that if the function defined by the power series

has one simple pole r at its radius of convergence then r lim^oo ak/ak+i- Later Hadamard [106,1892] gave determinantal expressions in terms of the coefficients of (2.37) for poles beyond the radius of convergence. Aitken [1,1926] independently derived these expressions and gave recurrences for their computation. Rutishauser consolidated and extended the recurrences in his qd-algorithm [222, 223,1954]. (For a systematic treatment of this development see [122].) Rutishauser [224,1955] then showed that if the numbers from one stage of the qdalgorithm were arranged in a tridiagonal matrix T then the numbers for the next stage could be found by computing the LU factorization of T and multiplying the factors in reverse order. He generalized the process to a full matrix and showed that under certain conditions the iterates converged to an upper triangular matrix whose diagonals were the eigenvalues of the original matrix. The result was what is known as the LR algorithm. Later Rutishauser introduced a shift to speed convergence [225,1958]. Except for special cases, like positive definite matrices, the LU algorithm is numerically unstable. Kublanovskaya[154,1961] and Francis [76,1961] independently proposed substituting the stable QR decomposition for the LU decomposition. However, Francis went beyond a simple substitution and produced the algorithm that we use today, complete with a preliminary reduction to Hessenberg form and the implicit double shift for real matrices. The name of the QR decomposition comes from the fact that in Francis's notation the basic step was to decompose the matrix A into the product QR of an orthogonal matrix and an upper triangular matrix. Thus the algorithm preceded the decomposition. I have heard that the Q was originally O for "orthogonal" and was changed to Q to avoid confusion with zero. For more historical material see Parlett's survey [204] and the paper [73] by Fernando and Parlett.

SEC. 2. THE EXPLICITLY SHIFTED QR ALGORITHM


Variants of the QR algorithm

111

There are four factorizations of a matrix into a unitary and a triangular matrix, which we may represent symbolically by QR, QL, RQ, and LQ, where R and L stand for upper and lower triangular. The theory of the QR algorithm, mutatis mutandis, applies to the other three variants. The shifted variants of the QR and QL algorithms exhibit fast convergence in the last and first rows; those of the RQ and the LQ, in the first and last columns. For more details on the QL algorithm, see 1.3, Chapter 3. The QR algorithm, the inverse power method, and the power method The relation of the QR algorithm to the inverse power method was known to J. H. Wilkinson and W. Kahan (see [206, p. 173]), although the first explicit statement of the relation is in a textbook by Stewart [253, p. 352], The relation to the power method was known from the first, as was the convergence result in Theorem 2.2, which was originally established using determinants. The proof given here is due to Wilkinson [301], [300, 29-30, Ch. 8]. Theorem 2.1, which is so important to the implicitly double shifted algorithm, is due to Francis [76]. Local convergence The local convergence results are adapted from [264]. As mentioned in the text, the iteration converges quadratically to a nondefective multiple eigenvalue. For the special case of the Rayleigh-quotient shift, this result is implied by work of Ostrowski on the Rayleigh-quotient method [193]; however, no general analysis seems to have appeared in the literature. Watkins and Eisner [292] have given a very general convergence theory that holds for both the QR and LR algorithms. Householder transformations and plane rotations See 1:4.1.5 for notes and references on Householder transformations and plane rotations The treatment here differs from that in many textbooks in its emphasis on com plex transformations. For more on complex Householder transformations see [159]. Hessenberg form The reduction of general matrix to Hessenberg form is due to Householder [123] and Wilkinson [297], who worked out the numerical details. The stability analysis is due to Wilkinson. His general approach to backward error analysis of orthogonal transformations is given in his Algebraic Eigenvalue Problem [300] and is the basis for most of the rounding-error results cited in this and the next chapter. It is possible to use nonorthogonal transformations to reduce a symmetric matrix to tridiagonal forma process that bears the same relation to Givens' and Householder's method as Gaussian elimination bears to orthogonal triangularization. The case for nonorthogonal reduction, however, is not as compelling as the case for GausVol II: Eigensystems

112

CHAPTER 2. THE QR ALGORITHM

sian elimination, and the method is not used in the major packages. For details and an error analysis see [300, 6.8-19]. The Hessenberg QR algorithm As this subsection makes clear, the implementation of the QR algorithm is a large task, and our final resultAlgorithm 2.8cannot be regarded as a polished implementation. For further details, there is little to do but go to the better packages and look at the code. The Handbook ALGOL codes [305] are well documented but show their age, as do their EISPACK translations into FORTRAN [81]. The LAPACK [3] codes are state of the artat least for large matricesbut they are undocumented, sparsely commented, and difficult to read. The observation that the QR step preserves Hessenberg form is due to Francis [76]. Deflation criteria A personal anecdote may illustrate the difficulties in finding satisfactory criteria for declaring a subdiagonal element zero. In 1965 I attended a series of lectures on numerical analysis at the University of Michigan, where Jim Wilkinson presented the QR algorithm. His talk was punctuated by phrases like, "When a subdiagonal element becomes sufficiently small,... ." After one of the lectures I asked him, "How small is small?" He began, "Here is what I do," and described the relative criterion (2.28). He ended by saying, "But if you want to argue about it, I would rather be on your side." So it remains to this day. The Wilkinson shift The Wilkinson shift was proposed by Wilkinson [302] for symmetric tridiagonal matrices, where it insures global convergence of the QR algorithm. Its use in the general QR algorithm is traditional. Aggressive deflation The idea of deflating when there are two consecutive small subdiagonal elements is due to Francis [76]. The computational advantages of this procedure are obvious. In addition, many people felt that such small elements could retard the convergence of the implicitly shifted QR algorithm (to be discussed in the next section). However, Watkins [289] has shown that the shift is accurately transmitted through the small elements. Preprocessing The balancing algorithm (p. 107) is due to Osborne [187] and was used, along with the strategy for the initial deflation of eigenvalues, in the Handbook [208] and in subsequent packages. For another scaling strategy, which works well with sparse matrices, see [50].

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM


Graded matrices

113

There is little in the literature about general graded matrices. For a general theory and references see [266]. The fact that the direction of the grading must be taken into account was noted for symmetric matrices by Martin, Reinsch, and Wilkinson [169]. Contrary to (2.36), they recommend that the matrix be graded upward, because their version of the reduction to Hessenberg form starts at the bottom of the matrix and works up. This matrix is then passed on to a variant of the QR algorithmthe QL algorithmthat also works from the bottom up.

3. THE IMPLICITLY SHIFTED QR ALGORITHM


In the previous section we described a variant of the QR algorithm that is suitable for computing the Schur decomposition of a general complex matrix. Unfortunately, complex arithmetic is quite expensive and to be avoided if at all possible. Since real matrices can have complex eigenvalues and eigenvectors, it is generally impossible to avoid complex arithmetic if the actual Schur form is to be computed. In this section we will show that there is a real equivalent of the Schur form and that the QR algorithm can be adapted to compute it in real arithmetic. The adaptation involves a technique called implicit shifting, which can also be used to solve generalized eigenproblems and compute the singular value decomposition. We begin the section with the real Schur form and an inefficient algorithm for computing it. It turns out that these inefficiencies can be removed if the matrix in question is Hessenberg. Hence in 3.2 we establish an important result that enables us to take advantage of the Hessenberg form. Finally, in 3.3 we pull the material together into an algorithm for computing the real Schur form. Since the concern is with solving the real eigenproblem: In this section A will be a real matrix of order n.

3.1. REAL SCHUR FORM


In this subsection we derive the real Schur form and present a preliminary algorithm for its computation. Real Schur form A real Schur form is a Schur form with 2x2 blocks on its diagonal, each such block containing a conjugate pair of eigenvalues. The following theorem establishes the existence of such decompositions.

VolII: Eigensy stems

114

CHAPTER 2. THE QR ALGORITHM

Theorem 3.1 (Real Schur form). Let A be real of order n. Then there is an orthogonal matrix U such that T = 7T AU is block upper triangular of the form

The diagonal blocks ofT are of order one or two. The blocks of order one contain the real eigenvalues of A. The blocks of order two contain the pairs of complex conjugate eigenvalues of A. The blocks can be made to appear in any order. Proof. The proof is essentially the same as the proof of Theorem 1.12, Chapter 1, except that we use two real vectors to deflate a complex eigenvalue. Specifically, let (A, z) be a complex eigenpair with

From the relations 2,y = x + x and Izi x - or, we find that Ay = fj,y - vz and Az = w 4- LIZ. or

By computing the characteristic polynomial of Z, one can verify that the eigenvalues of L are A and A. Now let

be a QR decomposition of (y z). Then (y z] = X\R. Since y and z are independent (see Theorem 1.3, Chapter 1), R is nonsingular. Hence X\ = (y z)R~l, and

It follows as in the proof of Theorem 1.12, Chapter 1, that

which completes the deflation of the complex conjugate pair A and A. Because RLR is similar to L, its eigenvalues are A and A. Three comments.

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM

115

A matrix of the form (3.1) in which the blocks are of order one or two is said to be quasi-triangular. Like the proof of Schur's theorem, the proof of this theorem is almost constructive. Given the necessary eigenvectors, one can reduce a matrix to real Schur form using Householder transformations. It is an instructive exercise to work out the details. The relation

implies that A maps the column space of X\ into itself. Such a space is called an eigenspace or invariant subspace. Such subspaces will be the main concern of the second half of this volume. A preliminary algorithm The QR algorithm can be adapted to compute a real Schur form of a real matrix A in real arithmetic. Here we will start with an expensive algorithm that points in the right direction. We begin by noting that the reduction of A to Hessenberg form (Algorithm 2.2) can be done in real arithmetic, resulting in a real matrix H. We can then apply the shifted QR algorithm (Algorithm 2.8) in real arithmetic until such time as a complex shift is generated. At that point, we need a new approach to avoid the introduction of complex elements in our matrix. The starting point is the observation that if the Wilkinson shift K is complex, then its complex conjugate K is also a candidate for a shift. Suppose that we apply two steps of the QR algorithm, one with shift K and the other with shift K to yield a matrix H. By Theorem 2.1, if

is the QR decomposition of (H - Kl)(H - K!), then H = QHHQ. But

is real. Hence so are Q and H. Thus the QR algorithm with two complex conjugate shifts preserves reality. This strategy of working with complex conjugate Wilkinson shifts is called the Francis double shift strategy. We can even avoid complex arithmetic in the intermediate quantities by forming the matrix H2 - 2Re()# + W 2 /, computing its Q-factor Q, and then computing H = QTHQ. Unfortunately, the very first step of this algorithmthe formation of H2 -2 RQ(K)H + \K\2Irequires 0(n3) operations, which makes the algorithm as a whole unsatisfactory. However, it turns out that we can use a remarkable property of Hessenberg matrices to sidestep the formation of A2 - 2 Re(/c) A +1|2/. We no turn to this property. VolII: Eigensy stems

116

CHAPTER 2. THE QR ALGORITHM

3.2. THE UNIQUENESS OF HESSENBERG REDUCTION


Let A be of order n and let H = Q^AQ be a unitary reduction of A to upper Hessenberg form. This reduction is clearly not unique. For example, the QR algorithm produces a sequence of Hessenberg matrices each of which is similar to the original matrix A. However, there is a limit to this nonuniqueness, as the following argument suggests. In reducing A to Hessenberg form H by a unitary similarity, we must introduce (n-l)(ra-2)/2 zeros into A. Now a unitary matrix has n(n-l)/2 degrees of freedom (see the discussion preceding Theorem 1.12, Chapter 1). Since we must use (n l)(n-2)/2 of the degrees of freedom to introduce zeros in A, we have n-1 degrees of freedom left over in Q, just enough to specify the first column of Q. It is therefore reasonable to conjecture that, given A, the matrices Q and H are determined by the first column of Q. It turns out that this is essentially true, but with two provisos. First, let H = QEAQ be a unitary reduction of A to Hessenberg form. If Q = QD, where \D\ = /, then H = Q^AQ is also a reduction to upper Hessenberg form. The two reductions are not essentially different, since Q and Q differ only in the scaling of their columns by factors of modulus one. The choice of scaling will also affect the elements of H\ specifically, hij is replaced by tiihijtij. In either case the rescaling makes no essential difference, and we will say that the reduction is determined up to column scaling ofQ. Second, we must assume that the subdiagonals of H are nonzero. Formally we make the following definition. Definition 3.2. Let H be upper Hessenberg of order n. Then H is UNREDUCED if fct+i f ^ 0 ( i = 1,... , We are now in a position to give conditions under which a reduction to upper Hessenberg form is essentially unique. Theorem 3.3 (Implicit Q theorem). Let A be of order n and let H = QHAQ be a unitary reduction of A to upper Hessenberg form. IfH is unreduced then up to column scaling ofQ the matrices Q and H are uniquely determined by the first column ofQ or the last column ofQ. Proof. Consider the relation

If we partition Q = (q1 qn) by columns, then the first column of this relation is

Multiplying (3.5) and remembering that q^qi = 1 and gj1^ 0, we have

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM


We then have

117

Since /i2i ^ 0, the vector Aq\ h\\qi is nonzero. Since \\qz\\2 = 1 we may take /i2i = H^gi - huqi ||, which determines q-2 uniquely up to a factor of modulus one. Now suppose that qi,... , q^ have been determined. Then the fcth column of (3.4) gives the relation

Since q\,... , qk+i are orthonormal, we have

Moreover,

Since /&&+!, is nonzero, Aqk h\kq\

hkkqk is nonzero, and we may take

which determines qk+i up to a factor of modulus one. Finally, from the last column of (3.4) we get

To show that Q is uniquely determined by its last column we start with the relation

and repeat the above argument on the rows of QH starting with the last. The theorem is sometimes called the implicit Q theorem, because it allows the determination of Q implicitly from its first or last column. Its proof is actually an orthogonalization algorithm for computing Q and H. It is called the Arnoldi method and will play an important role in the second half of this volume. The algorithm itself has numerical drawbacks. For example, cancellation in the computation of Aqk hikqi hkkqk can cause the computed qk+i to deviate from orthogonality with

qi,.. - , qk-

3.3. THE IMPLICIT DOUBLE SHIFT


We now return to our preliminary algorithm and show how it may be modified to avoid the expensive computation of H2 2Re()# -f ||2/. We will begin with a very general strategy and then fill in the details. VolII: Eigensystems

118
A general strategy

CHAPTER 2. THE QR ALGORITHM

Let K be a complex Francis shift of H. We have seen above that if we compute the Q-factor Q of the matrix H2 - 2Re(# + \K\2I then H = QTHQ is the result of applying two steps of the QR algorithm with shifts K and R. The following is a general algorithm for simultaneously determining Q and H. 1. Determine the first column c of C = H2-2 Re(K)H+\K\2L 2. Let QQ be a Householder transformation such that Q^c = cre\. 3. Setjy 1 =0H40o. 4. Use Householder transformations to reduce H\ t upper Hessenberg form H. Call the accumulated transformations Q\. 5. Set 0 = 0o0i. To establish that this algorithm works, we must show that H and Q are the matrices that would result from two steps of the QR algorithm with shifts K and K. We will proceed in stages. 1. The first column of QQ and the first column of Q are, up to scaling, the same. To see this, partition the QR factorization of C in the form

Then c = pq. Now if we partition Q0 (g()0i^), then from the relation c O-QQGI we have c = aq(\ Hence q and q^ are proportional to c. 2. The first column of QoQi is proportional to q. This is because QI&I ej [see (2.21)]. 3. By construction the matrix (QoQi )rH(QoQi) is Hessenberg. Thefirstcol umn of the reducing transformation is proportional to q. Hence by the implicit Q theorem (Theorem 3.3), if H is unreduced, then Q = QoQi and H = (QoQi)TA(Q0Q1). The key computations in (3.6) are the computation of the first column of C and the reduction of Q^HQi to Hessenberg form. It turns out that because H is upper Hessenberg we can effect the first calculation in 0(1) operations and the second in O(n2) operations. We now turn to the details. Getting started The computation of the first column of C = H2 - 2 RQ(K)H + |Ac|2/ requires that we first compute the scalars 2 Re() and ||2. To do this we do not need to compute K itself. For it is easily verified that

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM


and

119

Because H is upper Hessenberg, only the first three components of the first column of H2 are nonzero. They are given by

Thus the first three components of the first column of c are given by

Inserting the definition (3.7) of t and (3.8) of d, we obtain the following formula for c:

Since two proportional vectors determine the same Householder transformation, we can ignore the multiplicative factor h^\ in the definition of c. The formulas for the components of h^c involve products of the elements of H and are subject to overflow or underflow. The cure is to scale before calculating c. This, in effect, multiplies c by the scaling factor, which does not affect the final Householder transformation. Algorithm 3.1 calculates the vector u generating the Householder transformation to start a doubly shifted QR step. In practice, when the problem deflates, the QR step will not be applied to the entire matrix, but between certain rows and columns of H. For this reason we do not invoke the algorithm with the matrix H, but with the specific elements of H used to generate c. Note that we may assume that h21 is nonzero, for otherwise the problem would deflate. Hence the scaling factor s in statement 2 is well defined. The particular form of the formulas has been chosen to avoid certain computational failures involving small off-diagonal elements. For more on this, see the notes and references. An important consequence of our substitution of t for 2 RC(K) and d for \K\2 is that our algorithm works even if the Francis double shifts are real. Specifically, suppose that the matrix (3.7) and (3.8) has real eigenvalues A and u. Then

Thus the formulas in Algorithm 3.1 generate a vector u that starts the iteration with shifts of A and p. VolII: Eigensystems

120

CHAPTER 2. THE QR ALGORITHM

This program generates a Householder transformation that reduces the first column of C = H2 - 2Re()# + \K\2I to a multiple of e^ 1. 2. 3. startqr2step(hll, h!2, h21, h22, h32, hnlnl, hnln, hnnl, hnn, u) s = l/max{|/z77|,|/z72|,|/z27|,|/i22|,|/z32|. \hnlnl\,\hnln\,\hnnl\,\hnn\} hll = s*/*77; h!2 = s*h!2; h21 = s*/*27; h22 = s*h22\ h32 = s*h32; hnlnl = s*hnln]; hnln = s*hnln; hnnl = s*hnnl; hnn s*hnn p = hnn hll q = hnlnl - hll r = h22 - hll (p*q-hnnl*hnln)/h21 + h!2\ r-p-q c h32 J housegen(c, w, v] end startqrstep

4. 5. 6.
7.

8. 9.

Algorithm 3.1: Starting an implicit QR double shift o Reduction back to Hessenberg form Let RQ denote the Householder transformation corresponding to the vector u returned by Algorithm 3.1. Then premultiplication by RQ acts only on the first three rows of H, so that RoH has the form

Similarly, postmultiplication by RQ operates on only the first three columns of H so that after the complete transformation has been applied, we get the matrix

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM

121

We must now reduce this matrix to Hessenberg form. In the usual reduction to Hessenberg form we would annihilate all the elements below the first subdiagonal. But here only two of the elements are nonzero, and we can use a Householder transformation RI that acts only on rows and columns two through four. The result of applying this transformation is

We now continue with a transformation R^ that annihilates the hatted elements in this matrix to give

Yet another transformation R3 annihilates the hatted elements in the third column:

The last transformation is a special case, since there is only one element to annihilate. This can be done with a 2x2 Householder transformation or a plane rotation RA:

Note that the transpose in the above diagram is necessary if R3 is a rotation; it makes no difference when #3 is a Householder transformation, which is symmetric. Algorithm 3.2 implements a double implicit QR shift between rows and columns Vol II: Eigensystems

122

CHAPTER 2. THE QR ALGORITHM

Given an upper Hessenberg matrix H and the vector u from Algorithm 3.1 (startqrstep), this program applies utoH and then reduces H to Hessenberg form. The transformations are applied between rows il and 12 and are accumulated in a matrix Q. 1. qr2step(H, w, i7, i2, Q) 2. for i = il to /2-2 3. j = maxjzI,z7} 4. VT = uJ-*H[i:i+2,j:n] 5. H[i:i+2,j:n] = H[i:i+2,j:n] - U*VT 6. iu = min{i-f 3, z'2} 7. v = .ff[l:iw,*:*+2]*u 8. H[l:iu, i:i+2] = H[l:iu, o+2]-v*ttT 9. -y = Q[l:rz, z:i+2]*w 10. Q[l:, *:+2] = Q[l:n, i:z+2]-v*wT 11. if (z / /22) /i0ws0gew(.H"[z'+l:z'+3, i], w, nw) fi 12. if (t ^ i7) ff[i+l,j] = H[i+2J] = 0; fi 13. end for 2 14. rotgen(H[i2-l, 12-2], H[i2,i2-2], c, 5) 15. rotapp(c, 3, #[/2-l,i'2-l:n], J7[i"2,i2-l:n]) 16. rotapp(c, 5, J5T[l:i2, /2-1], J3"[l:/2, /2]) 17. rotapp(c, s, Q[l:n, i2-l], <^[l:n, /2]) 18. end qr2step Algorithm 3.2: Doubly shifted QR step o

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM

123

il and i2 of H. The coding is a bit intricate, since there are special cases at both ends of the loop on i. It helps to think of i as pointing to the row containing the subdiagonal at which the current Householder transformation starts. It is easy to do an operation count on this algorithm, with the result that: Algorithm 3.2 requires 6n(i2il) flam. Deflation The behavior of the doubly shifted QR algorithm once asymptotic convergence has set in depends on the eigenvalues of the matrix

which determines the shift. If the eigenvalues are complex and nondefective, then /i n _i )n _2 converges quadratically to zero. If the eigenvalues are real and nondefective, both the /i n _ 1>n _ 2 and /in-i,n converge quadratically to zero. In either case, we must allow for the deflation of a 2x2 block at the bottom of the matrix. As usual, the subdiagonal elements other than /i n _i >n _2 and /in-i,n rnay show a slow convergence to zero so that we must allow for deflation in the middle of the matrix. Algorithm 3.3 implements a backsearch for deflation. It differs from Algorithm 2.6 in recognizing deflation of both 1x1 and 2x2 blocks. A 2 x 2 block may require additional processing. At the very least, if it contains real eigenvalues, it should be rotated into upper triangular form so that the eigenvalues are exhibited on the diagonal. As with the singly shifted algorithm, we can start a QR step at a point where two consecutive subdiagonals are small, even when they are not small enough to cause a deflation. For more on this topic, see the notes and references. Computing the real Schur form Algorithm 3.4 reduces a real Hessenberg matrix to real Schur form. There are several comments to be made about the algorithm. We have already observed that the routine qr2step requires 6n2 (12il) flam. If we assume that il = 1 throughout the reduction and that it requires k iterations to compute an eigenvalue, then the total operation count is

On the other hand, the explicitly shifted QR algorithm (Algorithm 2.8) requires k'n3 complex flrots, where k' is the number of iterations to find an eigenvalue. In terms of real arithmetic this is

Vol II: Eigensystems

124

CHAPTER 2. THE QR ALGORITHM

This algorithm takes a Hessenberg matrix H of order n and an index t (1 < t < n) and determines indices il, i2 < t such that one of the following two conditions hold. 1. 1 < il < i2 < I, in which case the matrix deflates at rows il and il. 2. 1 = il i2, in which case no two consecutive subdiagonal elements of H in rows 1 through t are nonzero. In processing 2x2 blocks all transformations are accumulated in Q.

Algorithm 3.3: Finding deflation rows in a real upper Hessenberg matrix

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM

[25

Given a real upper Hessenberg matrix H, hqr overwrites it with a orthogonally similar quasi-triangular matrix. The similarity transformation is accumulated in Q. The routine gives an error return if more than maxiter iterations are required to deflate the matrix at any eigenvalue.

Algorithm 3.4: Real Schur form of a real upper Hessenberg matrix

Vol II: Eigensystems

126

CHAPTER 2. THE QR ALGORITHM

Even if k k', the superiority of the double shift algorithm is clear. In fact, one would expect that k < k', since each iteration of the double shift algorithm is equivalent to two steps of the single shift algorithm. Like the single shift algorithm, the double shift algorithm is numerically stable in the usual sense. It should not be thought that because Algorithms 2.8 and 3.4 are both backward stable that they produce essentially the same matrices. For example, since the real Schur form is real, the doubly shifted algorithm produces a matrix whose complex eigenvalues occur in conjugate pairs. The singly shifted algorithm, on the other hand, works in the complex field, and the imaginary parts of a pair of complex eigenvalues can drift away from conjugacy very far away if the eigenvalue is ill conditioned. This is yet another argument for computing the real Schur form. Eigenvectors The eigenvectors of the original matrix A can be found by computing the eigenvectors of the Schur form T produced by Algorithm 3.4 and transforming them back using the orthogonal transformation Q. Thus the problem of finding the eigenvectors of the original matrix A is reduced to computing the eigenvectors of a quasi-triangular matrix T. The method is a generalization of the back-substitution process of Algorithm 2.9. Rather than present a complete program, which would necessarily be lengthy, we will sketch the important features of the algorithm. It will be sufficient to illustrate the procedure on a quasi-triangular matrix T consisting of three blocks. We will assume that the eigenvalues of a diagonal block are distinct from those of the other diagonal blocks. We begin with the case of a real eigenvalue. Suppose T has the form

If we seek the eigenvector corresponding to A = r^ in the form (x j f 2 1) , then we have the equation

rp

(The reason for putting A to the right of the eigenvector will become clear a little later.) From the second row of (3.9) we have

whence 22 = -723/(r22 - A). This is just the usual back-substitution algorithm.

SEC. 3. THE IMPLICITLY SHIFTED QR ALGORITHM


From the first row of (3.9) we have

127

Hence we may obtain x\ as the solution of the linear system (T\\ \I}xi = tis 2*1 Here we have deviated from the usual back-substitution algorithm: the two components of the eigenvector in x\ are obtained by solving a 2x2 linear system. The system is nonsingular because by hypothesis A is not an eigenvalue of T\\. For a general quasi-triangular matrix T the back-substitution proceeds row by row as above. If the row in question has a scalar on the diagonal, then the process reduces to the usual back-substitution. On the other hand, if the diagonal block is 2x2, then two components of the eigenvector are obtained by solving a system of order 2. The case of a complex conjugate pair of eigenvalues is sufficiently well illustrated by the matrix

We will look for an "eigenvector" (later we will call it an eigenbasis) in the form

for some matrix L of order 2. We already have two examples of such block eigenvectors in (3.2) and (3.3). We begin by letting X$ be nonsingular but otherwise arbitrary. From the third row of (3.10), we have

from which it follows that

Since L is similar to T^ it contains the complex conjugate pair of eigenvalues of T^. From the second row of (3.10) we have

Hence we may compute zj asthesolutionofthe2x2systemorj(r22-i) = -t^A'ss. This system is nonsingular because T22 is not an eigenvalue of L. From the third row of (3.10) we have

Vol II: Eigensystems

128

CHAPTER 2. THE QR ALGORITHM

This is a Sylvester equation, which we can solve for AI because 1 n and L have no eigenvalues in common (see Theorem 1.16, Chapter 1). For larger matrices the process continues, each row of the matrix yielding either a 2 x 2 system or a Sylvester equation for the corresponding part of X. We now turn to the choice of X3. A natural choice is X$ Ithe generalization of the choice 3 = 1 for an ordinary eigenvector. The principal advantage of this choice is that it does not require any computation to form L, which is simply ^33. However, if actual eigenvectors are desired, it is better to take X$ = (y^ 23), where x3 = y3 + ^3 is the right eigenvector of TSS. Arguing as in the proof of Theorem 3.1 [see (3.2)], we have

where fj, iv are the eigenvalues of Tys,- If we then compute X as described above and partition

This relation implies that y iz are the right eigenvectors of T corresponding to the eigenvalues // ip. Thus our choice generates the real and imaginary parts of the desired eigenvector. This sketch leaves open many implementation detailsin particular, how to solve the linear systems and how to scale to prevent overflow. Moreover, we have presented only row-oriented versions of the algorithms. It is easy to cast them into columnoriented form in the spirit of Algorithm 2.9. The major packages adopt a different approach that is equivalent to our second choice of T^. Specifically, for a complex eigenvalue A they write out the relation Ax = Ax and backsolve as in the real case but compute the real and imaginary parts explicitly in real arithmetic.

3.4. NOTES AND REFERENCES Implicit shifting


The ideas in this section, from the real Schur form to the implicit double shift, are due to Francis [76]. Although we have focused on the double shift version, there is a single shift variant, which we will use to compute eigenvalues of a symmetric tridiagonal matrix. There is also a multishift variant (see below), which is implemented in the LAPACK routine xHSEQR. The idea of an implicit shift has consequences extending beyond the computation of a real Schur form. In the next section we will show how to use implicit shifting to solve the generalized eigenvalue problem and in the next chapter will apply it to the singular value decomposition.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM Processing 2x2 blocks

129

When a 2 x 2 block has converged, it should be split if it has real eigenvalues. The LAPACK routine XLANV2 does this. It also transforms a block with complex eigenvalues into one in which the diagonal elements are equal. The multishifted QR algorithm There is no need to confine ourselves to two shifts in the implicitly shifted QR algorithm. For example, when we treat the symmetric eigenvalue problem, we will use single shifts. We can also use more than two shifts. Specifically, suppose that we have chosen m shifts KI,... , Km. We compute the first column c of (A - Kml) - (A i/), which will have m + 1 leading nonzero components. We then determine an (ra+l)x(ra+l) Householder transformation QQ that reduces c to ei and then apply it to A. The matrix QoAQo has an (m+l)x(m+l) bulge below its diagonal, which is chased down out of the matrix in a generalization of Algorithm 3.2. The shifts can be computed as the eigenvalues of the trailing mxm submatrix. This algorithm, proposed by Bai and Demmel [9] and implemented in the LAPACK routine xHSEQR, can take advantage of level-3 BLASthe larger m the greater the advantage. Unfortunately, Watkins [290] has shown that if the number of shifts is great they are not transmitted accurately through the bulge chasing process. An alternative is to note that if, say, the bulge from a 2 x 2 shift is chased two steps down the diagonal then another double shift can be started after it. If this process is continued, the result is a sequence of small, adjacent bulges being chased down the matrix. This algorithm and a new deflation procedure is treated by Braman, Byers, and Mathias [29]. The paper also contains an extensive bibliography on the subject.

4. THE GENERALIZED EIGENVALUE PROBLEM


The generalized eigenvalue problem is that of finding nontrivial solutions of the equation

where A and B are of order n. The problem reduces to the ordinary eigenvalue problem when B = Iwhich is why it is called a generalized eigenvalue problem. Although the generalization results from the trivial replacement of an identity matrix by an arbitrary matrix B, the problem has many features not shared with the ordinary eigenvalue problem. For example, a generalized eigenvalue problem can have infinite eigenvalues. In spite of the differences between the two problems, the generalized eigenvalue problem has the equivalents of a Hessenberg form and a Schur form. Moreover, the QR algorithm can be adapted to compute the latter. The resulting algorithm is called the QZ algorithm, and the purpose of this section is to describe it. Vol II: Eigensystems

130

CHAPTER 2. THE QR ALGORITHM

We begin in the next subsection with the theoretical background, including Schur forms and perturbation theory. We then turn to the details of the QZ algorithm. Like the QR algorithm, the QZ algorithm begins by reducing A and B to a simplified form, called Hessenberg-triangular form, and then iterates to make both pairs triangular. We will treat the reduction to Hessenberg-triangular form in 4.2 and the QZ iteration in 4.3.
4.1. THE THEORETICAL BACKGROUND

In this subsection we will develop the theory underlying the generalized eigenvalue problem. For reasons of space, we only sketch the outlines. The reader is referred to the notes and references for more extensive treatments. Definitions We begin with the definition of generalized eigenvalues and eigenvectors. Definition 4.1. Let A and B be of order n. The pair (A, x) is an EIGENPAIR or RIGHT EIGENPAIR of the PENCIL (A, B) (also written A - \B) if
1. x ^ 0, 2. Ax = \Bx.

The scalar A is called an EIGENVALUE of the pencil and the vector x is its EIGENVECTOR. The pair (A, y) is a LEFT EIGENPAIR of the pencil (A, B) ify ^ 0 and yHA = R Xy B. As with the ordinary eigenvalue problem, eigenpairs of the generalized problem are assumed to be right eigenpairs unless otherwise qualified. It is important to keep in mind that the geometry of generalized eigenvectors differs from that of ordinary eigenvectors. If (A, or) is an eigenpair of A, then A maps x into a multiple of itselfi.e., the direction of x remains invariant under multiplication by A, provided we agree that the direction of the zero vector matches that of any nonzero vector. On the other hand, if (A, or) is an eigenpair of the pencil (A, B), the direction of x is not necessarily preserved under multiplication by A or B. Instead, the direction of both Ax and Bx are, the same. This elementary fact will be useful in understanding the material to follow. Regular pencils and infinite eigenvalues An important difference between the generalized eigenvalue problem and the ordinary eigenvalue problem is that the matrix B in the former can be singular whereas the matrix / in the latter cannot. This difference has important consequences. In the first place if B is singular, it is possible for any number A to be an eigenvalue of the pencil A - \B. For example, if

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

131

then Ae2 = Be^ 0. Hence for any X, Ae2 = XBe%. More generally, if A and B have a common null vector x, then (A, x) is an eigenpair of (A, J?) for any A. An even more general example is the pencil

in which A and B have no null vectors, right or left, in common. In all these examples the determinant of A XB is identically zero. This suggests the following definition. Definition 4.2. A matrix pencil (A, B) is REGULAR if det( A - XB) is not identically zero. We also say that the pair (A, B) is regular. A regular matrix pencil can have only a finite number of eigenvalues. To see this, note that Ax = XBx (x ^ 0) if and only if det(A - XB) = 0. Now p(X) = det(A - XB) is a polynomial of degree m < n. If the pencil is regular, then p(X) is not identically zero and hence has m zeros, which are eigenvalues of (A, B). It is possible for p(X) to be constant, in which case it appears that the pencil has no eigenvalues. However, this can only occur if B is singular. Now if A / 0 is an eigenvalue of a pencil (A, B), then /x = A"1 is an eigenvalue of (5, A) and vice versa. If B is singular, then Bx = 0 for some x ^ 0, and zero is an eigenvalue of (J5, A). It is therefore natural to regard oo = 1/0 as an eigenvalue of (A, B). Thus if p(X) is constant, the pencil must have an infinite eigenvalue corresponding to the vector x. The possible existence of infinite eigenvalues distinguishes the generalized eigenvalue problem from the ordinary one. It should be stressed that infinite eigenvalues are just as legitimate as their finite brethren. However, infinite eigenvalues do present mathematical and notational problems. For example, what is the multiplicity of an infinite eigenvalue? To answer this question, among others, we will appeal to a generalization of the Schur form (Theorem 4.5). But first we must describe the kind of transformations we will use to arrive at this generalized Schur form. Equivalence transformations We have already observed that the natural transformations for simplifying an ordinary eigenvalue problem are similarity transformations. They preserve the eigenvalues of a matrix and change the eigenvectors in a systematic manner. The corresponding transformations for the generalized eigenvalue problem are called equivalence transformations. Definition 43. Let (A, B) be a matrix pencil and let U and V be nonsingular. Then the pencil (UHAV, UEBV) is said to be EQUIVALENT to(A, B). Alternatively, we say that(UH AV, URBV) is obtained from (A, B) by an EQUIVALENCE TRANSFORMATION. The effect of a equivalence transformation on the eigenvalues and eigenvectors of a matrix pencil is described in the following theorem, whose proof is left as an exercise. Vol II: Eigensystems

132

CHAPTER 2. THE QR ALGORITHM

Theorem 4.4. Let (A, x) and (A, y) be left and right eigenpairs of the regular pencil (A,B).IfU and V are nonsingular, then (A, V~lx) and (A, U~ly) are eigenpairs of (UEAV,UHBV). Equivalence transformations also leave the polynomial p(X) - det(A - XB) essentially unaltered. In fact,

Since U and V are nonsingular, the equivalence transformation multiplies the p( A) by a nonzero constant. In particular, the roots of p( A) and their multiplicity are preserved by equivalence transformations. Generalized Schur form Just as we can reduce a matrix to simpler forms by similarity transformations, so can we simplify a pencil by equivalence transformations. For example, there is an analogue of the Jordan form for regular pencils called the Weierstrass form. Unfortunately, this form, like the Jordan form, is not numerically well determined, and the transformations that produce it can be ill conditioned (see 1.6, Chapter 1). Fortunately, if we restrict ourselves to unitary equivalences, which are well conditioned, we can reduce the matrices of a pencil to triangular form. Specifically, we have the following theorem. Theorem 4.5 (Generalized Schur form). Let (A, B) be a regular pencil. Then there are unitary matrices U andV such thatS UHAV andT = UHBV are upper triangular. Proof. Let v be an eigenvector of (A, B) normalized so that || v\\2 = 1, and let (v V) be unitary. Since the (A, B) is regular, at least one of the vectors Av and Bv must be nonzero say Av. Moreover, if Bv ^ 0 then it must be proportional to Av. Let u Av/||Av||2 and let (u U_L) be unitary. Then

The (2, l)-block of the matrix on the right is zero because by construction Av is orthogonal to the column space of /j_. Similarly,

The proof is now completed by an inductive reduction of (A, B) to triangular form. We now turn to four consequences of this theorem.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


Multiplicity of eigenvalues

133

Let (A, B) be a regular pencil and let (A, B) be a generalized Schur form of (A, B). Then

where \u>\ = 1 (a; is the product of the determinants of the unitary transformations that produce the generalized Schur form). Now the degree m of p is invariant under equivalence transformations [see (4.1)]. Hence exactly m of the ba are nonzero and nm are zero. The former correspond to the finite eigenvalues of (A, B), while the latter correspond to the infinite eigenvalues. Thus any generalized Schur form will exhibit the same number of finite and infinite eigenvalues. This argument justifies the following definitions. Definition 4.6. Let (A,B)bea regular pencil of order n. Then

is the CHARACTERISTIC POLYNOMIAL of (A, B). We say that the ALGEBRAIC MULTIPLICITY of a finite eigenvalue of (A, B) is its multiplicity as a zero of the characteristic equation. I f m is the degree of the characteristic polynomial and m < n, then we say that (A, B) has an INFINITE EIGENVALUE OF ALGEBRAIC MULTIPLICITY n-m. An eigenvalue of algebraic multiplicity one is called a SIMPLE EIGENVALUE. Another consequence of the above argument is that we can choose the eigenvalues of (A, B) to appear in any order in a generalized Schur form. Specifically, we can choose any eigenvalue, finite or infinite, to be in the first position. After the first step of the reduction, we have from (4.2) and (4.3) that

where \u\ 1. If the second eigenvalue in the sequence is finite, then it must satisfy det(A - A B) = 0; i.e., it must be an eigenvalue of (A, B). On the other hand, if the second eigenvalue is infinite, B must be singular; for otherwise, the degree of p^A^ would be too large. In either case we can find an eigenvector corresponding to the second eigenvalue. Thus we have established the following corollary. Corollary 4.7. In Theorem 4.5, the eigenvalues of (A, B) can be made to appear in any order on the diagonals of(S, T). Projective representation of eigenvalues The Schur form has enabled us to solve the mathematical problem of defining the multiplicity of generalized eigenvaluesfinite or infinite. It also suggests how to put finite and infinite eigenvalues on the same notational footing. VolII: Eigensystems

134

CHAPTER 2. THE QR ALGORITHM

Let (A, B) be a regular pencil reduced to Schur form. Then the eigenvalues of (A, B) are determined by the pairs (a,-;, /%,-). If /?t-,- is nonzero, A = eta/Pa is a finite eigenvalue of A. Otherwise the eigenvalue is infinite. We can erase the distinction between the two kinds eigenvalues by representing them by the pairs (o^-, fin). This is equivalent to writing the generalized eigenvalue problem in the form

Unfortunately, this representation is not unique, since any nonzero multiple of the pair (an, fin) represents the same eigenvalue. We solve this problem by introducing the set

We will call this set the projective representation of the eigenvalue. In this nomenclature (0,1} is a zero eigenvalue and (1,0) is an infinite eigenvalue. An ordinary eigenvalue A can be written in the form (A, 1). Generalized shifting Let (-4, B) be a pencil with B nonsingular. Then the equation Ax = \Bx can be written in the form B~lAx \x. Thus when B is nonsingular, we can reduce the generalized eigenvalue problem to an ordinary eigenvalue problema computationally appealing procedure. The reduction is not possible when B is singular, and it has computational difficulties when B is ill conditioned. To remedy this difficulty we can work with the shifted pencil Ax = jj,(B + wA)x, whose eigenpairs are (A/(l + wA), x). If we can determine w so that B + wA is well conditioned, we can reduce the shifted problem to the ordinary eigenvalue problem (B + wA)~lAx = \LX. We are not restricted to shifting B alone. We can shift A and B simultaneously, as the following theorem shows. Theorem 4.8. Let (A,B}bea regular pencil and let

be nonsingular. Let

Then ((a, /?), x) is an eigenpairof(A, B) if and only if

is an eigenpair of (C, D). Moreover, these eigenpairs have the same multiplicity.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

135

Proof. Assume without loss of generality that (A, B) is in generalized Schur form with the pair (a, ft) in the initial position, so that the vector ei is the corresponding eigenvector. Then (C, D} is also in Schur form with (7,6) = (a, (3)W in the initial position. Since W is nonsingular (7,6) ^ (0,0). Consequently, ((7,<$),ei) is an eigenpair of (C, D). The converse is shown by using the nonsingularity of W to pass from (C,D) back to (A, B). The statement about multiplicities follows from the fact that if an eigenvalue appears m times on the diagonal of (A, B) then by the nonsingularity of W the transformed eigenvalue appears exactly m times on the diagonal of (C, D). Left and right eigenvectors of a simple eigenvalue We have seen that if A is a simple eigenvalue of a matrix A then its left and right eigenvectors cannot be orthogonal [see (3.12), Chapter 1]. This allows us to calculate the eigenvalue in the form of a Rayleigh quotient yHAx/yHx. The left and right eigenvectors of a simple eigenvalue of a pencil can be orthogonal. For example, the right and left eigenvectors of the pencil

corresponding to the eigenvalue 1 are ei and 62- Nonetheless, there is an generalized form of the Rayleigh quotient, as the following theorem shows. Theorem 4.9. Let (a, ft} be a simple eigenvalue of the regular pencil (A, B). Ifx and y are right and left eigenvectors corresponding to (a, ft), then

Consequently,

Likewise,

Proof. To establish (4.5) we may pass to the Schur form and assume that the pencil (A, B) has the form

Then x is a nonzero multiple of ei. Now the first component of y is nonzero. For otherwise the vector y consisting of the last n-\ components of y would be a left eigenvector of the pencil (A, B), contradicting the simplicity of (a, ft}. Hence t/H / 0, and it follows from (4.8) that

Vol II: Eigensystems

136

CHAPTER 2. THE QR ALGORITHM

To establish (4.6), we drop the Schur form and suppose that yH Ax = 0. Then by (4.5) and the regularity of the pencil, y^Bx ^ 0. Since Ax is proportional to Bx, we must have Ax = 0. Again, since yH A is proportional to y^B, we must have ?/H A 0. The implication (4.7) is established similarly. Since a yHAx and ft = y^Bx, we can write the ordinary form of the eigenvalue as

This expression is a natural generalization of the Rayleigh quotient, since B plays the role of the identity in the Rayleigh quotient for the ordinary eigenvalue problem. This theorem will also prove important a little later when we consider the perturbation of eigenvalues of matrix pencils. Perturbation theory We now turn to perturbation theory for the generalized eigenvalue problem, and specifically to the perturbation of a simple eigenpair ((a, ft),x) of a regular pencil (A, B). Let

be the perturbed pencil. Let us agree to measure the size of this perturbation by

We wish to know if there is an eigenpair ({a, ft),x) of (A, B) that converges to the eigenpair ((a, /?}, x) as e 0. We also wish to know how close the perturbed eigenpair is to the original as a function of e. We begin with a qualitative assessment of the effects of the perturbation (E, F) on the eigenvector x. By shifting the pencil, we can assume that B is nonsingular. Hence the problem can be reduced to the ordinary eigenvalue problem

Similarly, we have for the left eigenvector y

From the perturbation theory of inverses and Theorem 3.13, Chapter 1, we know that there exist perturbed eigenvectors x and y satisfying

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


If we normalize x, x, y, y so that

137

then (4.9) implies that

For the eigenvalue we have from (4.5) that

[Here the notation (a, (3) + O(e) is an abbreviation for the more proper (a + 0(e), /? -f O(e)).] Thus the projective representation of the eigenvalues converges at least linearly in e. First-order expansions: Eigenvalues We now turn to first-order expansions of a simple eigenvalue. We will use the notation established above. Theorem 4.10. Let x and y be simple eigenvectors of the regular pencil (A,B), and let (a, (3} = (y^Ax,y^Bx} be the corresponding eigenvalue. Then

Proof. The key to the proof lies in writing the perturbed eigenvectors x and y in appropriate forms. Since the pencil is regular, not both yH A and y^B can be zero. For defmiteness assume that UH = t/ H A / 0. Then by (4.6) we have u^x ^ 0. This implies that if U is an orthonormal basis for the orthogonal complement of u then the matrix (x U)is nonsingular. Hence we can write x = -yx + Uc for some 7 and c. Now since x > x [see (4.10)], we must have 7 > 1. Hence renormalizing x by dividing by 7 and setting e = f/c/7, we may write

Similarly we may write

Now

Vol II: Eigensystems

138
Similarly, Two observations on this theorem.

CHAPTER 2. THE QR ALGORITHM

The expression (4.11) can be written in the form

Hence if A is finite,

This generalizes the Rayleigh-quotient representation of A in (3.21), Chapter 1. Since ||a;||2 = \\y\\2 = 1, equation (4.11) says that up to second-order terms a and ft lie in the intervals [a - e, a + c] and \J3 e, ft + \. We can convert these bounds into bounds on the ordinary form A of the eigenvalue. However, the process is tedious and does not give much insight into what makes an eigenvalue ill conditioned. We therefore turn to a different way of measuring the accuracy of generalized eigenvalues. The chordal metric From (4.4) we see that the projective representation (a, /3) is the one-dimensional subspace of C 2 spanned by the vector (a ft) . It is therefore natural to measure the distance between two eigenvalues (a, ft) and (7, S) by the sine of the angle between them. Denoting this angle by 0, we have by the Cauchy inequality
rp

Hence, after some manipulation

This justifies the following definition. Definition 4.11. The CHORDAL DISTANCE between (a, ft) and (7, S) is the number

There are several comments to be made about this definition and its consequences. The function x is a metric; that is, it is definite and satisfies the triangle inequality. If/? and S are nonzero and we set A = a/ft and p = 7/8, then

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

139

Thus x defines a distance between numbers in the complex plane. By abuse of notation we will denote this distance by x( A, /u). By a limiting argument, we can write

Thus the chordal distance includes the point at infinity. In particular, x(0, oo) = 1. In Theorem 4.8, we saw how to shift a pencil and its eigenvalues by a nonsingular matrix W of order two. Specifically, the eigenvalue (a, ft) was shifted into {(a, ft)W). In general, the chordal metric is not invariant under such shifts. But if W is a nonzero multiple of a unitary matrix, the angle between two projective points is preserved, and the chordal distance between them remains unchanged.

Hence for eigenvalues that are not too large, the chordal metric behaves like the ordinary distance between two points in the complex plane. The name chordal distance comes from the fact that x( A, //) is half the length of the chord between the projections of A and ^ onto the Riemann sphere. The condition of an eigenvalue Turning now to our first-order expansion, we have

from which we get

But the numerator of this expression is

Hence

We summarize our results in the following theorem, in which we recapitulate a bit. Vol II: Eigensystems

140

CHAPTER 2. THE QR ALGORITHM

Theorem 4.12. Let Xbea simple eigenvalue (possibly infinite) of the pencil (A,B) and let x and y be its right and left eigenvectors. Let the projective representation of A be (a,/?), where

Let A - A + E and B = B + F, and set

Then fore sufficiently small, there is an eigenvalue A the pencil (A, B) satisfying

where

There are five comments to be made on this theorem. The number v mediates the effects of the error on the perturbation of the eigenvalue and is therefore a condition number for the problem. By (4.15) it is independent of the scaling of x and y. If ||ar||2 = \\y\\2 = 1 the condition number v is large precisely when a and ft are both small. This agrees with common-sense reasoning from the first-order perturbation expansion

If both a and {3 are small, they are sensitive to the perturbation E and F, which means that the subspace (a, J3) is ill determined. On the other hand, if one of a or j3 is large, then v is not large and the eigenvalue is well conditioned. In particular, we may have j3 = 0, so that the eigenvalue A is infinite. In this case, although A moves infinitely far in the complex plane, it remains in a small neighborhood of infinity on the Riemann sphere. Such are the regularizing properties of the chordal metric. The bound does not reduce to the ordinary first-order bound

when B - I and F = 0. However, if we normalize A so that \\A\\2 = 1 and normalize x and y so that yHx 1, then |A| < 1 and ||ar||2|b||2 = sec Z(x, y). Hence,

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


Moreover, by (4.14),

141

Hence, for the case \\A\\2 = 1 the results of ordinary perturbation theory and our generalized theory agree up to constants near one. Unfortunately, ill-conditioned eigenvalues can restrict the range of perturbations for which the first-order expansion of a well-conditioned eigenvalue remains valid, as the following example shows. Example 4.13. Consider the pencil

where e is small. If we perturb it to get the pencil

then

Thus the eigenvalues of the perturbed pencil are 1 ^/e. In particular, ife 10 the "well-conditioned"eigenvalue 1 has changed by 10~5.

10

The example shows that perturbations can cause an ill-conditioned eigenvalue to wander around, bumping into other eigenvalues and destroying their accuracy. However, this problem should not be taken too seriously. It is obvious from the example that only a very special perturbation can undo a well-conditioned eigenvalue. Such perturbations are unlikely to arise from essentially random sources, such as rounding or measurement error. Perturbation expansions: Eigenvectors To derive a perturbation expansion for a simple eigenvector x of regular eigenpair (A, B), we appeal to the first step of the reduction to Schur form [see (4.2)]. Specifically, let (x X) and (u U) be unitary matrices such that

The fact that we can choose U so UHAx = UHBx = 0 is a consequence of the fact that x is an eigenvector. Conversely, if such a U exists, then (u U) (A, B)(x X) must be of the form (4.16), and x must be an eigenvector.
IT

Vol II: Eigensystems

142

CHAPTER 2. THE QR ALGORITHM

Now let (A, B) = (A+E, B -f F). We seek the perturbed eigenvector in the form x (x -f Xp), where p is to be determined. We also seek the corresponding matrix U in the form U = (U + uq^)(I + <jr# H )~ 2, where q is also to be determined. Since we know that x converges to x as e = \j \\E\\p + \\F\\p * 0, we may assume that p and q are small. In particular, the factor (/+<?<?H)~ 2, which makes f/ orthonormal, differs from the identity by second-order terms in g, and we will drop it in what follows. For x to be an eigenvector of (A. B}. we must have /7H Ax = U^Bx 0. But

the last equality following from (4.16). Similarly, J7H B x = UHFx+(3q+Bp. Hence p and q must satisfy the equations

We may eliminate the auxiliary vector q from these equations by multiplying the first by /3 and the second by a. and subtracting to get

Now the matrix /3A - aB is nonsingular. For otherwise (a,/3) would be an eigenvalue of (A, B), contradicting the simplicity of the eigenvalue (a, /?). Thus

where

The condition of an eigenvector To convert (4.18) to a first order-bound, note that we can multiply (4.17) by a constant to make max{ | a |, |ft\} 1. Moreover, by Lemma 3.12, Chapter 1, up to second-order terms sin Z(z, x) = ||J^Hx||2. Finally, sinceX and U are orthonormal, ||XH#||2 < 1. Hence on taking norms we get: In the above notation suppose that

and set

Then

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

143

The number <$[(a, /?), (A, B}] is analogous to the number sep(A, M) for the ordinary eigenvalue problem [see (3.16), Chapter 1]. It is nonzero if {a, /?) is simple, and it approaches zero as (a, /3} approaches an eigenvalue of (A, B). Most important, as (4.19) shows, its reciprocal is a condition number for the eigenvector corresponding to(a,/3).

4.2. REAL SCHUR AND HESSENBERG-TRIANGULAR FORMS


We now turn to the computational aspects of the generalized eigenvalue problem. As indicated in the introduction to this section, the object of our computation is a Schur form, which we will approach via an intermediate Hessenberg-triangular form. The purpose of this subsection is to describe the real generalized Schur form that is our computational goal and to present the reduction to Hessenberg-triangular form. Generalized real Schur form Let (A, B} be a real, regular pencil. Then (A, B) can be reduced to the equivalent of the real Schur form (Theorem 3.1); i.e., there is an orthogonal equivalence transformation that reduces the pencil to a quasi-triangular form in which the 2x2 blocks contain complex conjugate eigenvalues. Specifically, we have the following theorem. Theorem 4.14. Let (A, B) be a real regular pencil Then there are orthogonal matrices U and V such that

and

The diagonal blocks ofS and T are of order either one or two. The pencils corresponding to the blocks of order one contain the real eigenvalues of(A,B). The pencils corresponding to the blocks of order two contain a pair of complex conjugate eigenvalues of(A,B). The blocks can be made to appear in any order. The proof of this theorem is along the lines of the reduction to generalized Schur form, the chief difference being that we use two-dimensional subspaces to deflate the complex eigenvalues. Rather than present a detailed description of this deflation, we sketch the procedure. Vol II: Eigensystems

144

CHAPTER 2. THE QR ALGORITHM


1. Using Definition 4.6 and Theorem 4.8, argue that complex eigenvalues of a real pencil occur in conjugate pairs and that the real and imaginary parts of their eigenvectors are independent. 2. Let x = y + iz be an eigenvector corresponding to a complex eigenvalue and let X = (y z). Show that for some matrix L, we have AX BXL. 3. Let(F V) be orthogonal with K(V} = n(X). Let (U UL} be orthogonal withft(i7) = K(AV) U U(BV).
4. show that

where S and T are 2x2. By repeated applications of this deflation of complex eigenvalues along with the ordinary deflation of real eigenvalues, we can prove Theorem 4.14. Hessenberg-triangular form The first step in the solution of the ordinary eigenvalue problem by the QR algorithm is a reduction of the matrix in question to Hessenberg form. In this section, we describe a reduction of a pencil (A, B) to a form in which A is upper Hessenberg and B is triangular. Note that if A is upper Hessenberg and B is lower triangular, then AB~l is upper Hessenberg. Thus the reduction to Hessenberg-triangular form corresponds to the the reduction to Hessenberg form of the matrix AB~l. The process begins by determining an orthogonal matrix Q such that Q^B is upper triangular. The matrix Q can be determined as a product of Householder transformations (Algorithm 1:4.1.2). The transformation QT is also applied to A. We will now use plane rotations to reduce A to Hessenberg form while preserving the upper triangularity of B. The reduction proceeds by columns. Figure 4.1 illustrates the reduction of the first column. Zeros are introduced in A beginning at the bottom of the first column. The elimination of the (5, l)-element of A by premultiplication by the rotation $45 in the (4,5)-plane introduces a nonzero into the (5,4)-element of B. This nonzero element is then annihilated by postmultiplication by a rotation Z$ in the (5,4)-plane. The annihilation of the (4,1)- and (3, l)-elements of A proceeds similarly. If this process is repeated on columns 2 through n-2 of the pencil, the result is Algorithm 4.1. Here are some comments. We have implemented the algorithm for real matrices. However, with minor modifications it works for complex matrices. The computation of Q is special. Since Q is to contain the transpose of the accumulated transformations, we must postmultiply by the transformations, even though they premultiply A and B.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

145

Figure 4.1: Reduction to Hessenberg-triangularform

VolII: Eigensystems

146

CHAPTER 2. THE QR ALGORITHM

This algorithm takes a matrix pencil of order n and reduces it to Hessenberg-triangular form by orthogonal equivalences. The left transformations are accumulated in the matrix Q, the right transformations in the matrix Z.

Algorithm 4.1: Reduction to Hessenberg-triangularform

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

147

The operation count for the reduction of B is 2 |n3 flam. The reduction of A takes irot. Thus for real matrices, the algorithm requires

If only eigenvalues of the pencil are desired, we need not accumulate the transformations. The algorithm is backward stable in the usual sense.

4.3. THE DOUBLY SHIFTED QZ ALGORITHM


Like the QR algorithm, the doubly shifted QZ algorithm is an iterative reduction of a real Hessenberg-triangular pencil to real generalized Schur form. Since many of the details such as back searchingare similar to those in the QR algorithm, we will not attempt to assemble the pieces into a single algorithm. Instead we begin with the general strategy of the QZ algorithm and then treat the details. Overview Let (A, B) be in Hessenberg-triangular form and assume that B is nonsingular. Then the matrix C AB~l is Hessenberg and is a candidate for an implicit double QR step. The idea underlying the QZ algorithm is to mimic this double QR step by manipulations involving,only A and B. In outline the algorithm goes as follows. [Before proceeding, the reader may want to review the outline (3.6) of the doubly shifted QR algorithm.] 1. Let H be the Householder transformation that starts a double shift QR step on the matrix AB~l. 2. Determine orthogonal matrices Q and Z with Qei GI such that (A, B} = Q^(HA, HB)Z is in Hessenberg-triangular form. To see why this algorithm can be expected to work, let C = AB~l. Then

Moreover, since Qei = e ithe first column of HQ is the same as that of H. It follows that C is the result of performing an implicit double QR step on C. In consequence, we can expect at least one of the subdiagonal elements c njn _! and c n _ 1?n _ 2 to converge to zero. But because (A, B) is in Hessenberg-triangular form,

Hence if frn-i,n-i and 6 n _2, n -2 do not approach zero, at least one of the subdiagonal elements a n>n _i and a n -i,n-2 must approach zero. On the other hand, if either 6 n _i ?n _i or 6n_2,n-2 approaches zero, the process converges to an infinite eigenvalue, which can be deflated. Vol II: Eigensystems

148

CHAPTER 2. THE QR ALGORITHM

If repeated QZ steps force a n)n _i to zero, then the problem deflates with a real eigenvalue. If, on the other hand, a n _ 1>n _ 2 goes to zero, a 2x2 block, which may contain real or complex eigenvalues, is isolated. In either case, the iteration can be continued with a smaller matrix. Getting started We now turn to the details of the QZ algorithm. The first item is to compute the Householder transformation to start the QZ step. In principle, this is just a matter of computing the appropriate elements of C and using Algorithm 3.1. In practice, the formulas can be simplified. In particular, if we set m = n1, the three components of the vector generating the Householder transformation are given by

In EISPACK and LAPACK these formulas are further simplified to reduce the number of divisions. The formulas are not well defined if any of the diagonal elements 611, 622* bmrn, or bmm is zero. For the case of zero &n, the problem can be deflated (see p. 153). If the others diagonals are too small, they are replaced by eM||.Z?||, where B is a suitable norm. The above formulas do not use the Francis double shift computed from the matrix C. Instead they shift by the eigenvalues of the the trailing 2x2 pencil of (A, B): namely,

This approach is simpler and is just as effective. The QZ step Having now determined a 3x3 Householder transformation to start the QZ step, we apply it to the pencil (.4, B) and reduce the result back to Hessenberg-triangularform. As usual we will illustrate the process using Wilkinson diagrams. Our original pencil

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


has the form

149

If we premultiply this pencil by the Householder transformation computed above, we get a pencil of the form

The next step reduces B back to triangular form. First postmultiply by a Householder transformation to annihilate the elements with superscripts 1. We follow with a plane rotation that annihilates the element with superscript 2. This produces a pencil of the form

We now premultiply by a Householder transformation to annihilate the elements of A with superscripts 1. This results in a pencil of the form

Once again we reduce B back to triangular form using a Householder transformation and a plane rotation:

Vol II: Eigensystems

150

CHAPTER 2. THE QR ALGORITHM

When we repeat the procedure this time, we need only use a plane rotation to zero out the (5,3)-element of A. The result is a matrix that is almost in Hessenberg-triangular form:

A postmultiplication by a plane rotation annihilates the (5,5)-element of B without affecting the Hessenberg form of A. Since the QZ algorithm, like the QR algorithm, works with increasingly smaller matrices as the problem deflates, the sweep will be applied only to the working matrix. Algorithm 4.2 implements a sweep between rows il and i2. In studying this algorithm, keep in mind that k1 points to the column of A from which the current Householder transformation is obtained (except for the first, which is provided by the input to the algorithm). Also note that the Householder transformation that postmultiplies (A, B) reduces the three elements of B to a multiple of ej not ei as housegen assumes. We therefore use the cross matrix

in statements 10 and 12 to reverse the order of the components. There are four comments to be made about this algorithm. An operation count shows that the sweep requires

Thus a QZ sweep is a little over twice as expensive as a doubly shifted QR sweep. The extra rotations in (4.21) are due to the necessity of eliminating 62 in (4.20). An alternative is to premultiply by a Householder transformation to eliminate the elements 61 in the pencil

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

151

Given a real pencil (A, B) in Hessenberg-triangularform, and a vector u that generates a starting Householder transformation, qz2step implements a QZ sweep between rows il and /2. 1. <7z2ste/?(A, , tt, i7, i2, Q, Z) 2. for jfc = il to /2-2 3. if(k^il) 4. fa?Msegew(egen A[fc:fc+2, fc1], w, z/) 5. A[Ar,fe-lJ=i/;A[Jb+l:fc+2,Jt-l] = 0 6. end if
7.

8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30.

VT = uT*B[k:k+2,k:n]; B[k:k+2,k:n] = B[k:k+2,k:n] - UVT v = Q[:, Ar:fc+2]*w; Q[:, k:k+2] = Q[:, k:k+2] - VUT housegen(B[k+2,k:k+2]*f, tiT, i/) ,B[Ar+2,A;+2] = i/;5[Jfe+2,A?:fe+l] = 0 WT = wT*f v = jB[l:A?-fl, k:k+2]*u; B[l:k+l, k:k+2] = B[l:k+l, k:k+2] - vu1 Jbk = min{A?+3,/2} t; = A[l:Jbk,fe:A;+2]*w;A[likk, k:k+2] = A[l:kk,fc:fc+2]- W1 v = Z[:, A;:A;+2]*w; Z[:,fc:A;+2]= Z[:, A;:fc+2]-vttT ro/^/i(5[A:+l,A;+l],k+1], 5[fc+l,Ar],c,5) rotapp(c, s, B[l:k, k+I], B[l:k, k}) rotapp(c, s, A[l:kk, jfc+l], A[l:Jbfe, fc]) rotapp(c,s,Z[:,k+l],Z[:,k]) end for A; rotgen(A[i2-l,i2-2], A[i2,i2-2], c, s) rotapp(c, s, A[/2-l, i2-l:z2], (A[i2,i2-l:i2]) rotapp(c, s, 5[i2-l, /2-l:i2], (J?[i2, i2-l:i2]) w/flpp(c 5' Qt,*2-l], Qt,*2]) rotgen(B[i2,i2], B[i2,i2-l]1c,s) rotapp(c, s, 5[l:i2-l,i2], 5[l:/2-l,i2-l]) rotapp(c, s, A[l:i2, i'2], A[l:/2, i2-l]) rotapp(c, s, [:, i2], Z[:, i2-l]) end qz2step Algorithm 4.2: The doubly shifted QZ step o

VT = u T *A[fc:fc+2, Jk:n]; A[fc:fc+2, fc:n] = A[fc:fc+2, fc:n] - VT

Vol II: Eigensystems

1S2

CHAPTER 2. THE QR ALGORITHM

This gives an operation count of

which is exactly twice the count for a double QR sweep. For more see the notes and references. If only eigenvalues are desired, the sweep can be performed only on the subpencil (A[il : i2,il : i2],B[il : i2,il : z'2j) and the transformations need not be accumulated. The algorithm is stable in the usual sense.

4.4. IMPORTANT MISCELLANEA


Anyone attempting to code a QZ-style algorithm from the description in the last two sections will quickly find how sketchy it is. The purpose of this subsection is to fill the gapsat least to the extent they can be filled in a book of this scope. We will treat the following topics: balancing, back searching, infinite eigenvalues, 2x2 problems, and eigenvectors. Balancing The natural class of transformations for balancing the pencil (A, B) are the diagonal equivalences. Thus we should like to find diagonal matrices DR and Dc with positive diagonals so that the nonzero elements of of DRADC and DRBDC are as nearly equal in magnitude as possible. If we write

then we wish to choose positive numbers ri,... , rn and c\,... , cn so that all the elements riCj\aij\ and TiCj\bij\ of DRADC and DRBDC are nearly equal. This problem is not well determined, since multiplying the pencil (A, B) by a scalar does not change the balance. But we can make it well determined by specifying a value around which the scaled elements must cluster. If we take that value to be one, then our problem is to choose positive numbers 7*1,... , rn and c\,... , cn so that

The problem (4.22) is nonlinear in the unknowns rt- and GJ. However, if we set

then the problem is equivalent to finding quantities p\ and 7^ so that

If we solve this problem in the least squares sense, we end up with the problem

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

153

Without going into details, the normal equations for (4.23) are very simple. Although the system is too large to solve directly, it can be solved by an iterative technique called the method of conjugate gradients. Each iteration requires 0(n) operations, and the method converges so swiftly that the determination of the scaling factors is also an 0(n) process (remember that we do not have to determine the scaling factors very accurately). The procedure sketched above is not invariant under change of scale of A and B i.e., it will produce different results for the pair (ovl, rB) as a and r vary. Consequently, it is recommended that A and B be normalized so that their norms are one in some easily calculated, balanced norm. This scaling also helps in controling underflow and overflow in the QZ step. Back searching The QZ step implemented in Algorithm 4.2 is performed between rows il and 12 of A and B, where the elements A[/7-l, il] and A[i21,12] have been deemed negligible. The integers il and 12 are determined by a back-searching algorithm analogous to Algorithm 2.6. The chief problem is to decide when an element is negligible. The usual procedure is to assume that the problem is reasonably balanced and declare an element aij negligible if in some convenient norm. A similar criterion is used for the elements of B. Infinite eigenvalues If, in the course of the QZ iteration, a negligible element occurs on the diagonal of B, the pencil has an infinite eigenvalue. There are many ways of treating infinite eigenvalues. The following is a simple and efficient deflation procedure. Consider the Wilkinson diagram

in which the fourth diagonal element of B is zero. We can postmultiply this pencil by a rotation in the (4,3)-plane to annihilate the hatted element in B. The result is the pencil

VolII: Eigensy stems

154

CHAPTER 2. THE QR ALGORITHM

We may now premultiply a rotation in the (4,5)-plane to return A to Hessenberg form:

We can now repeat the process by postmultiplying by a rotation in the (3,2)-plane to get

and then premultiplying by a rotation in the (3,4)-plane to get

One more step of post- and premultiplication gives

Finally premultiplication by a rotation in the (1,2)-plane gives

As the lines in the above diagram show, the infinite eigenvalue has been deflated from the problem.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

155

We can also deflate an infinite eigenvalue if there are two small consecutive diagonal elements. Specifically, consider the matrix

If we apply a plane rotation in the (5,4)-plane to annihilate ci, then the (5,4)-element becomes

Consequently, if ei2/c is negligible, we can set the (5,4)-element to zero and deflate the zero (4,4)-element as described above. The 2x2 problem When the QZ iteration deflates a 2x2 pencil, it may have real eigenvalues. In that case, we will naturally want to deflate it further, so that the real eigenvalues appear explicitly on the diagonal of the Schur form. This amounts to computing the Schur form of a pencil of order two. This, it turns out, is not an easy problem when the effects of rounding error are taken into account. The details are too involved to give here, and we only warn the reader not to go it alone. Copy the EISPACK or LAPACK code. Eigenvectors Eigenvectors can be computed by a back substitution algorithm analogous to the ones for the ordinary eigenvalue problem. Unlike the generalized eigenproblem of order two, this algorithm contains no significant numerical pitfalls. However, its derivation is lengthy, and once again we refer the reader to the EISPACK or LAPACK code. 4.5. NOTES AND REFERENCES The algebraic background The generalized eigenvalue problem (regarded as a pair of bilinear forms) goes back at least to Weierstrass [293,1868], who established the equivalent of the Jordan form for regular matrix pencils. Jordan [137,1874] later gave a new proof for singular pencils. Kronecker [152, 1890] extended the result to rectangular pencils. For modem treatments see [80,141,269, 281,304]. The generalized Schur form is due to Stewart [251]. Perturbation theory For a general treatment of the perturbation theory of the generalized eigenvalue problem along with a bibliography see [269]. The use of the chordal metric in generalized Vol II: Eigensystems

156

CHAPTER 2. THE QR ALGORITHM

eigenvalue problems is due to Stewart [255], who is happy to acknowledge a broad hint from W. Kahan. For a chordless perturbation theory and backward error bounds see [112]. The QZ algorithm The QZ algorithm, including the preliminary reduction to Hessenberg-triangular form, is due to Moler and Stewart [178]. The double shift strategy, of course, works when the eigenvalues of the trailing pencil are real. However, Ward [286] has observed that the algorithm performs better if real shifts are treated by a single shift strategy. This option has been incorporated into the EISPACK and LAPACK codes. The balancing algorithm is due to Ward [287], who builds on earlier work of Curtis and Reid [50]. Ward [286] and Watkins [291] consider the problem of infinite eigenvalues. In particular, both the reduction to Hessenberg-triangular form and the steps of the QZ algorithm move zero elements on the diagonal of B toward the top. Moreover, Watkins shows that the the presence of small or zero elements on the diagonal of B does not interfere with the transmission of the shift. Thus an alternative to deflating infinite eigenvalues from the middle of the pencil is to wait until they reach the top, where they can be deflated by a single rotation. For the treatment of 2x2 blocks see the EISPACK code qzval or the LAPACK codeSLAG2.

3
THE SYMMETRIC EIGENVALUE PROBLEM

We have seen that symmetric (or Hermitian) matrices have special mathematical properties. In particular, their eigenvalues are real and their eigenvectors can be chosen to form an orthonormal basis for Rn. They also have special computational properties. Because of their symmetry they can be stored in about half the memory required for a general matrix. Moreover, we can frequently use the symmetry of the problem to reduce the operation count in certain algorithms. For example, the Cholesky algorithm for triangularizing a symmetric matrix requires half the operations that are required by its nonsymmetric counterpart, Gaussian elimination (see Algorithm 1:2.2.1). The first part of this chapter is devoted to efficient algorithms for the symmetric eigenvalue problem. In the first section we will show how to adapt the QR algorithm to solve the symmetric eigenvalue problem. The procedure begins as usual with a reduction to a simpler formin this case tridiagonal formfollowed by a QR iteration on the reduced form. We will treat this reduction in 1.1 and the tridiagonal QR iteration itself in 1.2. In 2 we will consider some alternative methods for the symmetric eigenvalue problem: a method for updating the symmetric eigendecomposition, a divide-and-conquer algorithm, and methods for finding eigenvalues and eigenvectors of band matrices. We next turn to the singular value decomposition. It is included in this chapter because the squares of the singular values of a real matrix X are the eigenvalues of the symmetric matrix A = X^X and the eigenvectors of A are the left singular vectors of X. Thus, in principle, the algorithms of the first section of this chapter can be used to solve the singular value problem. In practice, this approach has numerical difficulties (see 3.2), and it is better to solve the singular value problem on its own terms. Fortunately, the QR algorithm for symmetric matrices has an analogue for the singular value problem. Finally, in a brief coda, we treat the symmetric positive definite generalized eigenvalue problem Ax = XBx, where A is symmetric and B is positive definite. This problem has appealing analogies to the ordinary symmetric eigenproblem, but it is mathematically and numerically less tractable. In the ordinary eigenvalue problem, real and complex matrices are treated in es157

158

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

sentially different ways. For the symmetric eigenvalue problem, the singular value problem, and the definite generalized eigenvalue problem, the complex case differs from the real case only in the fine details. For this reason we will assume in this chapter that:

A and B are real symnetric matrices of order n.

1. THE QR ALGORITHM
In this section we will show how the QR algorithm can be adapted to find the eigenvalues and eigenvectors of a symmetric matrix. The general outline of the procedure is the same as for the nonsymmetric eigenvalue problemreduce the matrix to a compact form and perform QR steps, accumulating the transformations if eigenvectors are desired. Because orthogonal similarities preserve symmetry, the process simplifies considerably. First, the Hessenberg form becomes a tridiagonal form [see (1.1)]. Second, the final Schur form becomes diagonal. Finally, the columns of the accumulated transformations are the eigenvectors of A. Thus the algorithm computes the spectral decomposition

where V is an orthogonal matrix whose columns are eigenvectors of A and A is a diagonal matrix whose diagonal elements are the corresponding eigenvalues.

1.1. REDUCTION TO TRIDIAGONAL FORM


If a symmetric matrix A is reduced to Hessenberg form by orthogonal similarity transformations, all the elements below its first subdiagonal are zero and hence by symmetry so are all the elements above the first superdiagonal. Thus the matrix assumes a tridiagonal form illustrated by the following Wilkinson diagram:

In this volume almost all tridiagonal matrices will turn out to be symmetric or Hermitian. Hence: Unless otherwise stated a tridiagonal matrix is assumed to be symmetric or, if complex, Hermitian. The purpose of this subsection is to describe the details of the reduction of a symmetric matrix to tridiagonal form. But first we must consider how symmetric matrices may be economically represented on a computer.

SEC. 1. THE QR ALGORITHM The storage of symmetric matrices

159

Since the elements a^ and ajz of a symmetric matrix are equal, a symmetric matrix is completely represented by the n(n+l)/2 elements on and above its diagonal. There are two ways of taking advantage of this fact to save storage. First, one can store the matrix in, say, the upper half of a two-dimensional array of real floating-point numbers and code one's algorithms so that only those elements are altered. This approach has the advantage that it permits the use of array references like A[z, j] while leaving the rest of the array free to hold other quantities. The disadvantage is that the rest of the array is seldom used in practice because its n(n-l)/2 elements are insufficient to hold another symmetric or triangular matrix of order n. Second, one can put the diagonal and superdiagonal elements of a symmetric matrix into a one-dimensional array a device known as packed storage. The two usual ways of doing this are to store them in column order and in row order. The following diagram illustrates a 4x4 symmetric matrix stored in an array a in column order.

Packed storage offers two advantages. First, unlike the natural representation, it uses all the storage allocated to the matrix. Second, on nonoptimizing compilers it may run more efficiently, since the code references only a one-dimensional array. The price to be paid for these advantages is that the resulting code is hard to read (although practice helps). Because our algorithms are easier to understand in the natural representation, we will assume in this volume that the symmetric matrix in question is contained in the upper part of a two-dimensional array. Reduction to tridiagonal form The algorithm for reduction to tridiagonal form is basically the same as the algorithm for reduction to Hessenberg form described beginning on page 83. We partition A in the form

and determine a Householder transformation H such that Ha^i = 76!. Then

Vol II: Eigensystems

160

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

This matrix has the Wilkinson diagram (n = 6)

from which it is seen that the transformation has introduced zeros into the appropriate parts of A. The reduction continues by recursively reducing EA^E to tridiagonal form. The computation of EA^E can be simplified by taking advantage of symmetry. If we denote the vector defining E by r, then

This formula can be simplified by setting

so that

Before we can code the algorithm, we must decide how to represent the final tridiagonal matrix. The usual convention is to store the diagonal of the matrix in a onedimensional array, say d, and the off-diagonal elements in another one-dimensional array, say e. Thus the final tridiagonal matrix has the form

Algorithm 1.1 implements the tridiagonalization described above. Here are some comments. The computation of the product of A[k+1, k+1] and the Householder generating vector must be done at the scalar level, since in our storage scheme traversing a row

SEC. 1. THE QR ALGORITHM

161

Given a real symmetric matrix A of order n, TriReduce reduces A to tridiagonal form. The diagonal elements of the tridiagonal matrix are stored in the array d\ the offdiagonal elements, in the array e. The transformations are accumulated in the array V. 1. 2. TriReduce(A, d, e, V) for k ~ 1 to n-2

3.
4. 5. 6. 7. 8.

d(k) = A[k,k]
housegen(A[k,k+l:n], r[k+l:n], e[k+l]) V[k+l:n,k] = r[k+l:n] w =0 for i = fc+1 ton s[i] = 0

9.
10. 11. 12. 13. 14.
15.

tor j = k+l to i-l


s[i] = s[j] + A [7, d*r[j] end for j for j = i to n sM = *[*] + 4[i,j]*r[;] end for j
iu = i/; -f 5[z]*r[z]

16. end for i 17. s[k+l:n] = s[k+l:n] - (w/2)*r[k+l:n] 18. f o r j = Ar+1 to 7^ 19. f o r i = 1 to j 20. A [ i , j ] = A[iJ] - r[i]*s[j] - s[i]*r[j] 21. end for i 22. end for j 23. end for fc; 24. rf[n-l] -1] = A[n-l,n-l] 25. e[n-l] = A[n-I,n] 26. d[n] = A[n, n] 27. F[l:n-2,n-l:n] = 0; V[n-l:n,n-l:n] = I 28. for A; = n-2 to 1 by-1 29. r = V[k+l:n1k] 30. VT = rTF[A;+l:n, k+l:n] 31. V[fc+l:n, A?+l:w] = V[A:+l:w,fc+l:]- r*vT 32. V r [:,A ? ] = c Jb 33. end for k 34. end TriReduce
Algorithm 1.1: Reduction to tridiagonal form o Vol II: Eigensystems

162

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

of A must be done by proceeding down the corresponding column to the diagonal and then across the row. To keep the indexing consistent we store the Houselder vector in r[fc+l,n]. As in Algorithm 2.2, Chapter 2, we economize by saving the generating vectors for the Householder transformations and then accumulating them in a separate loop. The algorithm is cheaper than the reduction of a general matrix to Hessenberg form. Specifically: The operation count for Algorithm 1.1 is

flam for the reduction of A


flam for the accumulation of V

This should be compared with an operation count of |n3 flam for the reduction of A in Algorithm 2.2, Chapter 2. In spite of the fact that the final tridiagonal form requires only two one-dimensional arrays to store, its computation requires the upper half of a two-dimensional array. This particular implementation uses the array containing the original matrix A, destroying A in the process. The algorithm is backward stable in the usual sense (see Definition 2.4, Chapter 2). The computation of s, and r 1 A^r in (1.2) is done in statements 8-17. The computation of A^r requires two loops because only the upper part of the array A is referenced. This computation is neither column nor row oriented, and it is an interesting exercise to recast it so that it has uniform orientation. The first column of the matrix V is GI . This fact will prove important in deriving the implicit shift QR algorithm for symmetric tridiagonal matrices. Making Hermitian tridiagonal matrices real Algorithm 1.1 can easily be converted to compute the tridiagonal form of a complex Hermitian matrix. In this form the array d will necessarily contain real numbers; the array e, however, can contain complex numbers. This means that subsequent manipulations of the tridiagonal form will use complex rotations, which is expensive (see the comment on page 91). Fortunately, we can make the elements of e real by a sequence of diagonal similarity transformations. The process is sufficiently well illustrated for the case n 3. The tridiagonal matrix T has the form

SEC. 1. THE QR ALGORITHM


The first step is to make e\ real. Let D\ = diag(l, z/i, 1). Then

163

If e\ 0, it is real, and we do not need to do anything. In this case we may take 1/1 = 1. Otherwise we take v\ e-t l\e\ , so that

Similarly if we define D-2 diag(l, 1, v<), where

then

Thus the original matrix has been reduced to real tridiagonal form. Algorithm 1.2 sketches this scheme. It is incomplete in an important respect. The array e is necessarily an array of type complex, whereas at the end we require an array of real floating-point numbers. This problem can be overcome by adjusting the e^ (and the columns of V) as they are generated in the course of the reduction to tridiagonal form. The details are left as an exercise.
1.2. THE SYMMETRIC TRIDIAGONAL QR ALGORITHM

Since a tridiagonal matrix T is necessarily upper Hessenberg and the basic QR step preserves upper Hessenberg form, the result of performing a QR step on T is upper Hessenberg. Since the QR step also preserves symmetry, if T is symmetric and tridiagonal, the result of performing a QR step on T is symmetric and tridiagonal. Thus the QR algorithm preserves symmetric tridiagonal form. When this fact is taken into account the result is a sleek, speedy algorithm for computing the eigenvalues and optionally the eigenvectors of a symmetric tridiagonal matrix. As above, we will assume that the tridiagonal matrix T in question is represented by an array d containing the elements of the diagonal of T and an array e containing the elements of the superdiagonal [see (1.3)].

Vol II: Eigensystems

164

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

This algorithm takes a Hermitian tridiagonal matrix represented by the arrays d and e and transforms it to a real tridiagonal matrix. The transformations are accumulated in a matrix V.
1. 2. 3. 4. 5. for k = 1 ton-1 a = \ek\ if(a/0) v ek/a ek = a

6.

if (& / n-1)

7. efc+i = *efc+i 8. end if 9. F[l:n, Ar+1] = */*F[l:n, &+1] 10. end if 11. end for fc Algorithm 1.2: Hermitian tridiagonal to real tridiagonal form

The implicitly shifted QR step The symmetric tridiagonal QR algorithm has explicitly and implicitly shifted forms, of which the latter is the most commonly implemented. In broad outline the tridiagonal QR step goes as follows. 1. Given a shift AC determine a plane rotation P12 such that the (2,1)-element ofP-^T-K^iszero. 2. Determine an orthogonal matrix Q whose first column is a multiple of ei such that f = QT-Fj2 APi2Q is tridiagonal. As with the implicit double shift, the reasoning following (3.6), Chapter 2, shows that T is the matrix that would result from an explicit QR step with shift AC. An implementation of this sketch goes as follows. Since PI 2 is a rotation in the (1,2)-plane, the matrix P^APu has the form

SEC. 1. THE QR ALGORITHM

165

Figure 1.1: Implicit tridiagonal QR step

We now choose a rotation P23 in the (2,3)-plane to annihilate /. On applying the similarity transformation, we obtain a matrix of the form

We see that / has been chased one row and column down the matrix. This process can be repeated until the element / drops off the end. Figure 1.1 illustrates the entire procedure. In the implementation of this algorithm we must, as usual, take into account the fact that the problem may have deflated. Consequently, Algorithm 1.3 implements a QR step between rows il and 12 of T. The application of the rotations is tricky. As one enters the loop on i, the matrix has the form

where a hat indicates a final value. The element g is an intermediate value of di after the rotation Pi-ij has been applied. The first two statements of the loop complete the

Vol II: Eigensystems

166

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given a symmetric tridiagonal matrix whose diagonal is contained in the array d and whose superdiagonal is contained in e, this algorithm performs one QR step between rows il and i"2. The transformations are accumulated in V.
1. 2. triqr(d, e, AC, /7, i'2, V) g = d[i7] - K

3. 5 = 1; c = l;p = 0; 4. fori = i7toi2-l 5. / = s*e[i] 6. b = c*e[i] 1. rotgen(g, /, c, 5) 8. if(tV/7)e[2-l] = ^;fi 9. w = d[i] p 10. v = (d[z+l] w)*5 + 2*c*6 11. p = 5*v d[i] = w+p 12. 13. g = c*vb 14. /o/flpp(c, 5, V[:, t], F[:,+!]) 15. end for i 16. d[i2] = d[i2] - p 17. c[t2-l] = ^ 18. end triqr
Algorithm 13: The symmetric tridiagonal QR step o

SEC. 1. THE QR ALGORITHM application of P{-\^ to bring the matrix in the form

167

Finally the subsequent statements bring the matrix into the form

which advances the loop by one step. It is worth noting that the derivation of this sequence requires the application of the identity c2 -f s2 = 1, so that in the presence of rounding error the statements do not produce the same results as the direct application of the plane rotations PI,;+I. Such "simplifications" based on exact mathematical identities can turn a stable algorithm into an unstable one. Fortunately, this is not true of Algorithm 1.3, which is stable in the usual sense. It is easy to see that if m = 12 il, then the transformation of T requires 6m fladd and 5m flmlt plus m calls to rotgen. The accumulation of the transformations in V requires mn flrot. Thus the computation of eigenvectors is the dominant part of the calculation. If only eigenvalues are required, statement 14 can be eliminated with great saving in computations. Choice of shift Two shifts are commonly used with Algorithm 1.3. The first is the Rayleigh quotient shift, which is simply the diagonal element c/,2- The second is the Wilkinson shift, which is the eigenvalue of the matrix

that is nearest c/,2- The Wilkinson shift is globally convergent and is generally the one that is used. Local convergence The local convergence analysis beginning on page 73 applies to the symmetric problem. Specifically, if, say, dn is converging to a simple eigenvalue, then (2.14), Chapter 2, implies that the values of e n _i converge cubically to zero, provided the Rayleigh quotient shift is used. In fact, because the multiple eigenvalues of a defective matrix VolII: Eigensystems

168

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

are nondefective the convergence is cubic even for multiple eigenvalues. The Wilkinson shift usually gives cubic convergence, although in theory the convergence can be quadratic. This possibility is so remote that it is not considered a reason to prefer the Rayleigh quotient shift over the Wilkinson shift. Deflation If ei is zero, the tridiagonal matrix T deflates into two tridiagonal matrices, one ending with di and the other beginning with d{+i. If et is negligible, we can set it to zero to deflate the problem. Thus we must consider what criterion we shall use to decide when a subdiagonal element of a tridiagonal matrix is effectively zero. We have already treated this problem in 2.4, Chapter 2, where we proposed two possible solutions, one for balanced matrices and one for graded matrices. Here we will propose yet another solution adapted to tridiagonal matrices. We will proceed informally by deriving a criterion for deflating a graded matrix of order two. Consider the matrix

where p < 1 represents a grading ratio. When e is zero, the matrix has eigenvalues d and pd. We will now see how e perturbs the eigenvalue pd when e is small. The characteristic equation for T is

where g = e2. Differentiating this equation implicitly with respect to g gives

where \g is the derivative of A with respect to g. Since A = pd, we have

the latter approximation holding when p is small. Hence when e is small, the perturbation in the eigenvalue pd is approximately e2/a. If we wish the relative error in pd to be less than the rounding unit, we must have

or

SEC. 1. THE QR ALGORITHM

169

Note that the quantity y |a||pa| is the geometric mean of the two diagonal elements of T. This suggests that we regard a subdiagonal of a graded tridiagonal matrix to be negligible if

This criterion is effective for graded matrices, but it is too liberal for ordinary matrices. We therefore replace it with

Note that if di and di+i are of a size, then their geometric mean is about the same size, and the criterion reduces comparing et- to the rounding unit scaled by the size of the local diagonals. On the other hand, if the matrix is graded as in (1.4), then the criterion is stricter than (1.5), which tends to preserve the smaller eigenvalues. Because ^f\d^di^\\ < ||T||F, the Hoffman-Wielandt theorem (Theorem 3.10, Chapter 1) insures that the criterion (1.6) always preserves the absolute accuracy of the eigenvalues. Graded matrices It is important to remember that when one is using the tridiagonal QR algorithm to solve graded problems, the grading should be downward [see (2.36), Chapter 2]. If the grading is upward we can flip the matrix about its cross diagonal to reverse the grading. Alternatively, there is a variant of the QR algorithm, called the QL algorithm, which performs well on matrices that are graded upward. For more see the notes and references. Variations This brings to an end our discussion of the QR algorithm for symmetric matrices. But it by no means exhausts the subject. One has only to write down a naive version of the tridiagonal QR step and compare it with Algorithm 1.3 to realize that the formulas can be manipulated in many different ways. Not surprisingly, people have proposed many versions of the basic tridiagonal algorithm, each with their advantagesreal or imagined. Of these variants perhaps the most important is the square root free PWK method, which is especially valuable when only the eigenvalues of a symmetric tridiagonal matrix are needed. See the notes and references.

1.3. NOTES AND REFERENCES General references


The title of this chapter is the same as that of Beresford Parlett's masterful survey of the field [206], which is required reading for anyone interested in the subject. Wilkinson's Algebraic Eigenvalue Problem [300] contains much valuable material, as does the Handbook series of algorithms [305]. Vol II: Eigensystems

170

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Reduction to tridiagonal form Givens [83,1954] was the first to use orthogonal transformations to reduce a symmetric matrix to tridiagonal form. He used plane rotations, which in consequence are often called Givens rotations, and the method is called Givens' method. He went on to find the eigenvalues of the tridiagonal matrix by Sturm sequences and the inverse power method (see 2.3). For an error analysis of Givens' method see [300, 5.26]. As mentioned in 2.6, Chapter 2, Householder [123] observed that a general matrix could be reduced to Hessenberg form by Householder transformations and by implication that a symmetric matrix could be reducted to tridiagonal form. The actual algorithm given here is due to Wilkinson [297]. For an error analysis of Householder's method see [300, 5.35]. The tridiagonal QR algorithm Although Francis proposed his implicitly shifted QR algorithm for Hessenberg matrices, the extension to symmetric tridiagonal matrices is obvious. For a detailed treatment of the algorithm see [206, Ch. 8]. Parlett [206, Ch. 4] gives a proof of the convergence of the QR algorithm with Rayleigh quotient shift that he attributes to Kahan. The result is not quite global convergence, although the method performs well in practice. In 1968 Wilkinson [302] showed that the QR algorithm with Wilkinson shift (not his name for it) is globally convergent, and this has been the preferred shift ever since. However, Jiang and Zhang [135] have proposed a way of alternating between the Rayleigh quotient and Wilkinson shifts in such a way that the algorithm is globally and cubically convergent. We have derived the criterion (1.6) for setting an element to zero informally by considering a 2x2 matrix. For positive definite matrices, the criterion can be rigorously justified [59, Theorem 2.3]. If a symmetric tridiagonal matrix is graded upward, the QR algorithm will generally fail to compute the smaller eigenvalues accurately. An alternative is the QL algorithm, which is based on the sequence defined by

The QL step moves northwest from the bottom of the matrix to the top, and it is the first off-diagonal element that converges rapidly to zero. If the tridiagonal matrix was obtained by Householder tridiagonalization, that algorithm must also proceed from the bottom up, rather than top down as in Algorithm 1.1. Perhaps the most complete set of options is given by the LAPACK codes xSYTRD and xSTEQR. The former reduces a symmetric matrix to tridiagonal form and can be coaxed into performing the reduction either top down or bottom up. The latter automatically chooses to use either the QR or QL algorithm based on the relative sizes of the diagonals at the beginning and ends of the current blocks. For a brief summary of the various implementations of the symmetric tridiagonal

SEC. 2. A CLUTCH OF ALGORITHMS

171

QR algorithm see [206, 8.14-15], which also contains a complete exposition of the PWK (Pal-Walker-Kahan) algorithm. For an implementation see the LAPACK routine xSTERF.

2. A CLUTCH OF ALGORITHMS
The QR algorithm is not the only way to compute the eigensystem of a symmetric matrix. In this section we will consider some important alternative algorithms. We will begin this section with the problem of computing the eigensystem of a diagonal matrix plus a rank-one modification. This algorithm can in turn be used to implement a divide-and-conquer algorithm for the symmetric tridiagonal problem, which is treated in 2.2. Finally, in 2.3 we will show how to compute selected eigenvalues and eigenvectors of symmetric band matrices.

2.1. RANK-ONE UPDATING


In this subsection we will be concerned with the following problem. Let the symmetric matrix A have the spectral decomposition

[see (1.10), Chapter 1]. Let

where a 1. Find the spectral decomposition A VAV"T of A. One way of solving this problem is to form A and use the QR algorithm to compute its eigensystem. However, it might be hoped that we can use the spectral decomposition (2.1), which we already know, to simplify the computationa process called updating. With some decompositionse.g., the Cholesky decompositionupdating can result in a striking reduction in computation, typically from 0(n3) to O(n2). Unfortunately, updating the spectral decomposition requires 0(n3) operations. Nonetheless, the updating algorithm is less expensive than computing the decomposition from scratch, and the central part of the computationthe diagonal updating problemis useful in its own right. Algorithm 2.1 outlines the basic steps of the updating algorithm. We will treat these steps each in turn. Reduction to standard form We first turn to the problem of reducing A = A-fcrxx1 to the standard form D + zz1. We proceed in stages. At each stage we underline the currently reduced matrix First, since a 1, we may write the updating problem in the form

Vol II: Eigensystems

172

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Let A FAFT be the spectral decomposition of the symmetric matrix A. This algorithm sketches how to compute the spectral decomposition of A = A + axx^, where <r = l. 1. Reduce the problem to that of updating the eigensystem of D + zz , where D is diagonal with nondecreasing diagonal elements, and z is a vector with nonnegative components. 2. Deflate the problem to get rid of all very small components of z and to make the diagonal elements of D reasonably distinct. 3. Find all the remaining eigenvalues of D + zz1'. This is done by solving a rational equation whose roots are the required eigenvalues. 4. Use the eigenvalues to compute the eigenvectors of D -f zz^. 5. Transform the eigensystem of D + ZZT back to the original eigensystem of A. Algorithm 2.1: Rank-one update of the spectral decomposition This makes the sign of xx1 positive. Second, from the spectral decomposition (2.1), we have
rp

The matrix to be updated is now <jA, which is diagonal. Third, let 5 be a diagonal matrix whose elements are 1, such that Sy is nonnegative. Then

This makes the elements of the vector defining the update nonnegative. Fourth, let P be a permutation such that the diagonals of cr_PT AP appear in nondecreasing order. Then

If we now set

then

Thus if we can compute the spectral decomposition

SEC. 2. A CLUTCH OF ALGORITHMS


then with A = ah the decomposition

173

is the spectral decomposition of A. Here are some comments on the reduction. The way a = 1 keeps popping in and out of the formulas may be confusing. Algorithmically, what the equations say is that if a -1, update - A and then change the sign back at the end. To complete the updating, we must compute VSPQ (this is essentially step five in Algorithm 2.1). The computation of VS is simply a column scaling. The computation of ( V S ) P is a permutation of the columns of VS, about which more below. The computation of (VSP)Q is a matrix-matrix multiplication and takes about n3 flam. This has the consequence that our updating algorithm does not gain in order over the naive scheme of computing the decomposition of A from scratch. But still it is faster. Unless the order n of the problem is small, care should be taken to choose an efficient algorithm to sort the diagonals of D in order to avoid a lengthy series of column interchanges in the matrix VS. We will have occasions to exchange diagonals of D later in the algorithm. Any permutation of the diagonals must be reflected in a corresponding permutation of the columns of VS and the components of z. When we speak of such permutations, we will tacitly assume that VS and z have also been adjusted. In an actual implementation it may be better not to permute the columns of VS, the diagonals of D, and the components of z until the very end. Instead one might construct a data structure that keeps track of where these quantities should be and reference them through that structure. Deflation: Small components of z If the ith component of z is zero, so that z has the form

then D -f ZZL can be partitioned in the form

In this case the element di is an eigenvalue of the updated matrix. By a permutation we can move this eigenvalue to the end of the matrix and bring it back at the end of the update. Vol II: Eigensystems

174

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

In practice, we will seldom meet with components of z that are exactly zero. Instead we will find that some component zt- is small, and we must decide when we can regard it as zero. Now in this case we can write

Thus the effect of replacing <?,- by zero is to replace D + zz1 by D + ZZT - E. Thus a reasonable criterion is to require Z{ to be so small that

where eM is the rounding unit, and 7 is some modest constant (more about that later). By Theorem 3.8, Chapter 1, if this criterion is satisfied, setting Z{ to zero will move each eigenvalue by no more that \\D-\- zz^ I^M- Unless the original matrix has special structure, this is the kind of perturbation we should expect from rounding the elements of A. Now by computing the Frobenius norm of E, we get the bound

Moreover we can estimate

Hence our criterion becomes

Here we have absorbed the constant \/2 into 7. Deflation: Nearly equal d{ It turns out that if two diagonals of D are sufficiently near one another, we can use a plane rotation to zero out one of the corresponding components of z, thereby deflating the problem. The process is sufficiently well illustrated by the 2x2 problem

Let c and s be the cosine and sine of a plane rotation that annihilates the component Z2 of z:

SEC. 2. A CLUTCH OF ALGORITHMS


where z\ = y1' z\ + z\. Then

175

Consequently, if (d^ d\)cs is sufficiently small we can ignore it, and the problem deflates. As above, we deem this quantity sufficiently small if

In the general case, because the diagonal elements of d are nondecreasing it is only necessary to test adjacent diagonal elements. Of course, once a diagonal has been deflated, the diagonal that remains must be tested again against its new neighbor. When to deflate There is an important tradeoff in our criteria for deflation. If it is too stringent, we will seldom deflate and miss the substantial benefits of deflation. On the other hand, if the criterion is too liberal, the accuracy of our final results will deteriorate. There is yet another tradeoff. The calculations of the eigenvalues and eigenvectors to be described later require that the Z{ be nonzero and that the d{ be strictly increasing. Thus the deflation procedure can be seen as a preprocessing step to insure that the computation as a whole runs smoothly. This favors a liberal criterion over a conservative one. Saving accuracy at one stage is a poor bargain if it is lost at another. Since 7 controls the stringency of the criterion, the above discussion suggests that it should have a reasonable large value. A strict rounding-error analysis suggests that 7 ought to grow with n. However, this is too liberal because the rounding-error analysis is necessarily conservative. The conventional wisdom is that 7 should be a modest constant, say 10. The secular equation We turn now to the computation of the eigenvalues of D + ZZH . We begin with a theorem that shows where the eigenvalues lie and gives an equation they must satisfy. Theorem 2.1. If d\ < d% < < dn and the components of z are nonzero, the eigenvalues ofD + zz1 satisfy the SECULAR EQUATION

Moreover, the solutions AI < < An of (2.1) satisfy

Vol II: Eigensystems

176

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Proof. To derive the secular equation we will employ the useful fact that

This can be proved by observing that any vector orthogonal to v is an eigenvector of / UVT corresponding to one, while the vector v is an eigenvector corresponding to 1 v*-u. The result now follows from the fact that the determinant of a matrix is the product of the eigenvalues of the matrix. The characteristic polynomial of D + zz^ is

the last equality following from (2.9). Thus the characteristic polynomial is the product of Hi(^ ~ ^) anc* /(A) defined by (2.7). Let us consider the zeros of the latter. As A approaches d\ from above, /(A) must become negative. As A approaches di from below, /(A) must become positive. Hence / has a zero AI in (d\,e^)- In the same way we can show that / has zeros \i (di,di+i) (i 1,..., n - 1). Finally, as A approach dn from above, /(A) becomes negative, while as A oo, /(A) -* 1. Hence / has a zero A n satisfying An > dn. The proof is completed by observing that the n zeros A; of/ are also zeros of the characteristic polynomial p and hence are the eigenvalues of D + zz^. Solving the secular equation Theorem 2.1 shows that we can find the updated eigenvalues A z of A (up to the sign a) by solving the secular equation (2.7). Moreover, the interlacing inequality (2.8) shows that each root A z is simple and located in (d;, d;+i) [or in (dn, oo) for An]. Thus in principle we could use an off-the-shelf root finder to compute the A;. However, to determine the eigenvectors the eigenvalues must be calculated to high accuracy. Thus our root-finding algorithm must be specifically designed to work with the secular equation. The detailed description of such an algorithm is beyond the scope of this book, and here we will merely sketch the important features. But first a word on computer arithmetic. Throughout these volumes we assume that floating-point computations are done in standard floating-point arithmetic. Specifically, we assume that, excluding overflows and underflows, each floating-point operation returns the correctly rounded value of the exact operation. This assumption is critical for the algorithms that follow. For more see the notes and references. For definiteness we will consider the problem of computing A^, where k < n. The first step is to determine whether A^ is nearer <4 or dk+i. This can be done by

SEC. 2. A CLUTCH OF ALGORITHMS

111

evaluating f[(dk -f dk+i )/2]. If the value is negative, A& is nearer di\ if it is positive, Afc is nearer di+i. For definiteness we will suppose that \k is nearer d^. The second step is to shift the secular equation so that the origin is d^. Specifically, let

and define g(r) = f(dk -f T). Then

This shift has the advantage that we are now solving for the correction T^ to dk that gives Afc. Moreover, the functions r(r) and s(r) can be evaluated to high relative accuracy whenever r is between 0 and (cfor+i cfo)/2. In principle any good zero-finding technique applied to g will suffice to find the correction r^. However, because g ( r ) has poles at zero and dk+i dk, the most effective schemes are based on approximating g ( r ) by a rational function g ( r ) and finding the root of of g as the next approximation. For more, see the notes and references. Finally, one must decide when the iteration for T> has converged. Because of the simplicity of the function g(r), as it is calculated one can also calculate a bound on the error in its computed value. Our stopping criterion is:
Stop when the computed value of g(T) at the current iterate ios s than its error biound.

It can be shown that this criterion returns eigenvalues that are sufficiently accurate to be used in the computation of the eigenvectors, to which we now turn. Computing eigenvectors Let A j be an eigenvalue of D+zz1. Then the corresponding eigenvector q must satisfy the equation (D + zz^}qj = \jq3 or equivalently

Thus qj must lie along the the direction of (\jl - D) lz, and hence the normalized eigenvector is given by

VolII: Eigensystems

178

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Unfortunately, we do not know the eigenvalues of D + zz1'. Instead we have approximations Xj obtained by solving the secular equation. Now the ith component of qj is given by

where rjj is the normalizing constant. If Xj is very near di, as it will be when d{ and di+i are very near each other, replacing Xj by Xj in (2.12) will make a large perturbation in qij, unless Xj is a very accurate approximation to Xj. In particular, eigenvectors computed in this way may be inaccurate and, worse yet, be far from orthogonal to one another. One cure for this problem is to compute the eigenvalues Xj to high precision (it can be shown that double precision is sufficient). However, there is an alternative that does not require extended precision. It is based on the following theorem. Theorem 2.2. Let the Quantities A, satisfy the interlacing conditions

Then the quantities

are well defined. If we set z = (zi zn) , then the eigenvalues of D zz1 are
AI, ... , A n .

r-r\

Proof. We will first derive the formula (2.14) under the assumption that the required Zi exist, and then show that these values have the required property. We compute the characteristic polynomial of D + ZZT in two ways:

[see (2.10)]. Setting A = c/j, and solving for zf, we find that

The interlacing inequalities imply that the right-hand side of this equation is positive. Hence the z^ are well defined and given by (2.14).

SEC. 2. A CLUTCH OF ALGORITHMS

179

To show that the eigenvalues of D -f ZZT are the Aj, note that by the way the Z{ were defined the two expressions for the characteristic polynomial of D+z ZT in (2.15) are equal at the n distinct points dj. Since both expressions are monic polynomials of degree n, they must be identical. In particular if we evaluate both expressions at the AJ, we discover that they are zeros of the second expressioni.e., the Aj satisfy the secular equation for D + zz?'. Equation (2.14) does not quite specify 5t-, since the right-hand side contains the factor sign(^). As we shall see in a moment, in our application it is sufficient to replace sign(ii) with sign(^). To apply the theorem, suppose that we compute the zt- from (2.14), with the appropriate signs, and then use them to compute the components of the eigenvectors from (2.12). Now in standard floating-point arithmetic, the Z{ can be computed to high relative accuracy. Moreover, in the expression

the Aj are the exact eigenvalues of D + ZZT. Hence the components QJ of the computed eigenvectors qj will be to high relative accuracy the components of the exact eigenvectors of D + ZZT . In particular, the matrix Q of these eigenvectors will be orthogonal to working accuracy. There remains the question of the stability of this algorithm; after all, we have not found the eigenvectors of D + zz1 but those of D -f ZZT. However, it can be shown that if we use the stopping criterion (2.11) in finding the approximate eigenvalues A;, then where fi is a slowly growing function of n. Thus the computation of the eigenvectors of D + ZZT is backward stable. The inequality (2.16) also justifies our replacing sign(^) by sign(z,). For if Z{ and Z{ have opposite signs, they must be within a small multiple of the rounding unit, and hence insignificant. We summarize the computation of the eigenvectors in Algorithm 2.2. Here are two comments on this program. We have already noted that the algorithm is backward stable. However, this does not imply that the computed eigenvectors are accurate. They will have small residuals [see (2.35), Chapter 2], and, as we have pointed out, they will be orthogonal almost to working accuracy. But by Theorem 3.13, Chapter 1, the vectors corresponding to poorly separated eigenvalues will be inaccurate. The computation of the Z{ requires approximately 2n2 flam and n2 fldiv. The computation of the vectors requires approximately n2 fladd and n2 fldiv for the computation of the components of Q and n2 flam and n2 fldiv for the normalization (the divisions in the normalization can be replaced by multiplications). Thus the computation VolII: Eigensy stems

180

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given sufficiently accurate approximations Xj [see (2.11)] to the eigenvalues of D + zz1 that satisfy the interlacing inequalities (2.13), this algorithm returns approximations to the eigenvectors of D + ZZT in the array Q. Compute the modified update vector 1. for i = 1 ton
2. 3.
Z{ = A n u{ for j = 1 to i1

4.
5. 6.

Si = Zi*(Xj - di)/(dj - di)


end for j forj r j i ton-1

7. 8. 9. 10.
11. 12.

Zi = Zi*(Xj - di)/(dj+i - di) end for j Zi sqrt(zi)*sign(zi) end Compute the eigenvectors
for j 1 ton for i - 1 to n

13.
14.

Q[iJ] = 2i/&-di)
end for i

15. flM:,j] = M/IW[:,J]||2 16. end for j Algorithm 2.2: Eigenvectors of a rank-one update o

SEC. 2. A CLUTCH OF ALGORITHMS

181

of the eigenvectors is an O(n 2 ) process. However, it must be remembered that the diagonal updating is only a part of the larger Algorithm 2.1. Once the cost of computing VSPQ in (2.3) is taken into account, the count rises to O(n3). Concluding comments Our sketch of the algorithm for spectral updating is far from a working program. The data structures to handle permutations and deflation are nontrivial, and the routine to solve the secular equation is intricate. Thus the code for any implementation will be long and complicated compared with the code for forming A directly and applying the QR algorithm. Is it worth it? The answer is yes, at least for sufficiently large matrices. We have seen that the O(n3} overhead in the QR algorithm is the accumulation of the transformation, particularly the expensive accumulation of the plane rotations generated while solving the tridiagonal system. The updating algorithm has only one 0(n3) overhead: a single matrix-matrix multiplication to update the eigenvectors V. Thus for n large enough the updating algorithm must be faster. However, there is a second aspect. The deflation also saves time, and in some applications there are many deflations. We will return to this point in the next subsection. The algorithm is not without its drawbacks. Extra storage is required for the eigenvectors of the diagonalized problem D + zz1'. The algorithm does not work well for graded matrices. In particular, the deflation criteriae.g., (2.6) are couched in terms of the norms of D and z, which allows small but meaningful elements in a graded matrix to be declared negligible.
2.2. A DlVIDE-AND-CONQUER ALGORITHM

In this subsection we will present a divide-and-conquer algorithm for solving the symmetric tridiagonal eigenvalue problem. We begin with some generalities about the divide-and-conquer approach. Generalities The notion of a divide-and-conquer algorithm can be described abstractly as follows. Let P(n) denote a computational problem of size n, and suppose that we can divide P(n) into two problems Pi(f) and ^(f) f size f in such a way that the solution of P can be recovered from those of PI and PI at a cost of C(n). Now if PI and P2 are problems of the same type as P, we can repeat this dividing procedure on PI and P2, then on the subproblems of PI and PI, and so on. This recursion will stop after the size of the subproblems becomes so small that their solutions are trivialafter no more than about Iog2 n steps. We can estimate the cost of a divide-and-conquer algorithm by counting the costs at each level of the recurrence. For convenience, assume that n 2m. At the top level of the recurrence we solve one problem at a cost of C(n). At the second level, we solve two problems each at a cost of C(|) for a total cost of 2(7(|). At the third Vol II: Eigensystems

182

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

level, we solve four problems at a cost of C( J) for a total cost of 4C( J)and so on. Summing up these costs, we get for the total cost of the divide-and-conquer algorithm

Of course we must know the function C(n) to evaluate this expression. We will return to it later, after we have derived our algorithm. Derivation of the algorithm Let T be a symmetric tridiaeonal matrix of order n, and let T be partitioned in the form

(Here s stands for splitting index.) We can also write this partition in the form

Now let and


so that TI is TI with the element ds replaced by ds es and T-z is T% with the element ds+i replaced by ds+i es. Then we can write

Thus we have expressed T as the sum of a block diagonal matrix whose blocks are tridiagonal and a matrix of rank one. The idea behind our divide-and-conquer algorithm is to compute the eigensystems of TI and T<2 (which can be done recursively) and then combine them to give the eigensystem of T. To show how to combine the eigensystems, let

and

SEC. 2. A CLUTCH OF ALGORITHMS


be spectral decompositions of TI and T^- Then

183

The matrix D + zz1 is a rank-one modification of a diagonal matrix, whose spectral decomposition

can be computed by the algorithm of the last section. It follows that

is the spectral decomposition of T. We are now in a position to apply the divide-and-conquer strategy to compute the eigensystem of a symmetric tridiagonal matrix. Algorithm 2.3 implements this scheme. Here are some comments. For ease of exposition we cast the algorithm in terms of full matrices. In practice, we would represent T in some compact form e.g., as in (2.18). We have already observed that the method for updating a spectral decomposition has a great deal of overhead, so that for small matrices the QR approach is more competitive. Consequently, when the submatrices in the recursion fall below a certain size, specified here by the parameter mindac, we abandon the divide-and-conquer approach and compute the decompositions directly via the QR algorithm. Ideally, the value of mindac should be the break-even point where the two algorithms require about the same time to execute. Actually, for large matrices the ill consequences of using the wrong value are not very great, as we shall see. In LAPACK it is set at 25. The recursive approach taken here is natural for this algorithm. However, a direct, bottom-up approach is possible. For example, one might initially partition the matrix into blocks of size just less than mindac. Then one can work upward combining them in pairs. The code is not pretty. Because the algorithm diagupdate is backward stable, it can be shown that cuppen is also stable. We have noted that the updating algorithm diagupdate may not work well with graded matrices. Algorithm 2.3 inherits this drawback. In statements 16 and 17 we have taken advantage of the fact that V is block diagonal in forming VQ. This reduces the work from n3 flam to |n3 flam. Vol II: Eigensystems

184

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given a symmetric tridiagonal matrix T, Cuppen computes its spectral decomposition VAVT. It uses the routine diagupdate(D, o, z, A, Q) that returns the spectral decomposition D + zz1 = QAQ^. If the size of the matrix is less than the parameter mindac (min divide-and-conquer) the QR algorithm is used to compute its eigensystem. 1. Cuppen(T, A, V) 2. n = the order of T 3. if (n < mindac) 4. Compute A and V using the QR algorithm 5. else 6. s= \n/1\ 7. fi = T[l:s,l:s] 8. T1[s,s] = f[s,s]-T[s,s+I] C 9. Cuppen(Ti,Ai,Vi) 10. f2 2= T[s+l:n,s+l:n] 11. f 22 [l,l] = r 2 [l,l]--r[3,3+l] 12. Cuppen(f2, &!,%>) 13. D = diag(Ai,A2) 14. ^ = (Vi[5,:] F2[1,:])T 15. diagupdate(D, T[s, s+1], z, A, Q) 16. y[l:,:] = Vi*9[l:5,:] 17. V[a+l:n,:] - V2*Q[s+l:n,:} 18. end if 19. end cuppen Algorithm 23: Divide-and-conquer eigensystem of a symmetric tridiagonal matrix o

SEC. 2. A CLUTCH OF ALGORITHMS


Complexity To apply the formula

185

[see (2.17)] for the total cost of Algorithm 2.3, we must first determine the function C(n). This is essentially the cost of Cuppen exclusive of its cost of the recursive calls to itself. An examination of the algorithm shows two potentially significant sources of work: the call to diagupdate in statement 15 and the matrix multiplication in statements 16 and 17. We have already noted that the updating requires only O(n2) operations, while the multiplication requires |n3 flam. Thus, the computation is dominated by the matrix multiplication, and we may take

It is now an easy matter to get a sharp upper bound on Ctotai- Specifically,

Thus: Algorithm 2.3 requires about |n3 flam. We see that our divide-and-conquer algorithm has not really conquered in the sense that it has reduced the order of the work. It is still O(n 3 ). But if it has not conquered, it has certainly prospered. The order constant | is quite respectable compara Gaussian elimination and far better than the QR algorithm. In addition to the low-order constant, the algorithm benefits from deflations in diagupdate, which effectively make part of Q diagonal. With some classes of matrices the number of deflations grows with n, so that the divide-and-conquer approach becomes dramatically faster than the QR approach. Of the total of f n3flamwork | (i.e., ^n3flam)is done in the veryfirstst the recursion, leaving \ of the work for the remaining stages. The second stage doe | of this work, leaving only ^ of the total. In general after the &th stage only -^ o the total work remains to be done. Thus after a two or three stages, the remaining work is insignificant compared to the work done by the higher stages. This has the consequence that for large matrices, the choice of the point at which one shifts to the QR algorithm (parameterized by mindaq} is not very critical. So little work is being done at the lower stages that it does not matter if we use an inefficient algorithm there.

Vol II: Eigensystems

186

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

2.3. EIGENVALUES AND EIGENVECTORS OF BAND MATRICES


We begin with a definition. Definition 23. Let A be symmetric of order n. Then A is a BAND MATRIX of BAND WIDTH 2p + 1 if

Thus if p = 1, then A is a tridiagonal matrix. If p = 2, then A is pentadiagonal and has the form

Band matrices are economical to store. For example, a symmetric pentadiagonal matrix can be represented by 3n-3 floating-point numbers. This means that it is possible to store band matrices that are so large that the matrix of their eigenvectors, which is of order n, cannot be stored. Fortunately, in many applications involving band matrices we are interested in only a few eigenpairs, often a few of the largest or smallest. The computation of a selected set of eigenpairs of a large symmetric band matrix is the subject of this subsection. In outline our algorithm goes as follows. 1. 2. 3. Reduce A to tridiagonal form T Find the selected eigenvalues of T Find the selected eigenvectors by the inverse power method applied to A

Note that we compute the eigenvalues from T but the eigenvectors from A. Another possibility is to store the transformations that reduce A to T, find the eigenvectors of T, and transform back. Unfortunately, if n is large, the transformations will require too much storage. Thus we are forced to find the eigenvectors of A directly from A. For the most part our algorithms will be cast in terms of absolute tolerances relative to the norm of A. This means that small eigenvalues may be determined inaccurately. How to compute small but well-determined eigenpairs of a general band matrix is at present an unsolved problem. A special case of our algorithm is when the matrix A is already tridiagonal. In this case it turns out that there are better algorithms than the ones proposed here. However, their complexity puts them beyond the scope of this book, and the reader is referred to the notes and references.

SEC. 2. A CLUTCH OF ALGORITHMS


The storage of band matrices

187

Although we will present our algorithms for band matrices as if they were stored in full arrays, in practice we must come to grips with the fact that such storage is not economical. Specifically, a symmetric band matrix of band width 2p-fl has approximately (p+l}n nonzero elements on and above its diagonal. If p <C n it would be a waste of memory to store it naturally in an array of order n. Instead such a matrix is usually stored in an array just large enough to accommodate its nonzero elements. There are many ways of doing this. The current standard is the LAPACK scheme actually two schemes. The first scheme stores a band matrix in a (p+l)xn array as illustrated below for a pentadiagonal matrix.

The asterisks denote unused elements. More generally if B is the array in which the matrix is stored, then

The other scheme stores the elements according to the formula

Thus one scheme stores the upper part of A, whereas the other stores the lower part. When A is complex and Hermitian, this is not just a rearrangement of the same numbers, since the corresponding upper and lower elements are not equal but are conjugates of one another. Tridiagonalization of a symmetric band matrix We will now show how to reduce a symmetric band matrix to tridiagonal form. One possibility is simply to apply Algorithm 1.1 for tridiagonalizing a dense matrix to the full band matrix, zeros and all. However, it is easy to see that even if one takes into account the zero elements in the band matrix, the band width grows as the reduction proceeds, so that eventually one is working with a full dense matrix. Here we consider another alternative that uses plane rotations and preserves the band size. We will illustrate it for a matrix of band width seven (p = 3). We begin by choosing a rotation in the (3,4)-plane to annihilate the (4, l)-element (and by symmetry the (1,4)-element) of A. The application of this rotation introduce new nonzeros outside the band in the (7,3)- and (3,7)-elements. This step of the reduction is illustrated below: Vol II: Eigensystems

188

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

We now choose a rotation in the (6,7)-plane to annihilate the elements outside the band. This places new nonzeros in the (10,6)- and (6,10)-elements. However, when we eliminate this element, no new elements are generated, as illustrated below:

Thus we have annihilated the (4,1)- and (1,4)-elements while preserving the band structure. We are now ready to work on the (3, l)-element. A rotation in the (2,3)-plane annihilates this element, but introduces nonzeros in the (6,2)- and (6,2)-elements. These elements can be chased out of the matrix as illustrated below:

SEC. 2. A CLUTCH OF ALGORITHMS

189

Thus we have reduced the first row and column to tridiagonal form. The reduction now continues by reducing the second row and column, then the third row and column, and so on. The actual code is tedious and not very informative, and we will not give it here. To get an operation count for this algorithm, we will begin by counting plane rotations. The key observation is that when an element is being chased out of the matrix it moves down the matrix in steps of length p. This can be inferred from our example and easily confirmed in general. Hence when the first row and column are being processed, each zero introduced requires roughly n/p rotations to chase the element outside the band to the end of the matrix. Since we must zero out p 1 elements in the first row and column, the total number of rotations is roughly n(p-l)/p. Similarly it requires (n-l)(p-l)/p rotations to process the second row and column, (n2)(pl)/p to process the third, and so on. Hence the total number of rotations for this algorithm is about

Remembering that we only operate on the upper or lower part of the matrix, we see that each rotation is applied to 2(p + 1) pairs of elements (here we count the adjustment of the 2 x 2 block on the diagonal as two applications). Thus the total number of annlications of rotations to nairs of elements is

We can convert this to multiplications and additions as usual. Thus the reduction is truly an 0(n2) process. On the other hand, since the reduction generates 0(n 2 ) rotations we cannot afford to save or accumulate the transformations when n is very large. An important implication of these counts is that if we can afford n2 units of storage to accumulate transformations we are better off using the standard Algorithm 1.1. It is true that the reduction itself requires O(n3) operations as opposed to O(n 2 ) for the banded reduction. But for both algorithms the accumulation of the transformations requires O(n3) operations, and the extra work in accumulating plane rotations, as opposed to Householder transformations, tips the scales against the band algorithm. The algorithm is stable in the usual sense. The computed tridiagonal matrix is orthogonally similar to A + E, where ||J?||2/||j4||2 is of the order of M. However, in this case E does not share the banded structure of A. But it is symmetric, and hence the eigenvalues of A are moved by no more than quantities of order ||A||2M (Theorem3.8, Chapter 1). Inertia We now turn to the problem of computing some of the eigenvalues of a symmetric tridiagonal matrix. The basic tool is a method for counting how many eigenvalues lie Vol II: Eigensystems

190

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

to the left of a point on the real line. We begin with the mathematical foundations of this method. Let A be symmetric. The number of eigenvalues lying above the point A on the real line is the same as the number of eigenvalues of A - XI lying above zero. Thus to count the location of the eigenvalues of a symmetric matrix with respect to an arbitrary point, it is sufficient to be able to count their locations with respect to zero. This suggests the following definition. Definition 2.4. Let A be symmetric. Then inertia (A) is the triplet (f, (, TT), where v is the number of negative eigenvalues of A, C is the number of zero eigenvalues of A, and TT is the number of positive eigenvalues of A. Although inertia is defined by the eigenvalues of a matrix, it is much easier to compute than the eigenvalues themselves. The reason is that inertia is invariant under congruence transformations, i.e., transformations of the form U^-AU, which are more general than similarity transformations. Specifically, we have the following theorem. Theorem 2.5 (Sylvester, Jacobi). Let A be symmetric and U be nonsingular. Then

Proof. The proof is by contradiction. Suppose that A has more positive eigenvalues than U^AU. Let X be the space spanned by the eigenvectors corresponding to the positive eigenvalues of A. Then

Now let y be the space spanned by the vectors corresponding to the nonpositive eigenvalues of U^AU, and let Z = Uy. Then

It follows that X H Z {0}. But the dimension of X is the number of positive eigenvalues of A and the dimension of Z is the number of nonpositive eigenvalues of UTAU. By hypothesis, the sum of these dimensions is greater than the order of A. Hence they have a nonzero vector in commona contradiction. Similarly, we can show that the number of negative eigenvalues of A is the same as the number of negative eigenvalues of (7T AU and therefore that the number of zero eigenvalues is the same for both matrices. Inertia and the LU decomposition Turning now to the computation of inertia, we begin with a constructive theorem for determining inertia.

SEC. 2. A CLUTCH OF ALGORITHMS

191

Theorem 2.6. Let A be symmetric and suppose that the leading principle submatrices of A are nonsingular. Then there is a unique unit lower triangular matrix L and a unique upper triangular matrix U such that

Moreover if DU = diag(wn, ^22,. ,w nn ), then'meTtia,(A) = inert!a(DU). Proof. It is well known that if the leading principal submatrices of A are nonsingular then A has a unique factorization A = LU into a unit lower triangular matrix L and an upper triangular matrix U (Theorem 1:3.1.3). Since A is nonsingular, the diagonal elements of U are nonzero. Hence we can write A = LDu(DylU). By symmetry (D^1 U)T(LDU) is an LU decomposition of A, and hence by the uniqueness of LU decompositions, D^U T, so that A LDuL^. Hence A and DU are congruent and have the same inertia. It follows that if we have an LU decomposition of A, then we can read off the inertia of A by looking at the diagonal elements of U. Now the LU decomposition of a matrix can be computed by Gaussian elimination (see Chapter 1:3). Hence, in principle, we can compute the inertia of A by performing Gaussian elimination and looking at the diagonal elements of U (which, in fact, are just the pivot elements in the elimination). Unfortunately, Gaussian elimination requires pivoting for stability, and the usual pivoting procedures do not result in a U-factor that has anything to do with inertia. But if A is tridiagonal, we can compute the diagonals of U in a stable manner. Let us see how. The inertia of a tridiagonal matrix Consider a symmetric tridiagonal matrix T, written in the usual form:

Since we will later be concerned with the inertia of T XI as a function of A, we will work with the matrix

VolII: Eigensystems

192

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given a tridiagonal matrix T in the form (2.20) and a constant A the function LeftCount returns a count of the eigenvalues less than A. The parameter umin > 0 is a minimum value on the absolute value of the current t*t-( A) defined by (2.21). 1. LeftCount(d, e, A) 2. LeftCount 0 3. u = d[l] - A 4. if (u < 0) LeftCount = LeftCount + 1 fi 5. for i:. = 2 to n 6. if (|w| < umin) 7. if(w>0) 8. u = umin 9. else 10. u = umin 13. u = d [ i ] - X + e[i-l]2/u 14. if (u < 0) LeftCount - LeftCount + 1 fi 15. end for i 16. end LeftCount Algorithm 2.4: Counting left eigenvalues If we perform Gaussian elimination on this matrix we get the following recursion for the diagonals of the U-factor:
11. 12.

end if end if

The generation of w;(A) requires a division by w 4 -_i(A), and we must specify what happens when ^^(A) is zero. It turns out that we can replace ui-i(X) by a suitably small number. The choice of such a number is a matter of some delicacy and depends on how the matrix is scaled. We will return to this point later. Algorithm 2.4 counts the eigenvalues to the left of A. Here are some comments. The algorithm requires 2n fladd n flmlt and n fldiv. In applications where the count must be repeated for many different values of A, it will pay to modify LeftCount to accept a precomputed array of the numbers t\. The method is stable. In particular, it can be shown that the the computed sequence Wj(A) is an exact sequence of a perturbed matrix T(A) whose elements satisfy

SEC. 2. A CLUTCH OF ALGORITHMS


and

193

This result implies that the count will be correct unless A is extremely close to an eigenvalue of T so close that in the presence of rounding error the two can scarcely be distinguished. These results do not imply that unpivoted Gaussian elimination applied to a tridiagonal matrix is stable. The stability concerns only the w z , not the LU decomposition as a whole. The choice of umin depends on the scaling of T and how accurately we wish to determine the count. One possibility is to make the tolerance relative to e,-, so that at the ith step we take

This choice assumes that the matrix has been scaled so that ei/umin will not overflow. In replacing u with umin, we choose the sign so that it is consistent with our previous adjustment of LeftCount Calculation of a selected eigenvalue Suppose that the eigenvalues of T are ordered so that

and we wish to compute the eigenvalue A m . We can do so by combining LeftCount with a technique called interval bisection. We begin by using Gerschgorin's theorem to calculate a lower bound a on \i and an upper bound b of A n , so that LeftCount(a) = 0 and LeftCount(b) n. Set c (a + 6)/2 and k = LeftCount(c). There are two cases. First, if k > ra, then A m < c. Consequently, A m G [a, c]. Second, if k < m, then Am > c. Consequently, A m [c, 6]. In either case, we have isolated A m in an interval that is half the width of the original. If we rename this interval [a, 6], we can repeat the procedure until the interval width is less than a prescribed tolerance. This procedure is called interval bisection. Algorithm 2.5 uses this procedure to find A m . Here are some comments. Except perhaps at the end, the size of the interval [a, b] halves at each step. Consequently, after k iterations, the difference between the current a and 6 is bounded by \b - a\ < 2,~k\bo O,Q\, where ao and bo denote the initial values. If we demand that this bound be less that eps, then the method must converge in about Iog2( |&o - o I jeps) iterations. Vol II: Eigensystems

194

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Let the tridiagonal matrix T be represented in the form (2.20) and let the eigenvalues of T satisfy

AI < A 2 < < A n .


The function FindLambda finds an approximation to \m. It uses the function LeftCount (Algorithm 2.4). The quantity eps is a generic convergence criterion. 1. FindLambda(d, e, m)

2. 3.
4. 5. 6. 7. 8. 9. 10. 11. 12.

Find upper and lower bounds on \m a = d(l)|e(l)|;6 = d(l)+|c(l)| for i 2 to n1


a = imn{a,d(i] e(il)\ \e(i)\} b = max{6, d(i) + \e(i-l)\ + \e(i)\] end for i a = min{a,e/(n) \e(n1))} 6 = max{6,d(n) + |e(n1))} Find \m by interval bisection while (\b-a\ > eps) c = (a+b)/2 if (c = a or c = 6) return c fi k = LeftCount(d, e, c)

13. 14.
15. 16. 17. 18. 19. 20.

if(fc<m) ac

else b= c end if end while return (a+6)/2 end FindLambda Algorithm 2.5: Finding a specified eigenvalue o

SEC. 2. A CLUTCH OF ALGORITHMS

195

Statement 11 takes care of an interesting anomaly. If eps is too small, it is possible to get endpoints a and b that differ only in a single bit. In that case, c must be equal to one of a and 6, and without statement 11 the algorithm would cycle indefinitely. The exact choice of eps depends on the accuracy required by the user. The computation of eigenvectors requires very accurate eigenvalues, and in this case a choice like will result in low relative error for all nonzero eigenvalues. If the eigenvalue being sought is simple, then eventually it will be isolated in the interval [a, 6]. At this point it may pay to shift over to an interation that converges more quicklye.g., the secant method. Although LeftCount does not produce a function whose zero is the desired eigenvalue, the product of the w's it generates is the value of the characteristic polynomial at c. The function FindLambda can obviously be used to find a sequence of several consecutive eigenvalues. It can also be used to find all the eigenvalues in an interval. But this is inefficient for two reasons. First the computation of the Gerschgorin bounds is repeated with each call to FindLambda. Second, in the process of finding one eigenvalue, one generates bounds on the other eigenvalues, bounds that can be used to speed up the bisection process. Therefore, when more than one eigenvalue is to be found, special code adapted to the task at hand should be used. Selected eigenvectors We now turn to the problem of computing the eigenvectors corresponding to a set of eigenvalues of a symmetric matrix A. For definiteness we will assume that these eigenvalues are and that they are approximated by the quantities We will make no assumptions about how the fjtk were obtained; but because we are going to use inverse iteration to compute their corresponding eigenvectors, we will assume that they are accurate to almost full working precision. The first thing we must decide is what we can actually compute. If the eigenvalue Afc is poorly separated from the other eigenvalues of A, then the eigenvector corresponding to \k will be sensitive to perturbations in A, and we will not be able to calculate it accurately [see (3.28), Chapter 1]. Instead we will attempt to find an approximation Xk such that the normalized residual

Vol II: Eigensystems

196

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

is small. The justification for this criterion may be found in Theorem 1.3, Chapter 2, which says that xk is the exact eigenvector of A+E, where ||||2/||A||2 is equal to the scaled residual norm. For the implications of this result, see the discussion following the theorem. A nice feature of this criterion is that it is easy to test. Specifically, if we take u normalized so that \\u\\2 = 1 as a starting vector for the inverse power step and let v be the solution of the equation (A }J,kI)v u, then

Thus if the quantity ||w||2/||A||2||v||2is small enough, say near the rounding unit, then we can accept x^ v/ \\v\\2 as a normalized eigenvector. There remains the question of whether the inverse power method is capable of producing a vector with a sufficiently small residual. Once again, let us start with a vector u normalized so that 11 u \ \ 2 = 1. Let yk be the normalized eigenvector of A corresponding to \k. Then if v (A jj,kl)~lu, we have

It follows from (2.22) that

Now suppose that ^ is a good relative approximation to A^, so that

for some modest constant 7. Then since |A^| < ||A||2, we have from (2.23) that

Thus the effectiveness of the inverse power method depends on the size of the component y^uofu along yk. Ifu is chosen at random, we can expect this component to be of the order l/^/n [see (1.9), Chapter 2], and consequently we can estimate the bound (2.24) by

Thus if n = 10,000, the estimate is only 100 times larger that 7M. However, note that (2.25) is likely to be an overestimate since it ignores the contribution of the components of u along the n1 remaining eigenvectors of A.

SEC. 2. A CLUTCH OF ALGORITHMS

197

If it turns out that the scaled residual is not satisfactorily small, we can always try again with u = v/\\v\\2. Since this u has had its components associated with the eigenvalues near ^ enhanced, we can expect this second iteration to do the job. For safety one might allow additional iterations. In addition to having small scaled residual norms, we would like our computed eigenvectors to be orthogonal. Unfortunately, it is easy to lose orthogonality when two of the \k are close, as the following example shows. Example 2.7. A matrix A was constructed by generating a random orthogonal matrix Q and setting A = <2AQT, where

Thus A has two very close eigenvalues near one and an isolated eigenvalue at two. Let us approximate the first two eigenvalues by

and perform inverse iteration with each Hk to approximate the corresponding eigenvectors. The residual norms for the approximations xi and x2 are about 1-10~15 and 2-10~15, which is extremely good. However, when we compute the inner product z T #2, we find that

The vectors x\ and x2 have lost half the orthogonality we expect from eigenvectors of a symmetric matrix. A little perturbation theory will help us understand what is going on here. The eigenvalues AI and A 2 are very close10~8 apart. Since the residual norms are of order 10~15, the computed vectors are exact vectors of A perturbed by matrices of order 10~~15. By (3.28), Chapter 1, these perturbations will move the computed eigenvectors by about 10~8. Since the errors in the eigenvectors are independent of one another, there is a corresponding deterioration in the orthogonality between the two vectors. The cure for this problem is to force x2 to be orthogonal to x\. Specifically, if ll^i \\2 = 1, the vector

is easily seen to have 2-norm one and to be orthogonal to x2. If, in our example, we perform this orthogonalization, we find that x^x2 = 7-10~18, so that x\ and x2 we orthogonal to working accuracy. Moreover, the residual norm for x2 is 2-10~15, so that VolII: Eigensystems

198

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

the quality of x2 as an eigenvector has not been compromised by the orthogonalization process. The orthogonalization process can be adapted to handle a sequence of close eigenvalues. We divide the //& into clusters according to some tolerance. As we pass through a cluster we use the Gram-Schmidt algorithm to orthogonalize each vector against the previously computed vectors in the cluster. Since the details of the orthogonalization are tricky (for the full story see 1:4.1.4), we leave the process to a routine

that orthogonalizes a vector u against the columns of X returning the result in v (which can be identified with u). Specifically, the routine returns a normalized vector v that is orthogonal to the columns of X and satisfies

Unfortunately, the orthogonalization complicates our convergence criterion. To see why, suppose that we have a group ^k-g+i > , Mfc of <? approximate eigenvalues and have determined normalized approximate eigenvectors x^-g+i,. - - , Xk-i, with Xk to be determined. We will also assume that we have bounds

on the residual norms of the or z . Now suppose that we have computed v by the inverse power method with shift //& applied to normalized vector u. If a stable method is used to calculate v, it satisfies

where E is of the order of the rounding unit. Now the approximate eigenvector Xk nroduced bv esreorthne satisfies

Hence

It follows that

Hence

SEC. 2. A CLUTCH OF ALGORITHMS

199

Let
Pi < V2 < ' ' ' < Vm

be a consecutive set of eigenvalues of a symmetric matrix A with relative accuracy approximating the rounding unit eM. This algorithm returns in the columns of the array X approximations to the eigenvectors corresponding to the nk- The algorithm uses the routine gsreorthog to orthogonalize a vector against a set of vectors [see (2.26)]. 1. 2. 3. groupsep= ||A||oo*10~3 tol = 100*5gr/(n)*||A||00*M maxit 5; g = 1 if (fjtk <= /**-! + groupsep) g = g+1 else g - 1 fi end if it = 1 u a vector of random normal deviates if (g > 1) gsr0r?/i0g(J*C[:,fc-(jr-f !,&-!], w, w, r, p) else u u/\\u\\2 end if it = 1 while (frae) Solve the system (A/*fc/)v = w if (p > 1) gsreorthog(X[:,kg+l,kl], v, w, r, />) else p = ||v||2; u - v/p end if
rfk = \\u\\2 + ||v|| 2 *>/(n)*ll^ll<x>*M

4. for k = 1 to ra 5. if(Ar>l)
6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.
19.

f = k-g+ltok-l k-1 20. 21. rik=:'nk + (*7; + lA*i-A)bl)*l r i-Jb+ J | 22. end for z 23. // = it + 1 24. if (it > maxit) error fi 25. end while 26. end for k
Algorithm 2.6: Computation of selected eigenvectors o

Vol II: Eigensystems

200

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

is a bound on the residual norm for XkAlgorithm 2.6 pulls all these threads together. There are several comments to be made about it. An absolute criterion is used to group eigenvalues for orthogonalization (see statements 1 and 6). If we use too liberal a grouping criterion, we will perform a lot of unnecessary orthogonalizations. On the other hand, if the criterion for belonging to a group is too small, the distance between successive groups can be small, resulting in loss of orthogonality between groups. (The routine gsreorthog insures that the vectors within a group are orthogonal to working accuracy.) The while loop can be exited with a new vector or with an error return when the number of iterations exceeds maxit. The starting vector for the inverse power method is a random normal vector. It is orthogonalized against the other members of the group to purge it of components that will contribute to loss of orthogonality. The algorithm uses the residual bound (2.27) to test for convergence. Limited experiments show that the bound tracks the actual residual norm with reasonable fidelity. We have not specified how to solve the system in statement 15. The matrix A ^1 will in general be indefinite, and some form of pivoting is required for stability. Unfortunately, diagonal pivoting, which preserves symmetry, destroys band structure. Thus the natural choice is Gaussian elimination with partial pivoting. This method does not respect symmetry. But the L and U factors it computes are banded, with L of bandwidth p+l and U of bandwidth 2p+l. Thus the storage requirements for the algorithm are four times the amount required to represent the original symmetric matrix. For more see 1:3.2.4. It should be stressed that Algorithm 2.6 can be expected to work only because we have aimed low. It is intended for use on balanced matrices eigenvalues and uses absolute criteria to determine when quantities can be ignored (e.g., see statements 1 and 2). It will not work on graded matrices, and it is not clear that it can be modified to do so. Moreover, it can and does fail on groups of eigenvalues that are separated by up to 103cM- Fr example, the algorithm is not a reliable way of computing a complete set of eigenvectors of a small perturbation of the identity matrix. Even as it stands Algorithm 2.6 involves a number of ad hoc decisionse.g., the clustering criterion, the choice of a starting vector, the convergence criterion, when to orthogonalize. There is a certain common sense to our choices, but the same can be said of other choices. See the notes and references.

SEC. 2. A CLUTCH OF ALGORITHMS 2.4. NOTES AND REFERENCES

201

Updating the spectral decomposition This updating algorithm has a long history, beginning with a survey of eigenvalue updating problems by Golub [87, 1973]. Bunch, Nielsen, and Sorensen [30,1978] formulated the algorithm treated here and noted that there were problems with maintaining orthogonality among the eigenvectors. Kalian, in unpublished communications, suggested that the algorithm can be made to work provided extended precision is used at certain critical points and noted that for IEEE standard arithmetic the extended precision arithmetic could be simulated. Sorensen and Tang [247,1991] showed that more was required and gave an algorithm that worked with simulated extended precision on all IEEE compliant machines. Finally, Gu and Eisenstat [100,1994] noted that by recomputing the Z{ so that the A z are exact eigenvalues of the corresponding matrix the orthogonality could be maintained in the eigenvectors without resorting to higher precision arithmetic. The stopping criterion in the secular equation solver insures that the procedure is backward stable. For an analysis of methods for solving the secular equation see [164]. An implementation of this method can be found in the LAPACK code xLAEDl. The divide-and-conquer algorithm The divide-and-conquer algorithm is due to Cuppen [49]. It was later modified by Dongarra and Sorensen [66]. For an error analysis see [13]. The algorithm has been implemented in the LAPACK routine SLAEDO. Gu and Eisenstat [101] propose a different divide-and-conquer algorithm in which the critical step is computing the spectral decomposition of an arrowhead matrix that is, a matrix of the form

Reduction to tridiagonal form The technique of reducing a band matrix to tridiagonal form is due to Schwarz [235]. Inertia and bisection The fact that the inertia of a matrix is preserved by congruence was discovered by Sylvester [272,1853] and independently by Jacobi [129,1857, posthumous]. Givens [83, 1954], who was the first to find eigenvalues of tridiagonal matrices by bisection, did not use Algorithm 2.4 to count eigenvalues. Instead he used closely VolII: Eigensystems

202

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

related Sturm sequences. Specifically, If T XI has the LU decomposition LU, then the product pk( A) = wii Ukk is the determinant of the leading principal minor of T A/. Clearly, the p/t(A) change sign when the u^ do. The polynomials^(A) are called a Sturm sequence (see [122, 2.4] for definitions and properties). Unfortunately, they are prone to overflow and underflow. The Handbook program bisect [15] appears to be the first to use the diagonal elements of U to count eigenvalues, although the authors justified their use by an appeal to Sturm sequences. This program also saves information from previous counts to speed up the convergence of the bisection procedure. There are bisection codes in EISPACK and LAPACK. Eigenvectors by the inverse power method Algorithm 2.6 is included to illustrate the problems of implementing a power method. For working code see the Handbook routine tristurm [305, n/18] or the LAPACK routine SSTEIN. In his Ph.D. thesis Dhillon [65] has described an O(n2) to compute all the eigenvalues and eigenvectors of a tridiagonal matrix. The thesis also contains a review and critique of previous attempts to use the inverse power method to compute eigenvectors and an extensive bibliography. Jacobi's method Jacobi's method for the solution of the symmetric eigenvalue problem uses rotations to annihilate off-diagonal elements of the matrix in question. Specifically, given a current iterate A^ and a pivot element a\ ' , a rotation Rk in the (ik, j'^-plane is determined so that the (*, jk)-element of Ak+i = R^A^Rk is zero. If we let r| be the sum of squares of the diagonal elements of Ak and <r| be the sum of squares of the off-diagonal elements, then

and

Hence, if we choose (ik,jk) so that o?^fc is maximal, then it is easy to show that r| - \\A\\p. In other words, Ak approaches a diagonal matrix. Jacobi [127,1845]fr"8*proposed this method as a technique for reducing the normal equations from least squares problems to diagonally dominant form, after which it could be readily solved by what is now called the point Jacobi iteration [285, 3.3.1]. In 1846 [128], he applied the same idea to reduce the symmetric eigenproblem to a diagonally dominant one, after which the eigenvectors could be found by an iteration based on a perturbation expansion. Thus, Jacobi regarded the algorithm now named for him as a preprocessing step, not as a complete algorithm in itself.

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

203

According to Goldstine and Horowitz [84], the method was rediscovered by Goldstine, von Neumann, and Murray in 1949 (also see [85]). The subsequent literature was dominated by two aspects of the convergence of the method. First, a search for a maximal element is too expensive on a digital computer. Consequently, it was proposed to sweep through the elements of the matrix in a systematic order. This cyclic Jacobi method considerably complicates the convergence proofs. Second, if the matrix has no multiple eigenvalues, its asymptotic convergence is at least quadratic. The situation with multiple eigenvalues and clusters of eigenvalues is considerably more complicated. For more on these topics see [75,107,110,171,298]. An interesting alternative to the cyclic method is the threshold method [212], in which all off-diagonal elements greater than a given threshold are annihilated until there are none left above the threshold, after which the process is repeated with a smaller threshold. Like other algorithms that proceed by rotations, Jacobi's method works well with graded matrices and matrices with small, well-determined eigenvaluesat least when the matrix is positive definite. For more on this topic see [59,172]. Until it was superseded by the QR algorithm, Jacobi's method was the algorithm of choice for dense symmetric matrix. (For an elegant implementation by Rutishauser always a name to be reckoned with see the Handbook code [226].) But since then it has not fared well. It has great natural parallelism, and at one time it and its variants were considered candidates for systolic arrays a class of computers that never realized their promise. But no one can say for sure what the future holds for this bewitching algorithm.

3. THE SINGULAR VALUE DECOMPOSITION


In this section we will treat methods for computing the singular values and vectors of a general nxp matrix X. For definiteness we will assume that n > p and that X is real. The singular value decomposition is closely allied to the spectral decomposition. In particular, there is an analogue of the QR algorithm to solve the singular value problem. The main purpose of this section is to describe this algorithm. We will begin with the mathematical background, including the perturbation of singular values and vectors. In 3.2 we will show how the singular value decomposition can be reduced to the solution of a symmetric eigenvalue problem. This method, as we shall see, has limitations that render it unsuitable as a general-purpose routine, though it may be the algorithm of choice in special cases. In 3.3 we will begin our development of the QR algorithm by showing how to reduce a general matrix to bidiagonal form. The QR algorithm itself is treated in 3.4.

3.1. BACKGROUND
In this subsection we will present the background necessary for this chapter. Much of this material has been treated in detail in 1:1.4.3 of this series, and many results will be presented without proof. Vol II: Eigensystems

204

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Existence and nomenclature The following theorem gives the particulars of the singular value decomposition. Theorem 3.1. LetXRn*p, where n > p. Then there are orthogonal matrices U and V such that

where

with

Here are some comments on this theorem. The numbers <jj are called the singular values of X. The nondecreasing order in (3.2) is conventional and will be assumed unless otherwise stated. We will use the notation &i(X) to denote the ith singular value of X. The columns of

are called left and right singular vectors ofX.

They satisfy

and

Moreover,

It often happens that n > p, in which case maintaining the nxn matrix U can be burdensome. As an alternative we can set

and write

This form of the decomposition is sometimes called the singular value factorization. Since the 2-norm is unitarily invariant, \\X\\2 = \\Z\\z- From this it is easily established that:

SEC. 3. THE SINGULAR VALUE DECOMPOSITION


The 2-norm of a matrix is its largest singular value. From the definition of the 2-norm it follows that

205

Later it will be convenient to have a notation for the smallest singular value of X. We will denote it by

Since the Frobenius norm is unitarily invariant, it follows that

In other words: The square of the Frobenius norm of a matrix is the sum of squares of its singular values. Uniqueness The singular value decomposition is essentially unique. The singular values themselves are unique. The right singular vectors corresponding to a simple singular value (one distinct from the others) are unique up to a factor of absolute value one. The right singular vectors corresponding to a multiple singular vector are not unique, but the space they span is. Once the right singular vectors have been specified, the left singular vectors corresponding to nonzero singular values are uniquely determined by the relation Xv{ = OiU{. Relation to the spectral decomposition From (3.1) and the fact that U is orthogonal, it follows that

This shows that: The squares of the singular values X are the eigenvalues of the CROSSPRODUCT MATRIX XTX. The right singular vectors are the eigenvectors of X^X. An analogous result holds for XX1-. However, when n > p, the matrix XXT has np additional zero eigenvalues. Sometimes they cannot be ignored [see (3.17)], and we will call them honorary singular values. VolII: Eigensystems

206

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Characterization and perturbation of singular values Given the relation of the singular value and spectral decompositions it is not surprising that the min-max characterization for eigenvalues (Theorem 3.5, Chapter 1) has an analogue for singular values. Theorem 3.2. Let the singular values ofX be ordered in descending order:

Then

and

An immediate consequence of this characterization is the following perturbation theorem for singular values. Theorem 33. Let the singular values ofX be arranged in descending order:

Let the singular values ofX = X + E also be ordered in descending order

Then

Thus singular values, like the eigenvalues of a symmetric matrix, are perfectly conditioned. However, this does not mean that perturbations of small singular values have high relative accuracy. See Example 3.9, Chapter 1. First-order perturbation expansions The perturbation of singular vectors is best approached via first-order perturbation theory. Let <TI ^ 0 be a simple singular value of the nxp matrix X with normalized left and right singular vectors u\ and v\. (Here we have discarded the conventional downward ordering of the singular values.) Assuming that n > p, let us partition the matrices of left and right singular vectors in the forms

SEC. 3. THE SINGULAR VALUE DECOMPOSITION


where U^ and Vi have pl columns. Then

207

where 2 = diag(<j2,... , crp) contains the singular values of X other than a\. Now let X X + E, where E is presumed small. Then we can write

where (p\ = u^Eui, eJ2 = u^EV2, etc. The singular vectors corresponding to a\ in the matrix U^XV are both ei (of appropriate dimensions). We will seek the singular value of UTXV in the form a\ + 0i, where 0i is assumed to go to zero along with E. We will seek the corresponding left and right singular vectors of t/T^V in the forms (1 g^ p3 > ) T and(l /iJ)T,where the g-2,gs, and hi are also assumed to go to zero along with E. Now consider the relation

From the first row of this relation, we have

Since both f^2 and /i22 go to zero with E, their product must eventually become negligible, and we can write

From the third row of (3.7) we have

Ignoring higher-order terms, as above, we get

The second row of (3.7) gives us

VolII: Eigensystems

208

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

or
This expression is not enough to determine gi and hi- But from the second row of the relation

we get

The approximations (3.9) and (3.10) can be readily solved for gi and hi to give the approximations

and
A simple singular value and its normalized singular vectors are differentiable functions of the elements of its matrix. Hence the quantities Q\, g-z, </3, and h^ are all 0(||E||), and the products we have ignored in deriving our approximations are all 0(||^||2). If we transform these approximations back to the original system, we have the following theorem. Theorem 3.4. Let a\ > 0 be a simple singular value of X Rnxp (n > p) with normalized left and right singular vectors u\ and v\. Let the matrices of left and right singular vectors be partitioned in the form

where Ui and V<2 have p 1 columns and let S2 - U?XV2 = diag(<7 2 ,... , <rp). Let a\,ui, and vi be the corresponding quantities for the perturbed matrix X = X + E. Then

and

SEC. 3. THE SINGULAR VALUE DECOMPOSITION


Here are two comments on this theorem. The expression (3.12) can be written in the form

209

In this form it is seen to be an analogue of the Rayleigh quotient for an eigenvalue (Definition 1.5, Chapter 2). The hypothesis that 0\ be nonzero is necessary. The problem is that singular values are not differentiable at zero. For example, the singular value of a scalar is its absolute value. For more on the behavior of zero singular values, see the notes and references. The condition of singular vectors We can use the results of Theorem 3.4 to derive a condition number for a singular vector. We will begin with the right singular vector. Since we will be concerned with angles between vectors and orthogonal transformations do not change angles, we may work with the transformed matrices in (3.5) and (3.6). Now the normalized perturbed right singular vector is

By Lemma 3.12, Chapter 1, the sine of the angle between this vector and ei is

Thus to get a bound on the angle between ei and the vector (3.13)or equivalently between v\ and v\ we must obtain a bound on ||/&2 \\2Consider the approximation (3.11) for h^. Because 2 is diagonal we may write it out component by component:

Here 77, <i2, and <foi represent corresponding components of /*2, /i2, and /2i, and 02 is the corresponding diagonal element of 2- We can rewrite this equation in the form

Since a\ and a<2 are positive, the fraction in this expression is a weighted average of <j>i2 and -<(>2i Hence it must lie between fa and -<foi, and its absolute value is bounded by max{|</>2i|, |0i2|}- It follows that

Vol II: Eigensystems

21C

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

where

Since U<2 and v\ are orthonormal,

Similarly, ||/12|| < \\E\\* Hence from (3.14),

Now up to terms of order 11E \ \ 2, the quantity 11 h2 \ \ 2 is the sine of the angle between Vi and vi. Hence: Let 6 be defined by (3.15). Then

Turning now to the left singular vectors, which we seek in the form (1 g g% ) , we see that the sine of the angle between HI and u\ is essentially x/H^lli + ll^slli- We can bound \\g-2\\2 as above; however, if n > p, we must take into account g3 defined by (3.8). We can do this by adjusting 6 to take into account the honorary zero singular values i.e., the additional zero eigenvalues of XX^-. Specifically: Let

where 6 is defined by (3.15). Then

Thus 6 1 (or S0 1 ) is a condition number for the singular vectors corresponding to the singular value a\. The number 8 is the separation of o\ from its companions, and it plays a role analogous to sep in the perturbation of eigenvectors of Hermitian matrices [see (3.28), Chapter 1].
3.2. THE CROSS-PRODUCT ALGORITHM

In (3.4) we have seen that the eigenvalues of the cross-product matrix A = XTX are the squares of the singular values of X and that columns of the matrix V of the eigenvectors of A are the right singular vectors of X. Moreover, if we know V we

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

211

Let X G R n x p (n> p). This algorithm computes the singular values, the right singular vectors, and the first p left singular vectors of X. 1. 2.
4. 5.

3. E = AJ

FormA = Jf T *X Compute the spectral decomposition A = VAVT


Up = X*V Normalize the columns of Up

Algorithm 3.1: The cross-product algorithm o can recover the first p columns of U via the formula XV = UPE. All this suggests Algorithm 3.1, which for defmiteness we will call the cross-product algorithm. This algorithm has some attractive features. The formation of A is cheaper than the reduction to bidiagonal form that we will propose latermuch cheaper if X is sparse. We already have algorithms to calculate the spectral decomposition. The computation of Up involves only matrix multiplication, which is cheaper than accumulating transformations. Nonetheless, the algorithm has severe limitations, and it is important to understand what they are. Inaccurate singular values The first problem is that we lose information about the singular values in passing from X to A. Let us first consider what happens to the singular values when we round X. This amounts to replacing X by X X + E, where

Here eM is the rounding unit for the machine in question [see (2.3), Chapter 1]. By Theorem 3.3, this perturbation can change the singular values of X by as much as (?iM. Specifically, if <7; is the ith singular value of-X t then the relative error in <j{ satisfies

As <j{ gets smaller, t becomes larger and cr,- has fewer and fewer accurate digits. By the time K, is of the order e"1, the perturbed singular value <7, will be totally inaccurate. Otherwise put, to expect any accuracy in crt- we must have

Turning now to the cross-product method, let us now assume that we compute A X^-X exactly and then round it to get A (we could hardly do better than that VolII: Eigensystems

212

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

in statement 1 of Algorithm 3.1). We can show as above that the eigenvalues of A and A satisfy

This bound has the same interpretation as (3.18). In particular we must have Ai/A; < e^1 to expect any accuracy in A,-. We now note that A 2 = of. Consequently the condition Ai/A z < c"1 is equivalent
to

This says that the range of singular values that the cross-product algorithm can compute with any accuracy has been severely restricted. For example, if M = 10~16 then any singular value satisfying ftz > 108 will have no significant figures when represented as an eigenvalue of Aeven though it may have as many as eight significant figures as a singular value of X. Thus we should not expect the cross-product algorithm to work well if the ratio of the largest to the smallest singular value of X is too large. An example will illustrate the above considerations. Example 3.5. A matrix X was generated in the form X = UDVT, where U and V are random orthogonal matrices and

The singular values ofX and the square roots of the eigenvalues of A = X^X were computed with the following results.
a l.OOOOOOOOOOOOOOOe+00 l.OOOOOOOOOOOOOOle-02 1.000000000000487e-04 1.000000000014129e-06 9.999999970046386e-09
VA l.OOOOOOOOOOOOOOOe+00 1.000000000000072e-02 1.000000001992989e-04 1.000009260909809e-06 1.177076334615305e-08

Since M = 10~16, it is seen that the errors increase as predicted by the analysis above. _i_ Although it is not illustrated by this example, when KP > eM 2 , it is possible for Xp to be negative, so that the cross-product algorithm produces an imaginary singular value.

SEC. 3. THE SINGULAR VALUE DECOMPOSITION


Inaccurate right singular vectors

213

We can perform a similar analysis to show that the right singular vectors of X can be less accurately represented in A. Specifically, consider the effects of rounding X on the left singular vector vt. From (3.16), we see that the perturbation of Vi depends on the separation of O{ from its nearest neighborcall it aj. If Vi denotes the singular vector of the rounded matrix, then

Since \\E\\2 < <7ieM we have

A similar analysis for A shows that

where V{ is the ith eigenvector of A. Noting once again that A; = of, we can rewrite this bound in the form

If we compare (3.19) and (3.20), we see that when K{ and KJ are large, (3.20) has the smaller denominator. The singular vector in A is more sensitive to rounding errors than the same vector in X. It is a curious and useful fact that the singular vector corresponding to the smallest singular value can be quite accurate, even when the singular value itself has no accuracy. Specifically, suppose v\ = ap-\ while ap is small. Then with i = p and j = p 1, we find that KP is much greater than K P _I, so that right-hand sides of the bounds (3.19) and (3.20) are approximately

Since K P _I = 1, the vector vp is well determined by both algorithms, although the small singular value ap is ill determined. The common sense of these bounds is that the subpace corresponding to the large singular values is well determined and hence its orthogonal complementthe space spanned by vp is also well determined. Note, however, that as ap-\ drifts away from a\, the bound for the cross-product algorithm deteriorates more rapidly.

VolII: Eigensystems

214

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Inaccurate left singular vectors The left singular vectors computed by our algorithm will also be less accurate, although the cause of the loss of accuracy is different. Let V{ be the ith right singular vector computed by the cross-product algorithm, and assume that

The cross-product algorithm computes the zth left singular vector by forming Wi = Xvi and normalizing it. Now an elementary rounding error analysis shows that the computed w, call it Wi satisfies

where

Here 7 is a constant that depends on the dimensions of X. Now W{ = Xvi + Xei + Evi = W{ + X e{ + Ev{. Hence

Since Wi = <J{Ui, we have \\Wi\\2 = &{. Hence the normwise relative error in w^ is

Thus, as previously, wz- will be computed inaccurately if <rz is small. Normalizing it will not restore lost accuracy. We have not specified the size of e in our analysis because the technique for computing left singular vectors is sometimes used independently with accurate V{ (c = eM). However, if V{ is computed from the cross-product algorithm, e can be quite large and have a devastating effect. For example, if M = 10~16 and Ki = 106, then e in (3.21) will be about 10~4, and the computed w; will have no accuracy at all. Assessment of the algorithm The above analysis shows that the cross-product algorithm is not suitable as a generalpurpose algorithm. Perhaps more important, the bounds from the analysis suggest when the algorithm can be used. For example, if KP is not too large, then the computed singular value ap may be satisfactory. Even when KP is large, the right singular vectors vp can, as we have seen, be very accurate. For more see the notes and references.

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

215

3.3. REDUCTION TO BIDIAGONAL FORM


The classical algorithm for computing the singular value decomposition is a variant of the QR algorithm. Like its counterparts for general and symmetric matrices, its efficient implementation requires that the matrix be reduced to a simpler form. In this case the form is an upper bidiagonal form, which we will write as

The reduction As usual let X be an nxp matrix with n > p. The reduction to bidiagonal form proceeds by alternately pre- and postmultiplying X by Householder transformations. For the first step, we determine a Householder H transformation to introduce zeros in the hatted elements in the following Wilkinson diagram:

Then H X has the form

We next choose a Householder transformation K such that HXK has zeros in the hatted elements of (3.23) to give a matrix of the form

Vol II: Eigensystems

216

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given an nxp matrix X with n > p, BiReduce reduces X to the bidiagonal form (3.22). The transformations from the left are accumulated in the n xp matrix U, and the transformations from the right in the pxp matrix V. On return, the array X contains the generators of the Householder transformations used in the reduction. 1. BiReduce(X, d, e, U, V) Reduce X

2.
3. 4. 5. 6. 1. 8.

fork = Hop
if (k < porn > p) housegen(X[k:n,k], a, d[k}) X[k:n,k] = a b1 = aT*X[k:n,k+l:p] X[k:n, k+l:p] = X[k:n, k+l:p] - a*6T end if housegen(X[k, k+I:p], 6T, e[k]) X[k,k+l:p] = bT a = X[k+l:n,k+l:p]*b X[k+l:n, k+l:p] = X[k+l:n, k+l:p] - a*6T end if end for k e\p-l] = X\p-l,p] if(n = p)rf[p] = A'[p,ri;fi Accumulate U V=( /' )
\Un-p,py

9.
10. 11. 12. 13. 14. 15. 16. 17.
18.
19. 20. 21. 22. 23.
24.

it(k<p-l)

for k min{p, n1} to 1 by 1 a = X[A;:7i,Ar] 6T = aT*C/[^:n,^:p] ?7[jfc:ra, k:p] = C/"[/^:n, A?:p] - a*6T end for A; Accumulate V
V = Ip

25.
26. 27. 28. 29. 30.

6T = A"[A;?A:-M:ri aT = 6T*F[Ar+l:p, A?+l:p] F[fc+l:p,fe+l:p]= V[A?+l:p, Ar+l:p] - 6*aT end for k end BiReduce Algorithm 3.2: Reduction to bidiagonal form

fork = p-2tolby-l

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

217

The reduction proceeds recursively on the matrix X[2:n, 2:p\. Algorithm 3.2 implements this reduction. Here are some comments. As in Algorithm 2.2, Chapter 2, the algorithm does not accumulate the transformations as they are generated. Instead it saves the generating vectors in X and accumulates the transformations after the reduction beginning with the last transformations. This saves some operations. In deriving an operation count for the algorithm, it is convenient to divide the labor. Algorithm 3.2 requires 2np2 -p3 flam for the reduction of X,
o

2np2 p3 fl flam for the accumulation of U, p3 flam flam for the accumulation of V.

Thus if n > p the total work is about 4np2 flam. If n = p, it is about |p3 flam. By accumulating only the first p columns of the transformations from the left, the algorithm sets the stage for the subsequent computation of the singular value factorization (3.3). If we accumulate the entire U, the operation count rises to 2n2pnp2. When n > p this part of the computation becomes overwhelmingly dominant. If we require the effect of the full matrix U, we can save the transformations that are generated and apply them whenever we need to form a product of the form Ux. The algorithm is backward stable in the usual sense.

The first column of the matrix V is ei. This fact will prove important in 3.4. Real bidiagonal form When X is complex, the tridiagonal form will also be complex. Our subsequent manipulations of this form will use plane rotations, and the operation count will be reduced if the rotations are real. We can insure this by transforming the complex bidiagonal form into a real form. Algorithm 3.3, which is an analogue of Algorithm 1.2, performs the reduction to real form. It alternately scales the rows and columns of the bidiagonal matrix, the row scalings making the di real and the column scalings making the e; real.

3.4. THE QR ALGORITHM


In this subsection we are going to show how the QR algorithm can be used to compute the singular values of a bidiagonal matrix B. What distinguishes the bidiagonal singular value problem from the other problems we have considered is that small relative changes in the elements of B make only small relative changes in the singular Vol II: Eigensystems

218

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

This algorithm takes the output of Algorithm 3.2 and transforms the bidiagonal matrix to real bidiagonal form. The transformations are accumulated in U and V.

Algorithm 3.3: Complex bidiagonal to real bidiagonal form

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

219

values of B. This means that we must take care that our convergence and deflation procedures do not introduce large relative errors. We begin with the basic QR step and then show how to compute the shift. We then treat the problem of when the superdiagonal elements of B can be considered negligible. The solution provides us with the wherewithal to describe a back search in the spirit of Algorithm 3.3, Chapter 2. Throughout this subsection: B will be an upper bidiagonal matrix represented in the form

The bidiagonal QR step The matrix C = B^B is easily seen to be symmetric and tridiagonal. Consequently, we could apply the tridiagonal QR algorithm to B^B to find the squares of the singular values of B. Unfortunately, this procedure is a variant of the cross-product algorithm, which we have shown to have substantial drawbacks. However, we can mimic a QR step on BTB while working with B. The procedure goes as follows. 1. Given a shift <r, determine a plane rotation PI 2 such that the (1,2)-element of (C - <72/)Pi2 is zero. 2. Determine an orthogonal matrix U and an orthogonal matrix V whose first column is a multiple of ei such that B = U^BP^V is bidiagonal. Since C = BTB = VTP?2BTBP12V = VTP?2CP12V, the reasoning following (3.6), Chapter 2, shows that C is the matrix that would have resulted from applying one step of the QR algorithm with shift cr2 to C. Since the repeated application of this algorithm (with suitable shifts) will cause C P _I )P to converge to zero, we may expect to see e p _i also converge to zero, in which case the problem deflates. To implement this procedure, we need the first column of C. Since B is bidiagonal, this column is easily computed:

Thus the cosine and sine of the initial rotation PI 2 are determined by the numbers d\ a2 and d\ei. Since these numbers are composed of products, some scaling should be done to prevent overflow and underflow. Vol II: Eigensystems

220

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

We could use by Algorithm 3.2 to reduce PuB to bidiagonal form. However, the fact that B is bidiagonal can be used to simplify the algorithm. Specifically, the matrix BPi2 has the form

Note that BP bulges out of its bidiagonal form at the hatted (2, l)-element. We can remove this bulge by premultiplying by a plane rotation U\i in the (1,2)-plane to get the matrix

The bulge has now moved to the (1,3)-element. We can eliminate it by postmultiplying by a rotation 23 in the (2,3)-plane:

The bulge is now at the (3,2) element. We can continue in this manner until the bulge is chased out the bottom of the matrix. The entire procedure is illustrated in Figure 3.1. In practice the QR step will not be applied to the entire matrix. Algorithm 3.4 implements a QR step between rows il and i'2. Here are some comments. The accumulation of the transformations accounts for most of the work, at least when p is large. Specifically: Algorithm 3.4 requires

The step is backward stable in the usual sense.

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

221

Given an upperbidiagonal matrix represented as in (3.24) and a shift cr, BiQR performs a QR step between rows il and i2. The transformations are accumulated in U and V.

Algorithm 3.4: Bidiagonal QR step

Vol II: Eigensystems

222

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Figure 3.1: A bidiagonal QR step Computing the shift The shift a in Algorithm 3.4 is generally computed from the trailing principal submatrix B[ill:ilj ill:il]. A reasonable choice is to take a to be the smallest singular value of this matrix. The following theorem gives an explicit formula for this singular value. Theorem 3.6. Let

Then the largest singular value ofT is given by the formula

If T 0, then the smallest singular value is given by

Proof. The eigenvalues of the matrix

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

223

are the squares of the singular values of T. The characteristic equation of this matrix

If we set

then it is easily verified that

Thus cr^ax and cr^, which is not greater than crmax, are roots of (3.27), and hence 0"max and cTmin are the largest and smallest singular values of T. The formula (3.26) follows from the fact that <rmax<7min = \pq\. Here are three comments on this theorem. If at least one of p, q, and r are zero, the singular values of T can be computed by inspection. The formulas yield approximations to the singular values that have high relative accuracy. In practice the formulas must be scaled and rearranged to avoid overflows and harmful underflows. For more see the notes and references. Negligible superdiagonal elements The formulas in Theorem 3.6 not only produce singular values to high relative accuracy, but they are themselves insensitive to small relative perturbations in the quantities p, g, and r. This is a special case of an important fact about the singular values of bidiagonal matrices. Small relative perturbations in the elements of a bidiagonal matrix cause only small relative perturbations in its singular values. Unfortunately, in testing convergence, we must decide when we can set a superdiagonal element to zero. Since this is an absolute change, there is a real danger of compromising the relative accuracy of the singular values. Fortunately, the following result can be used to tell when we can safely ignore superdiagonals. Let the quantities TV be defined as follows.

VolII: Eigensystems

224
It can be shown that

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

However, the real significance of the number r, is contained in the following theorem. Theorem 3.7 (Demmel-Kahan). Let B be a bidiagonal matrix in the form (3.24), and for fixed j let B be the matrix obtained by setting ej to zero. Let c?i and <j{ denote the singular values ofB and B arranged in descending order. Let

and consider the intervals

If<?i lies in the connected union ofm intervals Ik that are disjoint from the other intervals, then

To see what (3.29) means, take the exponential to get If me is small, then emc = 1 me. It follows that

Thus the result of setting ej to zero can introduce a relative error of no greater than me in any singular value of B. If the singular value in question is isolated and e is sufficiently small, then the relative error is bounded by e. Back searching We can combine (3.28) and the results of Theorem 3.7 to get Algorithm 3.5, which searches back for a block in which the problem deflates. It generates the rt from Theorem 3.7 as it proceeds backward through the matrix. Note that whenever the problem deflates (i.e., il = i'2), the sequence of rt- is restarted. By (3.30) the parameter tol is approximately the relative error we can expect from setting the current superdiagonal to zero. A reasonable value is the rounding unit. Final comments The algorithmic pieces we have created in this and the previous section can be assembled to produce a reliable algorithm for computing the singular values of a general matrix. Although no theorems can be proved, it works well on graded matrices, provided the grading is downward. Nonetheless, there are further embellishments that can improve the algorithm. Some of these are discussed in the notes and references.

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

225

This algorithm takes a bidiagonal matrix B represented as in (3.24), a tolerance tol, and an index i (1 < t < p) and determines indices /7,12 < t such that one of the following conditions holds.

Algorithm 3.5: Back searching a bidiagonal matrix

VolII: Eigensystems

226

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Let X G R nxp , where n > p. This algorithm computes the singular value factoriz; tion^Y = UXVH.

Algorithm 3.6: Hybrid QR-SVD algorithn

3.5. A HYBRID QRD-SVD ALGORITHM The algorithm sketched in the last subsection is reasonably efficient when n is not much greater than p. When n > p, however, one pays a high price for the accumulation of plane rotations in U. An alternative is to first compute the QR factorization of A, compute the singular value decomposition of R, and multiply the left singular vectors intoQ. Algorithm 3.6 implements this scheme. Here are three comments. When n > p, statement 2, which requires 0 (p3) operations, contributes only negligibly to the total operation count, which is 0(np2). Specifically, the QR decomposition of X can be computed in Inp2 flam while the generation of U requires np2 flam, bringing the total operation count to 3np2 flam. The computations can be arranged so that Q and then U overwrites X. The matrix Q will generally be computed as the product of the Householder transformations used to reduce X to triangular form (1:4.1.2). If instead, we store the transformations themselves and retain the matrix W, we save np2 flam and in the bargain have an implicit basis for both the columns space of X and its orthogonal complement. The price to be paid is that one must access that basis through subprograms that manipulate the Householder transformations. 3.6. NOTES AND REFERENCES The singular value decomposition The singular value decomposition was established independently and almost simultaneously by Beltrami [19,1873] and Jordan [137,1874]. For more historical material see [263] and 1:1.4.5. Missing proofs in 3.1 can be found in 1:1.4. Perturbation theory Parts of Theorem 3.4 were presented in [269, Theorem 1.4.6], where the expansion of the singular value is carried out to the second order. For ordinary singular values the second-order term makes no essential difference, but it shows that small singular

SEC. 3. THE SINGULAR VALUE DECOMPOSITION

227

values tend to increase in size under perturbation. The derivation of the first-order bounds given here is new. The cross-product algorithm The cross-product algorithm is widely and unknowingly used by statisticians and data analysts. For example, given a data matrix X, a standard transformation is to subtract column means, normalize, and form a cross-product matrix C called the correlation matrix. Subsequent analyses are cast in terms of C. Whenever an analysis involves the eigenvalues and eigenvectors of C, it amounts to an implicit use of the cross-product algorithm. Fortunately, much data is noisy enough that the errors introduced by passing to C are insignificantat least when computations are performed in double precision. The analysis of the cross-product algorithm appears to be new, although partial analyses and instructive examples may be found in most texts on numerical linear algebra often with warnings never to form the cross-product matrix. The lesson of the analysis given here is that one should not condemn but discern. Reduction to bidiagonal form and the QR algorithm The reduction to bidiagonal form is due to Golub and Kahan [88,1965]. It is a curious fact that the QR algorithm for the singular values of bidiagonal matrices was first derived by Golub [86, 1968] without reference to the QR algorithm. The derivation given here may be found in the Handbook contribution [91]. Much of the material on the implementation of the QR algorithm for bidiagonal matrices is taken from an important paper by Demmel and Kahan [58]. Owing to limitations of space we cannot do the paper full justice in this chapter. But here are some additional details. Additional tests for negligibility. The authors present a forward recurrence that computes the quantity ||J9[fc:n, fcin]"1!]^1. From this, it is possible to compute a lower bound g_ for the smallest singular value. This permits a cheap test for negligibility of the i. Namely, et- is negligible if |e;| < tol-a, where tol is the relative error required in the singular values. Zero shifted QR. If the shift in the QR algorithm is zero, the computations can be arranged so that all the singular values retain high relative accuracy. This algorithm is used whenever the relative accuracy tol-g_ required of the smallest singular value is less than the error CTCM that can be expected from the shifted QR algorithm (here a is an estimate of the largest singular value). Bottom to top QR. Our implementation of the shifted bidiagonal QR algorithm proceeds from the top of the matrix to the bottom, which is fine for matrices graded downward. For matrices that are graded upward there is are variants of both the shifted and unshifted algorithm that proceed from bottom to top. If the current block extends from il to /2, a natural, though not foolproof, method for choosing among these methVolII: Eigensystems

228

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

ods is to use the top-down method if d[il] > d[i2] and otherwise use the bottom-up method. Code based on these ideas may be found in the LAPACK routine xBDSQR. The QRD-SVD algorithm The idea of saving work by computing a singular value decomposition from a QR de composition is due to Chan [34, 35]. Higham [115] has shown that row and columi pivoting in the computation of the QR decomposition improves the accuracy of th( singular values. The differential qd algorithm When only singular values are desired, Fernando and Parlett [73] have devised a nev variant of the shifted qd algorithm that calculates them efficiently to high relative ac curacy. The algorithm has been implemented in the LAPACK routine SLASQ1. Divide-and-conquer algorithms Gu and Eisenstat [101] give a divide-and-conquer algorithm for the bidiagonal singu lar value problem. Their paper also contains a summary of other divide-and-conque algorithms with extensive references. Dovvndating a singular value decomposition The singular value decomposition is useful in applications where X is a data matrb with each row representing an item of data. An interesting problem is to update th( singular value decomposition after a row has been added or removed. The latter prob lem is called downdating and comes in several varieties, depending on what parts o: the singular value decomposition we have at hand. Gu and Eisenstat [102] give three algorithms for the downdating problem, as well as references to previous work. Jacobi methods Jacobi methods (see p. 202) can be generalized in two ways to find the singular value decomposition of a matrix X. The two-sided method, due to Kogbetliantz [149,1955] works with square X. A typical iteration step goes as follows. For some * < j, let V and V be plane rotations in the (i, j)-plane such that the (t, j)- and (j, i)-elements ol U^XV are zeroi.e., solve the singular value problem for the embedded 2x2 matrix

applying the transformations to rows and columns % and j of X. As with the Jacob algorithm, this transformation increases the sum of squares of the diagonal elements of X and decreases the sum of squares of the off-diagonal elements by the same amount.

Sec. 4. The S/PD Eigenvalue Problem

229

An interesting and work-saving observation about this method is that if X is upper triangular and elements are eliminated rowwise, then the result of a complete sweep is a lower triangular matrix. The one-sided method does not require X to be square. Choose two columns i and j of X and determine a rotation V such that the ith and j>th columns of XR are orthogonal. It is easy to see that the rotation V is the same as the rotation that would be obtained by applying a Jacobi step to X^X with pivot indices i and j. There is an analogous two-sided method in which rotations are also applied from the left. The techniques that are used to analyze the Jacobi method generally carry over to the variants for the singular value decomposition. For more see [8, 37, 67, 75, 107, 108,109, 203].

4. THE SYMMETRIC POSITIVE DEFINITE (S/PD) GENERALIZED EIGEN VALUE PROBLEM


A generalized eigenvalue problem Ax = \Bx is said to be symmetric positive definite (S/PD) if A is symmetric and B is positive definite. The problem arises naturally in many applications. Mathematically it is a generalization of the symmetric eigenvalue problem and can, in fact, be reduced to an equivalent symmetric eigenvalue problem. Although this reduction, which is due to Wilkinson, does not yield an unconditionally stable algorithm, it is the best we have, and the purpose of this subsection is to describe the problem and its solution. We begin by developing the theory of the S/PD generalized eigenvalue problem. In 4.2 we present Wilkinson's algorithm, including some modifications to handle the case where B is ill conditioned with respect to inversion. As usual in this chapter, all matrices are real.

4.1. THEORY
Here we establish the basic theory of S/PD pencils. The fundamental theorem We begin with a definition. Definition 4.1. Let A be symmetric and B be positive definite. Then thepencil(A, B) is said to be SYMMETRIC POSITIVE DEFINITE, abbreviated S/PD. The slash in S/PD is there to stress that two matrices are involvedthe symmetric matrix A and the positive definite matrix B (which is by definition symmetric). In transforming S/PD pencils it is natural to use symmetry-preserving congruences, i.e., transformations of the form ( X ^ A X , XTBX), where X is nonsingular. The following theorem shows that we can diagonalize A and B by such transformations.

VolII: Eigensystems

230

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Theorem 4.2. Let (A>B) be an S/PD pencil. Then there is a nonsingular matrix X such that and where Proof. Let Z be any matrix of order n satisfying For example Z could be the Cholesky factor of B. Since B is positive definite and hence nonsingular, Z is also nonsingular. The matrix Z~TAZ~l is symmetric. Let be its spectral decomposition. Set Then by construction X'1AX is diagonal. Moreover, is also diagonal. There are four comments to be made about this theorem. Since X^ BX = /, it is natural to say that X is ^-orthogonal. In this language, we have proved that A can be diagonalized by a i?-orthogonal transformation. When B /, the theorem says A can be diagonalized by an orthogonal transformation. In this sense the S/PD eigenvalue problem is a generalization of the symmetric eigenvalue problem. If we write AX = X~^D^ and denote the ith column of X by Xi, then Similarly, Bxi = [3iX~iei. It follows that so that Aj = Cti/Pi is an eigenvalue of (A, B) and X{ is the corresponding eigenvector. Thus, our theorem states that the S/PD pencil (A,B) has real eigenvalues and a complete set of jB-orthonormal eigenvectors. The proof of the theorem gives eigenvectors Xi normalized so that xjBxi = 1. But other normalizations are possible. Whatever the normalization, the numbers fa are positive. This implies that an S/PD pencil cannot have infinite eigenvalues.

Sec. 4. The S/PD Eigenvalue Problem Condition of eigenvalues

231

Let (A, or) be a simple eigenvalue of the S/PD pencil (A, B) with ||x||2 = 1. Let a = x T Axand/3 = xTBx so that (a,/?) is a projective representation of A. lf(A+E,B+ F) is a perturbed pencil, then by Theorem 4.12, Chapter 2, for E and F sufficiently small there is an eigenvalue A of the perturbed pencil such that

Thus (a2 + ft2) 2 is a condition number for the eigenvalue A in the chordal metric. The bound (4.1) shows that the eigenvalues of an S/PD problem, unlike the eigenvalues of a Hermitian matrix, can be ill conditioned. This happens when both a, and fti are small. For example, in the problem

the eigenvalue 2 is generally insensitive to perturbations bounded by 10 , while perturbations of the same size can move the eigenvalue 1 anywhere in the interval [0, oo). (However, see Example 4.13, Chapter 2.) On the other hand, the well-conditioned eigenvalues of an S/PD pencil are not necessarily determined to high relative accuracy. This is generally true of the small eigenvalues, as Example 3.9, Chapter 1, shows. However, well-conditioned large eigenvalues can also be ill determined in the relative sense. For example, consider the problem

If the (2,2)-element of B is perturbed to 2-10~5, the eigenvalue 105 becomes |-105.

4.2. WILKINSON'S ALGORITHM


In this subsection we consider an algorithm due Wilkinson for solving the S/PD eigenvalue problem. We begin with the algorithm itself and then consider modifications to improve its performance in difficult cases. The algorithm Wilkinson's algorithm is based on the proof of Theorem 4.2. Let (A, B) be an S/PD pencil and let

be the Cholesky decomposition of Bi.e., R is upper triangular with positive diagonals (see A.5). Let

VolII: Eigensy stems

232

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given an S/PD pencil (A, B) of order ra, this algorithm produces a matrix X such that

Algorithm 4.1: Solution of the S/PD generalized eigenvalue problem

be the spectral decomposition of R

AR l. Then the matrix

diagonalizes the pencil. Algorithm 4.1 implements this scheme. Here are some comments on this algorithm. Only the upper triangles of A and B need be stored. See page 159. The Cholesky factor R can be computed by a variant of Gaussian elimination e.g., Algorithm 1:3.2.1. If B is not needed later, its upper triangle may be overwritten byR. We will treat the computation of C in a moment. If A is not needed later, its upper triangle may be overwritten by the upper triangle of C. The columns Xj of X may be formed from the columns Uj of U by solving the triangular systems

The calculations can be arranged so that X overwrites U [cf. (1:2.2.7)]. The exact operation count for the algorithm depends on how long the method used to compute the spectral decomposition of C takes, which is determined in part by C. If the QR algorithm (1) or the divide-and-conquer algorithm (2.2) is used, the operation count is 0(n3) with a modest order constant. Computation of R~T AR~l The computation of C = R~^ AR~l is tricky enough to deserve separate treatment. In fact, there is more than one algorithm. The one given here proceeds by bordering.

Sec. 4. The S/PD Eigenvalue Problem Specifically, consider the partitioned product

233

Assuming that we already know C = R~TAR 1, we will show how to compute c and 7. This will enable us to solve our problem by successively computing the leading principal majors of R~T AR~l of order 1,2,..., n. We begin by rewriting (4.2) in the form

Then by direct computation we find that

and

Thus we can compute 7 and c by the following algorithm.

Algorithm 4.2 implements this scheme. Three comments. The algorithm takes |n3 fla The arrangement of the computations in (4.3) may seem artificial, but they are designed to allow Algorithm 4.2 to overwrite A by C. Simply replace all references to C by references to A. The bulk of the work in this algorithm is performed in computing the product of the current principal submatrix with a vector. For a scheme in which the bulk of the work is contained in a rank-one update see the LAPACK routine XSYGS2. Ill-conditioned B Wilkinson's algorithm is effectively a way of working with B~l A while preserving symmetry. A defect of this approach is that if B is ill conditioned with respect to inversioni.e., if ll^lbll-B" 1 !^ ls l^S6 (see I:3-3)then B~1A will be calculated inaccurately. There is no complete cure for this problem, since the large eigenvalues of (A, B) are ill determined. A partial cureone which keeps the errors confined to the larger eigenvaluesis to arrange the calculations so that the final matrix C is Vol II: Eigensystems

234

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

Given a symmetric matrix A and a nonsingular upper triangular matrix R, this algorithms computes C = R~TAR~l.

Algorithm 4.2: The computation of C = R~T AR~l

graded downward. As we have observed (p. 108ff) the reduction to tridiagonal form and the QR algorithm tend to perform well on this kind of problem. One way to produce a graded structure is to compute the spectral decomposition B = VMVT, where the diagonal elements of M are ordered so that ^i < ^ < < Mn- If we define C = M _ 1 V T AVM 2 and compute its spectral decomposi2 tion C = /A{7T, then the diagonal elements of A are eigenvalues of (A, B), and the corresponding eigenvectors are the columns of X = VM~^U. A less expensive alternative is to use a pivoted Cholesky decomposition of B (see A.5.3). This produces a decomposition of the form

where P i s a permutation matrix and R is graded downward. If we set

where f is the cross matrix, then C will be graded downward. If we then compute the spectral decomposition C = t/AJ7T, then the diagonal elements of A are eigenvalues of (A, B), and the corresponding eigenvectors are the columns of X = PR~lfU.
4.3. NOTES AND REFERENCES Perturbation theory

We have derived the perturbation theory for S/PD pencils from the perturbation theory for general pencils. As might be expected by analogy with the Hermitian eigenproblem, much more can be said about the eigenvalues and eigenvectors of S/PD pencils.

Sec. 4. The S/PD Eigenvalue Problem

235

This theory is surveyed in [269, IV.3]. Recently, Li and Mathias [163] have revisited this theory and, starting from a different perspective, have given significantly improved bounds. Wilkinson's algorithm Wilkinson presented his algorithm in The Algebraic Eigenvalue Problem [300, 6872, Ch. 5]. Wilkinson mentions, but does not derive, an algorithm for problems of the form ABx Ax, where A is symmetric and B is positive definite. Code for both problems may be found in the Handbook [170]. Wilkinson discusses the problem of ill-conditioned B and suggests that using the spectral decomposition of B instead of its Cholesky decomposition to reduce the problem will tend to preserve the small eigenvalues, although he does not mention the necessary sorting of the eigenvalues. Chandrasekaran [36] has noted that the large eigenvalues and corresponding eigenvectors of C (obtained from the spectral decomposition of B) are well determined. He shows how to deflate these well-determined eigenpairs from the original pencil, giving a smaller pencil containing the remaining eigenpairs. Since each deflation step requires the computation of a spectral decomposition, the algorithm potentially requires 0(n4} operations. It seems, however, that only a very few deflation steps are required. The LAPACK routinesxxxGST reduce the S/PD eigenproblem Ax XBxto standard form. They also reduce the eigenproblem B Ax Xx, where A is symmetric and B is positive definite. Band matrices Wilkinson's method results in a full symmetric eigenvalue problem, even when A and B are banded. To take advantage of the banded structure Wilkinson notes that Gaussian elimination on A \B gives a count of the eigenvalues less than A, just as in Algorithm 2.4. Thus the eigenvalues of (A, B) can be found by interval bisections. Eigenvectors can then be computed by the inverse power method suitably generalized. The definite generalized eigenvalue problem A Hermitian pencil (A, B) is definite if

A definite pencil can in principle be reduced to an S/PD pencil. Specifically, consider the set

Vol II: Eigensystems

236

CHAPTER 3. THE SYMMETRIC EIGENVALUE PROBLEM

The set f(A, G) is called the field of values of A + iB, and it can be shown to be convex. If we define

then the field of values TQ of Ag + Be is just the set jF rotated by the angle theta. Now if 7( A, B) > 0, then f( A, B) does not contain the origin; and since it is convex, it can be rotated to lie in the upper half of the complex plane, which is equivalent to Be being positive definite. For more on definite pairs see [269, VI.1.3, VI.3]. [It is a curious fact that the above argument does not work for n = 2 and real symmetric A and B when the vector x in (4.4) ranges only over 7n.] The above argument is nonconstructive in that it does not give a means for computing a suitable angle 0. However, Crawford and Moon [44] describe an iterative algorithm for computing a 9 such that BO is positive definite (provided, of course, that the original pencil was definite). Each step requires a partial Cholesky factorization of the current B$, and the algorithm can be 0(n4). For an implementation see [43]. For another approach see [40]. The generalized singular value and CS decompositions Let X E nxp and Y G R m X p , whereTO,n > p. Then there are orthogonal matrices Ux and Uy and a nonsingular matrix W such that
AND

where EX and Sy are diagonal. This generalized singular value decomposition was proposed, with W~l on the right-hand sides, by Van Loan [283,1976] and in the above form by Paige and Saunders [202,1981]. It is easily seen that
AND

so that the generalized singular value decomposition is related to the generalized eigenvalue problem in the cross-product matrices just as the singular value decomposition is related to the eigenvalue problem for the cross-product matrix. For much the same reasons as given in 3.2, a computational approach to the generalized singular value decomposition through cross-product matrices is deprecated. The generalized singular value decomposition is related to the CS decomposition of an orthonormal matrix (see [202,258] or 1:1.4.6). Specifically, let

be a QR factorization of (JfT yT)T. Then the CS decomposition exhibits orthogonal matrices Ux, UY, and V, such that

Sec. 4. The S/PD Eigenvalue Problem

237

where EX and Sy are diagonal matrices with S^ + Sy = /. (This last relation implies that the diagonal elements of E^ and Sy can be interpreted as cosines and sines, whence the name CS decomposition.) If we combine (4.6) and (4.7) and set JT = V^Ry the result is the generalized singular value decomposition (4.5). Algorithms for computing the CS decomposition and hence the singular value decomposition have been proposed by Stewart [259, 260] and Van Loan [284]. Paige [200] has given a method that works directly through X and Y. The LAPACK routine xGGSVD uses Van Loan's approach.

Vollt: Eigensystems

This page intentionally left blank

4
EIGENSPACES AND THEIR APPROXIMATION

The first half of this book has been concerned with dense matrices whose elements can be stored in the main memory of a computer. We now shift focus to problems that are so large that storage limitations become a problem. This problem has two aspects. First, if the order of the matrix in question is sufficiently large, we will not be able to store all its elements. This limitation is not as burdensome as it might appear. Many large matrices arising in applications are sparse; that is, their zero elements greatly outnumber their nonzero elements. With appropriate data structures we can get away with storing only the latter. Unfortunately, these data structures restrict the operations we can perform on the matrix, and, in consequence, most algorithms for large sparse eigenvalue problems confine themselves to matrix-vector multiplications or perhaps the computation of an LU factorization. Second, the eigenvectors of a sparse matrix are in general not sparse. It follows that if the matrix is large enough we cannot afford to store its entire eigensystem. Instead we must be satisfied with computing some subset of its eigenpairs. The space spanned by a set of eigenvectors is an example of an eigenspace, and it turns out that algorithms for large matrices are best explained in terms of eigenspaces. Consequently, this chapter is devoted to the basic facts about eigenspaces and their approximations. We begin with the basic algebraic theory of eigenspaces, and in 2 we present the analytic theoryresidual analysis and perturbation bounds. Because eigenspaces, like eigenvectors, cannot be computed directly, most algorithms for large problems proceed by generating a sequence of subspaces that contain increasingly accurate approximations to the desired eigenvectors. In 3 we treat one of the most popular ways of generating subspacesthe Krylov sequenceand in 4 we analyze the RayleighRitz method for extracting individual eigenvectors from a subspace. Although all of the results of this chapter apply to matrices of any size, our chief concern is with large eigenproblems. Therefore: Unless otherwise specified A will denote a matrix of order n. It will often help to think ofn as being very large.

239

240

CHAPTER 4. EIGENSPACES

1. EIGENSPACES
In this subsection we are going to develop the theory of subspaces that remain invariant when acted on by a matrix. We have already noted that these invariant subspacesor eigenspaces as we will call them are useful in the derivation and analysis of algorithms for large eigenvalue problems. They are also important because one can use them to isolate ill-behaved groups of eigenvalues. For example, a matrix that does not have a complete system of eigenvectors may instead have a complete system of eigenspaces of low dimension corresponding to groups of defective eigenvalues. In the first subsection we will present the basic definitions and properties. In 1.2 we will consider simple eigenspacesthe natural generalization of a simple eigenvector.

1.1. DEFINITIONS
We have already observed (p. 2) that the subspace spanned by an eigenvector is invariant under multiplication by its matrix. The notion of an eigenspace is a generalization of this observation. Definition 1.1. Let A be of order n and let X be a subspace ofCn. Then X is an
EIGENSPACE Or INVARIANT SUBSPACE of A if

The space spanned by an eigenvector is a trivial but important example of an eigenspace. A less trivial example occurs in the proof of the existence of real Schur decompositions (Theorem 3.1, Chapter 2). There we showed that if (A, or) = (\,y + iz] is a complex eigenpair of a real matrix A, then for some real 2x2 matrix L,

Moreover, the eigenvalues of L are A and A. Since the column space of (y z]L is a subset of the column space of (y z), the space X 7l[(y z)} is an eigenspace of A. This construction illustrates the utility of eigenspaces. The information contained in the set of complex eigenpairs (A, x} and (A, x) is captured more economically by the relation (1.1), which consists entirely of real quantities. Eigenspaces can be used to bring together combinations of eigenvalues and eigenvectors that would be difficult to treat separately. Eigenbases The definition of eigenspace was cast in terms of a subspace of C n , while the expression (1.1) concerns a specific basis for the subspace in question. In computational practice we will always have to work with a basis. The following theorem summarizes the properties of a basis for an eigenspace.

SEC. 1. ElGENSPACES

241

Theorem 1.2. Let X be an eigenspace of A and letX be a basis forX. Then there is a unique matrix L such that

The matrix L is given by

where X1 is a left inverse ofX i.e., a matrix satisfying X1X I. If (A, x) is an eigenpairofA with x X, then (A, Xlx) is an eigenpairofL. Conversely, if (A, u] is an eigenpairofL, then (A, Xu) is an eigenpairofA. Proof. Let

be partitioned by columns. Since y\ 6 X and X is a basis for X, yi can be expressed uniquely as a linear combination of the columns of X; i.e.,

for some unique vector t{. If we set L (i\ ^), then AX = XL, as required. If X1 is a left inverse of X, then

Now let (A, #) be an eigenpair of A with x G X. Then there is a unique vector u such that x Xu. However, u = Xlx. Hence

and the relation Lu = Xu follows on multiplying by X1. Conversely, if Lu = Xu, then

so that (A, Xu) is an eigenpair of A. We say that the matrix L is the representation of A on the eigenspace X with respect to the basis X. The theorem shows that L is independent of the choice of left inverse in the formula L = X1AX. The theorem also shows that there is a one-one correspondence between eigenvectors lying in X and eigenvectors of L. In particular L has a complete set of eigenvectors if and only if the eigenvectors of A lying in X span X. If L does not have a complete system of eigenvectors, the relation between the eigensystem of A and that of L can be very complicated. As we will see, however, for the important case of a simple eigenspace (Definition 1.7), the relation is straightforward. The existence of a unique representation L associated with a basis X for an eigenspace X justifies the following extension of the notion of eigenpair. Vol II: Eigensystems

242

CHAPTER 4. EIGENSPACES

Definition 1.3. Let A beofordern. ForX Cnxk andL Ck*k, we say that (L,X)
is an EIGENPAIR OF ORDER & Of RIGHT EIGENPAIR OF ORDER k of A if

We call the matrix X an EIGENBASIS and the matrix L an EIGENBLOCK. If X is orthonormal, we say that the eigenpair (L, X) is orthonormal. IfY G Cnxk has linearly independent columns and YHA = LYH, we say that
(L, Y) is a LEFT EIGENPAIR of A.

Note that if (L, V) is a left eigenpair of A, then y = T^(Y] is a left eigenspace of A in the sense that

The following theorem shows how eigenpairs transform under change of basis and similarities. Its proof, which is simple and instructive, is left as an exercise. Theorem 1.4. Let (L,X) be an eigenpair of A. IfU is nonsingular, then the pair (U~1LU,XU) is also an eigenpair of A. IfW is nonsingular, then (L,W~1X) is an eigenpair of"W~l AW. An important consequence of this theorem is that the eigenvalues of the representation of an eigenspace with respect to a basis are independent of the choice of the basis. Consequently, we can speak of the eigenvalues of A associated with an eigenspace. Existence of eigenspaces Given that every eigenspace has a unique set of eigenvalues, it it natural to ask if any set of eigenvalues has a corresponding eigenspace. The following theorem shows that indeed it has. Theorem 1.5. LetC = { A i , . . . , A^} C A(.A) be a multisubset of the eigenvalues of A. Then there is an eigenspace X of A whose eigenvalues are AI, ... , A^.
Proof Let

be a partitioned Schur decomposition of A in which TH is of order k and has the members of C on its diagonal. Computing the first column of this relation, we get

SEC. 1. ElGENSPACES

243

Hence the column space of U\ is an eigenspace of A whose eigenvalues are the diagonal elements of the triangular matrix TH i.e., the members of C. Thus a matrix A of order n with distinct eigenvalues has 2n distinct eigenspaces one corresponding to each subset of A( A). Unfortunately, if A has multiple eigenvalues, the eigenspaces of A are not as easily described. We will return to this point in the next subsection. Deflation In establishing the existence of the real Schur form (Theorem 3.1, Chapter 2) we essentially used the eigenspace corresponding to a pair of complex conjugate eigenvalues to deflate the matrix in question. This is a special case of a general technique. The proof of the following theorem is left as an exercise. Theorem 1.6. Let(i, X) bean orthonormaleigenpairofA andlet(X Y) be unitary. Then

where

Here are three comments on this theorem. The similarity transformation (1.2) of A deflates the problem in the usual sense. The spectrum of A is the union of spectra of L and M, which, for computational purposes, can be treated as separate eigenvalue problems. The relation (1.2) implies that

Thus (M, Y) is a left eigenpair of A. Otherwise put: If X is an eigenspace of A and y is the orthogonal complement of X, then y is a left eigenspace of A corresponding to the eigenvalues not associated with X. We call y the COMPLEMENTARY LEFT EIGENSPACE OF X. The construction of Theorem 1.2 is not the most general way to deflate an eigenspace. Specifically, if X is any basis for an eigenspace of A and (X Y)is nonsingular, then

for some matrices L, M, and H. For numerical reasons, however, it is preferable to use unitary transformations to deflate an eigenspace. See the discussion on page 10. Vol II: Eigensystems

244

CHAPTER 4. EIGENSPACES

1.2. SIMPLE EIGENSPACES Definition We have seen (Theorem 1.5) that if is a subset of the spectrum of A, then there is an eigenspace X of A whose eigenvalues are the members of L. Unfortunately, this eigen space need not be unique. For example, if A is a double eigenvalue of A that is not defective, then it has two linearly independent eigenvectors, and any nonzero vector in the plane spanned by these two vectors spans a one-dimensional eigenspace corresponding to A. Computationally, it is impossible to pin down an object that is not unique. The above example suggests that the nonuniqueness in eigenspaces results from it not having all the copies of a multiple eigenvalue. Hence we make the following definition. Definition 1.7. Let X bean eigenspace of A with eigenvalues C. Then X is a SIMPLE
EIGENSPACE of A if

In other words, an eigenspace is simple if its eigenvalues are, counting multiplicities, disjoint from the other eigenvalues of A. Block diagonalization and spectral representations We turn now to the existence of left eigenspaces corresponding to a right eigenspace. The problem is not as simple as the existence of left eigenvectors, since we cannot use determinantal arguments as in the second comment following Theorem 1.2, Chapter 1. We will approach the problem by way of block diagonalization. Theorem 1.8. Let (L\,X\) be a simple orthonormal eigenpair of A and let(Xi,Y<2) be unitary so that

(Theorem 1.2). Then there is a matrix Q satisfying the Sylvester equation

such that if we set

where

then

SEC. 1. EIGENSPACES

245

Proof. Beginning with (1.3), apply Theorem 1.18, Chapter 1, to reduce A to block diagonal form. The formulas (1.5) result from accumulating the transformation in the successive reductions to block triangular form and block diagonal form. For example,

which gives the formula for X^ in (1.5). Here are some observations on this theorem. If we write the second equation in (1.6) in the form

we see that AX? = X^L^ so that (L<2,X<2) is an eigenpair of A. The eigenspace 7Z(X2) is complementary to the eigenspace 1Z(Xi) in C n , and we call it the complementary right eigenspace. Likewise (Li, YI ) is a left eigenpair of A, so that 7( YI) is the left eigenspace corresponding to Tl(Xi). Combining these facts with the observation that the orthogonal complement of 7l(X\) is the complementary left eigenspace of A, we have the following corollary. Corollary 1.9. Let X be a simple eigenspace of A. Then X has a corresponding left eigenspace and a complementary right eigenspace. The orthogonal complement ofX is the complementary left eigenspace. If (A, x) is a simple eigenpair of A, then there is a left eigenvector y corresponding to x, which can be normalized so that yHx I [see (3.12), Chapter 1]. The fact that the eigenbasis Y\ for the left eigenspace corresponding to Xi is normalized so that Y^Xi = I generalizes this result. We say that the bases Xi and YI are biorthogonal. We will return to this point later when we consider canonical angles between subspaces (see Corollary 2.5). From (1.6) we can write

We will call this formula a spectral representation of A. Saying that (1.7) is a spectral representation of A is a convenient shorthand for (1.4) and (1.6). The eigenbases in a spectral representation are not unique. If, for example, S is nonsingular, then we may replace X\ by XiS, YI by Yi5~ H , and LI by S~lLiS. In establishing the spectral representation we assumed that Xi and Y% were orthonormal. We will call any such spectral representation a standard representation. Theorem 1.8 uses a single simple eigenspace to reduce a matrix to 2x2 block diagonal form. However, an obvious induction shows that if we have k simple eigenspaces then we can reduce v4.to(fc-fl)x(fc+l) block diagonal form, in which the first Vol II: Eigensystems

246

CHAPTER 4. EIGENSPACES

k blocks are eigenblocks of the eigenspaces and the last eigenblock is the eigenblock of the complement of their union. In analogy with (1.7), there is a corresponding spectral representation of the form

Uniqueness of simple eigenspaces We turn now to the question of whether a simple eigenspace is uniquely determined by its eigenvalues. Although it seems obvious that it is, the result is not easy to prove. It will be sufficient to prove the uniqueness for a simple eigenspace corresponding to a single eigenvalue. For if a simple eigenspace has more than one eigenvalue, it can be decomposed by diagonalization into eigenspaces corresponding to its individual eigenvalues. If the latter are unique, then so is the original space. Let X be a simple eigenspace corresponding to a single eigenvalue, which without loss of generality we may assume to be zero. Then we can diagonalize A as in Theorem 1.8 to get the matrix diag(Z, M). Since L has only zero eigenvalues it is nilpotent (Theorem 1.13, Chapter 1). Since M cannot have zero eigenvalues, it is nonsingular. Now let X be a second eigenspace corresponding to the eigenvalue zero. We can then use this eigenspace to diagonalize A to get diag(Z/, M), where again L is nilpotent and M is nonsingular. Since diag(Z/, M) and diag(Z/, M) are both similar to A, they are similar to each other. Let Jf~1diag(Z, M )X diag(i, M). Let Y = X~l, and write the similarity transformation in the partitioned form

Let k be an integer such that Lk = Lk 0. Then

Computing the (2,2)-block of this relation, we get

Since M is nonsingular, so are X^ and 22 Now compute the (1,2)-block of (1.8) to get

Since MkXM is nonsingular, F2i = 0. Similarly Yi2 - 0. Thus X is block diagonal, and the spaces X and X are the same.

SEC. 2. PERTURBATION THEORY 1.3. NOTES AND REFERENCES Eigenspaces

247

Although the term "eigenspace" can be found in Kato's survey of perturbation theory [146], such spaces are usually called invariant subspaces. A trivial reason for preferring "eigenspace" over "invariant subspace" is that the latter need not be truly invariant under multiplication by A an extreme example is A = 0, which collapses any subspace into {0}. A more substantial reason is that we can use the same terminology for generalized eigenvalue problems, where there is no one matrix to operate on the subspace. The generalization of the notion of eigenpair as well as the terms "eigenbasis" and "eigenblock" (Definition 1.3) are new. Spectral projections From the spectral representation

we can form the matrices Pi = XiY^. It is easily verified that Pi is idempotenti.e., Pf = Pi. Such matrices project a vector onto its column space along its null space, and for that reason the Pi are called spectral projectors. Spectral projectors can be used to decompose a matrix without transforming it. For example, it is easy to verify that

an equation that corresponds to our reduction to block diagonal form. For more on spectral projections see [146]. Uniqueness of simple eigenspaces That a simple eigenspace is determined by its eigenvalues seems to be taken for granted in the literature on matrix computations. The proof given here is new. The resolvent Our approach to eigenspaces through block triangularization and diagonalization reflects the way we compute with eigenspaces. An alternative approach is to use the resolvent defined by

For example, it can be shown that the spectral projection corresponding to a set of eigenvalues is given by the complex integral

where F is a closed path in the complex plane that contains and no other eigenvalues. For a systematic development of this approach see [146]. Vol II: Eigensystems

248

CHAPTER 4. EIGENSPACES

2. PERTURBATION THEORY
In this subsection we will treat the perturbation of eigenspaces and their associated eigenblocks. Much of this theory parallels the perturbation theory in 3, Chapter 1; however, because of the important role played by residuals in algorithms for large problems, we will first present the analysis of residuals and then go onto perturbation theory proper. Specifically, we begin with preliminary material on the canonical angles between subspaces. We then turn to the analysis of residuals. In 2.3 we use these residual bounds to derive a perturbation theory for simple eigenpairs. Finally, in 2.4 we present some residual bounds for Hermitian matrices. 2.1. CANONICAL ANGLES We have defined the angle between two nonzero vectors as the angle whose cosine is |a;H2/|/(||z||2||t/2||) [see(3.11), Chapter 1]. In this subsection we extend this definition to subspaces in C n . To avoid certain degenerate cases, we will restrict the dimensions of our subspaces to be not greater than ^. For a more complete development of this subject see 1:4.5. Definitions Let X and y be subspaces of the same dimension. Let X and Y be orthonormal bases for X and y, and consider the matrix C = Y^X. We have

Hence all the singular values of C lie in the interval [0,1] and can be regarded as cosines of angles. These angles are independent of the choice of bases for X and y. For if X and y are other bases, we can write X = XV and Y = YW, where V = XHX and W = YEY are unitary. Hence C = YHX = WUCV and C are unitarily equivalent and have the same singular values. This justifies the following definition. Definition 2.1. Let X and y be subspaces ofCn of dimension p and letX and Y be orthonormal bases forX and y. Then the CANONICAL ANGLES between X and y are the numbers

where 7,- are the singular values of YUX. We write Oi(X, y) for the ith canonical angle in descending order and define

We will also write Q(X, Y) for 6(*, y).

SEC. 2. PERTURBATION THEORY

249

Geometrically, the largest canonical angle has the following characterization:

Thus for each x in X we look for the vector y in y that makes the smallest angle 9(x) with x. The largest such angle 9(x) is the largest canonical angle. Computing canonical angles In principle we could compute canonical angles from the characterization in Definition 2.1. However, if the canonical angle is small, this procedure will give inaccurate results. Specifically, for small 6, cos 9 = 1-|02. IfO < 10~8, then cos 9 will evaluate to 1 in IEEE double-precision arithmetic, and we will conclude that 9 = 0. A cure for this problem is to compute the sine of the canonical angles. The following theorem, which is a generalization of Lemma 3.12, Chapter 1, provides the wherewithal. Theorem 2.2. Let X and Y be orthonormal bases for X and y, and let Y_\_ be an orthonormal basis for the orthogonal complement ofy. Then the singular values of Y^X are the sines of the canonical angles between X and y. Proof. Let

Since this matrix is orthonormal,

Let VH(CHC)V = T2 be the spectral decomposition of CHC. Since the eigenvalues of CHC are the squares of the singular values of C, the diagonal elements of F are the cosines of the canonical angles between X and y. But

It follows that E2 is diagonal and its diagonal elements are 1 - 7?the squares of the sines of the canonical angles. Hence the singular values of S YX are the sines of the canonical angles between X and y. In this chapter we will use Theorem 2.2 as a mathematical device for bounding canonical angles But it also provides the means to compute the sines of canonical angles numerically. For details, see the notes and references. Subspaces of unequal dimensions We will occasionally need to compare subspaces X and y of differing dimensions. The statement that X is near y makes sense only when dim(A') < dim(J^). For otherwise there would be a vector # in A" that is orthogonal to every vector in y and the Vol II: Eigensystems

250

CHAPTER 4. EIGENSPACES

angle between that vector and y could only be ^. When dirn(A') < dim(3;), we can define canonical angles as in Definition 2.1. In this case, the number of canonical angles will be equal to the dimension of X. These canonical angles can be calculated as in Theorem 2.2. The following theorem contains a useful characterization of the the angle between a vector and a subspace. Theorem 2.3. Let x be a vector with \\x\\2 1 and let y be a subspace. Then

Proof. Let (Y Y) be unitary with 7(F) = y. Let y^y and consider the transformed vector

In this new coordinate system we must have y 0. Hence

This norm is clearly minimized when y x, and the norm at the minimum is \\x_i ||2, which, by Theorem 2.2, is sin Z(z, y). Combinations of subspaces In Theorem 1.8 we expressed the left eigenspace corresponding to a simple eigenspace in the form X + YQ. We will meet such expressions later, where we will have to know the relations between the singular values of Q and X -f YQ. The following theorem does the job. Theorem 2.4. Let X and Y be ortho-normal matrices with XHY = 0 and let Z = X + Y Q. Let o~i and ^ denote the nonzero singular values ofZ and Q arranged in descending order. LetOi denote the nonzero canonical angles between 7Z(X) andlZ(Z), also arranged in descending order. Then

and

Proof. The squares of the nonzero singular values of Q are the nonsingular eigenvalues of Q^Q, and the squares of the nonzero singular values of Z are the nonzero eigenvalues of

SEC. 2. PERTURBATION THEORY


Hence

251

By definition the cosines of the canonical angles between K(X) and 7( Z) are the singular values of XHZ, where Z is any orthonormal basis for K(Z). One such basis is

where (/ + QHQ) 2 is the inverse of the positive definite square root of / + QHQ. Thus the cosines of the canonical angles are the singular values of

which by the above observation are the reciprocals of the singular values of Z. Hence cos &i (T~l, or sec 0,- = 0{. The relation tan 0t = <r; now follows from (2.1). If we combine this theorem with Theorem 1.8, we obtain the following corollary, which generalizes (3.12), Chapter 1. Corollary 2.5. Let X bean orthonormal basis fora simple eigenspace X of A and let Y be a basis for the corresponding left eigenspace y of A normalized so that YHX = I. Then the singular values ofY are the secants of the canonical angles between X and y. In particular,

2.2. RESIDUAL ANALYSIS Most methods for computing eigenspaces of a matrix A produce a sequence Xk of bases whose spans, it is hoped, converge to an eigenspace of A. In practice, the only way we have for determining convergence is to look at the residual Rk = AXk XkLk, where Lk is suitably chosen. If Rk is zero, then (Lk, Xk) is an eigenpair of A. It therefore seems reasonable to stop when Rk is sufficiently small. In this subsection we will consider the implications of a small residual. First we will show how to compute an optimal block L a generalization of Theorem 1.4, Chapter 2. We will then show that a small residual implies a small backward error a generalization of Theorem 1.3, Chapter 2. Finally, we will develop residual bounds for the error in (Z, X) as an approximate eigenpair. Optimal residuals Most of our algorithms will furnish an approximate eigenbasis X but will allow us the freedom to choose the eigenblock. It is natural to choose this block to make the residual R = AX - XL as small as possible. The following theorem shows how to make this choice. We will actually prove a little more. Vol II: Eigensystems

252

CHAPTER 4. EIGENSPACES

Theorem 2.6. Let(X XL) beunitary. LetR = AX-XLandSH = XHA-LXH. Then in any unitarily invariant norm \\R\\ and \\S\\ are minimized when

in which case

Proof. We will prove the result for J?, the proof for S being similar. Set

Then

The Rayleigh quotient The quantity L = XHAX is a generalization of the scalar Rayleigh quotient of Definition 1.5, Chapter 2. If X is an eigenbasis of A, then the Rayleigh quotient is an eigenblock. Consequently, if X is near an eigenbasis of A, we may expect the Rayleigh quotient to contain good approximations to the eigenvalues of A. Moreover, by Theorem 1.2 we may expect that if u is an eigenvector of L then Xu will be near an eigenvector of A. We will give substance to these expectations in 4, where we consider the Rayleigh-Ritz method. The matrix X^AX is not the most general matrix that will reproduce an eigenblock when X is an eigenbasis. Theorem 1.2,suggests the following definition. Definition 2.7. Let X be of full column rank and letX1 be a left inverse ofX. Then the quantity X1 A X is a RAYLEIGH QUOTIENT of A. It may seem odd to have a quotientless Rayleigh quotient, but in fact the division is implicit in X1. To make it explicit, let X be of full rank and let YHX be nonsingular. Then (Y^X)'1 YH is a left inverse of X and (YHX)-1YH AX is a Rayleigh quotient.

SEC. 2. PERTURBATION THEORY


Backward error

253

In Theorem 1.3, Chapter 2, we saw that if r = Ax - Ax, then (A, x) is an exact eigenpair of a perturbed matrix A + E, where E is of a size with r. The following theorem generalizes this result. Theorem 2.8. Let X be orthonormal and let

Then there is a matrix

such that

an/"f

If A is Hermitian and

then there is a Hermitian matrix

satisfy ing (2 A}. Moreover,

Proof. The proof is a generalization of the proof of Theorem 1.3, Chapter 2. The only tricky point is the verification of (2.6), which can be effected by observing that in the notation of the proof of Theorem 2.6,

The singular values of this matrix are <T;, where the az are the singular values of G. Since the singular values of G and R are the same, the 2-norm of this matrix is the largest singular value of R, and the square of the Frobenius norm is twice the sum of squares of the singular values of R. The import of this theorem is discussed just after Theorem 1.3, Chapter 2. Briefly, if the residual is small, then (L, X) is an exact eigenpair of a sightly perturbed matrix A -f E. This does not guarantee that (I, X) is a good approximation to the eigenpair, but for it not to be (, X) must be ill conditionedthat is, sensitive to small changes in A + E. Thus basing convergence on the size of the residual guarantees that wellconditioned eigenpairs will be determined accurately. VolII: Eigensystems

254

CHAPTER 4. EIGENSPACES

Residual bounds for eigenvalues of Hermitian matrices By combining Theorems 3.8 and 3.10 in Chapter 1 with Theorem 2.8 we can obtain residual bounds on the eigenvalues of a Hermitian matrix. Specifically, A(Z) C A(A+ E). Since the eigenvalues of A + E and A, arranged in descending order, cannot be separated by more than \\E\\2, we have the following corollary. Corollary 2.9. Let i\,... ,l\ be the eigenvalues of L. Then there are eigenvalues A 9 1 , . . . , A,, of A such that

and

The factor \/2 in (2.7) can be eliminated (see the notes and references). We will see in 2.4 that if we know more about the eigensystem of A then we can get tighter residual bounds. Block deflation Although the small backward error associated with a small residual is a powerful reason for using the residual norm as a convergence criteria, the question remains of how accurate the approximate eigenspace is. We will derive such bounds by a process of block deflation. Let (X X) be unitary and let

Then by Theorem 2.6 we know that in any unitarily in variant norm ||-||, ||J?|| = ||^4^ XL\\ - \\G\\. Consequently, if R is small, theright-handside of (2.8) is almost block triangular. We will derive bounds by nudging it into full block triangularity. Specifically, consider the similarity transformation

For the (2,1) block of the right-hand side to be zero, we must have PL MP = G - PHP, which can be written in the form

SEC. 2. PERTURBATION THEORY

255

where S is the Sylvester operator Equation (2.9) is nonlinear in P and has no closed form solution. However, under appropriate conditions its solution can be shown to exist and can be bounded. Theorem 2.10. Let || || denote a consistent norm. In the matrix

let

where S is defined by

If

there is a unique matrix P satisfying PL MP = G PHP and

such that

The spectra of L + HP and M PH are disjoint. For the proof of this theorem see the notes and references. We will first discuss this theorem in terms of the matrix B and then, later, in terms of the original matrix A in (2.8). Let

Then ( X , L) is an approximate eigenpair of B with residual norm \\G\\. The theorem shows that (L + HP, X) is a simple eigenpair of B with complementary eigenblock M - PH. By Theorem 2.4 the singular values of P are the tangents of the canonical angles between X and X. Consequently, if || || is the spectral norm, the largest canonical angle Q\ between X and X satisfies

Vol II: Eigensystems

256
The quantity sep

CHAPTER 4. EIGENSPACES

The quantity sep(.Z/, M), which appears in (2.11), is a generalization of the quantity sep(A, N) introduced in Theorem 3.11, Chapter 1. By Theorem 1.16, Chapter 1, it is nonzero if and only if the spectra of L and M are distinct. By Corollary 1.17, Chapter 1,

so that sep is a lower bound for the physical separation 6 of the spectra of L and M. Thus the poorer the separation, the larger the canonical angle between X and X. Unfortunately, sep(i, M} can be much smaller than the physical separation, as Example 3.15, Chapter 1, shows. The quantity sep has a number of useful properties, which are stated without proof in the following theorem. Theorem 2.11. Let sep be defined by a consistent norm \\-\\. Then the following statements are true. 1. Ifsep(Z,M) > 0, then sep(, M) = US"1]]"1, where S is the Sylvester operator defined by (2.10). 2. |sep( + , M + F) - sep(, M)| < \\E\\ + \\F\\. 3. Ifthenorm \\ \\ is absolute (i.e., \\A\\ = |||A|||;and L = diag(ii , . . . , < ) then and M = diag(MI , . . . , M m ),

4. If L and M are Hermitian, then in the Frobenius norm

5.t
It is a (not entirely trivial) exercise in the manipulation of norms to establish these properties. Item 1 provides an alternative definition of sep. Item 2 is a continuity property. It says that small changes in L and M make like changes in sep. This fact will be important later, when we derive perturbation bounds for eigenspaces. Items 3 and 4 exhibit sep for matrices of special form. Finally, item 5 shows how far sep may be degraded under similarity transformations. It is useful in assessing the separation of diagonalizable matrices.

SEC. 2. PERTURBATION THEORY

257

Residual bounds We now return to our original matrix A and derive residual bounds for the approximate subspaces. Theorem 2.12. Let X be an approximate eigenbasis for A and let(X X_) be unitary. Let L = XHAX and M - X^AX be the Rayleigh quotients corresponding to X and X, and let

If in any unitarily invariant norm

then there is a simple eigenpair (, X) of A satisfying

and

Proof. Write

Then by Theorem 2.6 \\R\\ = \\G\\ and \\S\\ = ||#||. If we now apply Theorem 2.10 accumulating transformations, we see that if (2.12) is satisfied then there is an eigenblock of A of the form (L + HP, X + A^P), where

The bound (2.13) follows on taking the norm of the difference of L and L + HP. The bound (2.14) follows from Theorem 2.4. From a mathematical standpoint, this theorem does exactly what we need. It provides conditions under which a purported eigenpair (L,X) approximates an actual eigenpair of the matrix in question. In large eigenproblems, however, the size n of the matrix will be very much greater than the number k of columns of the matrix X. Although, we can compute L, R, and S easily enough, we cannot compute M, which is large and generally dense, or the quantity sep(, M). We shall see later that we can approximate a condition number for an eigenblock, provided we have an approximation to the corresponding left eigenbasis; but when it comes to eigenspaces of very large matrices, one must have additional information about the disposition of the eigenvalues to use the theorem. Vol II: Eigensystems

258 2.3. PERTURBATION THEORY

CHAPTER 4. EIGENSPACES

In the last subsection we considered the problem of bounding the error in an approximate eigenspace. In this subsection we will treat the problem of bounding the perturbation of an exact eigenspace when the matrix changes. The perturbation theorem Given a simple eigenspace of a matrix A, we wish to determine when there is a nearby eigenspace of a perturbation A = A + E of A and to bound the angles between the two spaces. In principle, we can do this by regarding the exact eigenspace of A as an approximate eigenspace of A and applying Theorem 2.12. In practice, we obtain better bounds by proceeding indirectly through a spectral decomposition of A. Theorem 2.13. Let A have the spectral representation

Let A = A + E and set

Let || || be a consistent family of norms and set

If
then there is a matrix P satisfying

such that

and

are complementary, simple, right and left eigenpairs of A. The spectra ofL and M are disjoint Proof. By item 2 of Theorem 2.11 the quantity 6 is a lower bound on sep(L+Fu, M-\^22)- Hence if (2.17) is satisfied, Theorem 2.10 guarantees the existence of a matrix P satisfying (2.18) that block triangularizes the matrix (2.16). The expressions (2.19) and (2.20) follow upon accumulating the transformations that reduce A to block triangular form. We will now examine the consequences of this theorem.

SEC. 2. PERTURBATION THEORY Choice of subspaces

259

Theorem (2.13) actually represents a continuum of results, since spectral representations are only partially unique (see p. 245). The variants do not say the same things, since the matrices L, M, and Fij also change. There is, unfortunately, no single choice of spectral representation that is suitable for all applications, but the one that comes closest is the the standard representation in which X\ and Y2 are orthonormal. In the remainder of this subsection we will therefore make the following assumptions. In Theorem 2.13, the matrices Xi and 2 are assumed to be orthonormal. In consequence (Theorem 2.10) there is a matrix Q such that

The singular values ofQ are the tangents of the canonical angles between X^ = H(Xi) andyi = n(Yi) (Theorem 2.4). We will set

Bounds in terms of E The bounds of Theorem 2.13 are cast in terms of the matrices Fij because they are the primary quantities in the proof of the theorem. In practice, however, we will seldom have access to these matrices. What we are likely to have is a bound on some norm oi E. In this case we must weaken the bounds by replacing \\Fij\\ by ||y^H||||'||||Xj||. In the 2-norm, these bounds can be conveniently written in the terms of 0xy defined in (2.21). Specifically,

With these bounds, we may redefine

and replace the condition (2.17) by

so that the bound (2.18) becomes

Thus how X\ and y\ are situated with respect to one another affects the condition for the existence of the perturbed eigenspace, but it does not affect the final bound on \P\\2. Vol II: Eigensystems

260
The Rayleigh quotient and the condition of L
Let

CHAPTER 4. EIGENSPACES

Since Y^Xi = /, the matrix L is a Rayleigh quotient in the sense of Definition 2.7. This Rayleigh quotient is an especially good approximation to the eigenblock of A. In fact, from the above bounds

Thus the difference between the Rayleigh quotient and the exact representation goes to zero as the square of ||"||2We also have

Hence as E 0

Thus the secant of the largest canonical angle between X^ and y\ is a condition number for the eigenblock L that determines how the error in E propagates to the representation L. Thus we have the following generalization of the assertion (3.24), Chapter 1.

Angles between the subspaces In the relation Xi = Xi -f X^P, the size of P is a measure of the deviation of X\ = K(Xi) from Xi. It is natural then to ask how this measure relates to the canonical angles between the two spaces. If Xi were orthonormal and Y^Xi were zero, we could apply Theorem 2.4 to obtain this relation. Unfortunately, neither condition holds. But with a little manipulation we can find a basis for X\ to which Theorem 2.4 does apply. From (2.21) we have

SEC. 2. PERTURBATION THEORY

261

the last inequality following from (2.22) (remember sec2 0xy = 1 + tan2 #xy). It follows that / -}- QP is nonsingular and

We can therefore write

Now the subspace spanned by Xi(I+QP) l is still X\. Since X\ and Y2 are orthonormal and Y^Xi = 0, it follows from Theorem 2.4 that the tangents of the canonical angles between X\ and X\ are the singular values of P(I + QP}~1. On taking norms and using (2.23) and (2.27) we have the following corollary. Corollary 2.14. Let 0xy be the largest canonical angle between X\ and 3^i and let Q(X\, AI) be the largest canonical angle between X\ and X\. Then

where

Here are two comments on this corollary. The denominator of (2.28), which is necessarily positive, approaches 6 as E 0, so that when E is small the bound is effectively 11E \ \ 2 / 8. Moreover, 6 itself approaches sep(i, M). Thus sep(Z, M) is a condition number for X\. In summary: Let A have the standard spectral representation X\LY^ + X^MY^. Then in the 2-norm the quantity sep(jL, M)""1 is a condition number for the eigenspace K(Xi). As E. 0 the matrix P(I + QP)~l > P. Consequently, for E small enough the singular values of P are approximations to the tangents of the canonical angles between X\ and X\. In fact, since for small 9 we have 6 = tan 0, the singular values approximate the angles themselves. If we are willing to replace sep(L, M) with sep(L, M) we can generalize the proof of Theorem 3.13, Chapter 1, to obtain the following bound:

However, this approach has the disadvantage that it assumes rather than proves the existence of X\. Vol II: Eigensystems

262

CHAPTER 4. EIGENSPACES

2.4. RESIDUAL BOUNDS FOR HERMITIAN MATRICES


The residual bound theory of 2.2 addresses two logically distinct problems: the existence of certain eigenspaces of A and the bounding of the error in those eigenspaces. For Hermitian matrices we can often say a priori that the required eigenspaces exist. For example, suppose that the Hermitian matrix A has the form

and that 6 = min |A() - A(M)| > 0. If ||G||2 is less than f, then by Theorem 3.8, Chapter 1, the eigenvalues of A must divide into two groupsthose that are within ||G||2 of A(L) and those that are within ||<7||2 of A(M). The eigenspaces corresponding to these two groups of eigenvalues are candidates for bounding. The fact that we know these eigenspaces exist before we start enables us to get direct bounds that are simpler and more useful than the ones developed above. The purpose of this subsection is to state theorems containing such direct residual bounds. The proofs, which are not needed in this work, will be omitted. Residual bounds for eigenspaces We begin with the simpler of the two results on eigenspaces treated here. As usual, (A', y) will denote the the diagonal matrix of canonical angles between the subspaces X and y. Theorem 2.15. Let the Hermitian matrix A have the spectral representation

where (X Y) is unitary. Let the orthonormal matrix Z be of the same dimensions as X, and let

where N is Hermitian. If

then

The separation hypothesis (2.30) is different from that required by the residual bounds of Theorem 2.12. There we required that the spectra of two Rayleigh quotients corresponding to the approximate subspaces be disjoint. Here the separation is between the certain eigenvalues of A (those of L) and eigenvalues associated with the

SEC. 2. PERTURBATION THEORY

263

approximating subspace (those of N). Moreover, the separation criterion is less stringent in Theorem 2.15 than that of Theorem 2.12, and the final bound is smallerthe benefits of being Hermitian. The theorem reflects an important tradeoff in bounds of this kind. The condition (2.30) requires only that the eigenvalues values of M and N be decently separated. Otherwise, they are free to interlace with eigenvalues of M lying between those of N and vice versa. The price we pay is that we can only bound the Frobenius norm of sin 0(7(JQ, 7(Z)) i.e., the square root of the sum of squares of the sines of the canonical angles. For individual angles the bound will generally be an overestimate. We can resolve this problem by restricting how the eigenvalues of M and N lie with respect to one another. Theorem 2.16. In the notation of Theorem 2.15 suppose that

and for some 8 > 0

Then for any unitarily invariant norm

The conditions on the spectra of N and M say that the spectrum of N lies in an interval that is surrounded at a distance of 6 by the spectrum of M. The bound is now in an arbitrary unitarily invariant norm. The natural norm to use is the 2-norm, in which case (2.32) bounds the largest canonical angle between the two spaces. Residual bounds for eigenvalues In Corollary 2.9 we showed that if R AX XL is small then there are eigenvalues of A lying near those of L. The bound is of order \\R\\- The following shows that if we can specify a separation between the eigenvalues of L and a complementary set of eigenvalues of A then we can reduce the bound to be of order \\R\\2Theorem 2.17. Let (Z Z_\_] be unitary, where Z has k columns. Let

Let

VolII: Eigensystems

264

CHAPTER 4. EIGENSPACES

If

then

The theorem basically says that if A has a set of eigenvalues that are close to A() and that are removed from A(M) by 6, then for R small enough, the eigenvalues and A(i) can be paired so that they are within O(||J?||2) of each other. This theorem has the great advantage that we do not have to put restrictions such as (2.31) on the spectra. However, in sparse applications it has the disadvantage that we do not know N. But if we know that (in the notation of the last paragraph) there is a set C of eigenvalues of A with rnin{|A(M) - _L|} = <!>, then we can write

Hence the condition \\R\\2 < # can be replaced by the condition 3||.R|| < 6 and righthand side of (2.33) by \\R\\%/(6 - 2|| J2||2).
2.5. NOTES AND REFERENCES

General references For general references on perturbation theory see 3.3, Chapter 1. Canonical angle The idea of canonical angles between subspaces goes back to Jordan [138,1875], and has often been rediscovered. For a more complete treatment of this subject see Volume I of this series or [269, Ch. I]. The definitive paper on computing canonical angles is by Bjorck and Golub [26], who recommend computing the sines of the angles. In our applications n will be very large compared with the common dimension k of the subspaces. In this case Yi is very large, and it is impossible to compute YX directly. However, given a basis for y one can compute an orthogonal matrix whose first k columns span y as a product of k Householder transformations (Algorithm 1:4.1.2). These transformations can then be applied to X to give YX in the last nk rows of the result. Optimal residuals and the Rayleigh quotient Theorem 2.6 for Hermitian matrices is due to Kahan [142, 1967] (his proof works for non-Hermitian matrices). Stewart [252,1973] stated the result explicitly for nonHermitian matrices and gave the formula (2.2) for the optimal residual R. Earlier, Wilkinson [300,1965, p. 264] proved the result for vectors.

SEC. 3. KRYLOV SUBSPACES


Backward error

265

For Hermitian matrices in the vector case, a result of Dennis and More [63, 1977] shows that (2.5) is optimal (also see [64, Theorem 9.11]). The theorems stated here all have to do with approximate right eigenspaces, and of course they have trivial variants that deal with left eigenspaces. If we have small right and left residuals R = AX - XL and 5H = YUA ~ Z H y H it is natural to ask if there is a perturbation that makes X a right eigenbasis and Y a left eigenbasis. Kahan, Parlett, and Jiang [144] produce perturbations that are optimal in the spectral and Frobenius norms. Residual eigenvalue bounds for Hermitian matrices Corollary 2.9 is due to Kahan [142,1967], who showed that the factor \/2 can be removed from the right-hand side of (2.7). The result can be generalized to unitarily invariant norms [269, Theorem FV.4.14]. A treatment of other theorems of this kind may be found in [206]. Block deflation and residual bounds The use of block triangularization to derive residual bounds is due to Stewart [250, 1971], who also introduced the quantity sep. The approach taken here, in which the transforming matrix is triangular, is simpler than the original, which used an orthogonal transformation. For more on the history of such bounds see [269, p. 244]. Perturbation theory The passage from residual bounds to perturbation bounds was given in [254]. It is worth noting we can go the other way. Given a residual, we can generate a backward error and apply a perturbation theorem to get a residual bound. The fact that the Rayleigh quotient (2.24) is accurate up to terms of order \\E\\2 shows that not all Rayleigh quotients are equal. The Rayleigh quotient X^AXi, for example, is accurate only up to terms of order \\E\\. The greater accuracy of Y^AX\ is due to the fact that we use approximations to both the left and right eigenbases in its definition. Alternatively, we can regard the greater accuracy as due to the fact that the matrix (2.16) is an off-diagonal perturbation of the block diagonal matrix consisting of the two Rayleigh quotients Y^AXi and F2H AX2The bound (2.29) is due to Ipsen [126]. Residual bounds for eigenspaces and eigenvalues of Hermitian matrices The residual bounds for eigenspaces are due to Davis and Kahan [54,1970], who prove much more in their ground-breaking paper. The residual bounds for eigenvalues are due to Mathias [174] and improve earlier bounds by Stewart [261].

Vol II: Eigensystems

266

CHAPTER 4. EIGENSPACES

3. KRYLOV SUBSPACES
Most algorithms for solving large eigenproblems proceed in two stages. The first stage generates a subspace containing approximations to the desired eigenvectors or eigenspaces. The second stage extracts approximations to the eigenvectors from the subspace generated in the first stage. If the approximations are not satisfactory, they may be used to restart the first stage. In this section we will be concerned with the most widely used method for computing subspaces containing eigenvectorsthe method of Krylov sequences. In the first subsection we will introduce Krylov sequences and their associated subspaces. We will then consider the accuracy of the approximates produced by the method in 3.2. Finally, in 3.3 we will introduce block Krylov sequences. 3.1. KRYLOV SEQUENCES AND KRYLOV SPACES Introduction and definition The power method ( 1, Chapter 2) is based on the observation that if A has a dominant eigenpair then under mild restrictions on u the vectors Aku produce increasingly accurate approximations to the dominant eigenvector. However, at each step the power method considers only the single vector Aku, which amounts to throwing away the information contained in the previously generated vectors. It turns out that this information is valuable, as the following example shows. Example 3.1. A diagonal matrix A of order 100 was generated with eigenvalues 1,.95,.952,.953,...,.95". Starting with a random vector ui, the vectors uj, Aku\ were generated. The solid line in Figure 3.1 shows the tangent of the angle between Akui and the dominant eigenvector of A. It is seen that the convergence is slow, as it must be, since the ratio of the subdominant eigenvalue to the dominant eigenvalue is 0.95. The dashed line gives the tangent between the dominant eigenvector and the space spanned by i,... , Uk. The convergence is much more rapid, reducing the error by eight orders of magnitude. (The dash-dot line shows the convergence to the subdominant eigenvector, of which more later.) The swift convergence of an approximation to the dominant eigenvector in the subspace spanned by ui, Aui,..., Ak~lu\ justifies studying such subspaces. We begin with a definition. Definition 3.2. Let A be of order n and let u ^ 0 be an n vector. Then the sequence is a KRYLOV SEQUENCE BASED ON A AND u. We call the matrix

SEC. 3. KRYLOV SUBSPACES

267

Figure 3.1: Power method and Krylov approximations the kth KRYLOV MATRIX. The space

is called the kth KRYLOV SUBSPACE. When A or u are known from context, we will drop them in our notation for Krylov matrices and subspaces. Thus we may write ICk(u) or simply /C^. Elementary properties The basic properties of Krylov subspaces are summarized in the following theorem. The proof is left as an exercise. Theorem 3.3. Let A and u ^ 0 be given. Then 1. The sequence of Krylov subspaces satisfies

and

2. I f t r ^ O ,

Vol II: Eigensystems

268 3. For any K,

CHAPTER 4. EIGENSPACES

4. If W is nonsingular, then

The second item in the above theorem states that a Krylov subspace remains unchanged when either A or u is scaled. The third says that it is invariant under shifting. Finally, the fourth says that the space behaves in a predictable way under similarity transformations. In particular if A is Hermitian or nondefective, we may diagonalize ita strategy that sometimes simplifies the analysis of Krylov sequences. The polynomial connection Krylov subspaces have an important characterization in terms of matrix polynomials. By definition any vector v in *.( A, u] can be written in the form

Hence if we define the matrix polynomial p( A)

then v = p(A)u. Conversely, if v p(A)u for any polynomial of degree not exceedingfc1,then v G K,k(A, u). Thus we have proved the following theorem. Theorem 3.4. The space ICk(A, u) can be written in the form

Termination If (A, u) is an eigenpair of A, then Aku Xku, and

In other words the Krylov sequence terminates in the sense that the Krylov vectors after the first one provide no new information. More generally, we will say that a Krylov sequence terminates at t if I is the smallest integer such that

The following theorem states the basic facts about termination.

SEC. 3. KRYLOV SUBSPACES

269

Theorem 3.5. A Krylov sequence terminates based on A and u at I if and only iff. is the smallest integer for which

If the Krylov sequence terminates at I, then /Q is an eigenspace of A of dimension t. On the other hand, ifu lies in an eigenspace of dimension m, then for some I < m, the sequence terminates at I. Proof. Equation (3.2) follows from (3.1). On the other hand if (3.2) is satisfied, (3.1) follows from the fact that / C /Q+i. If the sequence terminates at I, then

so that K, is an invariant subspace of A. If u is in an invariant subspace X of dimension ra, then so are the members of the sequence w, Au,..., Am~l u. Now if the sequence terminates at I > m it follows that m = dim(/Q) > dim(/Cm) = dim(A'), which is impossible. Termination is a two-edged sword. On the one hand, if a Krylov sequence terminates, it contains exact eigenvectors of A. On the other hand, it stops furnishing information about other eigenvectors. As we shall see, the sword is especially difficult to wield in the presence of rounding error.

3.2. CONVERGENCE
We have seen in Example 3.1 that a sequence of Krylov subspaces can contain increasingly accurate approximations to the certain eigenvectors of the matrix in question. In this case we will say, somewhat illogically, that the Krylov subspace converges to the vector. Experience has shown that these eigenvectors have eigenvalues that tend to lie on the periphery of the spectrum of the matrix. In this subsection we will give mathematical substance to this observationat least for the Hermitian case. The general approach In what follows, we will assume that A is Hermitian and has an orthonormal system of eigenpairs (A;, Xi) (i = 1,..., n). Let u be a starting vector for a Krylov sequence, and write u in the form

where a; = x^u. By Theorem 3.4 any member of fCk can be written in the form p(A)u, where p(X) is a polynomial of degree not greater than k. Since p(A)x{ = p(\i)x{, we have

Vol II: Eigensystems

270

CHAPTER 4. EIGENSPACES

Thus if we can find a polynomial such that p(\i) is large compared withp(Aj) (j ^ i), then p( A)u will be a good approximation to X{. The following theorem quantifies this observation. Theorem 3.6. In the above notation, if x^u / 0 andp(Xi) / 0, then

Proof. We begin by observing that if u has the expansion (3.3) then |aj|/||w||2 is the cosine of the angle 9 between u and Xi and -y/Sj^i |aj |2/||w||2 is the sine of 0. Hence

It follows from (3.4) that

To apply this theorem note that the right-hand side of (3.5) does not depend on the scaling of p. We can therefore assume that p(Xi) = 1 and write

If deg(p) < k 1, then p(A)u fCk and tan /.(p(A)u, X{) is an upper bound for tanZ(xj,/C&). Hence

Thus if we can compute

as a function of k, we will have a bound on the accuracy of approximations to X{ in the sequence of Krylov subspaces. As it stands, this problem is too difficult. To simplify it, assume that

SEC. 3. KRYLOV SUBSPACES


and that our interest is m the eigenvector x\. Then

271

is an upper bound for (3.6). Thus we are lead to the problem of calculating the bound

This is a well-understood problem that has an elegant solution in terms of Chebyshev polynomials, to which we now turn. Chebyshev polynomials The Chebyshev polynomials are defined by

Chebyshev polynomials are widely used in numerical analysis and are treated in many sources. Rather than rederive the basic results, we collect them in the following theorem. Theorem 3.7. Let Ck(i) be defined by (3.8). Then the following assertions are true.

Vol II: Eigensystems

272

CHAPTER 4. EIGENSPACES

Convergence redux We now return to the problem of bounding tan /.(x\, /C^), which by (3.7) is equivalent to finding

We can apply (3.10) to compute <7jt, provided we change variables to transform the interval [A n , AI] to [-1,1]. It is easily verified that the change of variables is

The value of/^ at AI is

Hence the value of a\^ is l/Cfc_i(//i). In view of (3.9), we have the following theorem. Theorem 3.8. Let theHermitian matrix A have an orthonormal system ofeigenpairs (Af, xi), with its eigenvalues ordered so that

T.p.t

Then

Three comments. The bound appears to be rather complicated, but it simplifiesat least asymptotically. For k large we can ignore the term with the exponent 1 - k and write

As with the power method, a nearby subdominant eigenvalue will retard convergence. However, in this case the bound gives us a bonus. For if 77 is small, the bound hp.rnmps

SEC. 3. KRYLOV SUBSPACES

273

The square root increases the influence of rj on the bound. For example, consider the matrix in Example 3.1. There 77 = 0.5/0.95 = 0.053. The square root of this number is about 0.23, and the bound on the convergence rate is 1/(1 + 2-0.23) = 0.69. Thus the square root effect gives a great improvement over the rate of 0.95 for the power method. By item 2 in Theorem 3.3, the Krylov subspaces of A remain unchanged when A is replaced by A. Hence Theorem 3.8 can be used to bound convergence to the eigenvector corresponding to the smallest eigenvalue of A. However, it is important to keep in mind that the smallest eigenvalues of a matrixparticularly a positive definite matrixoften tend to cluster together, so that the bound will be unfavorable. In Example 3.1, the value of 77 corresponding to the smallest eigenvalue is about 0.33-10~4, so that the bound on the convergence rate is about 0.97. The general approach can be used to derive bounds for the remaining eigenvectors z 2 , 3, For example, to derive a bound for x 2 , let

where q(t) is a polynomial of degree not greater than k 2 satisfying q( A 2 ) 1. Note thatp(Ai) = 0 andp(A 2 ) = 1-It: tnen follows from (3.5) that

where

Bounds for A,- (t > 2) can be derived by considering a polynomial of the form

where A is the Lagrange polynomial that is zero at AI ,... , A;_i and one at A;. Multiple eigenvalues The hypothesis AI > A 2 in Theorem 3.8 can be relaxed. To see this, suppose that Aj = \2 > AS. Let u be given, and expand u in the form

Vol II: Eigensystems

274

CHAPTER 4. EIGENSPACES

where the Xi are the normalized eigenvectors corresponding to A ? . Then

This shows that of all the vectors in the two-dimensional invariant subspace that is spanned by xi and #2, the spaces ICk(A, u) contain only approximations to ai^i -f 0:2X2. I* is just as though (Ai, otiXi + #2X2) were a simple eigenpair of A. Thus Theorem 3.8 continues to hold when AI is multiple provided we adopt the convention that only one copy of AI is listed in (3.11). Similarly, if we retain only one copy of AI and A2, the bound (3.12) continues to hold when A! and A 2 are multiple. Assessment of the bounds It is instructive to apply the bounds to the Krylov sequence generated in Example 3.1. The bound predicts a value for tan Z.(x\, 20) f 2.0-10"3, where the actual value is 1.5-10"7. The problem is that the theory predicts a convergence ratio of 0.67, while a glance at the graph in Figure 3.1 shows that the convergence ratios are steadily decreasing. Immediately after the first step they range from 0.55 to 0.75, but then they drop off. The last three convergence ratios are 0.31,0.26, and 0.22. This phenomenon is not accounted for by our theory. The dot-dash line in Figure 3.1 is tan Z( 2 ,/C 20 ). The final value is 5.2-10"6, whereas the bound predicts a value of 4.0-10"2 once again, a poor prediction. Actually, the graphs show that any exponentially decreasing bound of the form apk must be weak. Simply take a ruler and draw a line from the common initial point that is tangent to the dashed line (at about k = 12). Its value at A; = 25isabout7-10~ 4 , which is the best we can expect and compares favorably with the bound 2.0-10~3. The same procedure applied to the dot-dash line yields an optimal bound of about 6-10~3. Thus part of the problem is with the mathematical form of our bounds, which does not reflect the true behavior of the Krylov approximations. To summarize, the bounds provide support for the empirical observation that Krylov sequences generate good approximations to exterior eigenvalues, but they can underestimate how good the approximations actually are sometimes by orders of magnitude. The reason is that the bounds must take into account the worst-case distribution of the eigenvalues. We will return to this point in a moment. Non-Hermitian matrices The theory of Krylov subspaces for non-Hermitian matrices is less well developed. There are two reasons. First, the geometry of the eigenvalues is generally more complicated. Second, if the matrix is nonnormal, we may not have a complete system of eigenvectors to aid the analysis. The following example shows that a change in geometry can have a major effect on the rates of convergence. Example 3.9. A normal (actually diagonal) matrix was constructed whose eigenvalues were those of a random complex matrix. The largest eigenvalue was recomputed

SEC. 3. KRYLOV SUBSPACES

275

Figure 3.2: Power method and Krylov approximations so that the absolute value of its ratio to the second largest eigenvalue was 0.95 (as in Example 3.1). The solid line in Figure 3.2 shows the tangent of the angle between the kth Krylov subspace and the dominant eigenvector. The convergence is not much better the power method in Example 3.1. To vary the geometry, the eigenvalues were altered so that the ratio of the absolute values of the successive eigenvalues became 0.95 white their arguments remained the same. The dash-dot line shows how well the Krylov subspace approximates the eigenvector. The convergence is swift as in Example 3.1. In a third experiment, the eigenvalues from the first experiment were replaced by their absolute values, so that the matrix is nowHermitian. The convergence, illustrated by the dashed line, is intermediate. It would be foolish to conclude too much from these examples. It is clear that geometry matters and perhaps that exponentially decaying eigenvalues are a good thing. The example does have something to say about the convergence bounds from Theorem 3.8. Recall that the bound failed to predict the swift convergence to xi for the matrix from Example 3.1. It turns out that the third experiment in Example 3.9, in which the matrix is Hermitian, has exactly the same bounds. Since it converges more slowly, the bounds cannot predict swifter convergence. There is a polynomial connection for non-Hermitian matrices.

Vol II: Eigensystems

276

CHAPTER 4. EIGENSPACES

Theorem 3.10. Let A be a simple eigenvalue of A and let

be a spectral representation. Let

where

Then

Proof. By Theorem 2.3

Hence for any polynomial p of degree not greater than k-1 with p(\i) = 1, we have

This theorem is an analogue of Theorem 3.6. Actually, it is a continuum of theorems, since spectral representations are not unique. For example, if A is nondefective we can take L to be diagonal and the columns of X to have norm one, in which case the bound becomes (after a little manipulation)

where A 2 , . . . , An are the eigenvalues of A other than A. The theorem suggests that we attempt to choose polynomials p with p(\) = 1 so that p(L) is small. This is not, in general, an easy task, since the geometry of the eigenvalues can be complicated. What results exist suggest that under some conditions the Krylov sequence will produce good approximations to exterior eigenvectors. For more see the notes and references. The theorem also illustrates the difficulties introduced by defectiveness and nonnormality. Suppose, for example, /j ^ A is an eigenvalue of A with a Jordan block of order ra. Then for p(L) to be zero, the polynomialp(r) must have the factor (r - n)m. In other words, it is not sufficient to simply make p small at //. This implies that we cannot generalize the approach via Chebyshev polynomials to defective matrices.

SEC. 3. KRYLOV SUBSPACES

277

3.3. BLOCK KRYLOV SEQUENCES


We saw above [see (3.13)] that when it comes to multiple eigenvalues, a Krylov sequence has tunnel vision. Specifically, if AI is double and the generating vector is expanded in the form

the Krylov sequence can only produce the approximation a\x\ -f 0:2^2 to a vector in the eigenspace of AI. Of course, what we would like to approximate is the entire invariant subspace corresponding to that eigenvalue. A cure for this problem is to iterate with a second vector, say

Then

so that ICk(A, v) can approximate the linear combination faxi + /32^2- Since the sequence in u produces approximations to otiXi -}- 0.2X2, unless we are unlucky the two approximations will span the required two-dimensional invariant subspace. The foregoing suggests that we generate a block Krylov sequence by starting with a matrix U with linearly independent columns and computing

The space JCk(A,U) spanned by the first k members of this sequence is called the kth block Krylov subspace. Although it requires more storage and work to compute a block Krylov sequence than an ordinary Krylov sequence, there are two compensating factors (aside from curing the problem of multiple eigenvalues). First, it frequently happens that the computation of the product of a matrix with a block U of, say, ra vectors takes less than ra times the time for a matrix-vector product. For example, if the matrix is stored on disk, it has to be retrieved only once to form AU. Second, passing to block Krylov sequences improves the convergence bound, as the following theorem shows. Theorem 3.11. Let A be Hermit/an and let (Az-, Xi) be a complete system oforthonormal eigenpairs of A, with the eigenvalues ordered so that

and assume that the multiplicity of AI is not greater than m. If

VolII: Eigensy stems

278
is nonsingular and we set then

CHAPTER 4. EIGENSPACES

where

Proof. By construction vK(U). Hence JCk(A,v) C ICk(A,U)so that From the definition of v it is easily verified that xfv = 0 (i = 2,... , m). Hence the Krylov subpace /Cjt(A, v) contains no components along #2, , xm; it is as if we were working with a matrix in which the pairs (A,-, xt-) (i = 1,..., m) had been deleted, so that the eigenvalue following AI is A ra+ j. We may now apply Theorem 3.8 to get (3.15). Three comments. If the multiplicity of A! is less than m, then 77 defined by (3.16) is larger than the value

of 77 in Theorem 3.8. Thus Theorem 3.11 predicts faster convergence for the block method. However, the order constant in the bound istanZ(xi,t;) not tanZ(xi,{7). In general the latter will be smaller, so that initially the bound may be unrealistic. By the same trick used to derive the bound (3.12), we can get convergence rates for the vectors #2, x3-> The argument concerning multiple eigenvalues suggests that we can use block Krylov sequences to good effect with non-Hermitian matrices. However, there is no convergence theory analogous to Theorem 3.11 for non-Hermitian block Krylov sequences. An alternative to block Krylov methods is to deflate converged eigenpairs, so that the Krylov sequence can converge to a second eigenpair corresponding to a repeated eigenvalue. The two approaches each have their advantages and drawbacks. Since deflation is vital in other ways to many algorithms, we will stress it in this volume. But the reader should keep in mind that there are important block variants of many of the algorithms we discuss here.

SEC. 3. KRYLOV SUBSPACES 3.4. NOTES AND REFERENCES Sources

279

Three major references for Krylov sequences are The Symmetric Eigenvalue Problem by B. N. Parlett [206], Numerical Methods for Large Eigenvalue Problems: Theory and Algorithms^ Y. Saad [233], and Eigenvalues of Matrices by F. Chatelin [39]. In addition to most of the results treated in this subsection, these books contain historical comments and extensive bibliographies. Krylov sequences According to Householder [121, 6.1], Krylov [153, 1931] introduced the sequence named for him to compute the characteristic polynomial of a matrix. Specifically, if the Krylov sequence terminates at i [see (3.1)], then there are constants ao, , <^-i such that It can then be shown that the polynomial divides the characteristic polynomial of A. The term "Krylov sequence" is due to Householder. The solution of eigenvalue problems by forming and solving the characteristic equation is a thing of the past. What makes the Krylov sequence important today is that it is the basis of the Lanczos algorithm for eigenpairs and the conjugate gradient method for linear systems as well as their non-Hermitian variants. Since this book is concerned with eigensy stems, the focus of this section has been on the spectral properties of Krylov sequences. A word on notation. In much of the literature the eigenvectors of the matrix in question are denoted generically by u (perhaps because u is commonly used for an eigenfunction of a partial differential equation), and Krylov sequences are often based on a vector v. To maintain consistency with the first half of this book, eigenvectors are denoted by x, and, to avoid underusing a good letter, Krylov sequences are based on u. Convergence (Hermitian matrices) It seems that Krylov had no idea of the approximating power of the subspaces spanned by his sequence. The first hint of the power of Krylov sequences to approximate eigenvectors is found in Lanczos's 1950 paper [157], in which he proposed the algorithm that bears his name (Lanczos himself called it the method of minimized iterations). In the conclusion to his paper, he states Moreover, the good convergence of the method in the case of large dispersion makes it possible to operate with a small number of iterations, obtaining ra successive eigenvalues and principle axes by only m+1 iterations. Vol II: Eigensystems

280

CHAPTER 4. EIGENSPACES

It is unfortunate that the first convergence results for Krylov spaces were directed toward the Lanczos algorithm, which is a combination of Krylov sequences and the Rayleigh-Ritz method to be treated in the next subsection. Kaniel [145, 1966], who gave the first analysis of the method, started by using Chebyshev polynomials to bound the eigenvalues produced by the Lanczos method and then using the eigenvalue bounds to produce bounds on the eigenvectors. In his important thesis Paige [196,1971] followed Kaniel's approach, correcting and refining his eigenvector bounds. In 1980 Saad [229] showed that more natural bounds could be derived by first bounding the eigenvector approximations contained in the Krylov sequence itself and then analyzing the Rayleigh-Ritz procedure separately. This is the approach we have taken here. The result is Theorem 3.6, Theorem 3.8, and the related bound (3.12). This bound, incidentally, shows that there is nothing sacrosanct about Chebyshev polynomials. One is free to use themor not use themin combination with other polynomials. Convergence (non-Hermitian matrices) The inequality (3.14) was stated without proof by Saad in [230, 1980], who gave a direct proof later [233, p. 204]. The result requires that A be diagonalizable. Theorem 3.10 removes this restriction. These results raise the possibility of using polynomials to get eigenvalue bounds. It is known that Chebyshev polynomials defined on a suitable ellipse asymptotically satisfy an inequality like (3.10). Thus when an eigenvalue lies outside an ellipse containing the rest of the spectrum, bounds analogous to those of Theorem 3.8 are possible. For more see [229]. Block Krylov sequences Block Krylov sequences limited to small powers of A were introduced by Cullum and Donath [45, 1974] in connection with a restarted Lanczos algorithm. Block Krylov sequences in their full generality were introduced by Underwood in his Ph.D. thesis [280, 1975] to generalize the Lanczos algorithm (also see [92]). Underwood established eigenvalue bounds in the style of Kaniel, using a technique related to the construction in the proof of Theorem 3.11. Theorem 3.11 itself is due to Saad [229].

4. RAYLEIGH-RITZ APPROXIMATION
We have seen how a sequence of Krylov subspaces based on a matrix A can contain increasingly accurate approximations to an eigenspace of A. But it is one thing to know that an approximation exists and another to have it in hand. The purpose of this subsection is to describe and analyze the most commonly used method for extracting an approximate eigenspace from a larger subspacethe Rayleigh-Ritz method. It is important to keep in mind that there are two levels of approximation going on here. First there is a best approximation to the desired eigenspace in the larger subspace. The Rayleigh-Ritz method approximates that best approximation. Con-

SEC. 4. RAYLEIGH-RlTZ APPROXIMATION

281

sequently, the analysis of the method is somewhat complicated, although its use in practice is straightforward. In this section we will develop the theory of the method and examine its practical implications. To keep the treatment simple, we will confine ourselves to the approximation of eigenvectors and will point out where the results generalize to eigenspaces. We begin with a description of the method and then turn to its analysis. The analysis shows that unless a certain regularity condition is satisfied, the method may not produce satisfactory approximations. Consequently, the last two subsections are devoted to ways to circumvent this problem.
4.1. RAYLEIGH-RlTZ METHODS

The essential ingredients for the application of the Rayleigh-Ritz method is a matrix A and a subspace U containing an approximate eigenspace of A. No other assumptions are made about U. It may and often will be a Krylov subspace, but that is irrelevant to what follows. We will motivate the method by the following theorem, which treats the case when U contains an exact eigenspace of A. Theorem 4.1. LetU be a subspace and let U be a basis for U. Let V be a left inverse ofU and set

If X C It is an eigenspace of A, then there is an eigenpair (L, W) ofB such that (L, UW) is an eigenpair of A with U(UW) = X. Proof. Let (L, X) be an eigenpair corresponding to X and let X UW. Then from the relation

we obtain

so that (L, W) is an eigenpair of B. Thus we can find exact eigenspaces contained in U by looking at eigenpairs of the Rayleigh quotient B. By continuity, we might expect that when U contains an approximate eigenspace X o f A there would be an eigenpair (!, W) of 7? such that (L, AW) is an approximate eigenpair of A with Tl(AW) = X. This suggests that to approximate an eigenpair corresponding to X we execute the following procedure.

Vol II: Eigensystems

282

CHAPTER 4. EIGENSPACES

We will call any procedure of this form a Rayleigh-Ritz procedure. We will call the pair (M, UW) a Ritz pair, M its Ritz block', and UW its Ritz basis. The space 1Z(UW) will be called the Ritz space. We will call W itself the primitive Ritz basis. When the concern is with eigenvalues and eigenvectors so that the Ritz pair can be written in the form (A, Uw), we will call A a Ritz value, Uw a Ritz vector, and w a primitive Ritz vector.

Two difficulties
The procedure listed in (4.1) has two difficulties. First, we have not specified how to choose the eigenpair (M, W) in statement 3. Second, we have no guarantee that the result approximates the desired eigenpair of A. Let us examine these difficulties in turn. In practice, the eigenpair (M, W) is chosen by looking at the eigenvalues of B. Recall that in large eigenproblems we cannot expect to compute the entire spectrum. Instead we must specify the part of the spectrum that we are interested ine.g., a group of eigenvalues with largest real part. It is therefore natural to collect the eigenvalues of B lying in the same chosen part of the spectrum and use them to compute (M, W) (see Theorem 1.5). This procedure, however, will work only if we can insure that there are eigenvalues in B that approximate those of A in the the desired part of the spectrum. The second difficulty has no easy answer, as the following example shows. Example 4.2. Let A = diag(0,1, 1) and suppose we are interested in approximating the eigenpair (0, ei). Assume that by some method we have come up with the basis

Then U is its own left inverse and we may take

Since B is zero, any nonzero vector p is an eigenvector corresponding to the part of the spectrum near zero. Since B itself gives no clue as to which vector to choose, we T might end up with p = (1 1) , in which case our approximate eigenvector becomes (1 \/2 -\/2) which is completely wrong. Thus the method can fail, even though the space U contains an exact approximation to the desired eigenvector. Of course, in real life we would not expect B to be exactly zero. But nearly zero is bad enough. For example, by perturbing U by a matrix of random normal deviates with standard deviation of 10~4, we obtained a matrix B = (UTU)~l UTAU of the
T

SEC. 4. RAYLEIGH-RITZ APPROXIMATION


form

283

The eigenvector corresponding to the smallest eigenvalue ofB (the primitive Ritz vector) is (9.4110e-01 3.3813e-01)T and the corresponding Ritz vector is

This comes nowhere near reproducing the order 10 know lies in Tl(U}.

approximation to GI that we

The problem arises because the process of forming the Rayleigh quotient creates a spurious eigenvalue of B near zero. This suggests that we may have to postulate a separation between the approximations to the eigenvalues we desire and the other eigenvalues of the Rayleigh quotient. It turns out that such a postulate combined with the convergence of the eigenvalues in the Rayleigh quotient allows us to prove that the Ritz spaces converge as the approximations in U converge. Symbolically:

We will flesh out this equation in the next subsection. Rayleigh-Ritz and generalized eigenvalue problems The algorithm (4.1) presupposes that V is a left inverse of U. If it is not, we can convert it to a left inverse by replacing it with V = V (FH f/)~ H , provided of course that VHU is nonsingular. If (//, w) is a primitive Ritz pair, then

and hence

Thus the primitive Ritz pairs are the eigenpairs of the generalized eigenvalue problem (4.4). The orthogonal Rayleigh-Ritz procedure In its full generality the algorithm (4.1) is called an oblique Rayleigh-Ritz method because the subspaces spanned by U and V can differ. This form of the method has important applications (e.g., to the bi-Lanczos algorithm). But in the overwhelming majority of applications U is taken to be orthonormal and V is taken equal to U. In Vol II: Eigensystems

284

CHAPTER 4. EIGENSPACES

addition, the primitive Ritz basis W is taken to be orthonormal, so that the Ritz basis X UW is also orthonormal. We call this procedure the orthogonal Rayleigh-Ritz method. When A is Hermitian, the orthogonal Rayleigh-Ritz method has the obvious advantage that it preserves symmetry throughout the procedure. However, the following theorem shows that for any matrix the orthogonal method also gives minimum residuals. Theorem 4.3. Let (M, X) be an orthogonal Rayleigh-Ritz pair with respect to U. Then

is minimal in any unitarily invariant norm. Proof. By Theorem 2.6 all we need to show is that M = XHAX. But if W is the (orthonormal) primitive Ritz basis, then M = WHBW (see Theorem 1.2). Since X = UW, we have

4.2. CONVERGENCE
This subsection is concerned with the accuracy of the approximations produced by the Rayleigh-Ritz procedure. We will treat the orthogonal variant and for simplicity will only consider the case where we are attempting to approximate a simple eigenvalue and its eigenvectorby far the most common use of the method. Setting the scene Consider the use of the Rayleigh-Ritz procedure in real life. We want to approximate the eigenpair (A, x) of A. By some methodcall it the U-machinewe obtain an orthonormal basis U0 for which 0 Z(ar, UQ] is small. We apply the Rayleigh-Ritz process to obtain a Ritz pair (fj,g, Uepe) If the pair is unsatisfactory, we return to our Umachine, ask it to grind out another UQ with a smaller value of 0, and try the RayleighRitz process again. To justify this process, we must show that the process in some sense converges as 0 - 0. We will treat this problem in two stages. First we will show that the Rayleigh quotient

contains a Ritz value /J,Q that converges to A. We will then treat the more delicate question of when the Ritz vector x$ converges.

SEC. 4. RAYLEIGH-RlTZ APPROXIMATION

285

Convergence of the Ritz value Our approach to the convergence of Ritz values is through a backward perturbation theorem. Theorem 4.4. Let BQ be the Rayleigh quotient (4.5). Then there is a matrix EQ satisfying

such that A is an eigenvalue of Be + EQ. Proof. Let (Ue U_) be unitary and set

Now Uj_ spans the orthogonal complement of the column space of UQ. Hence ||2:||2 = sin 9 and hence

or

it follows from (4.6) that

Now define

Then clearly We can now apply Eisner's theorem (Theorem 3.1, Chapter 1) to give the following corollary. Corollary 4.5. There is an eigenvalue U,Q ofBa such that

where m is the order of Be. Vol II: Eigensystems

286
Two comments.

CHAPTER 4. EIGENSPACES

Assume the number m of columns of U& is bounded. Then the corollary assures us that we only have to wait until 0 is small enough for a Ritz value to emerge that is near A. The factor H-E^H in the bound (4.7) suggests that we may have to wait a long time. But as we shall see later, under a certain separation condition, the convergence will be 0(0). If A is Hermitian, we may replace the right-hand side of (4.7) by \\E\\? (see Theorem 3.8, Chapter 1). In this case we do not have to assume m is bounded. This has important implications for the Lanczos algorithm, which uses a sequence of Krylov spaces in which m can become rather large. Convergence of Ritz vectors We now turn to the convergence of Ritz vectors. The key is the following theorem, which relates Ritz vectors to the angle 0. Theorem 4.6. In the above notation, let (fig, we) be a primitive Ritz pair and let the matrix (we We) be unitary, so that
j_

Then

For the proof of the theorem see the notes and references. To apply the theorem, suppose we have chosen a Ritz pair (whose existence is guaranteed by Corollary 4.5) for which IJLQ * A. Then by the continuity of sep (Theorem 2.11), we have

Consequently, if sep(/0, NO) remains bounded below, so does the sep(A, NO) in (4.8), at least in the limit. Since \\hg\\2 < \\A\\2, we have sin Z(x, U0p$) -* 0 along with 0. Thus we have the following corollary. Corollary 4.7. Let (//<?, U&WQ) be a Ritz pair for which U.Q - A. If there is a constant a > 0 such that

then asymptotically

SEC. 4. RAYLEIGH-RITZ APPROXIMATION

287

This corollary justifies the statement (4.3) to the effect that eigenvalue convergence plus separation equals eigenvector convergence. Specifically, it contains the convergence hypothesis that JJLQ approaches A and the separation hypothesis that the quantity sep(//0, Ng) is uniformly bounded below. The conclusion is that the sine of the angle between the eigenvector x and the Ritz vector Uepe approaches zero. We call the condition (4.9) the uniform separation condition. What is unusual for results of this kind is that it consists entirely of computed quantities and can be monitored. For example, in the second part of Example 4.2 the separation of the eigenvalues of B is about 1.9-10"4, which accounts for the failure of the Ritz vector to reproduce the eigenvector ei, even though it is present in U to accuracy of order 10~4. Convergence of Ritz values revisited The bound in Corollary 4.5 suggests that the convergence of the Ritz value can be quite slow. We will now use the fact that the Ritz vector converges to derive a more satisfactory result. Let (fig, XQ] be the Ritz approximation to (A, x). Then by construction,

is the Rayleigh quotient formed from XQ and A. If we write XQ 70; -f <jy, where y 1. x and ||t/||2 = 1, then (7! = cosZ(#0,:r) and \cr\ = sin/(#,#). If the uniform separation is satisfied, by Corollary 4.7 we have a\ = sin Z(z0, x) = O(9). By direct computation of the Rayleigh quotient x^Axg we find that

Thus the Ritz value converges at least as fast as the eigenvector approximation of x in K(U8). Hermitian matrices When A is Hermitian, we can say more. Let the eigenvalues of A be ordered so that

and let the Ritz valuesthe eigenvalues of the Hermitian matrix U AUbe ordered so that

Vol II: Eigensystems

288

CHAPTER 4. EIGENSPACES

Then by the interlacing theorem (Theorem 3.6, Chapter 1),

Consequently, if m converges to A,- then it must converge from below. Similarly, if /^converges to A n _ m+ ; it must converge from above. The Ritz values converge more quickly in the Hermitian case. For in (4.10) we have x^Av = 0. and hence

Convergence of Ritz blocks and bases Theorem 4.4, Corollary 4.5, Theorem 4.6, and Corollary 4.7 all have natural analogues for Ritz blocks and Ritz bases, and, with the exception of Corollary 4.7, the proofs are essentially the same. Consequently, we can use the Rayleigh-Ritz method to approximate eigenspaces with the same assurance that we use it to approximate eigenvectors. For more see the notes and references. Residuals and convergence The results of this subsection have been cast in terms of the sine of the angle 9 between an eigenvector x and its approximating subspace U. Although these results give us insight into the behavior of the Rayleigh-Ritz method, in the last analysis we cannot know 0 and hence cannot compute error bounds. Thus, as always, we must look to the residual as an indication of convergence. The following residual bound actually applies to any approximate eigenpair. Theorem 4.8. Let A have the spectral representation

where \\x\\% 1 and Y is orthonormal. Let (^, x) be an approximation to (A, x) and let

Then

Proof. Because (4.11) is a spectral decomposition, Y is an orthonormal basis for the orthogonal complement of the space spanned by x. Thus sin/(#,#) = Y^x. Let T = Ax f i x . Then

SEC. 4. RAYLEIGH-RlTZ APPROXIMATION

289

It follows that

from which the first inequality in (4.12) follows. The second inequality follows from the first and the fact that sep(/z, L) > sep(A, L) - \^i - X\ (see Theorem 2.11). Since A is assumed to be simple, this theorem says that:

Unfortunately, as Example 4.2 shows, spurious Ritz values can cause the residual to fail to converge. We therefore turn to two alternatives to Ritz vectors.

4.3. REFINED RITZ VECTORS Definition


By hypothesis, the space U$ contains increasingly accurate approximations XQ to the vector in the simple eigenpair (A, x). By Corollary 4.5, there is a Ritz value pe that is approaching A. It follows that the residual Axe - fJ>0%9 approaches zero. Hence if we define xg to be the vector whose residual Axe - Ve&d has the smallest norm, that residual must approach zero. This suggests the following definition. Definition 4.9. Let U.Q be a Ritz value associated with U$. A REFINED RITZ VECTOR is a solution of the problem

We will worry about the computation of refined Ritz vectors later. First let us return to Example 4.2, which showed how the Rayleigh-Ritz method could fail to deliver an accurate approximation to an accurate eigenvector contained in a subspace. Specifically, if we solve the problem using the smallest eigenvalue of B in (4.2) we get the vector

which is an excellent approximation to the original eigenvector ei of A.

Convergence of refined Ritz vectors


We now turn to the convergence of refined Ritz vectors. We have argued informally that the convergence of the refined Ritz value u-o to the simple eigenvalue A is sufficient to insure the convergence of the refined Ritz vector. The following theorem gives quantitative substance to this assertion. Vol II: Eigensystems

290
Theorem 4.10. Let A have the spectral representation

CHAPTER 4. EIGENSPACES

where ||z||2 = 1 and Y is orthonormal. Let fig be a Ritz value and XQ the corresponding refined Ritz vector. If sep(A, L) - \fj,g A| > 0, then

Proof. Let U be an orthonormal basis for U and let a: = y+z, where y = UUHx. Then \\z\\2 = ^U^x^ = sin#. Moreover since y and z are orthogonal, \\y\\\ = 1 sin2 9. Let

be the normalized value of y. We have

Hence

By the definition of a refined Ritz vector we have

The result now follows from Theorem 4.8. Here are two comments on this theorem. By Corollary 4.5 we know that fig - A. It follows from (4.15) that sin Z(ar, XQ) > 0. In other words, refined Ritz vectors, unlike ordinary Ritz vectors, are guaranteed to converge. Although the Ritz value //# was used to define the refined Ritz vector XQ, the Rayleigh quotient fa = x jAxg is likely to be a more accurate approximation to A. Moreover, by Theorem 2.6, the residual norm \\Axg - jji0x0\\2 will be optimal.

SEC. 4. RAYLEIGH-RlTZ APPROXIMATION

291

The computation of refined Ritz vectors The computation of a refined Ritz vector amounts to solving the optimization problem

Let U be an orthonormal basis for U. Then any vector of 2-norm one in U can be written in the form Uz, where \\z\\2 = 1. Thus we need to solve the problem

By Theorem 3.2, Chapter 3, the solution of this problem is the right singular vector of (A - fjLl)U corresponding to its smallest singular value. Thus we can compute refined Ritz vectors by computing the singular value decomposition of (A - fj,I)U. This suggests the following algorithm.

It is natural to compare this process with the computation of an ordinary Ritz vector. We will assume that U is nxp, where n ~^> p. The computation is dominated by the formation of V and the computation of the singular value decomposition. The formation of V requires p multiplications of a vector by A. This computation must also be done by the Rayleigh-Ritz method. As with the formation of block Krylov sequences, it will often happen that the formation of AU takes less time than p individual matrix-vector multiplications. The next nontrivial step is the computation of the singular value decomposition of W, which requires O(np2) operations. On the other hand, the Rayleigh-Ritz method must calculate H = UEV, which is also an 0(np2) process, albeit with a smaller order constant. Thus, the computation of a single refined Ritz vector and a single ordinary Ritz vector require the same order of work. The situation is different when several vectors, say m, are to be computed. In this case, we will have to compute m singular value decompositions to get the refined vectors. On the other hand, the Rayleigh-Ritz method requires only that we compute the eigensystem of H. Thus all Ritz vectors can be calculated with 0(np2) operations, while the computation of each refined Ritz vector requires O(np2) operations. Hence the computation of m refined Ritz vectors will take longer than the computation of m ordinary Ritz vectors by a factor of at least m. A cure for this problem is to use the cross-product algorithm (Algorithm 3.1, Chapter 3) to compute the singular value decompositions. Specifically, the cross-product

Vol II: Eigensystems

292
matrix corresponding to A U ull is

CHAPTER 4. EIGENSPACES

If in the notation of (4.17) we precompute the matrices

then for any fj, we can form

at negligible cost. Thus the cost of computing an additional refined Ritz vectors is the same as computing a spectral decomposition of a matrix of order p. Our analysis of the cross-product algorithm applies here. Specifically, denote the singular vectors of AU ^1 by a\ > > ap. If // is an accurate approximation to an eigenvalue A, we expect ap to be small. Then by (3.20), Chapter 3, with i = p and j = ply we see that the sine of the angle between the computed vector and the true vector is of order (<J p _i/cri) 2 e M - If &p-i is not too small something we can check during the calculation then the refined Ritz vector computed by the cross-product algorithm will be satisfactory. Finally, we note that if U is a Krylov subspace, the computation of refined Ritz values can be considerably abbreviated, as we shall see in 1.4, Chapter 5.

4.4. HARMONIC RITZ VECTORS


The eigenvalue 0 of A in Example 4.2 lies between the eigenvalues 1 and 1 and for this reason is called an interior eigenvalue of A. Interior eigenvalues are particularly susceptible to being impersonated by Rayleigh quotients of the form uHAu, where u is not near an eigenvector of A. In fact, such an impersonation is the cause of the failure of the Rayleigh-Ritz method in the example. The use of refined Ritz vectors solves the problem by insuring that the residual Ax fix is small something that is not true of the spurious Ritz vector. Unfortunately, the quality of the refined Ritz vector depends on the accuracy of ^, and, as we have seen, each refined Ritz vector must be calculated independently from its own distinct value of//. Harmonic Ritz vectors, on the other hand, can provide a complete set of approximating pairs while at the same time protecting pairs near a shift K against impersonators. There is no really good way of introducing them other than to begin with a definition and then go on to their properties. Definition 4.11. LetU be a subspace and U be an orthonormal basis for U. Then (K + , Uw) is a HARMONIC RITZ PAIR WITH SHIFT K if

SEC. 4. RAYLEIGH-RITZ APPROXIMATION

293

We will refer to the process of approximating eigenpairs by harmonic Ritz pairs as the harmonic Rayleigh-Ritz method. This method shares with the ordinary RayleighRitz method the property that it retrieves eigenvectors that are exactly present in U. Specifically, we have the following result. Theorem 4.12. Let (A, x) be an eigenpair of A with x = Uw. Then (A, Uw) is a harmonic Ritz nair. Proof. Calculating the left- and right-hand sides of (4.18), we find

Hence Uw is an eigenvector of (4.18) with eigenvalue b A K; i.e., (A, Uw) is a harmonic Ritz pair. This theorem leads us to expect that if x is approximately represented in U, then the harmonic Rayleigh-Ritz, like its unharmonious counterpart, will produce an approximation to x. Unfortunately, as of this writing the method has not been analyzed. But it is easy to see informally that it protects eigenpairs near K, from imposters. Specifically, on multiplying (4.18) by W H , we gel or

Consequently, if any harmonic Ritz value is within 5 of K the pair must have a residual norm (with respect to K) bounded by \S\. For example, if AC > A and 6 > 0, then it eventually becomes impossible for the harmonic Rayleigh-Ritz method to produce impersonators. It should be stressed that A does not have to be very near K for this screening to occur. If we return to Example 4.2 and compute the harmonic Ritz vector associated with the eigenvalue zero setting K = 0.3, we obtain the following excellent approximation to ei:

Computation of harmonic Ritz pairs When U contains a good approximation to an eigenvector whose eigenvalue lies near AC, (A - Kl)U in (4.18) will have a small singular value which will be squared when we form U^(A - K,I^(A - /)/, which can result in subsequent inaccuracies (see 3.2, Chapter 3). To circumvent this problem, we can compute the QR factorization

Vol II: Eigensystems

294

CHAPTER 4. EIGENSPACES

Then (4.18) assumes the form

Hence

This eigenproblem can be solved by the QZ algorithm (4.3, Chapter 2). An alternative is to work with the ordinary eigenproblem

In this case a small singular value in R will cause R l and hence R 1Q U to be large. Fortunately, we are interested in harmonic Ritz values that are near K, i.e., values for which 6 is small. Thus we want eigenpairs corresponding to large eigenvalues in (4.23). Although the eigenvalue itself will not necessarily be accurately computed (the loss of accuracy occurs in forming R, not in foming R~1Q^U), if the eigenvalue is sufficiently well separated from it neighbors the eigenvector p will be well determined. The harmonic Ritz values are useful primarily in locating the harmonic Ritz vectors we need. When it comes to approximating the associated eigenvalue, we should use the ordinary Rayleigh quotient WH UAUw, which minimizes the residual norm. In computing this Rayleigh quotient we can avoid a multiplication by A by using quantities alreadv calculated. SDecificallv, from (4.20)

Hence

where x is the harmonic Ritz vector. When A is Hermitian, both the eigenproblems (4.22) and (4.23), which are essentially nonsymmetric, can give complex harmonic Ritz values in the presence of rounding error. However, we can use the same technique that we used for the S/PD problem (4, Chapter 3). Specifically, we can transform (4.23) into the Hermitian eigenproblem

for the vector Rw. This approach has the slight disadvantage that having computed a solution g we must solve the system Rw = g to retrieve the primitive harmonic Ritz vector. However, the usual Ravleidi Quotient has the simpler form

SEC. 4. RAYLEIGH-RITZ APPROXIMATION

295

4.5. NOTES AND REFERENCES Historical In 1899, Lord Rayleigh [215] showed how to compute the fundamental frequency of a vibrating system. His approach was to approximate the fundamental mode by a linear combination of functions. He chose the linear combination x for which the quantity A = XT Ax/x^x was minimized and took A for the fundamental frequency. In 1909 Ritz [217] proposed a general method for solving continuous problems that could be phrased as the minimization of a functional. His idea was to choose a suitable subspace (e.g., of low-order polynomials) and determine coefficients to minimize the functional. His example of an eigenproblema second-order differential equationdoes not, strictly speaking, fit into his general scheme. Although the mode corresponding to the smallest eigenvalue minimizes a functional, the other eigenvalues are found from the stationary points. The Rayleigh-Ritz method is sometimes called a Galerkin method or a GalerkinPetrov method. These methods solve a linear system Ax b in the operator A by choosing two subspaces U and V and choosing x to satisfy the conditions

If U = V the method is called a Galerkin method; if not it is called a Galerkin-Petrov method. Now let V be the subspace spanned by V in (4.1). Then any Ritz pair (ju, x) satisfies the conditions

The similarity of (4.25) and (4.26) explains the nomenclature. The subject is not well served by this proliferation of unnecessary terminology, and here we subsume it all under the terms Rayleigh-Ritz method, Ritz pair, etc. The Rayleigh-Ritz method is also called a projection method because a Ritz pair (/x, x) is an eigenpair of the matrix F^APy, where P\> and PU are the orthogonal projections ontoZY and V. Convergence For earlier work on the convergence of the Rayleigh-Ritz method see the books by Parlett [206] for Hermitian matrices and by Saad [233] for both Hermitian and nonHermitian matrices. The convergence theory developed here is essentially that of Jia and Stewart for Ritz vectors [133] and for Ritz bases [134]. Theorem 4.6 is a generalization by Stewart of a theorem of Saad [231] for Hermitian matrices (also see [148]) and can in turn be extended to Ritz bases. For a proof see [268]. Refined Ritz vectors Refined Ritz vectors whose residual norms are not necessarily minimal were introduced by Ruhe [220] in connection with Krylov sequence methods for the generalVol II: Eigensystems

296

CHAPTER 4. EIGENSPACES

ized eigenvalue problem. Refined Ritz vectors in the sense used here are due to Jia [131], who showed that they converge when the Ritz vectors fail to converge. The proof given here may be found in [134]. The use of the cross-product algorithm to compute refined Ritz vectors was suggested in [132]. Harmonic Ritz vectors For a symmetric matrix, the (unshifted) harmonic Ritz values are zeros of certain polynomials associated with the MINRES method for solving linear systems. They are called "harmonic" because they are harmonic averages of the Ritz values of A~l. For a survey and further references see the paper [201] by Paige, Parlett, and van der Vorst, who introduced the appellation harmonic. Morgan [179] introduced the harmonic Ritz vectors as good approximations to interior eigenvectors. His argument (still for symmetric matrices) was that since eigenvalues near K become exterior eigenvalues of (A Ac/)"1, to compute their eigenvectors we should apply the Rayleigh-Ritz method with basis U to (A K I)"1. However, we can eliminate the need to work with this costly matrix by instead working with the basis (A K,I)U. This leads directly to equation (4.18). But the resulting Ritz vector (A - K,I)Up will be deficient in components in eigenvalues lying near K. Hence we should return the vectors Up, which are not Ritz vectors, at least in the usual sense for symmetric matrices. Morgan also recommended replacing the harmonic Ritz value with the ordinary Rayleigh quotient. Since Morgan was working with Hermitian matrices, he was able to establish some suggestive results about the process. Harmonic Ritz values for non-Hermitian matrices were described by Freund [78], again in connection with iterative methods for solving linear systems. Harmonic Ritz vectors were introduced by Sleijpen and van der Vorst [240], who characterized them (in our notation) by the Galerkin-Petrov condition

The use of the inequality (4.19) to justify the use of harmonic Ritz vectors is new. The explicit reduction of the harmonic eigenproblem to the forms (4.22), (4.23), and the symmetric form (4.24) is new, although the symmetric form is implicit in the implementation of the Jacobi-Davidson algorithm in [243]. Another way of looking at these reductions is that when Tl(U} contains an eigevector of A corresponding to eigenvalue r, the pencil in the original definition (4.18) is not regular, while the transformed pencil (4.22) is. For the generalized eigenvalue problem Ax \Bx, a natural generalization of a harmonic Ritz pair is a solution of

which was first introduced in [74]. An argument similar to that leading to (4.19) shows that this method also discourages imposters.

5
KRYLOV SEQUENCE METHODS

In this chapter and the next we will treat algorithms for large eigenproblems. There are two ways of presenting this subject. The first is by the kind of problemthe symmetric eigenproblem, the generalized eigenproblem, etc. This approach has obvious advantages for the person who is interested in only one kind of problem. It has the disadvantage that, at the very least, a thumbnail sketch of each algorithm must accompany each problem type. The alternative is to partition the subject by algorithms, which is what we will do here. In the present chapter we will be concerned with methods based on Krylov sequences specifically, Arnoldi's method and the Lanczos method. In the first subsection we will introduce certain decompositions associated with Krylov subspaces. The decompositions form the basis for the the Arnoldi and Lanczos algorithms to be treated in 2 and 3.

1. KRYLOV DECOMPOSITIONS
For a fixed matrix A, not every subspace of dimension fc is a Krylov subspace of A. This means that any basis of a Krylov subspace must satisfy certain constraining relations, which we will call Krylov decompositions. It turns out that a knowledge of these decompositions enables us to compute and manipulate Krylov subspaces. Consequently, this section is devoted to describing the relations that must hold for a basis to span a Krylov subspace. The most widely used Krylov decompositions are those that result from orthogonalizing a Krylov sequence. They are called Arnoldi decompositions for non-Hermitian matrices and Lanczos decompositions for Hermitian matrices. We will treat these special decompositions in the first two subsections. Unfortunately, these decompositions are not closed under certain natural operations, and in 1.3 we introduce more general decompositions that are closed decompositions that will be used in our computational algorithms.

297

298

CHAPTER 5. KRYLOV SEQUENCE METHODS

1.1. ARNOLDI DECOMPOSITIONS


An explicit Krylov basis of the form

is not suitable for numerical work. The reason is that as k increases, the columns of Kk become increasingly dependent (since they tend increasingly to lie in the space spanned by the dominant eigenvectors). For example, the following table gives the condition number (the ratio of the largest to the smallest singular values) for the Krylov basis Kk( A, e), where A is the matrix of Example 3.1, Chapter 4. k Condition 5 5.8e+02 10 3.4e+06 15 2.7e+10 20 3.1e+14 A large condition number means that the space spanned by the basis is extremely sensitive to small perturbations in the vectors that form the basis. It is therefore natural to replace a Krylov basis with a better-conditioned set of vectors, say an orthonormal set. Unfortunately, a direct orthogonalization of the columns of Kk will not solve the problem; once the columns have become nearly dependent, information about the entire Krylov subspace has been lost, and orthogonalization will not restore it. We therefore proceed indirectly through what we will call an Arnoldi decomposition. The Arnoldi decomposition Let us suppose that the columns of Kk+i are linearly independent and let

be the QR factorization of Kk+i (see 6, Chapter 2.3). Then the columns of Uk+i are the results of successively orthogonalizing the columns of Kk+i It turns out that we can eliminate Kk+i from equation (1.1). The resulting Arnoldi decomposition characterizes the orthonormal bases that are obtained from a Krylov sequence. Theorem 1.1. Letu\ have 2-norm one and let the columns of Kk+i(A,ui) belinearly independent. Let Uk+i (u\ Uk+i) be the Q-factor ofKk+i- Then there is a (&+l)xAr unreduced upper Hessenberg matrix Hk such that

Conversely, ifUk+i is orthonormal and satisfies (1.2), where Hk is a (k+l)xk unreduced Hessenberg matrix, then Uk+i is the Q-f actor of Kk+i(A, ui).

SEC. 1. KRYLOV DECOMPOSITIONS


Proof. If we partition (1.1) in the form

299

we see that Kk = UkRk is the QR factorization of AV Now let Sk Rk l. Then

where

It is easily verified that Hk is a (k+l)xk Hessenberg matrix whose subdiagonal elements are hi+iti = ri+ij+isa = n+i,z+i/ r n- Thus by the nonsingularity of Rk, Hk is unreduced. Conversely, suppose that the orthonormal matrix Uk+i satisfies the relation (1.2), where Hk i s a ( f c + l ) x f c unreduced Hessenberg matrix. Now if k = 1, then Au\ huui 4- h,2iU2. Since /i2i ^ 0, the vector u2 is a linear combination of HI and Au\ that is orthogonal to u\. Hence (u\ u^} is the Q-factor of AY Assume inductively that Uk is the Q-factor of Kk- If we partition

then from (1.3)

Thus Uk+i is a linear combination of Auk and the columns of Uk and lies in JCk+iHence Uk+i is the Q-factor of Kk+i- This theorem justifies the following definition. Definition 1.2. Let Uk+i G Cnx^k+l^ be orthonormal and let Uk consist of the first k columns ofUk+i If there is a (&+1) x k unreduced upper Hessenberg matrix Hk such that

then we call (1.3) an ARNOLDI DECOMPOSITION OF ORDER k. If H is reduced, we say the Amoldi decomposition is REDUCED. Vol II: Eigensystems

300

CHAPTER 5. KRYLOV SEQUENCE METHODS

In this nomenclature, Theorem 1.1 says that every nondegenerate Krylov sequence is associated with an Araoldi decomposition and vice versa. An Amoldi decomposition can be written in a different form that will be useful in the sequel. Specifically, partition

and set

Then the Arnoldi decomposition (1.2) is equivalent to the relation

In what follows it will reduce clutter if we dispense with iteration subscripts and write (1.4) in the form

When we do, the compact form (1.3) will be written in the form

Thus the hats over the matrices U and H represent an augmentation by a column and a row respectively. Uniqueness The language we have used abovean Arnoldi decompositionsuggests the possibility of having more than one Amoldi decomposition associated with a Krylov subspace. In fact, this can happen only when the sequence terminates, as the following theorem shows. Theorem 1.3. Suppose theKrylov sequence Kk+\(A, u\) does not terminate at k+1. Then up to scaling of the columns of Uk+i, the Amoldi decomposition of Kk+i is unique. Proof. Let

be the Amoldi decomposition from Theorem 1.1. Then by this theorem Hk is unreduced and fa ^ 0. Let

SEC. 1. KRYLOV DECOMPOSITIONS

301

where Uk+i is an orthonormal basis for /Cjt+i(A, wi). We claim that U^Uk+\ = 0. For otherwise there is a Uj such that Uj = auk+i + Uka, where a ^ 0. Hence Aitj contains a component along Ak+l u and does not lie in /Cjt+i, a contradiction. It follows that H(Uk) = ^(Uk) and hence that Uk = UkQ, for some unitary matrix Q. Hence

or

On premultiplying (1.5) and (1.7) by Uk we obtain

Similarly, premultiplying by u^+l, we obtain

Now by the independence of the columns of Kk+i, both (3k and (3k are nonzero. It then follows from (1.8) that the last row of Q is a>e, where \u>k\ = 1. Since the norm of the last column of Q is one, the last column of Q is u^e^. Since Hk is unreduced, it follows from the implicit Q theorem (Theorem 3.3, Chapter 2) that Q = diag(u>i,... ,tjfc), where \MJ = 1 (j = 1,... , fc). Thus up to column scaling Uk = UkQ is the same as Uk- Subtracting (1.7) from (1.5) we find that

so that up to scaling Uk+i and tik+i are the same.

This theorem allows us to speak of the Arnoldi decomposition associated with a nonterminating Krylov subspace. Perhaps more important, it implies that there is a one-one correspondence between Krylov subspaces and their starting vectors. A nonterminating Krylov subspace uniquely determines its starting vector. The nontermination hypothesis is necessary. If, for example, /Cfc+i = /C^+2, then AUk+i = Uk+iHk+i> and for any Q such that Q^Hk+iQ is upper Hessenberg, the decomposition A(Uk+\Q) = (Uk+iQ}(Q^Hk+iQ] is another Arnoldi decomposition. The Rayleigh quotient In the proof of Theorem 1.3 we used the fact that Hk = U^AUk- But this matrix is just the Rayleigh quotient with respect to the basis Uk (see Definition 2.7, Chapter 4). Thus the Arnoldi decomposition provides all that is needed to compute Ritz pairs. Vol II: Eigensystems

302

CHAPTER 5. KRYLOV SEQUENCE METHODS

Reduced Arnold! decompositions In Definition 1.2 we have required that the Hessenberg part of an Arnoldi decomposition AUk = Uk+iHk be unreduced. It is natural to ask under what conditions an Arnoldi-like relation can be satisfied with a reduced Hessenberg matrix. The following theorem answers that question. Theorem 1.4. Let the orthonormal matrix Uk+i satisfy

where Hk is Hessenberg. Then Hk is reduced if and only ifR,(Uk) contains an eigenspace of A. Proof. First suppose that Hk is reduced, say that hj+ij 0. Let H be the leading principal submatrix of Hk of order k and let U be the matrix consisting of the first j columns of Uk+i Then it is easily verified that AU UH, so that U is an eigenbasis of A. Conversely, suppose that A has an eigenspace that is a subset ofR,(Uk) and suppose that H k is unreduced. Then lZ(Uk) contains an eigenvector of A, which we can write in the form x = UkW for some w. Let A be the corresponding eigenvalue and let

Then

Because H\ is unreduced, the matrix Uk+iH\ is of full column rank. It follows that w = 0, a contradiction. This theorem, along with Theorem 3.5, Chapter 4, shows that the only way for an Arnoldi decomposition to be reduced is for the Krylov sequence to terminate prematurely. However, if hj+ij = 0, the sequence can be continued by setting wj+i equal to any normalized vector in the orthogonal complement of Uj. If this procedure is repeated each time the sequence terminates, the result is a reduced Arnoldi decomposition. Computing Arnoldi decompositions The Arnoldi decomposition suggests a method for computing the vector Uk+i from HI , . . . , Uk. Write the fcth column of (1.4) in the form

Then from the orthonormality of Uk+i we have

SEC. 1. KRYLOV DECOMPOSITIONS


Since we must have

303

and

These considerations lead to the following algorithm for computing an expanding set of Arnoldi decompositions.

We call this procedure the Arnoldiprocess. It is worthwhile to verify that this process is the same as the reduction to Hessenberg form described in 3.2, Chapter 2. Reorthogonalization Although we derived (1.9) from the Arnoldi decomposition, the computation of wjt+i is actually a form of the well-known Gram-Schmidt algorithm. This algorithm has been treated extensively in 1:4.1.4, where it is shown that in the presence of inexact arithmetic cancellation in statement 3 can cause it to fail to produce orthogonal vectors. The cure is a process called reorthogonalization. It is illustrated in the following extension of (1.9).

Since the vector v in statement 3 need not be orthogonal to the columns of Uk, the extended algorithm therefore orthogonalizes it again, accumulating any changes in h^.

VolII: Eigensystems

304
Given an Arnoldi decompositioi

CHAPTER 5. KRYLOV SEQUENCE METHODS

of order k, ExpandArn extends it to an Arnoldi decomposition of order k + 1. The algorithm uses an auxiliary routine gsreorthog to perform the orthogonalization (Aleorithml:4.1.13).

Algorithm 1.1: The Arnoldi step

In general, this algorithm is quite satisfactoryusually no more than the one reorthogonalization performed in statements 4-6 is needed. However, there are some tricky special cases; e.g., what to do when v in statement 3 is zero. More important, we can often dispense with the reorthogonalization entirely. Hence, our final algorithmAlgorithm 1.1 uses a function gsreorthog (Algorithm 1:4.1.3) that handles exceptional cases and tests whether to reorthogonalize. By applying Algorithm 1.1 repeatedly, one can compute an Arnoldi decomposition of any order. Practical considerations The work in computing an Arnoldi step is divided between the computation of the vector-matrix product Au and the orthogonalization. The user must provide a method for computing the former, and its cost will vary. For more see Example 1.2, Chapter 2. The cost of the orthogonalization will be 2nkr flam, where r is the number of orthogonalization steps performed by gsreorthog. In general r will be one or two. Hence:

To compute an Arnoldi decomposition of order k from scratch, one must apply the algorithm for orders i = 1, . . . , & 1 . Thus:

SEC. 1. KRYLOV DECOMPOSITIONS

305

It requires nk floating-point words to store the matrix U. This fact, more than operations counts, restricts our ability to compute Arnoldi decompositions. If n is very large, then as k grows we will quickly run out of memory. Of course we can move the columns of U to a backing storesay a disk. But each Arnoldi step requires all the previous vectors, and transfers between backing store and main memory will overwhelm the calculation. Orthogonalization and shift-and-invert enhancement We have seen in connection with the inverse power method (1.2, Chapter 2) that replacing A by (A K!)~I will make eigenvalues near K large. If (A ft/)""1 is used to form a Krylov sequence, the sequence will tend to produce good approximations to those large eigenvalues. Thus shift-and-invert enhancement can be used to steer a Krylov sequence to a region whose eigenvalues we are interested in. For the inverse power method, where the concern is with one eigenpair, the closer the shift is to the eigenvalue the better the performance of the method. With Krylov sequences, where the concern is often with several eigenpairs, an excessively accurate approximation to one eigenvalue can cause the convergence to the other eigenpairs to stagnate. The problem, at least in part, is in the Arnoldi procedure, as the following example shows. Example 1.5. Let

be of order 30 with the last 29 eigenvalues decaying geometrically. For i > 1, the Krylov subspaces /C&(A t -, e) can be expected to quickly develop very good approximations to GI. The bound (3.12), Chapter 4 suggests that it will also produce approximations to 62, although more slowly. In fact, Figure 1.1 plots sin 0, where 0 = ^[G2,fck(Ai, e)] versus k for several values ofi. The convergence of sin 9 toward zero proceeds typically up to a point and then levels off. The larger the value ofi, the sooner the convergence stagnates. In this example we have simulated a shift-and-invert transformation by giving A{ a large eigenvalue of 10*. Moreover, we have taken A{ to be diagonal, so that the effects of rounding error in the formation of the matrix-vector product AiUk are minimal. Thus the effects observed in the figure are due to the combination of the large eigenvalue and the orthogonalization step. No formal analysis of this phenomenon has appeared in the literature, but what seems to be happening is the following. In any Krylov sequence the Arnoldi vector u^+i is orthogonal to /Cjfe. Hence if there is an accurate approximation to any vector in /Cjt, then v,k+i must be almost orthogonal to it. For our example, this means that the first component of Uk will rapidly approach zero as good approximations to ei appear in *. Similarly, as good approximations to e2 appear, the second component of Uk will approach zero. Now in the presence of rounding error, the first component of Uk will not become exactly zero but will be reduced to Vol Hi Eigensystems

306

CHAPTER 5. KRYLOV SEQUENCE METHODS

Figure 1.1: Stagnation in a Krylov sequence the order of the rounding unitsay 10~16. But this nonzero first component is magnified by 10* when Auk is formed. When Auk is reorthogonalized, this spurious first component will introduce errors of order 10*~16 in the other components. Thus we have effectively changed our rounding unit from 10~16 to 10l~16, and we can expect no greater accuracy in the approximations to the other eigenvectors. The moral of this example is that if you wish to use shift-and-invert enhancement to find eigenpairs in a region, do not let the shift fall too near any particular eigenvalue in the region. 1.2. LANCZOS DECOMPOSITIONS Lanczos decompositions When A is Hermitian the Amoldi decomposition and the associated orthogonalization process simplify. Specifically, let A be Hermitian and let

be an Arnoldi decomposition. Then the Rayleigh quotient Tk is upper triangular. But since Tk = U^AUk, Tk is Hermitian. It follows that Tk is tridiagonal and can be

SEC. 1. KRYLOV DECOMPOSITIONS

307

We will call the decomposition (1.12) a Lanczos decomposition. Like the Arnoldi, the Lanczos decomposition is essentially unique, provided that the matrix Tk is unreduced. This will always be true if the sequence does not terminate. The Lanczos recurrence The fact that Tk is tridiagonal implies that the orthogonalization Uk+i depends only on Uk and t/fc-i, in contrast to the Arnoldi procedure where Uk depends on u\,... , w^. To see this, note that the first column of the Lanczos decomposition (1.12) is
or

Moreover, from the orthonormality of HI and w 2 it follows that i = v^Aui and we may take0i = \\Au\ ^ui\\2. More generally, from the jth column of (1.12) we get the relation

where This is the Lanczos three-term recurrence, which is implemented in Algonthm 1.2. Here are three comments. Since /2j_i is taken to be real, we do not have to conjugate it in statement 5. A frequently occuring alternative is to calculate

This is the equivalent of the modified Gram-Schmidt algorithm (see 1:4.1.4). Both work well. For more on variants of the basic algorithm, see the notes and references. The body of the loop requires one multiplication by A, two inner products, and two subtractions of a constant times a vector. Hence: Vol II: Eigensystems

308

CHAPTER 5. KRYLOV SEQUENCE METHODS

Let HI be given. This algorithm generates the Lanczos decomposition

where I\ has the form (1.13).

Algorithm 1.2: The Lanczos recurrence

The operation count for Algorithm 1.2 is k matrix-vector multiplications and 4nk flam. The above is less by a factor of about k than the corresponding count (1.11) for the Arnoldi process. Although the simplicity and economy of the Lanczos recurrence is enticing, there are formidable obstacles to turning it into a working method. If only eigenvalues are desired, we can discard the Uj as they are generated and compute Ritz values from the Rayleigh quotient T^. But if one wants to compute eigenvectors, one must retain all the vectors u3;, and for large problems it will be necessary to transfer them to a backing store. A more serious problem is loss of orthogonality among the vectors Uj. In the Arnoldi process we were able to overcome this problem by reorthogonalization. However, if we reorthogonalize Uj+\ in the Lanczos against its predecessors, we lose all the advantages of the Lanczos recurrence. We will return to this problem in 3, where we will treat the Lanczos algorithm in detail.

1.3. KRYLOV DECOMPOSITIONS


An Arnoldi (or Lanczos) decomposition can be regarded as a vehicle for combining Krylov sequences with Rayleigh-Ritz refinement. It exhibits an orthonormal basis for a Krylov subspace and its Rayleigh quotientthe wherewithal for computing Ritz pairs. As we shall see, it also permits the efficient computation of the residual norms of the Ritz pairs. However, because of its uniqueness, we can do little more with it. For

SEC. 1. KRYLOV DECOMPOSITIONS

309

example, there is no unreduced Arnold! form whose Rayleigh quotient is triangular. In this subsection we will show how to relax the definition of an Arnoldi decomposition to obtain a decomposition that is closed under similarity transformations of its Rayleigh quotient. Definition A Krylov decomposition, like an Arnoldi decomposition, specifies a relation among a set of linearly independent vectors that guarantees that they span a Krylov subspace. Specifically, we make the following definition. Definition 1.6. Let u\, 1^2,. , Uk+i be linearly independent and let

A KRYLOV DECOMPOSITION OF ORDER k is a relation of the form

Equivalently, we can write

IfUk+i is orthonormal, we say that the Krylov decomposition is ORTHONORMAL. We call the H(Uk+i) the SPACE SPANNED BY THE DECOMPOSITION and Uk+i the basis for the decomposition. Two Krylov decompositions spanning the same space are said to be EQUIVALENT. Thus a Krylov decomposition has the general form as an Arnoldi decomposition, but the matrix B^ is not assumed to be of any particular form. It is uniquely determined by the basis Uk+i> For if (V v) is any left inverse for Uk+i, then it follows from (1.16) that
IT

In particular, Bk is a Rayleigh quotient of A. Here is a nontrivial example of a Krylov decomposition. Example 1.7. Let

Vol II: Eigensystems

310

CHAPTER 5. KRYLOV SEQUENCE METHODS

be of order k. If the columns ofKk+i(A, HI) are independent, then

is a Krylov decomposition whose basis is the Krylov basis. Every Arnold! decomposition is a Krylov decomposition, but not every Krylov decomposition is an Arnoldi decomposition, as the above example shows. However, every Krylov decomposition is equivalent to a (possibly unreduced) Arnoldi decomposition. If the Arnoldi decomposition is unreduced, then it is essentially unique, and the subspace of the original Krylov decomposition must be a nondegenerate Krylov subspace. To establish these facts we will introduce two classes of transformations that transform a Krylov decomposition into an equivalent Krylov decomposition. They are called similarity transformations and translations. Similarity transformations Let

be a Krylov decomposition and let Q be nonsingular. Then on postmultiplying by Q we obtain the equivalent Krylov decomposition

We will say that the two Krylov decompositions are similar. We have already met with a similarity transformation in the proof of the uniqueness of the Arnoldi decomposition [see (1.6)]. In that case, however, the transforming matrix Q necessarily satisfied \Q\ = I so that the two similar decompositions were essentially the same. With a general Krylov decomposition, however, we are free to reduce the Rayleigh quotient B to any convenient form. For example, we could reduce B to Jordan form, in which case we will say that the decomposition is a KrylovJordan decomposition. In this terminology an Arnoldi decomposition is an orthonormal Krylov-Hessenberg decomposition and a Lanczos decomposition is an orthonormal Krylov-tridiagonal decomposition. There is also a Krylov-Schur decomposition, which will play an important role in our treatment of the Arnoldi method (see 2.2). Translation The similarity transformation (1.18) leaves the vector Uk+i unaltered. We can transform this vector as follows. In the Krylov decomposition

let

SEC. 1. KRYLOV DECOMPOSITIONS

311

where by the independence of the vectors Uj we must have 7 ^ 0 . Then it follows that

Since K[(Uk Wfc+i)] = TZ[(Uk v>k+i)]> this Krylov decomposition is equivalent to the original. We say that it was obtained from the original decomposition by translation. Note that translation cannot produce an arbitrary vector Uk+i- Instead, Uk+i is constrained to have components along the original vector Uk+i, so that the two decompositions span the same space. Equivalence to an Arnold! decomposition We will now use the transformations introduced above to prove the following theorem. Theorem 1.8. Every Krylov decomposition is equivalent to a (possibly reduced) Arnoldi decomposition. Proof. We begin with the Krvlov decomposition where for convenience we have dropped the subscripts in k and k+1. Let U = UR be the OR factorization of U. Then is an equivalent decomposition, in which the matrix U is orthonormal. Next let be a vector of norm one such that UHu = 0. Then the translated decomposition is an equivalent orthonormal Krylov decomposition. Finally, let Q be a unitary matrix such that 6HQ = ||&||2eJ and QHBQ is upper Hessenberg. Then the equivalent decomposition

is a possibly reduced Arnoldi decomposition. There are two points to be made about this theorem. If the resulting Amoldi decomposition is unreduced, then by Theorem 1.3 it is essentially unique, and by Theorem 1.4 71 (U) contains no invariant subspaces of A. The proof of Theorem 1.8 is constructive. Given the original decomposition, each step in the proof has an algorithmic realization. If the original basis Uk+i is reasonably well conditioned, these algorithms will be reasonably stable. To summarize: Vol II: Eigensystems

312

CHAPTER 5. KRYLOV SEQUENCE METHODS

Figure 1.2: Rowwise reduction to Hessenberg form Each Krylov sequence that does not terminate at k corresponds to the class of Krylov decompositions that are equivalent to its Arnoldi decomposition. Reduction to Arnoldi form As we shall see, it is sometimes necessary to pass from an orthonormal Krylov sequence to an Arnoldi sequence. This can be done by Householder transformations as follows. Let the Krylov decomposition in question be

where B is of order k. Let H\ be a Householder transformation such that 6HH\ = /tefc. We now reduce H\BHi to Hessenberg form by a variant of the reduction described in 2.3, Chapter 2, in which the matrix is reduced rowwise beginning with the last row. The course of the reduction is illustrated in Figure 1.2. Now let Q = HiH2 - Hk-i- Then the Krylov decomposition

has a Hessenberg Rayleigh quotient. Because the last rows of HI, ... , H^-\ are ei,

so that (1.19) is an Arnoldi decomposition. Algorithm 1.3 implements this scheme. It uses a variant ofhousegen that zeros the initial components of a vector. This algorithm illustrates an important fact about algorithms that transform Krylov decompositions. If n is large, transformations on the Rayleigh quotient are negligible

SEC. 1. KRYLOV DECOMPOSITIONS

313

Let

be an orthogonal Krylov decomposition of order k. This algorithm reduces it to an Arnoldi decomposition.

The algorithm uses the routine housegen2(x, w, */), which takes an ra-vector x and returns a Householder transformation H I uvP such that Hx ven [see (2.20), Chapter 2].

Algorithm 1.3: Krylov decomposition to Amoldi decomposition

Vol II: Eigensystems

314

CHAPTER 5. KRYLOV SEQUENCE METHODS

compared to the manipulation of U. Thus the bulk of the work in Algorithm 1.3 is found in the very last statement, where U is overwritten by U*Q. This process requires nk2 flam. We could have accumulated the Householder transformations directly into U, which would give the same operation count. But the possibilities for optimizing cache utilization are better if we calculate U*Q as above (see 1:2.3).

1.4. COMPUTATION OF REFINED AND HARMONIC RITZ VECTORS


In 4.3 and 4.4, Chapter 4, we introduced refined and harmonic Ritz vectors. In general, both are somewhat expensive to compute. However, if the defining subspace for these vectors is a Krylov subspace, their computation simplifies. The purpose of this subsection is to give the details. In what follows, we will assume that

is a orthonormal Krylov decomposition. Refined Ritz vectors If \i is a Ritz value then the refined Ritz vector associated with n is the right singular vector of (A - iiI)U whose singular value is smallest [see (4.16), Chapter 4]. From (1.20) we have

If we set

we have

Since (U u)is orthonormal, the right singular vectors of (A ^iI)U are the same as the right singular vectors of B^. Thus the computation of a refined Ritz vector can be reduced to computing the singular value decomposition of the low-order matrix B^. Harmonic Ritz vectors By Definition 4.11, Chapter 4, the pair (K + <!>, Uw) is a harmonic Ritz pair if

SEC. 1. KRYLOV DECOMPOSITIONS


and

315

It follows tha

Thus we have reduced the problem of computing w to that of solving a small generalized eigenvalue problem, which can be done by the QZ algorithm (see 4.3, Chapter 2). If we are willing to assume that (B K/)H is well conditioned, we can multiply by (B K/)~ H to get the ordinary eigenvalue problem

1.5. NOTES AND REFERENCES

Lanczos and Arnold! Contrary to our order of presentation, the Lanczos recurrence preceded the Arnoldi procedure. It is due to to Cornelius Lanczos (pronounced Lantzosh), whose algorithm [157,1950] has had a profound influence on the solution of large eigenproblems. Lanczos did not compute approximations to the eigenvalues from the matrix Tk (which he never explicitly formed), but instead used the recurrence to generate the characteristic polynomial of Tk, from which he computed eigenvalues. As indicated above (p. 279), he was aware that accurate approximations to certain eigenvalues could emerge early in the procedure. He called his method the method of minimized iterations because orthogonalizing Au against u\,... , Uk minimizes the norm of the result. Lanczos also gave a biorthogonalization algorithm for non-Hermitian matrices involving right and left Krylov sequence. The matrix form (1.12) of the Lanczos decomposition is due to Paige [195], whose ground-breaking thesis helped turn the Lanczos algorithm from a computational toy with promise into a viable algorithm for large symmetric eigenproblems. As might be expected, there are several variants of the basic three-term recursion, of which (1.15) is an example. Paige [197] has given a rounding-error analysis of these variants. The two described here emerge with a clean bill of health, but the others may not perform well. Arnoldi's chief contribution [5,1951] seems to have been to generalize the onesided Lanczos process to non-Hermitian matrices, noting that the Rayleigh quotient is Hessenberg. What we have been calling an Arnoldi decomposition is often called an Arnoldi factorization, and indeed the relation (1.2) is a factorization of AUk- However, the factorization is concealed by the second form (1.4), which is by far the most widely used. Consequently, we have opted for the slightly vaguer word "decomposition." Vol II: Eigensystems

316

CHAPTER 5. KRYLOV SEQUENCE METHODS

Shift-and-invert enhancement and orthogonalization The fact that a shift that closely approximates an eigenvalue can degrade convergence to other eigenpairs does not seem to be noted in the literature. One possible reason is that one does not generally have very accurate shifts. Moreover, as Example 1.5 shows, the shift has to be extremely accurate for the degradation to be significant. Krylov decompositions The idea of relaxing the definition of an Arnoldi decomposition is due to Stewart [267], as are the systematic transformations of the resulting Krylov decompositions. However, some of these ideas are implicit in some algorithms for large eigenproblems and large linear systems. Most notably, Sorensen's implicitly restarted Arnoldi algorithm [246], to be treated in the next section, proceeds via an orthonormal Krylov decomposition, which is then truncated to yield an Arnoldi decomposition. For more, see 2.5.

2. THE RESTARTED ARNOLDI METHOD


Let

be an Arnoldi decomposition. We have already noted that the Ritz pairs associated with Uk can be computed from the Rayleigh quotient Hk- As k increases, some of these Ritz pairs will (we hope) approach eigenpairs of A. In principle, then, we can use Algorithm 1.1 to keep expanding the Arnoldi decomposition until the Ritz pairs we want have converged. Unfortunately, for large problems our ability to expand the Arnoldi decomposition is limited by the amount of memory we can devote to the storage of Uk- For example, if A is of order 10,000, Uwo requires almost 10 megabytes of memory to store in IEEE double precision. A possible cure is to move the vectors Uk to a backing storesay a diskas they are generated. However, in order to orthogonalize Auk against the previous vectors we will have to bring them back into main memory. Since disk transfers are slow, the algorithm will spend most of its time moving numbers back and forth between the disk and main memory. An alternative is to restart the Arnoldi process once k becomes so large that we cannot store Uk- This, in fact, is the way the Arnoldi method is used in practice. In this chapter we will introduce two restarting methods: the implicit restarting method of Sorensen and a new method based on a Krylov-Schur decomposition. These methods are the subjects of 2.1 and 2.2. We then turn to practical considerations: stability, convergence, and deflation.

SEC. 2. THE RESTARTED ARNOLDI METHOD 2.1. THE IMPLICITLY RESTARTED ARNOLDI METHOD

317

The process of restarting the Arnold! method can be regarded as choosing a new starting vector for the underlying Krylov sequence. A natural choice would be a linear combination of Ritz vectors that we are interested in. This, it turns out, is a special case of a general approach in which we apply a filter polynomial to the original starting vector. We will begin by motivating this process and then go on to show how the QR algorithm can be used to implement it. Filter polynomials For the sake of argument let us assume that A has a complete system of eigenpairs (A;, Xj), and suppose that we are interested in calculating the first k of these eigenpairs. Let wi be a fixed vector. Then u\ can be expanded in the form

If p is any polynomial, we have

If we can choose p so that the values p(\i) (i = fc-f 1,... , n) are small compared to the values p(A;) (i = 1,... , k), then u will be rich in the components of the Xi that we want and deficient in the ones that we do not want. Such a polynomial is called a filter polynomial. There are many possible choices for a filter polynomial, but two suggest themselves immediately. 1. If the eigenvalues \k+i,... , A n lie in an interval [a, 6] and the eigenvalues AI, ... , Ajt lie without, we can take p to be a Chebyshev polynomial on [a, 6]. By the properties of Chebyshev polynomials (see Theorem 3.7, Chapter 4), this polynomial has values on [a, 6] that are small compared to values sufficiently outside [a, 6]. 2. Suppose we have at hand a set of Ritz values fii,... , /zm, and suppose that /ifc+i,..., jLtm correspond to the part of the spectrum we are not interested in. Then takep(i) = (t - pk+i) ( * - /*m) It should be observed that both choices accentuate the negative. The emphasis is on filtering out what we do not want, while what we want is left to fend for itself. For example, desired eigenvalues near the interval [a, 6] in the first of the above alternatives will not be much enhanced.

VolII: Eigensystems

318
Implicitly restarted Arnoldi

CHAPTER 5. KRYLOV SEQUENCE METHODS

Whatever the (considerable) attractions of filter polynomials, they are expensive to apply directly. If, for example, p is of degree mk, then p(A)ui requires rak matrixvector multiplications to compute. However, if HI is the starting vector of an Arnoldi decomposition of order m, we can use shifted QR steps to compute the Krylov decomposition of ICk[p(A)ui] without any matrix-vector multiplications. This technique is called implicit restarting. Before describing how implicit restarting is implemented, let us look at how it will be used. We begin with an Arnoldi decomposition

We then use Algorithm 1.1 to expand this decomposition to a decomposition

of order m. The integer m is generally chosen so that the decomposition can fit into the available memory. At this point a filter polynomial p of degreeTOfcis chosen, and the implicit restarting process is used to reduce the decomposition to a decomposition

of order & with starting vector p( A )ui. This process of expanding and contracting can be repeated until the desired Ritz values have converged. The contraction phase works with a factored form of the filter polynomial. Specifically, let We incorporate the factor t Ki into the decomposition using an analogue of the basic QR step [see (2.1), Chapter 2]. Starting with the shifted decomposition we write

where Q\R\ is the QR factorization of Hm i/. Postmultiplyingby Qi, we get

Finally, we have

where

Note that H^. is the matrix that results from one QR step with shift KI applied to Hm. There are five points to note about this procedure.

SEC. 2. THE RESTARTED ARNOLDI METHOD

319

1. The matrix lib is orthonormal. 2. The matrix Hm is Hessenberg, and at most its last subdiagonal element is zero. This follows from the proof of the preservation of Hessenberg form by the QR algorithm. 3. The matrix Q\ is upper Hessenberg. This follows from the fact that it can be written in the form

where PJ-IJ is a rotation in the (j1, j)-plane (see Figure 2.2, Chapter 2). 4. The vector b^f+l = e^Qi is the last row of Q and has the form

i.e., only the last two components of b^m'+l are nonzero. 5. The first column of Um = UmQ\ is a multiple of (A - K\I). For on postmultiplying (2.1) by ei and remembering that RI is upper triangular, we get

Since Hm is unreduced, r^' is nonzero, which establishes the result. We may now repeat this process with K^? , Km-Jt- The result will be a Krylov decomposition

with the following properties.

Thus the decomposition (2.3) has the Wilkinson diagram presented below for k = 3 and ra = 6:

Vol II: Eigensystems

320

CHAPTER 5. KRYLOV SEQUENCE METHODS

where the q's are from the last row of Q. From this diagram it is easy to see that the first k columns of the decomposition can be written in the form

where Uj.m consists of the first k columns of Um HM cipal submatrix of order k of Hm~ and g^m is from the matrb Hence if we set

ls me

leading prin-

then

is an Arnold! decomposition whose starting vector is proportional to (AKi 1} -(A Ac m _jb/)Mi. We have thus restarted the Arnold! process with a decomposition of order k whose starting vector has been filtered by p(A). The elegance and economy of this procedure is hard to overstate. Not only do we avoid any matrix-vector multiplications in forming the new starting vector, but we also get its Arnoldi decomposition of order k for free. For large n the major cost will be in computing UQ. A bit of terminology will help in our description of the algorithm. After we have applied the shifts !,... , KJ, we can truncate the decomposition as above to yield a decomposition of order mj. We will call the integer mj the truncation index for the current problem. Implementation We have described the contraction algorithm for the implicitly restarted Arnoldi method in terms of the explicitly shifted QR algorithm. For single shifts there is no reason not to use this procedure. However, when A is real and the shift is complex, it is natural to use the implicit double shift procedure. The only new feature is that a double shift adds an additional two subdiagonals to the matrix Q and hence moves the truncation index back by two. For simplicity, we will only describe the implicit single step method. For convenience we separate the final truncation from the implicit filtering. Algorithm 2.1 is an implementation of one step of filtering. Here are some comments. The algorithm is a straightforward implementation of the single implicit QR step. The algorithm requires 0(m 2 ) work. A precise operation count is not necessary, since when n is large the applications ofFilterArn will account for an insignificant part

SEC. 2. THE RESTARTED ARNOLDI METHOD

321

Let

be an Arnoldi decomposition of order m. Given a shift AC, this algorithm reduces the truncation index by one. The transformations generated by the algorithm are accumulated in the raxm matrix Q.

Algorithm 2.1: Filtering an Arnold! decomposition

Vol II: Eigensystems

322
Given an Arnoldi decomposition

CHAPTER 5. KRYLOV SEQUENCE METHODS

and an integer m > k, this algorithm expands the decomposition to one of order m and then contracts it back to one of order k.

Algorithm 2.2: The restarted Arnoldi cycle

of the work in the overall Arnold! algorithm. In fact, we have ignored the opportunity to reduce the count by taking advantage of the special structure of Q. Transformations are not accumulated in U. It is much cheaper to accumulate them in the smaller matrix Q and apply Q to U at the end of the contraction process. The restarted Arnold! cycle We are now in a position to combine the expansion phase with the contraction phase. This is done in Algorithm 2.2. When n is large, the bulk of the work in this algorithm is concentrated in the expansion phase and in the computation of U*Q[l:k]. The expansion phase requires mk matrix-vector multiplications. From (1.10) we know that the Arnoldi step requires between Inj flam and 4nj flam, so that the expansion phase requires between n(m2-k2) flam and 2n(ra 2 -fc 2 ) flam. If we implement the product U*Q [:, 1: k] naively, the operation count is nm k flam. However, the elements of Q below the m-k subdiagonal are zero. If this is taken into

SEC. 2. THE RESTARTED ARNOLDI METHOD

323

consideration the count can be reduced to n(km - f fc2). These counts are not easy to interpret unless we know the relative sizes of m and k. There is no general analysis that specifies an optimal relation, but the conventional wisdom is to take m to be Ik or greater. Thus if we take m = 2k, we end up with the following table (in which RO stands for reorthogonalization).

The main conclusion to be drawn from this table is that it does not much matter how U*Q [:, 1 :k] is formed. In fact, the naive scheme permits more blocking, so that in spite of the operation counts it may be faster (see 1:2.3). For purposes of exposition we have assumed that m and k are fixed. However, they can be varied from cycle to cycle, as long as m is not so large that storage limits are exceeded. The implicitly restarted Arnoldi method can be quite effective, as the following example shows. Example 2.1. Let A = diag(l, .95, .952, .95 3 ,... , .95") (the matrix of Example 3.1, Chapter 4). The implicitly restarted Arnoldi method was run with k = 5, m = 10, and starting vector e. The results are summarized in the following table.

Axu 10 15 20 25
1. 2. 3. 4.

A 5.7e-02 2.0e-03 1.9e-05 4.8e-08

IRA 9.8e-02 4.9e-03 8.7e-05 8.0e-07

RV 1.2e-01 5.4e-03 8.8e-05 8.0e-07

The columns contain the following information: the number of matrix-vector multiplications, tan Z(ei, the full Krylov subspace), tan Z (ei, the restarted Arnoldi subspace), tan Z(ei, the Ritz vector from the restarted subspace).

The implicitly restarted Arnoldi method is almost as good as the full Krylov sequence. Yet the latter requires 2,500 words of floating-point storage, whereas the former requires only 1,000. It would be rash to take one offhand example as characteristic of behavior of the implicitly restarted Arnoldi method. But experience has shown it to be the best general method for non-Hermitian matrices when storage is limited. VolII: Eigensy stems

324
Exact shifts

CHAPTER 5. KRYLOV SEQUENCE METHODS

We have already mentioned the possibility of choosing Ritz valuesthe eigenvalues of H as shifts for the implicitly restarted Arnoldi method. When this is done the Rayleigh quotient assumes a special form in which the discarded Ritz values appear on the diagonal of the discarded half of the Rayleigh quotient. This fact is a consequence of the following theorem. Theorem 2.2. Let H bean unreduced Hessenberg matrix, and let pbean eigenvalue ofH. If one QR step with shifty is performed on H, then the resulting matrix H has the form

where HU is unreduced. Proof. The first part of the QR step consists of the reduction

of (H - f i l ) to triangular form. This reduction is illustrated in Figure 2.2, Chapter 2, from which it is evident that all but the last of the diagonal elements of R are nonzero. But H fil is not of full rank. Hence the last diagonal element of R must be zero. It follows that the last row of RQ is zero. Moreover, it follows from the representation of the formation of this product in Figure 2.3, Chapter 2, that all but the last of the subdiagonal elements of RQ are nonzero. Hence H - RQ -f p.1 has the form (2.6), where HU is unreduced. By repeated application of Theorem 2.2 we get the following result. Corollary 2.3. Let {im,... , fik+i be eigenvalues of Hk. If the implicitly restarted QR step is performed with shifts /u m ,... , fJ,k+i > then the matrix Hm~ ' in (2.3) has the form

where T^m *) is an upper triangular matrix with Ritz values pk+i, , Pm on its diagonal. The matrix Hk in (2.8) is the Rayleigh quotient for the implicitly restarted Arnoldi algorithm. Because Hm~ is block triangular, Hk must contain the Ritz values that were not used in the restarting process. This means that we can choose to keep certain Ritz values and discard others. Specifically, at the end of the expansion phase the Ritz valuesi.e., the eigenvalues of Hm are calculated and divided into two classes:

SEC. 2. THE RESTARTED ARNOLDI METHOD

325

those we wish to retain and those we wish to discard. The latter are used as shifts in the restarting algorithm. In this way the restarting process can be used to steer the Arnoldi algorithm to regions of interest. For example, if we are using shift-and-invert enhancement, we will be interested in the largest eigenvalues, and it is natural to retain the largest Ritz values. In stability computations, where an eigenvalue with a positive real part indicates instability, we might retain the Ritz values having the largest real part. A consequence of Corollary 2.3 is that in exact arithmetic the quantity H [k+l, k] in statement 11 of Algorithm 2.2 is zero, so that the computation of fl and u can be simplified. In the presence of rounding error, however, H[k+l,k] can be far from zero. We now turn to a discussion of this phenomenon. Forward instability Theorem 2.2 is a classic example of the limitations of mathematics in the face of rounding error. Given an exact shift, the matrix that one computes with rounding error can fail to deflate i.e., its (TO, TOl)-element can be far from zero. This phenomenon, which is called forward instability of the QR step, does not mean that we cannot use Algorithm 2.2. In fact, as we shall see later (Theorem 2.5), the Arnoldi relation AU = UH + flu will continue to hold to working accuracy. However, if a particular step is forward unstable, we cannot guarantee that the undesirable Ritz values have been purged from the decomposition. In fact, there is a danger of an unwanted Ritz value becoming permanently locked into the decomposition. An important algorithmic implication of forward instability is that we cannot deflate the decomposition after the application of each exact shift. We must continue to work with the entire matrix H as in Algorithm 2.1. Fortunately, when n is large, the work saved by deflation is negligible. Although forward instability is a real phenomenon, it should be kept in perspective. In cannot generate instability in the Arnoldi process itself. At worst it can only retard its progress. That is why ARPACK, the definitive implementation of the implicitly restarted Arnoldi method, has been and is used with great success to solve large eigenproblems.
2.2. KRYLOV-SCHUR RESTARTING

The implicitly restarted Arnoldi algorithm with exact shifts is a technique for moving Ritz values out of an Arnoldi decomposition. As we have seen, forward instability in the QR step can compromise the progress of the algorithm (though not its stability). In this subsection we describe a more reliable method for purging Ritz values. It is based on two observations. First, it is easier to move eigenvalues around in a triangular matrix than in a Hessenberg matrix. Second, if a Krylov decomposition can be partitioned in the form

Vol II: Eigensystems

326

CHAPTER 5. KRYLOV SEQUENCE METHODS

then AUi = U\B\\ + ub^ is also a Krylov decomposition. In other words a Krylov decomposition splits at any point where its Rayleigh quotient is block triangular. Our restarting algorithm then is to compute the Schur decomposition of the Rayleigh quotient, move the desired eigenvalues to the beginning, and throw away the rest of the decomposition. We will call the process Krylov-Schur restarting. Exchanging eigenvalues and eigenblocks Since the Krylov-Schur method requires us to be able to move eigenvalues around in a triangular matrix, we will begin with a sketch of how this is done. The first thing to note is that to move an eigenvalue from one place to another it is sufficient to be able to exchange it with either one of its neighboring eigenvalues. More precisely, let a triangular matrix be partitioned in the form

where

If we can find a unitary transformation Q such that

then the eigenvalues su and s22 m the matrix

will have traded places. If we have an algorithm to perform such exchanges, then we can move any eigenvalue on the diagonal of a triangular matrix to another position on the diagonal by a sequence of exchanges. However, it is not enough to be able to exchange just eigenvalues. If the eigenproblem in question is real, we will generally work with real Schur forms. Thus we must not only be able to exchange eigenvalues but also the 2x2 blocks containing complex eigenvalues. To derive our algorithms we will consider the real case. Let

where Su is of order n,- (i = 1,2). There are four cases to consider.

SEC. 2. THE RESTARTED ARNOLDI METHOD

327

We will now sketch algorithms for each case. The first two cases can be treated by what amounts to the first step in a reduction to Schur form (see the proof of Theorem 1.12, Chapter 1). Let the matrix in question be

where Su is of order one or two. Let x be a normalized eigenvector corresponding to 522 and let Q = (x Y) be orthogonal. Then it is easily verified that

Note that although Su need not be equal 611, the two matrices must have the same eigenvalues (in fact, they are similar). The third case can be treated by the variant of Schur reduction introduced in connection with the QR algorithm [see (2.2), Chapter 2]. Let

Let y be a normalized left eigenvector corresponding to Su and let Q = (X y) be orthogonal. Then

The last case, HI = n^ 2, is more complicated. Let

Let (522, X) be an orthonormal eigenpair, and let Q = (X Y) be orthogonal. Then by Theorem 1.6, Chapter 4,

Since 22 is the Rayleigh quotient X^SX it must have the same eigenvalues as 622, and similarly for Su. Vol II: Eigensystems

328

CHAPTER 5. KRYLOV SEQUENCE METHODS

The problem, then, is to compute the eigenbasis X. The procedure is to compute a nonorthonormal eigenbasis and then orthogonalize it. Specifically let the eigenbasis be (PT /)T, where P is to be determined. Then

From the first row of this equation, we get the Sylvester equation

which can be solved for P. In this case we do not use Algorithm 1.1, Chapter 1, to compute P but instead note that (2.9) is a set of four linear equations in four unknowns which can be solved by any stable method. Once we have computed P, we can compute the QR decomposition

In particular, Q (X Y) can be represented as the product of two Householder transformations. The algorithms for the first three cases have stable implementations. For the first case, the eigenvector can be computed by inspection. For the other two, they can be computed stably by solving a 2 x 2 system of equations. It is possible for this system to be singular, but replacing zero pivot elements with a suitably small number will allow the computation to continue (see Algorithm 2.9, Chapter 2). Once the eigenvector has been computed, the matrix Q can be taken to be a Householder transformation (or a plane rotation when n\ n<2 = 1), and it can be applied to the matrix in which S is embedded. These methods are stable in the usual sense. The algorithm for the fourth case is not provably stable, although it works well in practice and its failure can be detected. Specifically, after the transformation the matrix Q^SQ will have the form

To complete the algorithm, the matrix E must be set to zero. Consequently, if E is too largesay ||||oo > lOH^Hc^M tnen me algorithm is deemed to have failed. For more details on these algorithms see the LAPACK subroutine xLAEXC. The Krylov-Schur cycle We will now describe the basic cycle of the Krylov-Schur method. To keep the exposition simple, we will assume that the matrix in question is complex, so that we do not have to be concerned with real Schur forms.

SEC. 2. THE RESTARTED ARNOLDI METHOD


The Krylov-Schur cycle begins with a Krylov-Schur decomposition

329

where Uk+i is orthonormal and Sk is upper triangular. To get such a decomposition initially, one chooses a starting vector, expands it to an Arnoldi decomposition, and transforms it by a unitary similarity to triangular form. The expansion phase is exactly like the expansion phase for the Amoldi method. In fact, one can use ExpandArn (Algorithm 1.1) to implement it. However, the expanded Rayleigh quotient now has the form illustrated below for k = 4 and m = 8:

Writing the corresponding Krylov decomposition in the form

we now determine an orthogonal matrix Q such that Sm = Q^TmQ\s upper triangular and transform the decomposition to the form

Finally, we use the exchange algorithms to transform the eigenvalues we want to keep to the beginning of Sm and truncate the decomposition. Algorithm 2.3 implements this scheme. Here are two comments. The work involved in the expansion phase is the same as for the Arnoldi process. For large n the work in the contraction phase is concentrated in the formation of the product ?7*Q[:, !:&]. As (2.5) shows this is about the same as for implicit restarting. Thus the implicitly restarted Arnoldi cycle and the Krylov-Schur cycle are essentially equivalent in the amount of work they perform. In the computation of the Schur decomposition in statement 7, minor savings can be had in the initial reduction of S to Hessenberg form, since by (2.10) S is already partially reduced. When n is large, the savings are not worth the trouble.

Vol II: Eigensystems

330

CHAPTER 5. KRYLOV SEQUENCE METHODS

Given a Krylov-Schur decomposition

of order k and an integer ra > k, this algorithm expands the decomposition to one of order m and then contracts it back to one of order k.

Algorithm 2.3: The Krvlov-Schur cycle

SEC. 2. THE RESTARTED ARNOLDI METHOD


The equivalence of Arnold! and Krylov-Schur

331

Given that the implicitly restarted Arnoldi method with exact shifts and the KrylovSchur method both proceed by moving Ritz values out of their respective decompositions, it is natural to conclude that if we start from equivalent decompositions and remove the same Ritz values then we will end up with equivalent decompositions. That is indeed the case, although it requires some proving. Theorem 2.4. Let

be an unreduced Arnoldi decomposition and let

be an equivalent Krylov-Schur form. Suppose that an implicitly restarted Arnoldi cycle is performed on P and a Krylov-Schur cycle is performed on Q. If the same Ritz values are discarded in both and those Ritz values are distinct from the other Ritz values, then the resulting decompositions are equivalent. Proof. We must show that the subspaces associated with the final results are the same. First note that the expansion phase results in equivalent decompositions. In fact, since ll(U) = 11>(V) and in both cases we are orthogonalizingthe the vectors Au, A2u, the vectors Uk+2 ^m+i and Vk+2, , ^m+i are the same up to multiples of modulus one. Now assume that both algorithms have gone through the expansion phase and have moved the unwanted Ritz values to the end of the decomposition. At this point denote the first decomposition by

and the second by

Note that for both methods the final truncation leaves the vector u unaltered. Since V = UW for some unitary W, we have

Thus H and 5 are similar and have the same Ritz values. Thus it makes sense to say that both methods reject the same Ritz values. Let P be the unitary transformation applied to the Rayleigh quotient in P and let Q be the one applied to the Rayleigh quotient of Q. Then we must show that the subspaces spanned by UP[:, l:k] and VQ[:, l:k] are the same (see statement 14 in Algorithm 2.2 and statement 11 in Algorithm 2.3). For brevity, set Pk = P[:, l:k] and Qib = <?[:,!:*]. Vol II: Eigensvstems

332

CHAPTER 5. KRYLOV SEQUENCE METHODS

By construction Tl(Pk) spans the eigenspace P of Schur vectors of H corresponding to the retained Ritz values. Likewise, T^(Qk) spans the eigenspace Q of Schur vectors of S corresponding to the retained Ritz values. By hypothesis each of these eigenspaces are simple and hence are unique (page 246). Since W^W = H, the matrix W^Pk spans Q. Hence there is a unitary matrix R such that Qk = W^PkR. We then have

It follows that VQk and UPk span the same subspace. This theorem says that the implicitly restarted Arnoldi method with exact shifts and the Krylov-Schur method with the same shifts are doing the same thing. In particular, the Krylov-Schur method is restarting with a vector filtered by a polynomial whose roots are the rejected Ritz values. This fact is not at all obvious from the algorithmic description of the Krylov-Schur method. Comparison of the methods The implicitly restarted Arnoldi method and the Krylov-Schur method each have their place. The former can restart with an arbitrary filter polynomial, something the latter cannot do. On the other hand, when it comes to exact shifts the Krylov-Schur method is to be preferred because exchanging eigenvalues in a Schur form is a more reliable process than using implicit QR steps to deflate. The Krylov-Schur method can be used as an adjunct to the implicitly restarted Arnoldi method. For example, if the latter produces a persistent unwanted Ritz value, the decomposition can be reduced to Krylov-Schur form, the offending eigenvalue swapped out, and Algorithm 1.3 used to return to an Arnoldi decomposition. Although this seems like a lot of work, if n is large and we delay multiplying transformations into the decomposition until the end of the process, it effectively costs no more than a contraction step. We will see in the next subsection that a similar procedure can be used to deflate converged Ritz pairs.

2.3. STABILITY, CONVERGENCE, AND DEFLATION


In this subsection we will consider some of the practicalities that arise in the implementation of the Arnoldi method. We will first treat the behavior of the methods in the presence of rounding error. We will then discuss tests for the convergence of approximate eigenpairs. Finally, we will show how to deflate converged eigenpairs from a Krylov decomposition. Since the Arnoldi and Krylov-Schur decompositions are both orthonormal Krylov decompositions, we will present our results in the more general notation of the latter. Stability Provided we take due care to reorthogonalize, the algorithms of this section are stable in the usual sense.

SEC. 2. THE RESTARTED ARNOLDI METHOD


Theorem 2.5. Let

333

be an orthogonal Krylov decomposition computed by the implicitly restarted Arnoldi method or the Krylov-Schur method. Then there is an orthonormal matrix Uk+i satisfying

and a matrix E satisfying

such that

Here 7 is a generic constantin general different in (2.11) and (2.13) that depends on the size of the problem and the number of cycles performed by the algorithm. Alternatively, there is a matrix F satisfying

such that

For a sketch of the the proof, see the notes and references. This theorem has three implications. The generic constant 7 grows only slowly as the algorithm in question progresses. Thus the algorithm can be continued for many iterations without fear of instability. Since B = UHAU is a Rayleigh quotient of A, the eigenpairs (//;, w,-) of B are primitive Ritz pairs of A + E. The vectors Uk^i are near the Ritz vectors UkwkIt follows that unless the Ritz pairs are very sensitive to perturbations in A, they will be accurately computed. Thus we can take the output of our algorithms at face value.

Vol II: Eigensystems

334

CHAPTERS. KRYLOV SEQUENCE METHODS

Stability and shift-and-invert enhancement When shift-and-invert enhancement with shift K, is combined with the Arnoldi process, the vector v = (A K!)~IU will be computed by solving the system

where AK = A K/, and we must take into account the errors generated in solving this system. In most applications AK will be large and sparse, and the system must be solved by a direct sparse method or by an iterative method. The treatment of each of these methods is worth a volume in itself. However, we can say that the computed solution will satisfy

where

Depending on the stability properties of the direct solver or the convergence criterion used by the iterative method, it is possible for the constant 7 to be large. To relate the backward error in (2.14) to A"1, which replaces A in (2.12), we must show how F in (2.14) propagates to A~l. From the first-order expansion

we see that the backward error in AK l is approximately bounded by

This bound compares unfavorably with (2.12) in two ways. First, the constant 7 can be larger than its counterpart in (2.12), as we have already pointed out. Second, if K is very near an eigenvalue of A, then the condition number \\AK\\ \\A~l \\ will be large and will magnify the multiplier (7||AK||||A~1||) in (2.15). To put things less formally, instability in a direct solver or a lax convergence criterion in an iterative method can result in a comparatively large backward error in solving the system AKv = u: 111 conditioning of A K , due to the shift being near an eigenvalue of A, can further magnify the error. All this suggests that one must be careful in using shifts very near an eigenvalue of A, something we have already noted in Example 1.5. However, the above analysis is quite crude, and in practice accurate shifts may be less damaging than it suggests. Unfortunately, there is little in the literature to guide us. Convergence criteria We have already stressed in connection with the power method (p. 61) that an appropriate criterion for accepting a purported eigenpair (/^, z] is that the residual r = Az JJLZ

SEC. 2. THE RESTARTED ARNOLDI METHOD

335

be sufficiently small. More generally, if (M, Z) is an approximate orthonormal eigenpair with a small residual then by Theorem 2.8, Chapter 4, there is a matrix E satisfying such that (M, Z) is an exact eigenpair of A + E. Thus if

for some tolerance tol, then (M, Z) is an exact eigenpair of A, where the (normwise) relative error in A is tol. Thus, (2.18) provides a convergence criterion for determining if eigenpairs produced by an algorithm have converged. At first glance, the residual (2.16) would appear to be expensive to compute. For if Z has p columns, the computation requires p matrix-vector multiplications, not to mention the arithmetic operations involved in computing ZM. However, if Z = UW, where U is from an orthonormal Krylov decomposition, the residual is cheap to compute, as the following theorem shows. Theorem 2.6. Let be an orthonormal Krylov decomposition and let (M, Z) = (M, UW) be an orthonormal vair. Then

Proof. It is easily verified that Since

There are three comments to be made about this theorem. We have chosen to work with eigenspaces because that is what is produced by complex eigenvalues in a real Schur form. But for the most part, we will be concerned with ordinary eigenvalues and their eigenvectors. If (M, W) is a primitive Ritz pair, then BW WM = 0, and the expression (2.19) reduces to ||6HW||2. If the decomposition is an Arnoldi decomposition, so that 6H = /tejj-, then ||^||F is just the norm of the last row of W. Moreover: Vol II: Eigensystems

336

CHAPTER 5. KRYLOV SEQUENCE METHODS

where Uk is the last component ofw. If (M, W) is not a Ritz pair, then the formula (2.19) cannot be simplified. However, by Theorem 2.6, Chapter 4, it will be minimized when M is the Rayleigh quotient W^BW. In particular, when checking the convergence of refined or harmonic Ritz vectors, one should use the Rayleigh quotient, not the refined or harmonic Ritz value. In practice, we may not be able to compute \\A\\pespecially if we are using shift-and-invert enhancement. However, since we are generally concerned with exterior eigenvalues, the norm of the Ritz block M is often a ballpark approximation to m||p. Thus we might say that a Ritz pair (Af, UW) has converged if

When the concern is with eigenvectors rather than eigenspaces, the criterion becomes

Convergence with shift-and-invert enhancement As in the case of stability, when shift-and-invert enhancement is usedsay with shift K the residual R in (2.17) relates to the shifted matrix. Specifically, if we are concerned with the approximate eigenpair (^, z), then

In terms of the original matrix A, the approximate eigenvalue is K + // l, and from (2.22) we have the residual

It follows that for the relative backward error in A not to be greater than tol, we must have

Now it is reasonable to assume that ||A K,I\\p and ||A||F are of the same order of magnitude. Hence our convergence test becomes

This is exactly the same as the criterion (2.21) for Ritz pairs

SEC. 2. THE RESTARTED ARNOLDI METHOD


Deflation

337

We say a Krylov decomposition has been deflated if it can be partitioned in the form

When this happens, we have AU\ = UiB\\, so that U\\ spans an eigenspace of A. There are two advantages to deflating a converged eigenspace. First by freezing it at the beginning of the Krylov decomposition we insure that the remaining space of the decomposition remains orthogonal to it. In particular, this gives algorithms the opportunity to compute more than one independent eigenvector corresponding to a multiple eigenvalue. The second advantage of the deflated decomposition is that we can save operations in the contraction phase of an Arnoldi or Krylov-Schur cycle. The expansion phase does not change, and we end up with a decomposition of the form

Now since B\\ is uncoupled from the rest of the Rayleigh quotient, we can apply all subsequent transformations exclusively to the eastern part the Rayleigh quotient and to (C/2 Us). If the order of BU is small, the savings will be marginal; but as its size increases during the course of the algorithm, the savings become significant. Of course, we will never have an exact eigenspace in our decompositions. The following theorem relates the residual norm of an approximate subspace to the quantities we must set to zero to deflate. Theorem 2.7. Let

be an orthonormal Krylov decomposition, and let (Af, Z) (M, UW) be an orthonormalpair. Let (W W_\_) be unitary, and set

and

Then

Vol El: Eigensystems

338
Proof. Let

CHAPTER 5. KRYLOV SEQUENCE METHODS

From (2.20), we have

The theorem now follows on taking norms. To see the consequences of this theorem, suppose that AZ ZM is small, and, using (W W), we transform the Krylov decomposition AU UB = ub** to the form

tHEN BY (2.23)

with equality if and only if M is the Rayleigh quotient W^BW. Now if the residual norm \\AZ - ZM\\p is sufficiently small, we may set #21 and 61 to zero to get the approximate decomposition

Thus we have deflated our problem by making small changes in the Arnoldi decomposition. Stability of deflation The deflation procedure that leads to (2.26) is backward stable. If we restore the quantities that were zeroed in forming (2.26), we get the following relation:

SEC. 2. THE RESTARTED ARNOLDI METHOD


If we write this decomposition in the form

339

then

IfwesetE = -RUH,then(A + E)U = UB + utP. We may summarize these results in the following theorem. Theorem 2.8. Under the hypotheses of Theorem 2.7, write the deflated decomposition (2.26) in the form

Then there is an E satisfying

such that

Equality holds in (2.21) if and only if M is the Rayleigh quotient ZHAZ = WR B W. This theorem says that the deflation technique is backward stable. Deflating an approximate eigenspace with residual norm p corresponds to introducing an error of no more than p'm A.
Nonorthogonal bases

In practice we will seldom encounter a converging subspace unless it is a two-dimensional subspace corresponding to an imaginary eigenvalue in a real Schur decomposition. Instead we will be confronted with converged, normalized Ritz pairs (/^-, Z{) (i = 1,... , p) of one kind or another, and the vectors in these pairs cannot be guaranteed to be orthogonal. If we arrange the vectors in a matrix Z and set M = diag(//i,... , (J,p), the residual R AZ ZM must be small because the individual residuals are small. Since the deflation procedure only requires an orthonormal basis for the approximate eigenspace in question, we can compute a QR factorization

of Z and use the orthonormal basis Z in the deflation procedure. Unfortunately, the residual for Z becomes

VolII: Eigensystems

340

CHAPTER 5. KRYLOV SEQUENCE METHODS

where M = SMS~l. If the columns of Z are nearly dependent, \\S\\2 will be large, and the residual may be magnifiedperhaps to the point where the deflation cannot be performed safely. It may seem paradoxical that we could have, say, two vectors each of which we can deflate, but which taken together cannot be deflated. The resolution of this paradox is to remember that we are not deflating two vectors but the subspace spanned by them. If the vectors are nearly dependent, they must be very accurate to determine their common subspace accurately. Deflation in the Krylov-Schur method The deflation procedure is not confined to eigenpairs calculated by a Rayleigh-Ritz procedure. For example, it can be used to deflate harmonic Ritz vectors or refined Ritz vectors. However, if Ritz vectors are the concern, there is an easy way to deflate Ritz vectors in the Krylov-Schur method. After a cycle of the algorithm, let the current decomposition have the form

Here U\ represents a subspace that has already been deflated, and 622 ls tne Schur form that remains after the contraction phase. To deflate the the Ritz pair corresponding to the (1,1)-element of 22 we must set the first component of 62 to zero. Consequently, all we have to do to deflate is to verify that that component satisfies our deflation criterion. If some other diagonal element of 622 ls a candidate for deflation, we can exchange it into the (1, Imposition of 622 > and test as above. This procedure can be repeated as often as desired. Algorithm 2.4 implements this scheme. If, as usual, we accumulate the transformations in an auxiliary matrix Q and apply them to U only at the end of the deflation process, this is an inexpensive algorithm. Deflation in an Arnoldi decomposition Deflating an Arnoldi decomposition proceeds by reducing it to a Krylov-Schur decomposition. Specifically, at the end of the contraction phase the Arnoldi decomposition will have the form

where #22 is upper Hessenberg. The procedure is to reduce #22 to Schur form, deflate as in the Krylov-Schur form, and use Algorithm 1.3 to bring the decomposition back to an Arnoldi form. Although the procedure is roundabout, if n is large, it is not expensive.

SEC. 2. THE RESTARTED ARNOLDI METHOD


Let the Krylov-Schur AU = US + ubH have the fora

341

where Su is of order j. For some i > j, let the Ritz value sa be a candidate for deflation. This algorithm determines if the value can be deflated and if so produces a deflated decomposition.

Algorithm 2.4: Deflating in a Krylov-Schur decomposition

Choice of tolerance Although algorithms for dense eigenproblems are necessarily iterative, their implementations seldom use an explicit parameter to determine convergence. Instead they iterate until the limits set by finite precision arithmetic are reached. The reason is that it is comparatively inexpensive to do so. Algorithms for large eigenproblems, on the other hand, usually allow the user to furnish a tolerance to decide convergence. The reason is that the computations are potentially so voluminous that it is unreasonable to continue them beyond the accuracy desired by the user. It is therefore necessary to say how such a criterion should be chosen. The criterion (2.18) suggests stopping when the residual norm of the eigenpair in question is less than tol-a, where a is some convenient estimate of the size of A. In that case, the eigenpair comes from a perturbed matrix with relative error tol. There are two possibilities for choosing tol. 1. Choose tol to be a modest multiple of the rounding unit. There is no point in choosing tol smaller, since the operations in the algorithms already impose a backward error of the same order (see Theorem 2.5). 2. Choose tol to be something that gives a backward error that one can live with. The advantage of this choice is that one may save calculations by not demanding too much. The difficulty is that the choice is highly problem dependent and must be left to the user. Good packages, such as ARPACK, allow both a user-specified option and a default opVol II: Eigensystems

342

CHAPTER 5. KRYLOV SEQUENCE METHODS

tion based on the rounding unit. Since deflation is backward stable (see Theorem 2.8), the tolerance for deflation should of the same order of magnitude as the tolerance for convergence. However, it should be made somewhat larger to allow multiple vectors to be deflated. See the discussion on page 339.

2.4. RATIONAL KRYLOV TRANSFORMATIONS


The principle use of shift-and-invert transformations in Arnoldi's method is to focus the algorithm on the eigenvalues near the shift K. However, when the desired part of the spectrum is spread out, it may necessary to use more than one shift. One way of doing this is to restart with a new shift and a new vector. However, when the new shift is not far removed from the old, the Amoldi decomposition may still contain useful information about the eigenvectors near the new shiftinformation that should be kept around. It is a surprising fact that we can change a Krylov decomposition from one in (A - KI!)~I to one in (A - K/2/)"1 without having to perform an inversion. This subsection is devoted to describing how this is done. Krylov sequences, inverses, and shifts Although the computational algorithm is easy to derive, it is interesting to see what lies behind it. Suppose we have a Krylov sequence

If we set v = (A Ki/) 1

u, then the sequence with its terms in reverse order is

so that

Moreover by the shift in variance of a Krylov sequence (Theorem 3.3, Chapter 4)

It follows that

Equation (2.29) says that the Krylov subspace in (A KI/) 1 with starting vector u is exactly the same as the Krylov subspace in (A K^)"1 with a different starting vector w. Thus the problem posed above amounts to restarting the Krylov sequence with the new vector w. We will now describe an algorithm for doing this.

SEC. 2. THE RESTARTED ARNOLDI METHOD


The rational Krylov method Let us begin with an orthonormal Arnoldi decompositioi

343

Then

Henc

where

To reduce this relation to a Krylov decomposition, let

be a QR decomposition of / + (KI - K2H). Then

This is a Krylov decomposition, which can be reduced to an Arnoldi decomposition by Algorithm 1.3. Algorithm 2.5 implements this procedure. Here are some comments. The algorithm is quite economical involving no manipulations of A. As usual, the transformations to U can be saved and applied at the end of the algorithm. Since /+ (i KZ )H is upper Hessenberg, the Q in the factorization in statement 1 can be computed as the product of k plane rotations. In particular, this structure makes it easy to preserve deflated vectors in the initial part of the decomposition. The algorithm is not unconditionally stable. If R is ill conditioned, the application of R~l can magnify the residual error in the decompositions. At first sight it might appear that the rational Krylov transformation is a good way of getting something for nothing. As one gets better approximations to an eigenvalue Vol II: Eigensystems

344
Given an Arnold! decomposition

CHAPTER 5. KRYLOV SEQUENCE METHODS

of order k and a shift ^2, this algorithm computes an Arnoldi decomposition

Algorithm 2.5: The rational Krvlov transformation

of A, the argument goes, one can use them as shifts and get a sequence of Krylov decompositions with increasingly effective shift-and-invert enhancers. The flaw in this argument is that the rational Krylov transformation does not change the Krylov subspace. Consequently, the accuracy of eigenvector approximations is not affected. To put it another way, the closer the new shift is to an eigenvalue, the poorer the new starting vector. Nor does the method save the trouble of computing a factorization. If one wants to continue the sequence, one must be able to apply (A - K2/)-1 to a vector.

2.5. NOTES AND REFERENCES


Arnoldi's method, restarting, and filter polynomials Although the Arnoldi method is indeed due to Arnoldi [5], is was Saad [230, 1980] who first presented it as an effective algorithm for computing eigenpairs of large nonHermitian matrices. It is important to distinguish between restarting the Arnoldi process to compute a single eigenpair and to compute several eigenpairs simultaneously. The former problem is relatively easy: just restart with the best available approximation to the desired eigenvector. Once the eigenvector has been found it can be removed from the problem by various deflating techniques, which have been surveyed in [300, pp. 584-602] and [233, FV.2]. Equivalent block methods for several eigenvalues exist, provided the number of eigenvalues is less than the block size. See [45] and [93].

SEC. 2. THE RESTARTED ARNOLDI METHOD

345

The problem is far different when it is desired to restart the Arnoldi process while several eigenvectors are converging. To restart with a single approximate eigenvector would destroy the information accumulated about the others. In 1982, Saad [230] proposed restarting with a linear combination of approximate eigenvectors from the Krylov subspace, but in 1990 [233, p. 180] he pointed out that a good combination is hard to find. In an elegant paper Morgan [180,1996] showed why. The idea of following a sequence of Arnoldi steps with the application of a filter polynomial to purify the restart vector is due to Saad [232,1984]. The problem with this procedure is that once again one must choose a vector to purify. The breakthrough came with Sorensen's 1992 paper [246] entitled "Implicit Application of Polynomial Filters in a fc-Step Arnoldi Method." In it he described the implicitly restarted Arnoldi algorithm as presented here, including exact and inexact shifts. (By the way, the "implicit" in implicit restarting does not refer to its use of implicit QR steps but to the fact that the starting vector is chosen implicitly by the shifts in contraction procedure.) He also gives convergence results for the case of a fixed filter polynomial and the case of exact shifts for a symmetric polynomial. (For other convergence results see [160].) ARPACK New algorithms for large eigenproblems are usually implemented in MATLAB for testing but seldom end up as quality mathematical software. A happy exception is the implicitly restarted Arnoldi algorithm. Lehoucq, Sorensen, and Yang, building on a design of Phuong Vu, have produced ARPACK [162], a well-coded and well-documented package that bids fair to become the standard for large non-Hermitian eigenproblems. Reverse communication All routines for solving large eigenvalue problems require that some operation be performed involving the matrix in question and a vector. The simplest example is the computation of Ax; however, a more complicated operation may be required e.g., for shift-and-invert enhancement. The problem for a general-purpose routine is how to get the caller to perform the operations in question. One solution is for the caller to specify a subroutine to perform the operation in the calling sequence. However, once this subroutine is called, it must get data from the original program, which can only be done with messy global variable structures. An alternative called reverse communicationis for the general-purpose routine to return to the calling program with a flag specifying the desired operation. The calling program, which knows its own data, performs the operation and returns the results via another call to the general-purpose routine. Exchanging eigenvalues Stewart [256] produced the first program for exchanging eigenvalues in a real Schur form. The method is to iterate QR steps with an exact shift until the process converges. Vol II: Eigensystems

346

CHAPTER 5. KRYLOV SEQUENCE METHODS

The method is stable but can fail to converge when the separation of the eigenvalues in the blocks is poor. This lead to attempts to formulate noniterative algorithms. The algorithm described here is due to Bai and Demmel [11]. It too can fail, but the failures do not seem to occur in practice. It has been implemented in the LAPACK routine
xTREXC.

Forward instability The forward instability of the QR step has been investigated by Parlett and Le [207] for symmetric tridiagonal matrices and by Watkins [289] for Hessenberg matrices. To deal with the problems it poses for the iteratively restarted Arnoldi method, Lehoucq and Sorensen [158] propose a procedure for modifying the Krylov subspace so that it remains orthogonal to the left eigenvector of a converged, unwanted Ritz pair. The Krylov-^Schur method The iteratively restarted Arnoldi procedure has two defects, both resulting from its commitment to maintaining a strict Arnoldi decomposition. First, an unwanted Ritz pair can fail to be purged from the decomposition. Second, it is awkward to deflate converged Ritz pairs. The introduction of general orthonormal Krylov decompositions, due to Stewart [267], solves both these problems by expanding the class of transformations that can be performed on the underlying decomposition. Since the method is centered around a Schur decomposition of the Rayleigh quotient, it is called the Krylov-Schur method. Although the method is new, precursors of various aspects can be found in the literature. In fact, the contraction step of the iteratively restarted Arnoldi method produces an orthonormal Krylov decomposition, which is then truncated to become an Arnoldi decomposition. Regarding the use of Schur vectors, Fokkema, Sleijpen, and van der Vorst [74] explicitly use Schur vectors to restart the Jacobi-Davidson algorithm. Stathopoulos, Saad, and Wu [248] point out that since the unpreconditioned Jacobi-Davidson algorithm is equivalent to the Arnoldi algorithm, Schur vectors can also be used to restart the latter. Lehoucq [personal communication] has written code that uses Schur vectors in deflation. Also see [181]. Closer to home, for symmetric matrices Wu and Simon [306] exhibit what might be called a Lanczos-spectral decomposition, a special case of our Arnoldi-Schur decomposition. What distinguishes the Krylov-Schur approach is the explicit introduction and systematic manipulation of Krylov decompositions to derive and analyze new algorithms. The manipulations are justified by Theorem 1.8, which shows that they can never yield a decomposition that is not based on a Krylov sequence. Stability Theorem 2.5 has not appeared in the literature. But it is easily proved. From the properties of the Gram-Schmidt algorithm with reorthogonalization [51,117] and the general rounding-error analysis of unitary transformations [300, Ch. 3], it is easy to show

SEC. 3. THE LANCZOS ALGORITHM

347

that the residual AU ~ UB w6H of the computed decomposition is of the order of the rounding error, and that the departure of U from orthonormality is of the same order. From this one constructs (7, absorbs its error in the residual, and throws the error back on A as in Theorem 2.8, Chapter 4. Shift-and-invert enhancement and the Rayleigh quotient Nour-Omid, Parlett, Ericsson, and Jensen [184] discuss the effect of accurate shifts on the Rayleigh quotient and conclude that the graded structure of the Rayleigh quotient makes it a nonproblem. Convergence Converge criteria for the Arnoldi processes are discussed in [161]. The analysis of convergence criteria for shift-and-invert enhancement is new. Deflation Deflating converged Ritz values from an Arnoldi decomposition is a complicated affair [158], and it is not clear that the procedure can be extended to arbitrary vectors, such as refined and harmonic Ritz vectors. In fact, this is the problem that lead me to orthonormal Krylov decompositions. The fact that it may be impossible to deflate a group of several individually deflatable eigenvectors appears to be known but has not been analyzed before. The deflation technique for Arnoldi-Schur decompositions is closely related to Saad's method of implicit deflation [233, VI.2.3]. The rational Krylov transformation The rational Krylov method is due to Ruhe [221], who described it for the generalized eigenvalue problem.

3. THE LANCZOS ALGORITHM


We have seen that if A is symmetric and

is an Arnoldi decomposition, then the Rayleigh quotient 1 k is a tndiagonal matrix of the form

Vol II: Eigensystems

348

CHAPTER 5. KRYLOV SEQUENCE METHODS

This implies that the vectors Uk can be generated by a three-term recurrence of the form

where

When we combine this recursion with the Rayleigh-Ritz method, we get the Lanczos method. The purpose of this section is to describe the practical implementations of this method. Mathematically, the Lanczos vectors Uj computed by the Lanczos algorithm must be orthogonal. In practice, however, they can lose orthogonality, and the chief problem in implementing a Lanczos method is to maintain a satisfactory degree of orthogonality among them. There are two solutions. The first is to reorthogonalize the vectors at each step and restart when it becomes impossible to store the Lanczos vectors in main memory. The alternative is to save the Lanczos vectors in a backing store and move them into main memory to reorthogonalize the new Lanczos vectorspresumably only when absolutely necessary. In both cases the result of the orthogonalization is something that is not, strictly speaking, a Lanczos decomposition, since the reorthogonalization causes the Rayleigh quotient to become upper Hessenberg instead of tridiagonal. This fact is one of the main complications in dealing with the Lanczos algorithm in inexact arithmetic. We will begin by describing a general form of the algorithm that encompasses most of the variants that have appeared in the literature. We will then treat the restarted Lanczos algorithm in which orthogonalization is performed at each step. In 3.3 we will consider semiorthogonal algorithms, in which the orthogonality of the Lanczos basis is allowed to deteriorate up to a point, after which orthogonalization is performed. A key to deriving Lanczos-based algorithms is knowing when quantities can be neglected, i.e., when they are of the order of the rounding unit compared with A. To avoid cluttering our expressions with factors of \\A\\, we will assume throughout this sftrtinn that:

However, we reserve the right to insert a factor of \\A\\ in our bounds whenever it seems appropriate. 3.1. REORTHOGONALIZATION AND THE LANCZOS ALGORITHM Lanczos with reorthogonalization In finite precision arithmetic the vectors Uk produced by the Lanczos process will deviate from orthogonality. As in the Arnoldi algorithm, we can reorthogonalize a straying Lanczos vector Uk against its predecessors. There are two problems associated with

SEC. 3. THE LANCZOS ALGORITHM

349

Given a starting vector HI this algorithm computes a sequence of suitably orthogonalized Lanczos vectors.

Algorithm 3.1: Lanczos procedure with orthogonalization

this procedure. First, the preceding vectors must be stored and then brought back into the fast memory of the machine. The actual storing of these vectors is not a problem, since we have to save them anyway to compute Ritz vectors. But if a reorthogonalization is performed at each Lanczos step, the time taken to transfer Lanczos vectors from the backing store will dominate the calculation. To avoid this problem, we can make two compromises. First, we can agree to tolerate a prescribed degree of nonorthogonality so that we do not have to reorthogonalize at every step. Second, we can reorthogonalize Uk only against those vectors to which it is actually nonorthogonal. Algorithm 3.1 sketches a general procedure that encompasses most of the variants of the Lanczos algorithm. The following comments should be read carefully. They are a useful guide to what follows. Although we have written a nonterminating loop, it obviously will have to stop at some pointe.g., to restart or to deflate converged Ritz vectors. Depending on how the decision is made to reorthogonalize and the on details of the reorthogonalization process, this code encompasses five common variants of the Lanczos method. 1. No reorthogonalization: v is accepted as is at each iteration. 2. Full reorthogonalization: v is always reorthogonalized against all its predecessors. VolII: Eigensystems

350

CHAPTER 5. KRYLOV SEQUENCE METHODS


3. Periodic reorthogonalization: v is reorthogonalized against all its predecessors, but only when it fails a test for orthogonality. 4. Partial reorthogonalization: v is reorthogonalized against a subset of its predecessors when it fails a test for orthogonality. 5. Selective reorthogonalization: v is reorthogonalized against a subspace of the span of its predecessors determined by the current Ritz vectors.

In the next two subsections we will treat full and periodic reorthogonalization. For the other procedures see the notes and references. It may happen that /3k becomes so small that it can be neglected. In that case Uk effectively spans an eigenspace of A. If eigenpairs outside this eigenspace are desired, the Krylov sequence must be restarted. In what follows we will tacitly assume that this is done whenever necessary. The loss of orthogonality in the Lanczos procedure is of two types: local and global. Statements 7-8 attempt to enforce local orthogonality of v against Uk and u^-i- It turns out that the vector v in statement 6 can fail to be orthogonal to Uk and Uk-i to working accuracy. The cure is to reorthogonalize, which is done in statements 7-8. Note that the coefficients o^ and (3k-i are not updated during this process. This is because in spite of the fact that reorthogonalization restores orthogonality, it does not affect the coefficients significantly: the loss of orthogonality corresponds to errors in ak and /^-i that are below the rounding threshold. Statements 9-11 attempt to enforce global orthogonalitythat is, the orthogonality of v against Uk-i There are three problems here. The first problem is to determine when global reorthogonalization is needed. We do this by keeping a running estimate of the inner products U^Uk (see Algorithm 3.2). The second problem is how to reorthogonalize. If we are performing full reorthogonalization, we simply have to to reorthogonalize Uk against Uk-i Other variants require that we also reorthogonalize Uk-i against Uk-2- Thus we use the term "reorthogonalize" in statement 10 in a general senseto be specified in the context of the variant in question. The third problem is that reorthogonalization contaminates the Lanczos decomposition. Specifically, the Rayleigh quotient becomes upper Hessenberg, so that instead of a Lanczos decomposition we have the relation where Hk is upper Hessenberg. This is not even an Arnoldi decomposition, since with periodic, partial, and selective reorthogonalization the matrix Uk+i is not required to be orthogonal to working accuracy. Nonetheless, there are effective work-arounds for this problem. See 3.3. It will be useful to fix our nomenclature and notation at this point. The matrix Hk is a Rayleigh quotient in the general sense of Definition 2.7, Chapter 4. To distinguish

SEC. 3. THE LANCZOS ALGORITHM

351

it from the ordinary Rayleigh quotient Tjt we will call it the adjusted Rayleigh quotient. Note that it is truly a Rayleigh quotient in the sense of Definition 2.7, Chapter 4, since if ((V v) T ) is a left inverse of (Uk Wfc+i), then Hk = VTAUk. In what follows the deviation of Hk from the tridiagonal matrix (3.1) generated by Algorithm 3.1 will be of paramount importance. We will denote this deviation by SL. so that

3.2. FULL REORTHOGONALIZATION AND RESTARTING

When the Lanczos algorithm is run in the presence of rounding error with full reorthogonalization the results are stable in the usual sense. This implies that the elements above the superdiagonal in the Rayleigh quotient are negligible and can be ignored. To see this, postmultiply the relation (2.13) in Theorem 2.5 by Uk to get

where Bk is now the matrix Hk in (3.2). Hence Hk is a small perturbation of a symmetric matrix. Since the elements of Hk below the first subdiagonal are zero, the elements above the first superdiagonal must be small. Thus the main difference between the Lanczos algorithm with full orthogonalization and the Arnoldi algorithm is that the Rayleigh quotient for the former is symmetric (to working accuracy). In this subsection we will briefly sketch the resulting simplifications. The reader is assumed to be familiar with the contents of 2. Implicit restarting In its larger details implicitly restarting a Lanczos decomposition is the same as restarting an Arnoldi decomposition (see 2.1). Given the Lanczos decomposition

and mk shifts KI , . . . , Ac m _A:, one applies mk implicit QR steps with shifts t- to give the transformed decomposition

where Q is the matrix of the accumulated QR transformations. If we set

then the restarted decomposition is

VolII: Eigensystems

352

CHAPTER 5. KRYLOV SEQUENCE METHODS

The major difference between implicit restarts for the Lanczos and the Arnoldi decompositions is that implicit symmetric tridiagonal QR steps are used in the former (see Algorithm 1.3, Chapter 3). For large n this makes no difference in efficiency. Both general and exact shifts can be used in restarting the Lanczos algorithm. But because the spectrum of A is real, one can be more sophisticated about choosing filter polynomials than with the Arnoldi method. For more see the notes and references. Krylov-spectral restarting The comments on the forward instability of the QR algorithm for Hessenberg matrices (p. 325) apply to the tridiagonal Rayleigh quotient of the Lanczos algorithm. Consequently, when exact shifts are to be used in restarting, it will pay to use the analogue of the Krylov-Schur method. Since the Schur decomposition of a symmetric matrix is its spectral decomposition, we will call this analogue the Krylov-spectral method. The chief difference between the Krylov-Schur and the Krylov-spectral methods is in the treatment of the Rayleigh quotient. The reduction to diagonal form is done by the symmetric tridiagonal QR algorithm. Since the Rayleigh quotient is diagonal, eigenvalues can be moved around by simple permutationsi.e., there is no need for special routines to exchange eigenvalues or eigenblocks. Convergence and deflation If

is the current Krylov-spectral decomposition, then the primitive Ritz vectors are the unit vectors e; (i = 1,... , m). Consequently the residual norm for the ith Ritz vector is the magnitude of the ith component /% of 6. This number can be used as in 2.3 to determine the convergence of the ith Ritz pair. If this pair is moved to the beginning of the Rayleigh quotient, its component in 6 follows it. Consequently, if this component satisfies the criterion for deflation, it can be set to zero and the decomposition deflated. A particularly satisfying aspect of the Krylov-spectral decomposition is that the deflation of Ritz pairs is uncoupled. The fact that one Ritz pair has been deflated does not affect the later deflation of other Ritz pairs. Contrast this with the discussion on page 339.

3.3. SEMIORTHOGONAL METHODS


We turn now to methods that allow the orthogonality of the Lanczos method to deteriorate. We cannot, of course, allow orthogonality to be completely lost. However, if we suitably restrict the loss we can compute accurate Ritz values and partially accurate Ritz vectors. A method that performs reorthogonalization only when there is danger of the loss becoming too great is called a semiorthogonal method. The first half of this subsection is devoted to the definition and consequences of semiorthogonality. The second shows how to maintain semiorthogonality by timely reorthogonalizations.

SEC. 3. THE LANCZOS ALGORITHM


Semiorthogonal bases We begin with a definition.

353

Definition 3.1. Let U eRnxh have columns of 2-norm one, and let C = UTU. Then
U is SEMIORTHOGONAL if

Three comments on this definition. Since the diagonal elements of C are one, the definition says that U is semiorthogonal if the elements of / C are within roughly the square root of the rounding unit. Specifically, from the elementary properties of the 2-norm, we have

If 11/ - C\\2 were of the order of the rounding unit, we would say that U is orthogonal to working accuracy. Thus semiorthogonality requires orthogonality to only half working accuracy. Our definition of semiorthogonality is meant to be applied to the bases generated by Algorithm 3.1. Owing to rounding error, the members of these bases will not have norm exactly one. However, because they are normalized explicitly (statements 12 and 13), they will be normal to working accuracy. Since this small deviation from normality makes no difference in what follows, we will tacitly assume that all our bases are normalized. Choosing 7max to be about the square root of the rounding unit has the convenience that certain quantities in the Lanczos process will have negligible errors on the order of the rounding unit. However, there is nothing to keep us from using a larger value of Tmax saYto reduce the number of reorthogonalizations. The price we pay is that the errors that were formerly at the level of the rounding unit are now of the order 7max and this number, not the rounding unit, will limit the attainable accuracy of our results. The QR factorization of a semiorthogonal basis Let U be semiorthogonal and let

be the QR factorization U. Then

If we write R = I+ W, where W is strictly upper triangular, then

Vol II: Eigensystems

354

CHAPTER 5. KRYLOV SEQUENCE METHODS

where the approximation on the right is to working accuracy. It follows that up to terms of 0(6 M ) the matrix W is the strictly upper triangular part of C and hence that

In particular

We will use these facts in the sequel. The size of the reorthogonalization coefficients We have observed [see (3.2)] that reorthogonalization in the Lanczos algorithm introduces elements in the upper triangular part of the Rayleigh quotient, destroying its tridiagonal structure. For full reorthogonalization, these elements are insignificant and can be ignored. We will now show that if our basis is semiorthogonal, these elements may be too large to ignore. Let us suppose that we must reorthogonalize at step k. Let Pk^k+i Auk akUk fik-\uk-\ be the relation obtained after the Lanczos step but before the reorthogonalization. Let Uk be semiorthogonal and let Uk = QRbe its QR factorization. Let

where qlZ(Q) and q_i_'R(Q)'L have norm one. Then the vector d of reorthogonalization coefficients is

Since \\QTq\\2 = 1 and RT /, we have

To get some notion of what this approximation means, note that 7 is the norm or the projection of Uk+i onto the column space of Uk and hence measures how w^+i deviates from orthogonality to 7(/&). Now 7 must be larger than 7max> smce a loss of semiorthogonality is just what triggers a reorthogonalization. In the Lanczos process it is rare to encounter an extremely small /?. Consequently, we can expect the elements of d to be on the order of ^/CM . Since the elements of the difference Sk of the adjusted Rayleigh quotient Hk and Tk depend on the components of d [see (3.19)] we can expect it to be of the same order of magnitude.

SEC. 3. THE LANCZOS ALGORITHM


The effects on the Rayleigh quotient

355

We have observed [see (3.2)] that the Rayleigh quotient Hk = Tk + Sk is not the same as the tridiagonal matrix Tk computed by Algorithm 3.1. Nonetheless, it can be used to compute accurate Ritz values, as the following remarkable theorem shows. Its proof is beyond the scope of this volume. Theorem 3.2. Let

be the decomposition computed by Algorithm 3.1 and assume that Uk is semiorthogonal. Let Uk QkRk be the QR factorization ofUk- Then

The theorem says that up to rounding error, Tk is a Rayleigh quotient associated with the space spanned by Uk- Thus we can expect the Ritz values from Tk to be as accurate as those we would obtain by full reorthogonalization. The effects on the Ritz vectors Although the effects of semiorthogonality on the Rayleigh quotient and its Ritz values are benign, they have the potential to alter the corresponding Ritz vectors. The problem is that although a primitive Ritz vector w will be accurately determined by Tk (provided it is well conditioned) we cannot compute the corresponding Ritz vector QkW. Instead we must compute the vector UkW. Since

by (3.5) we have

At first glance this result appears to be discouraging, since it says that the errors in the Ritz vector can be as large as y^. However, there are mitigating factors. Although w has 2-norm one, its elements decrease as the vector converges, so that most of its elements are much less than one. Moreover, only some of the elements ofR-I are of order y^. Thus the product of (R I)w may be considerably less than y7^. Perhaps more important is the effect of semiorthogonality on the residual norms, since it is these numbers that we use to decide on convergence. Now if (//, w) is a primitive Ritz pair, we see from (3.7) that

Vol II: Eigensystems

356

CHAPTER 5. KRYLOV SEQUENCE METHODS

Since Uk+i is semiorthogonal, it has a QR factorization QR with R = I. Hence the residual norm is

Thus the semilarge values in 5^ can inflate the residual norm. However, since it is the product SkW that determines the the inflation, the comments about eigenvectors apply here also. The residual does not have to stagnate once it reaches -)/M. Be that as it may, the above analysis shows clearly that we cannot rely on the usual estimate \ftk^k\ to decide on convergence, since it may be smaller than the right-hand side of (3.8). Instead one must carry along the matrix Sk and use it in computing residual norms. Another advantage of saving this matrix is that if a particular Ritz pair stops converging, we can use the inverse power method on Hk = Tk + Sk to correct the vector. Such a process is cheap, since Hk is tridiagonal with a few spikes above the diagonal in the columns corresponding to reorthogonalization steps. Although it is not expensive to compute and store Sk (or equivalently Hk), the formulas for the columns of Sk are not easy to derive. For the sake of continuity, we will leave this derivation to the end of the section and assume that Sk is available whenever we need it. Estimating the loss of orthogonality Algorithms based on semiorthogonality allow the orthogonality to deteriorate until a vector Uf.+i violates one of the semiorthogonality conditions at which point Uk+i is reorthogonalized. Unfortunately, it is almost as expensive to compute the inner products ujuk+i as to perform a full reorthogonalization. We will now show how to estimate the loss of orthogonality as the Lanczos algorithm progresses. Let Uk be the Lanczos basis computed by Algorithm 3.1 and let

Then the size of the off-diagonal elements of Ck, which are the inner products 7^ = ujuj, measure the departure from orthogonality of i/,- and HJ. It turns out that we can use the relation (3.7) to derive a recurrence for the 7^-. Suppose that we have computed Ck and we want to compute Ck+i Write the jth column of (3.7) in the form

where hj is a quantity of order || A||eM that accounts for the effects of rounding error in the relation. Also write

SEC. 3. THE LANCZOS ALGORITHM

357

Given the output of Algorithm 3.1, this algorithm computes estimates of the inner products 7fc+i,j = u+lv,j. It requires an estimate a of \\A\\2.

Algorithm 3.2: Estimation of uT , u k+l"J Multiplying (3.9) by u^ and (3.10) by uj, subtracting, and simplifying, we obtain

Letting j = 2,... , k2 we can compute all but the first and last elements of row k+l of Ck- The first element can be computed by leaving out the term /^-^j-i in (3.11). Because we maintain local orthogonality, the quantity 7^+1,* = uk+i uk IS n the order of the rounding unit. Unfortunately, the quantities qjhj and q^hk are unknown. However, experience indicates that \\ht\\2 < \\A\\2M. Consequently, we can replace qjhj and q^hj, with aeM, where a is a suitable estimate of ||-A||2- We adjust the sign of this replacement so that it always increases 7^+1,j- The quantities u^UjSj and uJUkSk are in principle computable. But because we are maintaining semiorthogonality, they are also on the order of aeM. Consequently, we can absorb them into the corrections for qjhj and q^hk. Algorithm 3.2 implements this scheme. Two comments.
rp

By taking absolute values in (3.11) we could obtain upper bounds on the loss of orthogonality. But these bounds grow too quickly to be useful: they will trigger reorthogonalizations before they are needed. What we need are estimates of the 7,^ themselves. In exact arithmetic with accurate values of qjhk, qhj, u];UkSj, and Vol H: Eigensystems

358

CHAPTER 5. KRYLOV SEQUENCE METHODS

uJUkSk, the 7;j would be exact. The substitution of upper bounds on these quantities turns the 7^ into an estimate, driven upward by the choice of sign of r. Nonetheless, experiments show that the 7^ calculated by this algorithm track the true values rather well. The reason seems to be that as the loss of orthogonality grows, the terms of order aM has little effect on the recursion. In the basic recurrence, the row k+l of C depends only on rows kth and k1. Moreover, we only need the row k+lto decide when to reorthogonalize uk+i. Consequently, at any time we need only store two rowsthe current row and the preceding row. In Algorithm 3.1 we do not test the vector Uk+i but its unnormalized counterpart v. This means we must replace j3k in the algorithm by \\v\\2. Periodic reorthogonalization The ability to estimate the deviation of the Lanczos vectors from orthogonality enables us to be precise about the test in statement 9 in Algorithm 3.1. Specifically, if for some j the estimate jk+i,j has a value greater than 7max, we must perform a reorthogonalization step. Because we have allowed our basis to deteriorate, the process is more complicated than a full reorthogonalization step. There are three differences. 1. We must reorthogonalize both uk and v against Uk-i 2. We must reorthogonalize v against Uk3. We may have to repeat the orthogonalization of v against Uk We will treat these items in turn. The fact that we have to reorthogonalize both Uk and v follows from the three-term recurrence

If either Uk or Uk+i fails to be orthogonal to Uk-i, the lack of orthogonality will propagate to tifc+2 and hence to the subsequent Lanczos vectors. This problem is also reflected by the presence of jk,j-i in the recursion (3.11) for the orthogonality estimates. The process of reorthogonalizing v and Uk against t^-i may affect the orthogonality of these two vectors. Hence the lost orthogonality must be restored. The fact that we may have to repeat the reorthogonalization of v is a consequence of the fact that we are using a semiorthogonal basis to perform the reorthogonalization. To see what is going on, let Uk = QR be the QR factorization of Uk Recall that we can write R = I+W, where to working accuracy W is the strictly upper triangular part of Ck = U^Uk [see (3.4)]. Suppose we are trying to orthogonalize a vector of the form u = iq + rqt, where qn(Uk),qL 1l(Uk}L, and \\u\\2 - \\q\\2 = \\q.\\2 = 1The orthogonalized vector is u = (I UU^)u. Hence the norm of the component of

SEC. 3. THE LANCZOS ALGORITHM u lying in 7l(Uk) is the norm of

359

Now ||QTw||2 is the size of the component of it in TZ(Uk)i and (7! is the size of the corresponding component of u. It follows that the reorthogonalization step will tend to reduce the component by a factor of ^/e^. But we only perform a reorthogonalization if 7 is near y^ or larger. Thus, it is possible for one reorthogonalization to fail to purge the components along H(Uk)- This is not a problem for Uk, since in this case by semiorthogonality 7 is well below y^. But since v is not semiorthogonal, it may require another orthogonalization. It is worth noting that although we perform reorthogonalizations in the Arnoldi method, our reasons for doing so are different. In the Arnoldi method, where the vectors are orthogonal to working accuracy, the danger is that cancellation will magnify otherwise negligible rounding errors, and the cure is to repeat the orthogonalization. In the semiorthogonal Lanczos method, the basis vectors are not orthogonal, and, as the above analysis shows, they have a limited capacity to reduce unwanted componentseven when there is no rounding error involved. When should we reorthogonalize? The size of the component of v in 1^(11k) is T ||<2 -y||2. Hence if ||QT^||2 > y^, the first reorthogonalization step may have failed to eliminate the component. Now the vector v of reorthogonalization coefficients is x = U^v RQTUk+i, and since R is near the identity matrix, we have ||ar||2 = ||QTv||. Thus we can use x/||?;||2 to decide whether to reorthogonalize again. Reorthogonalization also solves the problem of how to restart the recursion for the jij. Since reorthogonalization leaves us with a Uk and Uk+i that are orthogonal to the columns of Uk-i to working accuracy, after the process the elements 7^ and 7jt+i,j should be some multiple of the rounding unit say -\/nM. Algorithms 3.3 and 3.4 pull things together. Owing to limitations of the page size, we have been forced to separate the outer Lanczos loop from the reorthogonalization. But they are essentially one algorithm. Here are some comments. The reorthogonalization, which is done by the modified Gram-Schmidt algorithm, assumes that the previous Lanczos vectors are available. The details will depend on the size of the problem and the choice of backing store. Note that the algorithm does not renormalize Uk. The reason is that the reorthogonalization does not significantly change its norm. To see this, let [in the notation of VolII: Eigensystems

360

CHAPTER 5. KRYLOV SEQUENCE METHODS

This algorithm performs Lanczos steps with periodic reorthogonalization. It is assumed the last two rows of the matrix Ck estimating U^+1 Uk+i are available. The reorthogonalization is done in Algorithm 3.4. The algorithm also updates the Rayleigh quotient Hk = Tk + Sk [see (3.7)1.

Algorithm 3.3: Periodic orthogonalization I: Outer loop o

SEC. 3. THELANCZOS ALGORITHM

361

This algorithm replaces statements 12-14 in Algorithm 3.3

Algorithm 3.4: Periodic reorthogonalization II: Orthogonalization step o

Vol II: Eigensystems

362

CHAPTER 5. KRYLOV SEQUENCE METHODS

(3.12)] Uk = 7#-f T<7j_. Since \\Uk\\2 = 1, we have 72 + r2 = 1. By semiorthogonality, 72 < M. Hence r = 1 to working accuracy. Since the reorthogonalized vector is rg_L, it has norm one to working accuracy. We have chosen to compute the Rayleigh quotient Hk instead of Sk- Since by definition Sk = Hk Tk, we can obtain Sk by subtracting the a; and /?,- from the diagonal and the super- and subdiagonals of Hk Since reorthogonalization is an exceptional event, most columns of Hk will be zero above the first superdiagonal. Instead of allocating storage to retain the zero elements, one can store only the nonzero elements in a packed data structure. It is not at all clear that this is worthwhile, since the storage is no more than that required for a set of primitive Ritz vectors, which must be computed to test for convergence. Updating Hk We must now derive the formulas for updating Hk after a reorthogonalization. Before the reorthogonalization we have the relation

which holds to working accuracy. The results of the reorthogonalization replace Uk with

and v with

Solving (3.14) and (3.15) for Uk and v and substituting the results in (3.13), we get

Also

If we substitute (3.17) and (3.18) into (3.16) and define Hk by

SEC. 3. THE LANCZOS ALGORITHM


then it is straightforward to verify that

363

which is a Krylov decomposition involving the new vectors iik and v. These adjustments have been implemented in statements 21-23 of Algorithm 3.4. Computing residual norms A knowledge of Hk makes the computation of residual norms easy. Specifically, suppose that (/z, Ukw) is an approximate eigenpair in the space spanned by Uk- We make no assumptions about how this pair was obtainedin most cases (ju, w) will be an eigenpair of Tk, but the following analysis does not require it. From the relation we have thai where It follows that the residual norm p = \\AUkW ^UkW\\2 satisfies

where bv semiorthoeonalitv Thus

estimates p to at least half the number of significant figures carried in the calculation. Thus a knowledge of the adjusted Rayleigh quotient enables us to compute residual norms without having to multiply by A. If we do not require very accurate eigenvectors, we can avoid accumulating H^. Specifically, the corrections in (3.19) consist of coefficients from the reorthogonalization step, which by semiorthogonality are bounded by 0(^l/^). Hence the difference between the adjusted Rayleigh quotient Hk and theLanczos matrix T* is also 0( y^). Consequently, until the residual falls below y7^, it does not matter if we use Tk or Hk to estimate its norm. But for smaller residuals, we should use Hk. Vol II: Eigensystems

364
An example

CHAPTER 5. KRYLOV SEQUENCE METHODS

We conclude this subsection with an example that illustrates the behavior of periodic reorthogonalization in the Lanczos algorithm. Example 33. In this example A is a diagonal matrix of order n = 500 whose first eigenvalue \\ = 1 and whose other eigenvalues are given by the recurrence

The periodically reorthogonalized Lanczos algorithm was run on this matrix with a random starting vector and 7max = -^/W~l6/n. Orthogonalizations took place for k = 11,17,22,28,33,38. Various statistics are summarized in the following table, in which we are concerned with the approximate eigenpairs (/4 , Ukw^ '), where the pair (^5 , Wg ') is the fifth eigenpairofthe Lanczos matrix Tk.

k 10 20 30 40

cl 3.9e-15 5.3e-15 6.5e-15 7.0e-15

c2 3.9e-15 3.9e-15 3.9e-15 3.9e-15

c3 1.9e-02 2.5e-07 2.8e-16 8.9e-19

c4 1.9e-02 2.5e-07 1.4e-12 1.4e-12

c5 1.9e-02 2.5e-07 1.4e-12 1.4e-12

The columns of the table contain the following quantities. cl: ||Tjb - QTAQ\\2, where Q is the Q-factor of Uk. c2: The global residual norm

c3: The classical estimate \(3kew$ '\ for the residual norm. c4: The true residual norm. c5: The residual norm estimated by (3.20). The numbers in the first column illustrate the results of Theorem 3.2. The tridiagonalLanczos matrix Tk is to working accuracy the Rayleigh quotient formed from the Q-factor ofUk. This means that in spite of the contamination ofTk by the reorthogonalization process, its eigenvalues converge to eigenvalues of A. The second column shows that the corrections in Algorithm 3.4 produce a Krylov decomposition whose residual is of the order of the rounding unit. The third and fourth columns show that the classic estimate for the residual norm deviates from the true residual norm. In particular the latter stagnates at about 10~~12, whereas the former continues to decrease. But the two values diverge only after the true residual norm falls below y^, as noted above. The fifth column shows that the approximate residual norm (3.20) is a reliable estimate of the residual norm.

SEC. 3. THELANCZOS ALGORITHM

365

Perhaps the most important point of this example is that Ritz vectors computed from the matrix T^ can fail to converge. When this happens, there is no cure except to compute Ritz vectors from the adjusted Rayleigh quotient Hk- Fortunately, the simple form of Hk makes it easy to apply a step of the inverse power method to the eigenvectors of Tk to obtain the primitive Ritz vectors of Hk.

3.4. NOTES AND REFERENCES The Lanczos algorithm


As was noted in 3.4, Chapter 4, Lanczos knew that his method was in some sense iterative, since his vectors could be combined to produce good approximations to eigenvectors before the algorithm ran to completion. But for some time the method was chiefly regarded as an exact method for tridiagonalizing a symmetric matrix. For example, it is so viewed in an early paper of Wilkinson [296,1959], which, incidentally, was the first to come to grips with the need for reorthogonalization. The acceptance of the Lanczos method as an iterative method is due to Kaniel [145, 1966] and especially Paige, who in his thesis [196,1971] and other papers [195, 197, 198, 199] laid the foundation for much of the work that was to follow. Full reorthogonalization The need for full reorthogonalization has been generally cited as a defect of the Lanczos method, and a good deal of research has been devoted to finding a way around this problem. Only when Sorensen showed how to restart the Arnoldi process (see 2) did the fully reorthogonalized method become a reasonable option. For an error analysis of full reorthogonalization, see [195]. Krylov-spectral restarting follows from our general treatment of Krylov decompositions. However, Wu and Simon [306] introduce it impromptu under the name of thick restarting. Filter polynomials For Arnoldi's method exact shifts are generally used in restarting because the alternatives are cumbersome. In the Lanczos method, where the eigenvalues in question lie on the real line, inexact shifts are a real possibility. For example, one could use the zeros of a Chebyshev polynomial to suppress the spectrum on a given interval. Another possibility is to use Leja points or their approximations. For more on this topic, see [6] and [7]. Semiorthogonal methods The semiorthogonal variants of Lanczos's algorithm all appeared between 1979 and 1984. Selective reorthogonalization is due to Parlett and Scott [209]; periodic reorthogonalization to Grcar [97]; and partial reorthogonalization to Simon [238]. Special mention must be made of an elegant paper by Simon [237], which unifies these methods. Vol II: Eigensystems

366

CHAPTER 5. KRYLOV SEQUENCE METHODS

Periodic reorthogonalization is the most straightforward of the methods. Theorem 3.2 is due to Simon [237], who shows that it applies to any basis generated by a semiorthogonal method. The recurrence (3.11) is implicit in Paige's thesis [196]; however, its explicit formulation and computational use are due to Simon [237, 238], who also gives empirical grounds for believing that the quantities calculated in Algorithm 3.2 actually track the loss of orthogonality. For another recurrence see [143]. The fact that semiorthogonality can cause the convergence of Ritz vectors to stagnate does not appear to have been noticed before (although in the context of linear systems the possible untoward effects are hinted at in [237] and [205]). The formulas (3.19) are new. A package LANSO implementing periodic reorthogonalization is available from Netlib. Partial reorthogonalization is based on the observation that one only needs to reorthogonalize v against those vectors U{ for which the bounds computed by Algorithm 3.2 are above 7max- Although the idea is simple, the implementation is complicated, and the reader is referred to the treatment of Simon [238], A package LANZ implementing partial reorthogonalization is available from Netlib. Selective reorthogonalization is based on a celebrated result of Paige [196]. Let zj (j = 1,... , k) be the Ritz vectors computed at step k of the Lanczos process and let Wj be the corresponding primitive Ritz vectors. Then there are constants 7^ of order of the rounding unit such that

Now by (3.20), \(3k^Wj \ is the residual norm for the Ritz vector [remember that for Ritz vectors r in (3.20) is zero]. It follows that Uk+i can have large components in 11(1}k) along only Ritz vectors that have almost converged. Broadly speaking, selective reorthogonalization consists of saving converged and nearly converged Ritz vectors and orthogonalizing the Lanczos vectors against them. But as is usual with Lanczos methods, the devil is in the details, and the reader should look for his presence in the above references. No reorthogonalization It is possible to use the Lanczos algorithm to good effect with no reorthogonalization. What happens is that after a loss of orthogonality previously converged Ritz values may reappear and spurious Ritz values may be generated. Cullum and Willoughby [46,48] have shown how to detect the spurious Ritz values. A package LANCZOS is available from Netlib. The singular value decomposition The singular values and vectors (0-;, u^ Vi) of a matrix X can be calculated by applying the Lanczos algorithm to the cross-product matrix X^X. This works well for the dominant singular values, but as the analysis in 3.2, Chapter 3, shows it may fail to

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

367

give sufficiently accurate results for the smaller singular values and their vectors. An alternative is to apply the method to the matrix

whose eigenpairs are

However, convergence to the smaller eigenvalues can be expected to be slow, since they are interior eigenvalues. For more see [21, 47, 89]. Software is available in SVDPACK at Netlib. Block Lanczos algorithms In 3.3, Chapter 4, we pointed out that a Krylov sequence cannot see more than one copy of a multiple eigenvalue and indicated that one way around the problem is to work with block Krylov sequences. It turns out that if one orthogonalizes a block Krylov sequence one gets a block tridiagonal Rayleigh quotient. The resulting generalization of the Lanczos algorithm is called a block Lanczos algorithm. Such algorithms have been proposed by Cullum and Donath [45], Golub and Underwood [92,280], and Ruhe [219]. For the use of shift-and-invert enhancement in a block Lanczos algorithm see the paper of Grimes, Lewis, and Simon [98], which is particularly strong on implementation issues. The bi-Lanczos algorithm The original Lanczos algorithm [ 157] was actually a method for general non-Hermitian matrices. The idea was to generate two Krylov sequences, one in A and the other in A1. If we denote bases for these sequences by Uk and Vk and require that they be biorthognal in the sense that V^Uk = /, then the Rayleigh quotient Tk = VJ^AVk is tridiagonal, and it follows that the columns of Uk and 14 satisfy three-term recurrence relations. When A is symmetric and u\ v\, this reduces to the usual Lanczos method. Gutknecht [103,104] gives a full treatment of the theory of the bi-Lanczos method. The method shares with the Lanzcos method the problem of loss of orthogonality (or, strictly speaking, biorthogonality). But it can fail in other, more serious ways. The cure is a look-ahead Lanczos recurrence, proposed by Parlett, Taylor, and Liu [210], that gets around the failure by allowing the Rayleigh quotient to deviate locally from tridiagonality. For more see [79, 105, 275].

4. THE GENERALIZED EIGENVALUE PROBLEM


In this section we will consider the use of Krylov methods to solve the generalized eigenvalue problem Ax = \Bx. The basic idea is to transform the generalized eiVol II: Eigensystems

368

CHAPTER 5. KRYLOV SEQUENCE METHODS

genvalue problem into an ordinary eigenvalue problem and then apply some variant of the Arnoldi or Lanczos method. An important issue here is the nature of the transformation. A second issue is how to determine convergence, since the usual residual criterion concerns the transformed problem, not the original. In 4.1 we will discuss these issues. In many applications the matrix B is positive definite. In 4.2 we will show how we can replace orthogonality in the Arnoldi and Lanczos algorithms with B -orthogonality to obtain new algorithms that are specially tailored to this form of the generalized eigenproblem.

4.1. TRANSFORMATION AND CONVERGENCE Transformation to an ordinary eigenproblem


The first step in applying Krylov sequence methods to a generalized eigenproblem Ax = \Bx is to find an equivalent eigenproblem Cx fix with the same right eigenvectors. Unfortunately, all transformations require that a linear system be solved to compute the products Cu required by Krylov methods. For example, if B is nonsingular we can take C = B~1A. The products = Cu can then be computed as follows.

To solve the linear system, we need to factor a matrixB in the above example. (The alternative is to use an iterative method; but that is another story.) When the matrix in question is easy to factor, this presents no problems. But when factorizations are expensive, we need to make each one count. As it turns out, if we define C properly, we can transform to an ordinary eigenproblem and get the benefits of shift-and-invert enhancement for the cost of a single factorization. To see how this is done let K be a shift, and write the problem in the form

Then

Hence if we set

then

Because the transformation from A to /x is the same as for the ordinary shift-and-invert method, we will call C the generalized shift-and-invert transform.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

369

The eigenvalues of the pencil (A, B) that are near K become large, so that they will tend to be found first by Krylov methods. If the matrix A KB can be factored, the product v = Cu can be efficiently computed by the following algorithm.

Thus the generalized shift-and-invert transformation requires only a single factorization. Residuals and backward error We turn now to the problem of convergence criteria. We will proceed in two stages. First we will establish a backward perturbation theorem for the generalized eigenproblem Ax = \Bx in terms of residual r = Ax - XBx. We will then show how to use the residual Cx Xx to bound the norm of r. The backward error theorem is an analogue of Theorem 1.3, Chapter 2. Theorem 4.1. Let (X,x)bean approximate eigenpair of the pencil A - XB and let Let || II denote the Frobemus or 2-norm, and let

where

Then

and
Proof. Direct verification. The bounds are optimal in the sense that there are no matrices E and F satisfying for which

where at least one of the inequalities is strict. Since the residual is in general computable, we can use this theorem to determine convergence. Namely, stop when the backward error is sufficiently smallsay some multiple of the rounding unit. For more on the use of backward error to determine convergence, see the comments following Theorem 1.3, Chapter 2. Vol II: Eigensystems

370
Bounding the residual

CHAPTER 5. KRYLOV SEQUENCE METHODS

When we use, say, the Arnold! method with a generalized shift-and-in vert transformation C = (A - K,B)~1B, the residuals we calculate are of the form s = Cx - fix. What we really want is a bound on the norm of the residual r = Ax - XBx, where fj, = (X )-1. To get such a bound multiply s by A KB to get

Dividing by /z, and simplifying, we get

Hence

It follows from Theorem 4.1 that (A, x) is anexacteigenpairof pair(A, B), where the normwise relative error in A and B is bounded bv

Consequently, if p is less than some tolerance, we can declare the pair (A, ar) converged. This criterion has the drawback that we need to know the norms of A and B, which may not be available. However, in practice we will be looking for eigenvalues near the shift*. Hence, we will have \\A\\ + \K\\\B\\ = \\A\\ + |A|||5||. Consequently, we may take

as an approximate bound on the backward error.

4.2. POSITIVE DEFINITE B


A difficulty with applying the generalized shift-and-invert transformation to the S/PD pencil (A, B) is that the matrix C = (A K,B)~1B is no longer symmetric and it appears we are forced to use the Arnoldi method rather than the more efficient Lanczos method to solve it. We could, of course, compute a Cholesky factorization R^R of B and apply the Lanczos algorithm to the symmetric matrix R(A - KB)~1R^, which is similar to C. Unfortunately, this procedure requires two factorizationsone of B and the other of A K,B. Fortunately, we can restore symmetry of a sort by working with a different inner product generated by B. We will begin with a brief treatment of the B innerproduct. We will then introduce the Arnoldi and Lanczos algorithms with respect to the B inner product. Finally, we will indicate some of the things that can happen when B is singular or ill conditioned.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


The B inner product We begin with some definitions.

371

Definition 4.2. Let B be a positive definite matrix. Then the B INNER PRODUCT is defined hv

The 5-NORM is

A matrix C is ^-SYMMETRIC if for all x and y,

Here are three comments on this definition. The reader should prove that the B inner product is actually an innerproducti.e., that it is a symmetric, definite, bilinear functionand that the -B-norm is actually a norm. The latter proof is essentially the same as for the 2-norm and proceeds via the
R-f'aiir'l'iv inrniiialitv

There is a curious inversion of the order of x and y as one passes from the left- to the right-hand side of (4.2). This makes no difference when we are working over the field of real numbers. In the complex case, however, the order matters. Specifically, if we define

then(/iz,2/).B = n(xjy)Bynd(xjfj,y)B ^(#,#)B, which is how functional analysts expect their inner products to behave. The alternate definition(x, y)s = x^By would give (//or, y)s fi(x, y]B-> which is not standard. It is easily verified that:

The matrix C is B symmetric if and only ifBC is symmetric.


In particular, if A is symmetric, then the generalized shift-and-invert transform (A K.B)~1B is B-symmetric.

VolII: Eigensystems

372
Orthogonality

CHAPTER 5. KRYLOV SEQUENCE METHODS

It is natural to say that two vectors u and v are B-orthogonal if (w, V)B = 0. All of the usual properties and algorithms associated with orthogonality carry over to Borthogonality. We will say that U is B-orthonormal if U^BU I. If U is square it is Borthozonal. The following easily proved result will be important later.

Thus postmultiplication by an orthogonal matrix (but not a ^-orthogonal matrix) preserves 5-orthonormality. B-Orthogonalization In what follows we will need to J9-orthogonalize a vector v against a set u\,... , Uk of j5-orthonormal vectors. This can be done by a variant of the Gram-Schmidt algorithm in which the B inner product replaces the ordinary inner product. However, notice that the the notation (z, y)s conceals a multiplication of a vector by B. Unless we are careful, we can perform unnecessary multiplications. To see this, consider the following B variant of the modified Gram-Schmidt algorithm.
1. 2. 3. 4. for j 1 to k hj = (ujJv)B v = v hj*Uj end for j

When we recast this algorithm in matrix terms we get the following.


1. 2. 3. 4. 5. for j = 1 to k Wj = B*UJ hjj wj*v j v v hj*Uj end for j

This program requires k multiplications by B. On the other hand, consider the B variant of the classical Gram-Schmidt algorithm. 1. forj = 1 to k 2. hJ = (uj,v)B 3. end for j 4. for j = 1 to k 5. v = v hj*Uj 6. end for j

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


In matrix terms this algorithm becomes

373

This version requires only one multiplication by B. In large problems multiplications by B may dominate the computation. Hence it is desirable to use the classical Gram-Schmidt algorithm whenever possible. Now it is well known that the modified Gram-Schmidt algorithm is numerically superior to the classical Gram-Schmidt algorithm. There are two ways around this difficulty.

The B-Arnoldi method The J?-Arnoldi method generates an Arnoldi decomposition of the form

where C is the generalized shift-and-invert transform and Uk is #-orthonormal. The procedure amounts to substituting f?-orthogonalizationfor ordinary orthogonalization. Here are some details. Orthogonalization. Because reorthogonalization is always used in the Arnoldi process, we can use the classical Gram-Schmidt algorithm, as suggested in (4.5), to save multiplications by B. Ritz pairs and convergence. Ritz pairs may be computed from the Rayleigh quotient Hk = U^BCUk- Specifically, if Cz = vz, where z = UkW, then from (4.6)

where u?k is the last component of w. It follows on premultiplication by U^B that EkM = isw, so that we can find the primitive Ritz vector v as an eigenvector of HkOn the other hand, if Hw = vw> then with z Uw, we have from (4.6)

Vol Hi Eigensystems

374

CHAPTER 5. KRYLOV SEQUENCE METHODS

Hence the residual 2-norm of the Ritz pair (*/, Ukw] is

Thus, as usual, we can determine convergence of Ritz pairs directly from the decomposition and the primitive Ritz vector without having to compute the residual vector. Note that (4.7) contains || wjt+i ||2- In the ordinary Arnoldi method, this quantity is one. In the .#-Arnoldi method, however, ||WAT+I||B is one, and ||wjt+i||2 will generally be different from one. Restarting. Let Q be orthogonal. By (4.3), we can transform the J?-Arnoldi decomposition CU = UH - 0ueT to

while preserving the 5-orthonormality of UQ. (In our terminology the transformed decomposition is a #-orthonormal Krylov decomposition.) Thus we are free to perform orthogonal similarities on the Rayleigh quotient H^. This means that both implicit and Krylov-Schur restarting can be applied to the B-Arnoldi method without change. Deflation. Deflation is somewhat more complicated than restarting. To see what is involved, suppose we have transformed our decomposition into the form

Then we can deflate the pair (*/, u\) by setting #21 and 7^+1,1 to zero. The error introduced into the decomposition by this deflation is

The problem is that we must estimate ||(/2 Wjt+i)||2, which is a rather large matrix. However, in the restarted Arnoldi method this matrix will be in main memory and we can use the bound

to compute a cheap bound. It should be noted that when we are deflating Ritz values the vector #21 is zero, so that all we need to calculate is ||Uk+i \\2> To summarize, the J?-Arnoldi method for the generalized eigenproblem with shiftand-invert enhancement is essentially a minor modification of the standard Arnoldi method, the main difference being the need to compute the matrix-vector products of the form Bv.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM


The restarted 5-Lanczos method

375

We have already noted that if A is symmetric then C = (AKB) ~ 1 B is B-symmetric; i.e., BC is symmetric. It follows that the Rayleigh quotient H = U^BCU is symmetric; and since H is Hessenberg, it must be tridiagonal. Thus the 5-Arnoldi method becomes a 5-Lanczos method. Just as the restarted B-Arnoldi method is a slightly modified version of the usual restarted Arnoldi method, so the restarted J9-Lanczos method is a modification of the ordinary restarted Lanczos method (see 3.2). The B -Lanczos method with periodic reorthogonalization In 3.3 we described the Lanczos method with periodic reorthogonalization. Once again the B version of the method can be obtained by obvious modifications of the original method. The estimates of the deterioration of orthogonality in Algorithm 3.2 are unchanged, although they now estimate deviation from B -orthogonality. When it is necessary to reorthogonalize, the columns of Uk must be brought in from backing store in blocks that fit in main memory. Thus we cannot implement the classical Gram-Schmidt algorithm in the B -inner product; the best we can hope for is a block modified Gram-Schmidt algorithm. If the block size is small, it makes sense to store the columns of BUk, as suggested in (4.5), to avoid forming matrix-vector products involving B. On the other hand if the block size is large or multiplications by B are cheap, it may be more efficient to process each block by the classical GramSchmidt algorithm as in (4.4). Semidefinite B Since the generalized shift-and-invert transform C = (A K,B)~l B does not involve the inverse of B, the algorithms described above can be formally applied when B is positive semidefinite. In this case the B -inner product is said to be a semi-inner product, and the J9-norm a seminorm. The B semi-inner products is blind to vectors lying in the null space of B that is, (x + z, y) = (ar, y) whenever z G N(B) and this fact presents complications for our algorithms. To see what is going on, we need a little geometry. We first observe that the null space of B and C are the same, and rank(C) = n - null(B). To see this, note that if z is a null vector of B then # is a null vector of C. On the other hand if a: is a null vector of C, then (A - nB)~lBx = 0. Multiplying by A - K,B, we get Bx 0, so that x 6 N(B). The result now follows from the fact that for any matrix C of order n, rank(C) + null(C) = n. We will now make the simplifying assumption that

so that any vector z can be uniquely written in the form z x+y, where x T^(C) and y J\f(B). (This decomposition of z into x + y is not an orthogonal decomposition.) The assumption is always true when C is nondefective. For if there is an x such that Vol II: Eigensystems

376

CHAPTER 5. KRYLOV SEQUENCE METHODS

Cx is nonzero and lies in J\f(B), then C2x 0, something that can happen only if C has a nontrivial Jordan form. Now the eigenvectors of C, other than the null vectors of B, lie in 7((7). Consequently, if we are going to use a Krylov method to calculate eigenvectors of B we must insure that the Krylov vectors lie in 7(C). Mathematically, this can be done as follows. Lett; be, say, a random vector and let HI = Cv/\\Cv\\B- Thent^ 7(C). Now suppose that wi, . . . , * lieinT^(C). Since Uk+i is a linear combination of ^i,... , Uk and Cuk, it must also lie in 7(<7). Thus if we start with a vector in 7(C), our Krylov subspaces lie in 7(C). In practice, at each stage rounding error will introduce small errors lying in N(B). Since the B -inner product cannot see vectors in N(B\ it is possible for the Lanczos or Arnoldi process to magnify these small errors, and such magnifications are empirically observed to happen. There are two potential dangers here. 1. The null-space error in Uk may somehow effect the Rayleigh quotient Hk, so that the primitive Ritz vectors are calculated inaccurately. 2. Even if a primitive Ritz vector w is calculated accurately, the null-space error may contaminate the Ritz vector UkW. To analyze these possibilities, let us suppose that we have the J?-Arnoldi decomposition

where Fk is an error matrix of order of the rounding unit that accounts for rounding errors made during the Arnoldi process. Write

where the columns of Uk are in T^(C) and the columns of Vk are in M(B). Then it follows that

and

The contamination of the Rayleigh quotient is not a problem. Specifically, from (4.10) we have

It then follows from (4.11) that Hk is essentially the Rayleigh quotient with respect to a set of vectors uncontaminated by contributions from M(B).

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM

377

It turns out that the errors Vk do not contaminate the Ritz vectors eitherat least asymptotically. To see this let (V, w) be a primitive Ritz pair. From (4.9) it follows that

where, as usual, Uk is the last component of w. Now the left-hand side of this relation has no components in M(B). Hence the null-space error in UkW is small in proportion as the cmantitv

is small. But |/3^^|||w||2 is the residual norm of the Ritz pair (i/, Ukw). Hence, as the Ritz pair converges, the null-space error will go to zero. The following example illustrates this phenomenon. Example 4.3. LetDk = diag(l, .95,... , .95k~l). Form > n/2, let

and

In this example we apply the B-Arnold! method to C with n 500 and m = 400. The starting vector u\ is of the form Cr/\\Cr\\s, where r is a random vector. Each multiplication by C was followed by the addition of a random perturbation on the order of the rounding unit. The following table summarizes the results. In it P denotes the projection ontoJ\f(B) corresponding to the decomposition R n = T^(C} + Af(B) [see (4.8) and the following discussion].

Vol II: Eigensystems

378

CHAPTER 5. KRYLOV SEQUENCE METHODS

The second column contains the norm of the component ofUk+i in N(B), which is seen to grow steadily as k increases. The third column contains the norm of the component in N(B) of the Ritz vector corresponding to the fifth eigenvalue ofC. The fourth column contains the product \ftk^k\> which along with \\Uk+i\\2 estimates the residual norm. Initially the component in the null space increases; but as the residual norm decreases so does the component. We will return to the remaining columns later. So far all is according to theory. However, note that the null-space error (column 2) ultimately increases far above one. Other examples of rapid growth of null-space error may be found in the literature. This puts a limit on how far we can extend an Arnoldi or Lanczos sequence, since in finite precision arithmetic the null space error will ultimately overwhelm any useful information in the Krylov vectors. The following suggests a way of purging the unwanted components from the entire sequence. It is based on the following characterization of the effects of a step of implicit restarting with zero shift. Theorem 4.4. Let AUk = Uk+\ Hk be an Amoldi decomposition, where Hk is unreduced. LetAUk-i = UkHk be the decomposition resulting from one step of zero-shift implicit restarting. If Hk QR is the QR factorization of Hk, then (up to column scaling) Uk = UkQ. Proof. Because Hk is unreduced Hessenberg, Qk is unreduced Hessenberg and Rk is nonsingular. Define Uk Uk+iQ. Then

By definition Uk-i UkQ[l'k, l:kl]. Hence if we multiply equation (4.14) by g[l:Ar,l:A?-l],weget

Since R is nonsingular and Q [1:fc,1 :kIJ is an unreduced Hessenberg matrix, H k-i = RQ[l:k, l:kl] is also unreduced Hessenberg. Thus (4.15) is an unreduced Arnoldi decomposition. Moreover, from (4.14) the first column of Uk satisfies

Since m ^ 0, the first column of Uk is a multiple ofCui. Hence by the uniqueness of the unreduced Arnoldi decomposition, (4.15) is the decomposition that results from one step of zero-shifted implicit restarting. Although we have proved this theorem for the ordinary Arnoldi process, it also holds for the #-Arnoldi process, even when B is semidefinite. The chief difference is that Uk+i is no longer unique. Instead, we can add to it any matrix V in N(B) such thatVfh. = 0.

SEC. 4. THE GENERALIZED EIGENVALUE PROBLEM The application of this theorem is simple. From (4.9) we have

379

Since the left-hand side of this equation is in 1Z(C), so is the right-hand sidei.e., one step of zero-shifted implicit restarting purges the B-Arnoldi vectors of null-space error. For this to happen it is essential that .ft"1 not be large, since in the presence of rounding error it will magnify the residual error Fk in the decomposition. The last two columns in (4.13) illustrate the effectiveness of this method of purging null-space error. The fifth column is the null-space error in Uk+iQ. For the first 50 iterations it remains satisfactorily small. However, thereafter it grows. The reason is that the null-space error in Uk (column 2) has grown so large that it is destroying information about the component of Uk in 7l(C}. The #-Arnoldi and Lanczos methods with semidefinite B are imperfectly understood at this time. The chief problem is that the null-space error in the Arnoldi vectors can increase until it overwhelms the column-space information. Since in practice the Arnoldi method must be used with restarts, including a zero shift among the restart shifts may suffice to keep the errors under control, although some experimentation may be required to determine the longest safe restarting interval. It helps that we can tell when the null-space errors are out of hand by the sudden growth of the Arnoldi vectors. With the Lanczos algorithms, the problem of purification is analogous to that of reorthogonalizationit requires access to the entire set of Lanczos vectors. The cure is to perform periodic purging in the same style as periodic reorthogonalization. Unfortunately, at present we lack a reliable recursion for the null-space error, which is needed to know when to purge.
4.3. NOTES AND REFERENCES

The generalized shift-and-invert transformation and the Lanczos algorithm The idea of using a shift-and-invert strategy for large generalized eigenvalue problems arose in connection with the Lanczos process. Ericsson and Ruhe [72] proposed applying the Lanczos algorithm to the matrix R(A KB)~1R^, where B = R^R is the Cholesky factorization of B. This approach has the difficulty that it requires two factorizations, one of B and one of A KB (however, the authors assume that one will use several shifts, so that the the initial factorization of B can be prorated against the several factorizations of A KB). They called their transformation "the spectral transformation." Here we have preferred the more informative "shift-and-invert transformation." The transform (A-KB)~1B appears implicitly in a book by Parlett [206, p. 319], who rejects it. He also gives a version of the Lanczos algorithm for B~l A, in which the Lanczos vectors are B -orthogonal, which, however, requires a factorization of B. Scott [236] applied Parlett's algorithm to the pencil [B(A- KB)~1B, B], showing that it required no factorization of B. (He also says that the algorithm is not new, citing Vol II: Eigensystems

380

CHAPTER 5. KRYLOV SEQUENCE METHODS

two technical reports [183,282].) When reduced to a standard eigenvalue problem by multiplying by B~l, this pencil becomes (C, /), in which C is what we have been calling the generalized shift-and-invert transform. He credits Parlett with recognizing that the algorithm can be regarded as the Lanczos algorithm in the B-irmer product. He also considers the case of semidefinite B. Residuals and backward error Theorem 4.1 follows from generalizations of a theorem of Rigal and Caches [216] for the backward error of linear systems and is due to Fraysse and Toumazou [77] and Higham and Higham [112]. Semidefinite B The basic paper for the semidefinite .#-Lanczos algorithm is by Nour-Omid, Parlett, Ericsson, and Jensen [184]. They point out that the null-space error in the Lanczos vectors can grow and give an example in which it increases 19 orders of magnitude in 40 iterations. They also point out that the formula (4.12) can be used to purge a Ritz vector of null-space error. (The same formula was used earlier by Ericsson and Ruhe [72], but for a different purpose.) The fact that the purging becomes unnecessary as a Ritz vector converges appears to have been overlooked. The hypothesis (4.8) that 7l(C) and Af(B) have only a trivial intersection is violated in practical problems. Ericsson [71] considers these problems in detail for the Lanczos algorithm. His solution is a double purging of the Ritz vectors based on the formula (4.12). Meerbergen and Spence [176] treat the nonsymmetric casei.e., the semidefinite B-Arnoldi algorithm. Their example of the need for purification increases the null-space error by 13 orders of magnitude in 11 iterations. They introduce the elegant method of using zero-shift implicit restarting to purge the null-space error, which they combine with the purification of Nour-Omid et al. to handle the problem of overlapping null and column spaces. Finally, the authors give a rounding-error analysis of their procedures.

6
ALTERNATIVES

Although the most widely used algorithms for large eigenproblems are based on Krylov sequences, there are other approaches. In this chapter we will consider two alternatives: subspace iteration and methods based on Newton's methodparticularly the Jacobi-Davidson method. Subspace iteration is a block generalization of the power method. It is an older method and is potentially slow. But it is very reliable; its implementation is comparatively simple; and it is easy to use. Moreover, combined with shift-and-invert enhancement or Chebyshev acceleration, it sometimes wins the race. We next turn to methods based on Newton's method for solving systems of nonlinear equations. Since Newton's method requires the solution of a linear system, these methods appear to be mostly suitable for dense problems. But with some care they can be adapted to large sparse eigenprobems. When we combine Newton's method with Rayleigh-Ritz refinement, we get the Jacobi-Davidson algorithm, with which this chapter and volume conclude.

1. SUBSPACE ITERATION
In motivating the power method with starting vector UQ ( 1.1, Chapter 2) we assumed that A was diagonalizable and expanded

in terms of the eigenvectors Xj of A. If

and 71 / 0, then the first term in the expansion dominates, and Aku0j suitably scaled, converges to x j. When | A21 is near | AI |, the converges of the power method will be slow. However, if we perform the power method on a second vector u'Q to get the expansion

381

382

CHAPTER 6. ALTERNATIVES

we can eliminate the effect of A2 by forming the linear combination

whose convergence depends of the ratio |As/Ai|. If this ratio is less than |A 2 /Ai |, the effect is to speed up the convergence. Subspace iteration is a generalization of this procedure. Beginning with an nxm matrix UQ, one considers the powers AkUo. It turns out that power subspace 7( A*'/o) generally contains a more accurate approximation to x\ than could be obtained by the power method. Moreover, the power subspace contains approximations to other dominant eigenspaces. However, there are two problems that must be addressed before we can derive an algorithm based on the above observations. First, the columns of AkUo will tend toward linear dependence, since they all tend toward the dominant eigenspaces of A. But in fact we are only interested in the space spanned by AkUo. Hence we can cure the problem of dependency by maintaining an orthonormal basis for 7( AkUo). This cure leads to an interesting and useful connection between subspace iteration and the QR algorithm. The second problem is how to extract approximations to eigenvectors from the space. We could, of course, use a Rayleigh-Ritz procedure. However, since we are working with orthonormal vectors, it is more natural to use a variant of the Rayleigh-Ritz method that computes the dominant Schur vectors of A. In 1.1 we will develop the basic theory of the algorithm. In 1.2 we will show how to implement subspace interation. Finally, in 1.3 we will treat the symmetric case and in particular show how to use Chebyshev polynomials to accelerate convergence.

1.1. THEORY
As suggested in the introduction to this section, the theory of subspace iteration divides into three parts: convergences of the subpaces, the relation to the QR algorithm, and the extraction of Schur vectors. We will treat each of these in turn. Convergence Let UQ be an nxm matrix. We wish to show that as k increases the space K(AkUo) contains increasingly accurate approximation to the dominant eigenspaces of A and also to determine the rates of convergence. We will suppose that A has the spectral representation [see (1.7), Chapter 4]

where LI is of order I, L^ is of order ml, and L$ is of order nm. The eigenvalues of these matrices, whose union is A(A). are assumed to be ordered so that

SEC. 1. SUBSPACE ITERATION

383

where d = Y^UQ. Multiplying (1.3) by Ah and recalling that AXi = XiLi, we get

The bottommost expression in this equation is analogous to (1.1). Moreover, (1.2) suggests that the first term in the expression will dominate, so that the column space of AkUo will approach the eigenspace TZ(Xi). To make this more precise, assume that C\2 = (Cj1 C^)H is nonsingular and let

where D\ has t columns. Then

If we partition Vk = (V^ V2(A:)), then

By construction K(V} ') C K(AkUQ). Moreover, by Theorem 2.9, Chapter 1, we have that for any e > 0

Thus we see that the column space of AkUo contains an approximation to the eigenspace IZ(Xi) that converges essentially as |A m +i/A/| fe . We summarize these results in the following theorem, in which we recapitulate a bit. Theorem 1.1. Let the matrix A of order n have the spectral representation

where LI is of order I, L^ is oforder m-1, L% is of order n-m, and their eigenvalues are ordered so that

Vol II: Eigensystems

384
Let UQ G C n x m be given and write

CHAPTER 6. ALTERNATIVES

where d = Y) H E/b- Let Ok be the largest canonical angle between K(AkUo) and K(Xi). If the matrix (C^ C^)H is nonsingular, then for any e > 0,

There are four comments to be made about this theorem. The theorem shows that subspace iteration is potentially much faster than the power method. Forif^ = 1, then the convergence depends essentially on the ratio |A m +i/Ai|, which is in general smaller than | A 2 /A!|. The theorem contains no hypothesis that A is nondefective. This suggests that subspace iteration can deal with defectiveness, which Krylov sequence methods do not handle well [see the discussion following (3.14), Chapter 4]. If, however, the eigenvalues A^ and A m+ i are nondefective, then Theorem 2.9, Chapter 1, implies that we can take e = 0 in (1.4). We are free to position t at any point in the spectrum of A where there is a gap in the magnitudes of the eigenvalues. If, for example, the magnitudes of the first ra eigenvalues of A are distinct, the columns space of AkUo will contain approximations to each of the eigenspaces corresponding to the first eigenvalues of A. However, the convergence of these approximations deteriorates as t increases, since the convergence ratio is essentially |Am.j-i/A^|. The theorem would appear to depend on choosing m so that | Am | is strictly greater than | A m+ i |. But if that condition fails, we can reduce the size of UQ to the point where the hypothesis is satisfied (at the very worst we might end up with m = ). Theorem 1.1 then applies. Moreover, adding back the missing columns of UQ can only improve the accuracy of the approximation to 7(XL), so that the theorem is valid for the original UQ. This observation is important in applications, since we will not know the eigenvalues of A when we choose m. The QR connection One difficulty with the naive version of subspace iteration is that the columns of Ak UQ tend to become increasingly dependent. For example, if |Ai| > \\2\, the columns will all tend to lie along the dominant eigenvector of A. Fortunately, we are not interested in the matrix AkUoonly the subspace spanned by it. Consequently, when the columns of AkUo begin to deteriorate, we can replace it with AkUoS, where S is chosen to restore independence. A natural choice is to make AkUoR orthogonal. If

SEC. 1. SUBSPACE ITERATION

385

we orthogonalize by computing a QR factorization after each multiplication by A, we get the following algorithm.

An easy induction shows that if Rk = RI Rk

that is, QkRk is me QR factorization of AkUo. Now recall (Theorem 2.1, Chapter 2) that if Ak = QkRk is the QR decomposition of Ak then Qk and Rk are the accumulated Q- and R-factors from the unshifted QR algorithm. This suggests that subspace iteration is in some way connected with the QR algorithm. In fact, the proof of Theorem 2.2, Chapter 2, can be adapted to establish the following result. Theorem 1.2. Let U0eCnxm be orthonormal and let

where

Suppose that X 1U0 has anLU decomposition LT, where U is unit lower trapezoidal and T is upper triangular. Partition X = (Xi X^}, and let X\ = QR be the QR factorization ofXi. IfAkUo has the QR factorization UkRk, then there are diagonal matrices Dk with \Dk\ = I such that UkDk Q. The importance of this theorem is that the matrices Uk generated by (1.5) converge to the Schur vectors spanning the dominant eigenspaces

[see the comments at (1.9), Chapter 1]. The diagonal elements of R converge to the dominant eigenvalues of A. When the hypothesis (1.6) is not satisfied, so that some eigenvalues have equal magnitudes, the corresponding columns of Qk will not settle down. Nonetheless, where there is a gap in the magnitudes of the eigenvalues, the space spanned by the corresponding columns of Qk converge to the corresponding dominant eigenspace. As in Theorem 2.2, Chapter 2, the convergence of the jth column of Qk is governed by the largest of the ratios \Xj/Xj_i \ and \Xj+i/Xj\ (but only the latter when j 1). But we know that H(Qk) must contain an approximation to Xj that is converging as \Xj/Xm+i\k. We now turn to the problem of how to extract an approximation that converges at this faster rate. Vol II: Eigensystems

386
Schur-Rayleigh-Ritz refinement

CHAPTER 6. ALTERNATIVES

Given the sequence Qk, we can use (1.5) to generate approximations to eigenvectors of A by the standard Rayleigh-Ritz method. However, one of the strengths of subspace iteration is that it gives meaningful results when the matrix A is defective or has nearly degenerate eigenvectors. What we really want to do is to rearrange the orthogonal matrix Qk so that its columns reflect the fast convergence of the dominant subspaces. The following procedure, which is called the Schur-Rayleigh-Ritz (SRR) method, accomplishes this.

1. V = AQk 2. B = Q*V
3.

4. V = VW
5.

Compute the Schur decomposition B = WTWn, where the eigenvalues of B are arranged in descending order of magnitude Compute the QR factorization V Qk+iRk+i

The motivation for this procedure is the following. The matrix B is the Rayleigh quotient B = Q^AQk- Now if we wish to use the Rayleigh-Ritz method to compute an orthonormal approximation to the dominant eigenspace Xj, we would compute an orthonormal basis Wj for the corresponding invariant subspace of B and for QkWj. But the columns of Wj are just the first j Schur vectors of B. Consequently, the matrix Qk W contains Ritz bases for all the dominant eigenspaces^j. Since AQkW = VW, we can obtain the iterate following the SRR refinement by orthogonalizing VW. The full analysis of this method is complicated and we will not give it here. The basic result is that if | Aj | > | \j+i \, so that the dominant eigenspace Xj is well define the approximations 1^[Qk('-, l:j)l converge to Xj essentially as |Am/Aj|*. Thus the SRR procedure gives properly converging approximations to all the dominant eigenspaces at once.

1.2. IMPLEMENTATION
In this subsection we will sketch at an intermediate level what is needed to produce an implementation of subspace iteration. The reader should keep in mind that actual working code requires many ad hoc decisions, which we do not treat here. For further details, see the notes and references. A general algorithm The theory of the last section shows that there are three nested operations that we must perform. The innermost operation is a power step in which we calculate AU (for notational simplicity we drop the iteration subscript). The next level is the orthogonalization of U. Finally, at the outer level is the performance of an SRR step. The power step must be performed at each iteration. But since we are only concerned with the subspace spanned by U, we do not need to orthogonalize until there

SEC. 1. SUBSPACE ITERATION

387

This algorithm is an outline of a general subspace iteration for the first nsv dominant Schur vectors of a general matrix A. The input to the program is an n x m orthonormal starting matrix U, where m > nv. 1. while (the number of converged vectors is less than nsv) 2. while (convergence is not expected) 3. while (the columns of U are sufficiently independent) 4. U = A*U 5. end while 6. Orthogonalize the columns of U 1. end while 8. Perform an SRR step 9. Test for convergence and deflate 10. end while Algorithm 1.1: Subspace iteration

is a danger of a nontrivial loss of orthogonality. Thus we may be able to perform several power steps before we need to Orthogonalize U. Similarly, the SRR step is needed only when we expect some of the columns of U to have converged. These observations are summarized in Algorithm 1.1. Because it is so general, the algorithm leaves several important questions unanswered: 1. 2. 3. 4. How do we test for convergence of Schur vectors? How do we deflate converged Schur vectors? How can we tell when to perform an SRR step? How can we tell when to Orthogonalize?

We will treat each of these problems in turn. Convergence Convergence is tested immediately after an SRR step. As usual we will test a residual. To motivate the test, suppose that U is composed of the dominant Schur vectors of A, so that

where T is upper triangular with its eigenvalues arranged in descending order of magnitude. In particular, the jth column of U satisfies

Vol II: Eigensystems

388

CHAPTER 6. ALTERNATIVES

where tj is the jth column of T, Thus we declare that the jth column of U has converged if

where tol is a convergence criterion (e.g., eM) and 7 is a scaling factor. A natural choice of 7 is an estimate of some norm of A. However, if A has been obtained by shift-andinvert enhancement, then such an estimate might be too large, and a better choice might be 7 = \TJJ\ i.e., the magnitude of the jth eigenvalue in the Schur decomposition [cf. (2.21), Chapter 5]. Our converge theory says that the Schur vectors corresponding to the larger eigenvalues will converge more swiftly than those corresponding to smaller eigenvalues. For this reason, we should test convergence of the Schur vectors in the order j = 1,2,... and stop with the first one to fail the test. This criterion is backward stable. Suppose that I vectors have converged. Let

where T( consists of the first I columns of T. Then by Theorem 2.8, Chapter 4, there is a matrix E with \\E\\2 = \\R\\z such that (A + E)U = UTi. In other words, the first I columns of U are exact Schur vectors of A + E. Deflation Because the columns of U converge in order, deflation simply amounts to freezing the converged columns of U. This freezing results in significant savings in the power, orthogonalization, and SRR steps. Specifically, suppose the first i columns of U have converged, and partition U (U\ #2), where U\ has i columns. Then when we multiply by A we form the matrix ({/i, AU%)i.e., we do not multiply U\ by A. At each orthogonalization step we orthogonalize the current U% first against U\ and then against itself. Finally, to perform an SRR step, we calculate the Rayleigh quotient

Here T\\ is the triangular part of the Schur decomposition that corresponds to U\. Because of the triangularity of TH, the matrix W of Schur vectors of B has the form

and the new U has the form

SEC. 1. SUBSPACE ITERATION

389

When to perform an SRR step The theory of the last section suggests that the residuals for the approximate Schur vectors will converge linearly to zero. We can use this fact to make a crude prediction of when we expect a Schur vector to converge. Let us focus on a particular Schur vector, and suppose at step j it has a residual norm pj and at step k > j; is has a residual norm pk. If the residual norms are converging linearly with constant cr, then pk = vk~Jpj, so that we can estimate a by

We can now use cr to predict when the residual norm will converge. Specifically, we wish to determine / so that

Hence

It follows from (1.7) that

The formula (1.8) is a crude extrapolation and must be used with some care. Precautions must be taken against it wildly overpredicting the value of /, especially in the early stages when linear convergence has not set in. One must also take care that the formula does not slightly underpredict /, so that an unnecessary SRR step is performed just before convergence. Finally, if A has nearly equimodular eigenvalues, it will pay to extrapolate the average of their residual norms, so that one SRR step detects the convergence of the entire cluster. For more see the notes and references. When to orthogonalize As we have mentioned, the columns of the matrices U,AU,A2U,... become increasingly dependent. The cure is to orthogonalize the columns of A1U for some /. If we take / too small, then we perform unnecessary work. On the other hand, if we take / too large we risk losing information about the subspace spanned by A1 U. To see what that risk is, let X = A1U, and consider the effects on H(X) of the perturbation X + E, where \\E\\% < \\X\\eMi.e., where E is comparable to the error in rounding X on a machine whose rounding unit is eM. By Theorem 2.2, Chapter 4, if Q is an orthonormal basis for H(X + E) and Q j. is an orthonormal basis for 7(X) 1 , then HQj^lh is the sine of the largest canonical angle 9 between H ( X ) and 1l(X + E). VolII: Eigensystems

390
To find an orthonormal basis for 1Z(X + E), let

CHAPTER 6. ALTERNATIVES

be the QR factorization of X. Then

has orthonormal columns. Hence if Q_ is any orthonormal basis for 7(X), then

Thus Hence

and the degradation in the subspace of X is proportional to K,(R). To apply this result to subspace iteration, note that once the process starts converging, we will have

where T is the Schur form from the last SRR step. Hence,

Since /is orthonormal, the sensitivity of A1 U is proportional to K,(Tl) < K(T)1. Thus if we decide that no deterioration greater than 10* is to be tolerated, we should orthogonalize after at most / steps, where / satisfies

An implication of this analysis is that if |Ai| > |A2| as it might be when we use shift-and-invert enhancement with a very accurate shiftthen we will have to reorthogonalize at each step. The reason is that for any matrix T we have (T) < IAmax(r)/Amin(T)|, where Amax(T) and Xmin(T) denote the largest and smallest eigenvalues of T in magnitude. Hence as convergence sets in, we will almost certainly have K,(T) > | Ai/A2|, which by hypothesis is large. Thus / in (1.10) will be zero. The common sense of this is that the larger the value of |A!/A 2 |, the more all the columns

SEC. l. SUBSPACE ITERATION

391

of AU will be contaminated by components of a?i, which we must eliminate by orthogonalization. It should be stressed that after deflation, we must continue to work with the full T, not the trailing principal submatrix of T associated with the remaining subspaces. The reason is that in the powering step, AI still makes its contribution to nonorthogonality, whether or not its eigenvector has been deflated. Once again we must treat the crude extrapolation (1.10) with care. For example, once it settles down it is likely to be pessimistic, since we have used several norm inequalities in deriving it. However, in practice the technique has shown itself to be effective. Real matrices If A is real, we will want to work with the real Schur form of the Rayleigh quotient (Theorem 3.1, Chapter 2). Most of the above discussion goes through mutatis mutandis. The only problem is the ordering of the blocks of the real Schur form, which has been treated in 2.2, Chapter 5.

1.3. SYMMETRIC MATRICES


When the matrix A is symmetric, we can obtain some obvious economies. For example, the Schur vectors are now eigenvectors, so that there is no need of a postprocessing step to compute the eigenvectors. Moreover, the Rayleigh quotient is symmetric, so that we can use the more efficient symmetric eigenvalue routines to perform the SRR step. There are two economies, however, that are less obvious. First we can make do with a single array U instead of the two arrays required by the nonsymmetric algorithm. More important, we can speed up convergence by replacing the power step with a Chebyshev iteration. Economization of storage In economizing storage it is important to appreciate the tradeoffs. In statement 4 of Algorithm 1.1 we wrote U = AU, indicating that the product A U is to overwrite the contents of U. This can be done in two ways. First, we can use an auxiliary matrix V and proceed as follows.

Alternatively, we can introduce an auxiliary vector v of order n and write

Algorithm (1.12) obviously uses less storage than (1.11) significantly less if n is large. The tradeoff is that we must perform m separate multiplications by the matrix Vol II: Eigensystems

392

CHAPTER 6. ALTERNATIVES

A. If the matrix A is sparse, it will generally be represented by some data structure, and a price must be paid for accessing that structure. In the algorithm (1.12) that price must be paid ra times. In the algorithm (1.11), on the other hand, we need only access A once to compute the entire product A Ubut, of course, at the cost of twice the storage, which brings the tradeoffs full circle. So far as computing the product AU is concerned, both algorithms have the option of economizing storage. But in calculating the Rayleigh quotient B = U^AU, we have no choice when A is non-Hermitian: we must use an extra array V. But if A is Hermitian, then so is B, and we need only compute its upper half. This can be done without an auxiliary array as follows.

Thus there is a true choice in the non-Hermitian case. How that choice will be made must depend on the representation of A and the properties of the machine in question. Chebyshev acceleration We have noted that if the eigenvalues of A are well separated in magnitude, then convergence will be fast, but we will perform many orthogonalization steps. Conversely, if the eigenvalues of A are clustered in magnitude, then convergence will be slow, but we will need few orthogonalization steps. In this case, however, we can use the power steps to accelerate convergence. Specifically, instead of computing AkU we will compute pk(A)U, where pk is a polynomial of degree k, chosen to enhance the gap between | AI | and | Am+11. A natural choice is the scaled Chebyshev polynomial

where |A m+ i| < s < |A m |. To see why, note that when we evaluate*^ (A/s), we have effectively scaled A by s. For the purposes of argument, assume that we have chosen s = |Am+1|, so that we may assume that |A m +i| = 1 and hence Ic^A^-i-i)! = 1. From (3.8), Chapter 4, we have

Thus Pk(A)U will contain approximations to the dominant eigenvector that converge at least as fast as e~k cosh ' Al I converges to zero. The analogous result is true for the other eigenvalues.

SEC. 1. SUBSPACE ITERATION


When | AI | is near one, the convergence ratio

393

can be much smaller than the usual ratio | AI | k obtained by powering. For example, suppose that AI = 1.01, so that ordinarily we could expect a convergence ratio of 1/1.01 = 0.99. On the other hand, if we use Chebyshev acceleration, we get a convergence ratio of 0.87a great improvement. In implementing Chebyshev acceleration there are three points to consider. 1. What value should we use for the scaling factor 3? 2. How do we compute Ck(A/s)Ul 3. How does the acceleration affect our procedure for predicting when to perform orthogonalization steps? Let V{ (i 1,... , m) be the Ritz values computed in the SRR step arranged in descending order of magnitude. Since by the interlacing theorem (Theorem 3.6, Chapter 1) we know that) A m+1 | < |i/TO| < | A m |, it is natural to take 5 = \vm\ for the scaling factor. The choice has the drawback that as the iteration converges, z/m > A m , so that we do not get the best convergence ratio. But in subspace iteration we generally choose m somewhat greater than the number of eigenpairs we desire, so that this drawback is of minimal importance. To evaluate Ck(A/s)U, we can use the three-term recurrence (see item 1 in Theorem 3.7, Chapter 4)

The following algorithm implements this recurrence.

Note that we have used two extra n x m arrays U and Vto implement the recurrence. If we generate the final U column by column, we can make do with two extra n-vectors. As above, the tradeoff is that we must call the routine to multiply A into an array more often.

VolIP. Eigensystems

394

CHAPTER 6. ALTERNATIVES Turning now to orthogonalization, we must modify the formula

for the interval between orthogonalizations in two ways. First, since A is symmetric, the Schur T of the Rayleigh quotient is diagonal. Thus we can avoid the invocation of a condition estimator and compute ft(T) as the ratio of vi/vm of the Ritz values. Second, if / is greater than one, we will be performing Chebyshev iteration, so that

where by (3.9), Chapter 4, Hence we must replace the formula (1.13) by

1.4. NOTES AND REFERENCES Subspace iteration

Subspace iteration originated in Bauer's Treppeniteration, [16,1957], which bears the same relation to Rutishauser'sLR algorithm [224,1955] as the orthogonal version presented here does to the QR algorithm. In The Algebraic Eigenvalue Problem Wilkinson [300, 1965] introduced the orthogonal variant. For symmetric matrices Jennings [130,1967] introduced an approximate Rayleigh-Ritz step using first-order approximations to the primitive Ritz vectors. The full Rayleigh-Ritz acceleration was introduced independently by Rutishauser [227,1969], Stewart [249,1969], and Clint and Jennings [41,1970]. For nonsymmetric matrices, Clint and Jennings [42,1971] compute Ritz vectors to get good approximations to eigenvectors from the Uk- Stewart [257, 1976] introduced and analyzed the Schur-Rayleigh-Ritz method for approximating Schur vectors. Although the hypothesis |A m | > |A m+ i| is not necessary for the spaces T^(Uk) to contain good approximations to the Schur vectors, it is necessary to prove that the SRR procedure retrieves them. A counterexample is given in [257], where it is argued that the phenomenon is unlikely to be of importance in practice. The idea of predicting when to orthogonalize is due to Rutishauser [228] for the symmetric case and was generalized to the nonsymmetric case by Stewart [257]. The latter paper also introduces the technique of extrapolating residual norms to predict convergence.

SEC. 2. NEWTON-BASED METHODS


Chebyshev acceleration

395

The use of Chebyshev polynomials to accelerate subspace iteration for symmetric matrices is due to Rutishauser [228]. When A is positive definite it is more natural to base the Chebyshev polynomials on the interval [0, s] rather than on [-s, s], as is done in the text. Chebyshev acceleration can also be performed on nonsymmetric matrices and can be effective when eigenpairs with the largest real parts are desired. For details and further references see [68]. Software Rutishauser [228] published a program for the symmetric eigenproblem. The program LOPS I of Stewart and Jennings [270,271] is designed for real nonsymmetric matrices and uses Rayleigh-Ritz refinement to compute eigenvectors. The program SRRIT of Bai and Stewart [12] uses SRR steps to compute Schur vectors. Duff and Scott [68] describe code in the Harwell Library that includes Chebyshev acceleration for the symmetric and nonsymmetric cases. All these references contain detailed discussions of implementation issues and repay close study.

2. NEWTON-BASED METHODS
One of the most widely used methods for improving an approximation to a root of the equation f ( x ) = 0 is the Newton-Raphson formula

It is a useful fact that specific instances of this formula can be derived without differentiation by using first-order perturbation expansions. For example, suppose we wish to compute ^/a for some positive a. This amounts to solving the equation f ( x ) = x2 a = 0. The Newton correction is

On the other hand if we write

where d is presumed small, expand the square, and drop terms in d2, we get the approximate linear equation

from which we find that

VolII: Eigensy stems

396

CHAPTER 6. ALTERNATIVES

Thus the Newton correction d and the approximation (2.1) to the true correction d are identical. In this section we are going to explore the consequences of applying this approach to the eigenvalue problem. It turns out that it yields some old friends like the Rayleighquotient method and the QR algorithm. However, it also yields some new methods and suggests ways of implementing them for large sparse eigenproblems. When combined with the Rayleigh-Ritz method, it becomes the Jacobi-Davidson method. In the next section we will introduce approximate Newton methods and a class of variants that we will call orthogonal correction methods. In 2.2 we will treat the Jacobi-Davidson algorithm.

2.1. APPROXIMATE NEWTON METHODS


This section concerns the derivation of Newton-based methods and the analysis of their orthogonal variants. We will begin with the general method and then specialize. A general approximate Newton method Suppose we are given an approximate eigenpair (/i, z) of A and wish to determine r\ and v so that (//+77,;?+v) is an improved approximation. For reasons that will become clear later, we will assume that we have an approximation

to A, where E is small. For purposes of derivation, let (// + r), z + v) be an exact eigenpair of A. Then

If we discard products of small terms, we obtain the following approximate equation in 77 and v:

We therefore define approximate corrections to be the solutions of the equation

Unfortunately, this equation is underdetermined: there are only n relations to determine the n components of v and the scalar 77. To determine the system completely, we add the condition

where w is a suitably chosen vector. For example, we could choose w e^, in which case the fcth component of z + v remains unchanged. Later we will consider the consequences of choosing w z.

SEC. 2. NEWTON-BASED METHODS


Now in matrix form our equations become

397

By multiplying the first row of this relation by WH( A /z/) the second row, we obtain the triangular system

and subtracting it from

Hence

We will call (2.4) the approximate Newton correction formula. If A A, we will simply call it the Newton correction formula. The correction equation There is an alternative to the correction formula (2.4), involving only v, that is of theoretical and practical use. To derive it, write the first equation in (2.4) in the form

The first order of business is to get rid of 77. Let

where r j_ is any vector that is orthogonal to r for which r^z ^ 0. In the language of projectors, P^~ is an oblique projector onto the orthogonal complement of r j_ along z. In particular, P^-z = 0 and P/r = r. It follows that

nOW LET

be the projector onto the orthogonal complement of w along u. Then follows that

We will call (2.5) the approximate Newton correction equation. It actually characterizes the correction vector v, as the following theorem shows. Vol II: Eigensy stems

398

CHAPTER 6. ALTERNATIVES

Theorem 2.1. In the above notation, let A - pi be nonsingular. Then v satisfies (2.4) if and only ifv satisfies (2.5). Proof. We have already shown that if v satisfies (2.4) then v satisfies (2.5). Suppose now that v satisfies (2.5). Then

Thus v satisfies (2.5). The correction equation says that the correction v to z satisfies a simple equatior involving the projected operator

Although the equation is pretty, is does not seem to offer much computational advantage over the correction formula, which exhibits the correction explicitly. However, the correction formula is cast in terms of inverses, and their implementation requires a factorization of the matrix A pi, which may be too expensive to compute for large sparse problems. On the other hand, if we use an iterative method based on Krylov sequences to solve the correction equation, we need only compute matrix-vector products of the form A y, where y is an arbitrary vector, something that is easily done. We will return to this point later. Orthogonal corrections The presence of oblique projectors in the correction equation is disturbing. Oblique projectors can be arbitrarily large, and large projections can cause numerical cancellation in expressions that contain them. However, if we restrict p appropriately, we can replace the projections P^- and P^ by a single orthogonal projection. We first observe that it is natural to take w = zthat is, to require the correction v to be orthogonal to the approximate eigenvector z. For if v J. z and v is small compared with z, then a simple picture shows that the minimum distance between z and span( + v) is approximately \\v\\z. In other words, v is close to the smallest possible correction.

SEC. 2. NEWTON-BASED METHODS


If we take w = z, then we may take

399

which is an orthogonal projection. We should also like P/- to be the same. However, in this case the correction equation becomes

and this equation is consistent only if r J_ z. Now by Theorem 1.4, Chapter 2, if we choose fj, to be the Rayleigh quotient

then r is indeed orthogonal to z. Thus we have established the following result. Theorem 2.2. Let (^, z) be an approximate normalized eigenpair of A where

and lei

Let

and assume that A is nonsingular. Then the Newton-based correction v that is orthogonal to z is given by the correction formula

Equivalently, v is the unique solution of the correction equation

Three comments on this theorem. We call the vector v of Theorem 2.2 the orthogonal (approximate Newton) correction, and (2.6) and (2.7) the orthogonal correction formula and the orthogonal correction equation. But since we will be concerned exclusively with orthogonal corrections in the sequel, we will usually drop the qualifier "orthogonal" and speak of the approximate Newton correction, correction formula, and correction equation, dropping the approximate when A = A. Vol II: Eigensystems

400

CHAPTER 6. ALTERNATIVES

We have used the expression "approximate Newton method" rather than simply "Newton method" because both the correction formula and the correction equation contain the approximation A. However, even when A = A, the iterated method is not strictly speaking Newton's method. The reason is that we use the normalized vector (z + v)/\\z + v\\2 and its Rayleigh quotient in place of z + v and /i + 77. The distinction, however, is in the higher-order terms. We have used the term "orthogonal" it more than one sense. The obvious sense is that we require v to be orthogonal to z. But equally important is that the operator A - fj,I is projected onto the orthogonal complement of z in the correction equation. Analysis The fact that the operator in the projection equation (2.7) is a projection of A suggests that for the purposes of analysis we should rotate the problem into a coordinate system in which the projector projects along the coordinate axes. Specifically, let Z = (z Z_\_) be a unitary matrix and partition

We will also write

where

[see (2.2)]. In the Z coordinate system, we have the following correspondences:

in which p is to be determined. The correction equation can now be written in the form

SEC. 2. NEWTON-BASED METHODS


Hence we have

401

This expression corresponds to the correction formula. Thus in the Z coordinate system the correction equation and the correction formula are so simply related that there is no need to prove a theorem to establish their equivalence. We now turn to the iterative application of the approximate Newton method. A natural quantity to measure the quality of the current approximation z is the residual norm \\r\\2- Thus our problem is to develop a bound for the residual norm corresponding to the corrected vector z = z + v in terms of the original residual norm ||r||2. There are three ways to simplify the analysis. First, although we should, in principle, work with the normalized vector ,/p||2, since v _L z, we have \\z\\2 = \\z\\2 + \\v\\2 1 -f- \\v\\2- Consequently, if v is smallwhich we may assume it to be in a convergence analysis z is essentially normalized. Second, it is not necessary to compute f. By definition it uses the Rayleigh quotient ft corresponding to z, and hence by Theorem 1.4, Chapter 2, f has the smallest possible residual. Thus any residual norm will serve to bound ||r||2, and our only problem is to find a reasonably small residual. Third, the problem is trivial in the Z coordinate system. For in this case the residual for the corrected vector is

where, as pointed out in the last paragraph, we may choose v at our convenience. The easiest choice is v fi -f /iHp, which makes the first component of the residual equal to zero. The remaining component is

By the correction formula (2.8) the first two terms in this expression vanish. Hence

Inserting iteration subscripts, we have the following theorem.

Vol II: Eigensystems

402

CHAPTER 6. ALTERNATIVES

Theorem 2.3. Let (^, zjt) (k 0,1,...) be a sequence of normalized approximate eigenpairs produced by the orthogonal approximate Newton method applied to the matrix A = A + E. Let Tk = Az/j - HkZk- Further let Z = (zk Z^) be unitary, and define

and
Then

Local convergence The recurrence (2.9) can be made the basis of a local convergence proof for the orthogonal Newton-based method. We will not present the proof here. However, the idea is to obtain uniform upper bounds a on (7k and e on e^ (the quantities r/k are uniformly bounded by ||A||2). If

then for all sufficiently small H^H, the quantity a^k + &kilk\\Tk\\2) & uniformly bounded below one. In particular, if ||ro||2 is sufficiently small, then the residual norms ||f;t II2 converge monotonically to zero. It can then be shown that Hk and Mjt (suitably defined) approach fixed limits A, M, so that by Theorem 2.10, Chapter 4, the eigenpairs (nk, z^ converge to an eigenpair (A, z) of A. If e > 0, then the convergence of the method is linear with convergence ratios not greater than ae. Since (j,k and Mk are converging to A and M, we have by Theorem 2.11, Chapter 4, that

Hence for not too large, the bound ae < I is essentially

What this says is that if we are going to use an approximation A instead of A in our iteration, the error in the approximation must be reasonably less than the separation of A from its neighbors in the sense of the function sep. In other words, convergence to a poorly separated eigenvalue requires a correspondingly accurate approximation. When = 0, the convergence is quadratic. When A is Hermitian, hk = <%, so that rjk = \\Tk\\2- Hence the convergence is cubic.

SEC. 2. NEWTON-BASED METHODS

403

Three approximations In the approximate Newton method, the rate of convergence depends on the accuracy of the approximation A = A + E. Ideally, we would take A = A, so that the method converges quadratically. But this is not always possible. Here we give three situations in which it may be desirable to take A ^ A. Natural approximations. Such approximations arise when A can be split into a matrix A that is easy to invert (in the sense of being able to solve systems involving A [ikI) and a small remainder E. For example, if A is diagonally dominant with small off-diagonal elements, we might split A = D E, where D is the diagonal of A and E = D A. In this case the approximate Newton method can be implemented solving only diagonal systems. Moreover, if E is small enough, the method will converge rapidly. This diagonal approximation is associated with the name of Jacobi. See the notes and references. Constant shift approximations. In the pure Newton method, we solve equations involving the matrix A fikl. Since //^ changes with each iteration, this may require a matrix factorization at each step. In many instances it is sufficient to replace A \i^I by (A r/), where r is the center of a focal region containing the eigenvalues of interest. (Note that r is sometimes illogically called a target in the literature.) If we write A = A + Ek, where Ek = (fJtk ~ r K> then A - /^/ = A - rl. This is an example of an approximation that changes from iteration to iteration. In this case, our iteration bound (2.9) simplifies to

where in the above notation a^ ||(M* - rl) l\\2. This bound is isomorphic to the bound (2.12), Chapter 2, for the local convergence of the QR algorithm. This is no coincidence. This variant of the approximate Newton method is closely related to the RQ variant of the QR algorithm. See the notes and references. Inexact solutions. In some applications, it is impossible to solve the equation A Hkl directly. If we lack a natural approximation, then we must use an iterative method to solve the correction equation (2.7). In this case the approximate Newton's method consists of inner iterations to solve the correction equations and outer iterations consisting of Newton steps. As with eigenvalue problems, we generally terminate an inner iteration when the residual

is sufficiently small. It is natural to ask what effect a residual-based convergence criterion has on the convergence of the approximate Newton method. It turns out the analysis given above covers this case.

Vol II: Eigensystems

404
From Theorem 1.3, Chapter 2, there is a matrix

CHAPTER 6. ALTERNATIVES

such that

Now since (/ - zzH)r = r, it followsfrom(2.10) that (/ - ZZE)S = s. Moreover, it is reasonable to assume that the iterative method in question produces an approximate solution v that satisfies (/ zz^)v = v. This implies that we may move E inside the brackets in (2.11), so that

Thus the effect of terminating the inner iteration with a residual 5 is the same as performing the outer iteration with an approximation in which ||||2 = ||s||2- This fact along with the iteration bound (2.9) can guide our choice of a convergence tolerance for the inner iteration.

2.2. THE JACOBI-DAVIDSON METHOD


The Jacobi-Davidson method is a combination of the approximate Newton iteration and Rayleigh-Ritz approximation. It has the advantage that the Rayleigh-Ritz procedure can focus the Newton iteration on a region containing the eigenvalues we are interested in. Moreover, it sometimes happens that while the method is converging to one eigenpair, it produces information that later speeds convergence to other eigenpairs in the focal area. The method is new and less than well understood, and its presence in a work whose concern is mostly the tried and true is something of an anomaly. Nontheless, it is promising, it has been used successfully, and it is technically interesting and that is reason enough to include it. We will begin with a general formulation of the Jacobi-Davidson algorithm and then introduce the refinements necessary to implement it. The basic Jacobi-Davidson method The approximate Newton method is suitable for improving a known approximation to an eigenpair. Moreover, as we shall see, it can be combined with an effective deflation technique that prevents it from reconverging to pairs that have already been found. However, it has two drawbacks. 1. If we do not start the method close enough to an eigenpair, there is no real control over what eigenvalue the method will converge to. In particular, it may converge to eigenpairs whose eigenvalues lie entirely outside the region we are interested in.

SEC. 2. NEWTON-BASED METHODS

405

Given a normalized starting vector z, this algorithm attempts to compute an eigenpair whose eigenvalue is near a focal point r. The matrix A is a suitable approximation of A.

1. 2. 3.
4.

V =v for & = !,... ,kmax Using V" compute a normalized Ritz pair (/^, z] such that /z is near r
r Az fj,z

5. 6. 1. 8. 9. 10. 11.

if (r is sufficiently small) return (^, z)', fi Choose a shift K near r or fj, Solve the system

(/- zzu)(A- K!)(! - ZZH)V = -r,

v J_ z

Orthonormalize w with respect to V V = (V v) end for k Signal nonconvergence Algorithm 2.1: The basic Jacobi-Davidson algorithm o

2. It is greedy. By greedy, we mean that the method attempts to do as well as possible at each step without any attempt at global optimization. Specifically, the correction vector v^ is applied once to the current approximate z^ and discardedmuch as past iterates in the power method are thrown away. In particular (up to normalization),

Yet this is only one vector in the correction space spanned by z0, VQ, ... , Vk, and it is possible that another vector in this space will provide a better approximate eigenvector. This suggests that we save the vectors ZQ,VQ,... > vk and use a Rayleigh-Ritz procedure to generate 2^+1. Although the Rayleigh-Ritz method is not infallible, the new approximation will generally be better than (2.12). Moreover, because we can choose from among k+1 Ritz pairs, we are free to choose one near a focal point, so that we can mitigate the effects of wild jumps in the Newton iterates. Algorithm 2.1 implements the basic Jacobi-Davidson algorithm. It consists of a basic Rayleigh-Ritz step to generate a starting vector for an approximate Newton step. The correction is then folded into the correction subspace and the process repeated. The algorithm contains three shift parameters: r, //, and K. As stated in the prologue, T is the center of a focal region in which we wish to find eigenpairs. The quantity // is the Rayliegh quotient corresponding to z. If it is expensive to vary K in solving Vol II: Eigensystems

406

CHAPTER 6. ALTERNATIVES

Figure 2.1: Convergence of the Jacobi-Davidson method o the correction equation, it will generally be chosen equal to r. However, if it is inexpensive to vary K and A A, then by the analysis of the last section the choice K = fj, will give quadratic convergenceprovided something does not go wrong with the Rayleigh-Ritz procedure. The following example shows that the Rayleigh-Ritz refinement can improve the convergence of the approximate Newton method. Example 2.4. As in Example 3.1, Chapter4, we begin with a diagonal matrix A with eigenvalues 1,.95,.952,.953,...,.95". The Jacobi-Davidson algorithm was used to approximate the eigenvector ei. A starting vector u was obtained by normalizing a vector of the form ei + 0.05e, where e is a vector of random normal deviates. Two cases were considered: Case 1 in which the Rayleigh-Ritz step was included and Case 2 in which it was not. To slow convergence so that the process has time to evolve, K was set to // + 0.1. The table in Figure 2.1 exhibits the results. The first column shows the convergence of the residual norm in Case 1; the second, in Case 2. It is seen that the JacobiDavidson method is converging faster than the ordinary approximate Newton method. The convergence ratios for the first case decrease from about 0.24 to 0.041, while for the second case they increase from a value of 0.28 to 0.67. (All this excludes the first step, which is atypical.)

SEC. 2. NEWTON-BASED METHODS

407

The third column shows the tangents of the angles between the correction space and the eigenvector ei. They track the residual norms rather closely and show that it is the Rayleigh-Ritz approximation that is driving the convergence. The example actually shows more. The last column exhibits the tangents of the angles between the correction subspace and the subdominant eigenvector 62- If we decide at the last iteration to declare the iteration has produced a satisfactory approximation to ei and start looking for approximations to e2, we will begin with a very accurate starting vector. Extending Schur decompositions We now turn to implementation issues. The first issue is the matter of deflation. Algorithm 2.1 is designed to find a single eigenpair. When more than one eigenpair is to be computed, we must take care that the iteration does not reconverge to a vector that has already been found; i.e., we must restrict the iteration to proceed outside the space spanned by the previous eigenvectors. Unfortunately, we cannot say just how the iteration should be restricted without knowing the unknown eigenvectors. A cure for this problem is to work with Schur vectors. If we have found a set ui,... , up of Schur vectors, we know that the other Schur vectors lie in the orthogonal complement of span(wi,... , up}. Thus, the restriction can be cast in terms of orthogonal projections involving known vectors. Let us begin by assuming that we have an orthonormal matrix U of Schur vectors of A; that is, U satisfies the relation

for some upper triangular matrix T = U^AU. We wish to extend this partial Schur decomposition to a partial Schur decomposition of order one greater. An algorithm to do this would allow us to build up ever larger partial Schur decompositions a step at a time. We begin by observing that we can extend (2.13) by mimicking the reduction to Schur form. Specifically, let (U t/j_) be unitary, and write

Now suppose (/i, z] is a normalized eigenpair of B, and let (z Z) be unitary. Then

is block upper triangular. It follows that

Vol II: Eigensystems

408
Hence,

CHAPTER 6. ALTERNATIVES

is a partial Schur decomposition of A of order one higher than (2.13). This typically dense matrix process is not much use in the large sparse problems that are our present concern. However, the following observation allows us to recast the algorithm in terms of the original matrix A. Let

be the orthogonal projector onto the column space of U.. Then it is easily verified that

Now suppose that (p, z) is an eigenpair of B, and let y = U.z. Then (ji, y) satisfies

Conversely, suppose y satisfies (2.15). Then y = Uzt where z Uy. Since py = Ay = UBz, it follows on multiplying by U that Bz = fj,z. In other words there is a one-one correspondence to eigenvectors of A lying in 7( t/j_) and eigenvectors ofB. Note that a knowledge of the eigenvector y is all that is necessary to extend the partial Schur decomposition. For it follows from (2.14) that the extended partial Schur decomposition is

where

To compute a vector y satisfying (2.15), we will use the Jacobi-Davidson procedure. The ingredients for a step of the procedure are the matrix U of Schur vectors, an orthonormal matrix V of orthogonalized corrections, and a new correction vector v. We will assume that V and v are orthogonal to 7(J7). We begin by orthogonalizing v with respect to V and incorporating it into V. We next compute the Rayleigh quotient B = VTAV and a Ritz pair (/i, z). Note that because V is orthogonal to H(U), the Rayleigh quotient can also be computed from the original matrix A in the form VTAV. We now compute the residual

SEC. 2. NEWTON-BASED METHODS

409

and test to see if it is small enough that (//, z) can be accepted as our eigenpair. There is a subtle point here. What we really want is to get a satisfactorily small residual when we substitute z for y in (2.16) and (2.17)that is, we want

to be sufficiently small. To assess the size of s, we compute the size of its components in U and U. First, multiplying s by UH, we get

Hence Ps = 0. On the other hand, if we multiply s by Pj_ = UU, we get

It follows to that we may use r in a convergence test. Finally, we solve the correction equation

where v _L U, z, to get another correction to add to V. Algorithm 2.2 implements this scheme. There are several comments to be made. The routine EPSD (Extend Partial Schur Decomposition) is designed to be used by a higher-level program that decides such things as the number of Schur vectors desired, the focal point r (which may vary), and how to restart when the arrays V and W are about to overflow storage. Excluding operations with A (e.g., in statements 4 and 15), the storage requirements are up to 2nm floating-point numbers. Again excluding operations with A, the mainfloating-pointoperations come from matrix-vector products such as Vp. Thus if U is not too large and the algorithm returns at k = m < m, we can expect the operation count to be a multiple of n(m)2 flam. As V grows, it is not necessary to recompute the entire Rayleigh quotient C only its southeast boundary. This is done in statement 5. In principle, we do not have to orthogonalize v against U in statement 3, since by definition U^v = 0. However, if there is cancellation when v is orthogonalized against V, the results will no longer be orthogonal to U to working accuracy. Thus v should be orthogonalized against both U and Vwith reorthogonalization if necessary. We do not compute the residual r directly. Rather we compute Az - \iz and orthogonalize it against U. Vol II: Eigensystems

410

CHAPTER 6. ALTERNATIVES

Given a partial Schur decomposition AU = t/T, EPSD extends it to a partial Schur decomposition of the form

The inputs, in addition to /7, are V, an nx (!) matrix of orthonormalized correction vectors; an additional correction vector v; W = AV, C WHV\ a focal point r; and an approximation A = A + E. In the following code, Pj_ = / - C/f/ H , and AX = PL APj.. It is assumed that the arrays V and W cannot be expanded to have more than m columns. If convergence does not occur before that happens, EPSD returns the next correction vector v.

Algorithm 2.2: Extending a partial Schur decomposition o

SEC. 2. NEWTON-BASED METHODS

411

As mentioned above, the natural choice of K is either r or /z. The later choice will give asymptotically swifter convergence; but since \JL varies with fc, it may make the correction equation harder to solverequiring, for example, a matrix factorization at each step. Restarting Like Krylov sequence methods, the Jacobi-Davidson algorithm builds up a basis V from which eigenvectors can be extracted by the Rayleigh-Ritz method. Ultimately, V will become so large that it exceeds the storage capacity of the machine in question. At that point we must restart with a reduced basis. Unlike Krylov sequence methods, the Jacobi-Davidson method does not have to preserve any special relation in the new basis we are free to restart in any way we desire. It is possible, however, to abuse that freedom. The basis V contains hard-won information about the vectors near the focal point, information that should not be discarded in the process of restarting. Fortunately we can extract that information by using a Schur-Rayleigh-Ritz process. Specifically, given V", a focal point r, and a radius />, we may proceed as follows. Here we use the notation of Algorithm 2.2.

Otherwise put, we replace V with a basis for the primitive Ritz subspace corresponding to the Ritz values within p of r. Harmonic Ritz vectors In 4.4, Chapter 4, we noted that an interior eigenvalue could be approximated by a Rayleigh quotient of a vector that has nothing to do with the eigenvalue in question. If such a vector is accepted as a Ritz vector, the Rayleigh-Ritz method may fail. We can, of course, detect these imposters by the fact that they have large residuals. But it is better to have a good vector in hand than to know that a vector is bad. An alternative is to use the harmonic Rayleigh-Ritz procedure, which discourages imposters. Recall (Definition 4.11, Chapter 4) that (r + , Vp) is a harmonic Ritz pair with orthonormal basis V and shift r if

Moreover, if WR is the QR factorization of (A - r!)U, then

Vol II: Eigensystems

412

CHAPTER 6. ALTERNATIVES

so that we can calculate 6 and p from this simpler and numerically more stable generalized eigenproblem. Note that the matrix B W^ U can be updated as we bring in new correction vectors v. Having computed a primitive harmonic Ritz pair (p, r + 6), we cannot use the harmonic eigenvalue in computing the residual, since that value will not make the residual orthogonal to V. Instead we must use the ordinary Rayleigh quotient p^VAVp. In 4.4, Chapter 4, we showed that

where z Vv is the harmonic Ritz vector. A little algebra then shows that

Algorithm 2.3 implements the harmonic version of partial Schur extension. Although it is more complicated than Algorithm 2.2, it has comparable storage requirements and operation counts. The algorithm for restarting the harmonic extension algorithm is more complicated than Algorithm 2.2 owing to the need to keep the columns of W orthogonal. Specifically, we have the following algorithm.

Note the indirect way of updating the QR factorization of the restarted matrix

It is faster than simply forming WRQ[:, 1:1] and computing its QR factorization. Hermitian matrices When A is Hermitian some obvious simplifications occur in Algorithm 2.2 (EPSD). For example, the Rayleigh quotient C is Hermitian, so that only the upper half of C need be retained. The Schur form is diagonal, so that EPSD need only return the converged Ritz pair (statement 13). Similarly economies can be achieved in the restarting procedure (2.18). The principle change in the harmonic extension (Algorithm 2.3), other than the natural economies listed in the last paragraph, is in how the harmonic Ritz vectors are

SEC. 2. NEWTON-BASED METHODS

413

Given a partial Schur decomposition AU UT, HEPSD extends it to a partial Schur decomposition of the form

using harmonic Ritz vectors. The inputs, in addition to U, are V, an nx(l1) matrix of orthonormalized correction vectors; an additional correction vector v\ the QR factorization WR of (A r!)V; the current harmonic pair (#, R); a focal point r; and an approximation A = A + E. In the following code P.L = I - UUH, and Aj_ = P^AP_L. It is assumed that the arrays V and W cannot be expanded to have more than m columns. If convergence does not occur before that happens, HEPSD returns the next correction vector v.

Algorithm 23: Harmonic extension of a partial Schur decomposition o Vol II: Eigensystems

414

CHAPTER 6. ALTERNATIVES

computed. As noted in 4.4, Chapter 4, when A is Hermitian, the nonsymmetric eigenproblems (4.22) and (4.23), Chapter 4, can give complex harmonic Ritz pairs. We should therefore use the Hermitian eigenproblem

to compute harmonic Ritz pairs, both for residuals for the correction equation and for restarting. Solving projected systems We now turn to the problem of solving the correction equation

It will pay to consider this problem in greater generality than just the correction equation. Therefore, we will consider the general system

in which we will assume M is nonsingular. To derive the solution of this system, we will assume that a solution x exists. Since x _L Q, we have

or

Hence,

a linear system from which we can compute a. It is easy to verify that if x is defined by (2.21), where a is a solution of (2.22), then x satisfies (2.20). Algorithm 2.4 implements this scheme. Here are three comments. Statement 1 anticipates the use of this algorithm to solve several systems. If it is expensive to solve systems involving the matrix M, then the bulk of the work in the algorithm will be concentrated in the formation of Q = M~1Q. If C has been precomputed, it can be used whenever another solution involving M and Q is required.

SEC. 2. NEWTON-BASED METHODS


This algorithm solves the projected equation

415

where Q is orthononnal, and M is nonsingulai

Algorithm 2.4: Solution of nroiftcted ennations

Likewise, if Q is augmented by a single vector z, then one can solve the system Mz z and update C in the form

In both cases there is a great savings in work. However, we must allocate additional storage to contain Q at least when M is nonsymmetric. For more see the discussion on economization of storage on page 391. We could go further and precompute or update a factorization of C by which we could calculate the solution of the system in statement 4. However, if n is very large, the savings will be insignificant. But if a factorization is to be updated, it should be one that can be stably updated without pivotinge.g., a QR decomposition. If Mis ill conditioned but (I-QQH)M(I-QQH) is not, then the vector x will not be large, while the vector x can be very large. In this case, we can expect cancellation in statement 5. Even when there is no cancellation, x is likely to have inaccuracies that will propagate to the solution x. The correction equation: Exact solution We now return to the solution of the correction equation

Since z _L U, we can set Q = (U z) and use Algorithm 2.4 to solve the correction equation. The mechanics of the algorithm argue strongly against changing the shift K frequently. In the first place, the algorithm requires that we solve systems of the form Vol II: Eigensystems

416

CHAPTER 6. ALTERNATIVES

(A K!)X = y. This requires a factorization of A, which has to be recomputed whenever K changes. Second, if K does not change, we can precompute the matrix C, and update it by adding the vector z as described above. All this suggests that we use the focal point r in Algorithms 2.2 and 2.3 as the shift K. Our comments on the accuracy of Algorithm 2.4 suggest that we should avoid ill conditioning in A K!. This means we should avoid a focal point r that accurately approximates an eigenvalue A of A. Even though such a focal point will speed up convergence to A, it could retard convergence to other eigenpairs. The correction equation: Iterative solution An alternative to the exact solution of the correction equation is to use an iterative method to provide an approximate solution. The subject of iterative methods is a large onefar beyond the scope of this volume. Fortunately, to describe how iterative solutions are used in the Jacobi-Davidson method, we need only know the operations we are required to perform with the matrix of our system. Let us consider a general linear system Ku b. The most successful of the various iterative methods for solving this system are based on Krylov sequences. This means that we only need to be able to form the matrix-vector product Kw for an arbitrary vector w. In the Jacobi-Davidson method, the matrix is (/- QQH)( A /)(/ QQH), where Q = (U z). Since the Jacobi-Davidson algorithm already requires that we be able to form matrix-vector products in A, it is easy to use Krylov sequence iterations with it. But that is not the whole story. The convergence of most Krylov sequence methods can be improved, often dramatically, by a process called preconditioning. The idea is to determine a matrix M usually based on special characteristics of the problem in questionsuch that M~1K is in some sense near the identity matrix. If it is cheap to solve systems in M, we can form the matrix-vector product z = M~lKw by the following algorithm.

In application to the Jacobi-Davidson algorithm, the matrix K is, as usual, (/ QQH)(A K!)(! QQ^)- The preconditioner M is determined from the matrix A AV/; however, since the preconditioner must approximate the projected system, it itself must be projected. Thus our equivalent of (2.23) is the following algorithm.

The system in statement 2 can be solved by Algorithm 2.4. The use of a preconditioned solver gives us more freedom to choose a shift K. First, the system to be solved involves the preconditioner, not the shifted matrix. Thus, if we can find an effective preconditioner that does not depend on K, we can vary K at least within the limits for which the preconditioner is effective. Second, we have more

SEC. 2. NEWTON-BASED METHODS

417

Figure 2.2: Convergence of the Jacobi-Davidson method with errors in the correction equations

freedom to place K near an eigenvalue, since we work only with the projected operator (/ QQ^)(A Kl)(I QQ^} and never have to explicitly solve systems involving A -AC/. Since we are free to stop an iterative method at any time, we can choose to solve the correction equation more or less accurately. Unfortunately, there is very little hard analysis to guide us in this matter. There is a tension between the local convergence driven by the approximate Newton iteration and the broader convergence driven by the correction subspace. From a local point of view, only a certain number of figures of v actually contribute to the improvement of z, and there is no reason to solve the correction equation more accurately than to that number of figures. However, this lack of accuracy can exact a price when we come to compute other eigenpairs. The following example illustrates this phenomenon. Example 2.5. The data is the same as in Example 2.4 (which the reader should review). The only difference is that at each stage a norm wise relative error of 0.01 is introduced in the correction equation. The table in Figure 2.2 shows the progress of the iteration (for a different random starting vector). The convergence is satisfactory, though not as fast as in Example 2.4. However, the approximations to 62 in the correction space stagnate after an initial decline. If we decrease the error in the solution to the correction equation in the above exVol II: Eigensystems

418

CHAPTER 6. ALTERNATIVES

ample to 10~3 and 10~4, the convergence to ei is marginally faster, but the convergence of approximations to 62 stagnates at 5-10~3 and 5-10~4, suggesting that the approximations to vectors other than the current vector will stagnate at about the level of the error in the solution of the correction equations. More generally, when the approximate Newton method is used, any convergence of the correction subspace should be toward eigenvectors of A = A + E, so that approximations to eigenvectors of A, other than the one currently being found, should stagnate at the level of \\E\\.
2.3. NOTES AND REFERENCES

Newton's method and the eigenvalue problem According to Kollerstrom [150] and Ypma [307] neither Newton nor Raphson used the calculus in the derivation of their methods. Newton, working with a polynomial equation p(x) = 0, expanded p(x + d) = q(d) and ignored higher terms in d to get a linear equation for d. He then continued by expanding q(d -f e) = r(e), linearizing, and solving for e. The scheme involved explicitly computing the polynomials p, q, r, etc. obviously a computationally expensive procedure. (However, Newton was actually interested in computing series expansions for x, in which case the extra work in computing the polynomials is justified.) Simpson showed how to effect the same calculations by working only with p. The formulation in terms of derivatives is due to Simpson. It is ironic that although Newton cannot be credited with the formula that bears his (and Raphson's) name, he seems to have been the originator of the idea expanding and linearizing to compute corrections to zeros of functions just the approach we use here. Many people have applied Newton's method to the eigenvalue problem. For some references, see [4]. The formula (2.3), with w z is due to Peters and Wilkinson [211]. They justify the choice w z by observing that if we require z and z + w to be normalized, then up to second-order terms in w we must have WTZ = 0. Peters and Wilkinson [211] explore in detail the relation of Newton's method to the inverse power method. The fact that asymptotically Newton's method and the Rayleigh quotient method produce essentially the same iterates can be established by a theorem of Denis and Schnabel [64] to the effect that any two superlinearly converging methods launched from the same point must up to higher-order terms produce the Newton direction. The relation of Newton's method to the RQ variant of the QR algorithm is best seen by considering the RQ factorization of AK! in the Z coordinate system. Specifically, partitioning the R- and Q-factors, we must have

(here we are ignoring second-order terms in the normalization of the first row and column of the Q-factor). It then follows that

SEC. 2. NEWTON-BASED METHODS

419

This algorithm takes a symmetric diagonally dominant matrix A = D + E, where D is the diagonal of A and an orthonormal matrix V of correction vectors and returns a Ritz pair (^u, z) approximating the fcth smallest eigenvalue of A and an augmented correction matrix R Here. Pi is the, nroiftction on to 7?. (V"!-1-.

Algorithm 2.5: Davidson's method o so that up to second-order terms the correction from the Q-factor and the Newton correction are the same. Inexact Newton methods In 1982, Dembo, Eisenstat, and Steihaug [55] introduced and analyzed inexact Newton methods, in which the Newton equation is solved inexactly. In some sense these methods are related to the approximate Newton methods introduced here, since any residual in the approximate solution of the Newton equation can be thrown back onto the Jacobian and conversely any perturbation of the Jacobian in the Newton equation corresponds to an approximate solution with a nonzero residual. However, it differs from the approximate Newton method given here in that we are working with a special constrained problem and the approximation is not to the Jacobian itself. To honor these distinctions we use the term "approximate" rather than "inexact" Newton method. The Jacobi-Davidson method As it has been derived here, the Jacobi-Davidson method might better be called the Newton-Rayleigh-Ritz method, and it is instructive to see how the current name came about. The story starts with Davidson's algorithm [53, 1975], which is sketched in Algorithm 2.5. It is very close to Algorithm 2.1 it builds up a correction subspace, from which it computes a Ritz vector and a new correction that is folded back into the subspace. The chief difference is in the correction equation, which is essentially an approximate inverse power method. For diagonally dominant matrices the approximation is quite good, so that the asymptotic relation between the inverse power method and Newton's method insures that Davidson's method will work well. But in other, less favorable problems it tends to stagnate. In 1990, Olsen [186] and his coauthors observed that the lack of orthogonality of v to z was a drawback. Using first-order perturbation expansions, they rediscovered Vol II: Eigensystems

420

CHAPTER 6. ALTERNATIVES

the matrix formulation of Peters and Wilkinson, but with an approximation as in (2.3), and solved it to get the correction formula (2.6). Thus Olsen's method is Davidson's method with an approximate Newton correction. It is worth noting that the author's application was so large that they could not save the corrections, and hence what they actually used was the approximate Newton method. In 1996, Sleijpen and van der Vorst [240] derived essentially the same algorithm by considering an algorithm of Jacobi [128,1846] for approximating eigenvectors of diagonally dominant matrices. Specifically, Jacobi partitioned a dominant symmetric matrix A in the form

Assuming an approximate eigenvector in the form ei, he computes a refined eigenvector of the form

This is easily seen to be one step of the approximate Newton method with a diagonal (Jacobi) approximation. Sleijpen and van der Vorst extended this example to general matrices, thus deriving the orthogonal Newton step. From the point of view taken here, their major contribution was the introduction of the correction equation, which expresses the correction in terms of a projection of the original matrix. It is the key to making the method effective for large sparse matrices. In particular, they went on to show how to deflate the problem and to incorporate iterative solutions with preconditioning. In later papers [74, 239, 245] Sieijpen, van der Vorst, and their colleagues also adapted the algorithm to harmonic Ritz vectors and the generalized eigenvalue problem. Templates may be found in [241, 242,243, 244]. Hermitian matrices The implementation for harmonic Ritz vectors suggested here differs somewhat from the implementation in [243]. There the authors accumulate R~l in the basis V. We have preferred to leave V orthogonal and work with the harmonic Rayleigh-Ritz equation (2.19).

APPENDIX: BACKGROUND
The reader of this volume is assumed to know the basics of linear algebra and analysis as well as the behavior of matrix algorithms on digital computers. This background has been presented in full detail in Volume I of this work. Here we confine ourselves to a review of some of the more important notation and facts.
1. SCALARS, VECTORS, AND MATRICES

1. Scalars are real or complex numbers. The set of real numbers will be denoted by R; the set of complex numbers by C. All scalars are denoted by lowercase Latin or Greek letters. 2. An n-vector is a collection of n scalars arranged in a column. The set of real nvectors is denoted by Rn; the set of complex n-vectors by C n . Vectors are denoted by lowercase Latin letters. 3. The scalars that form a vector are called the components of the vector. If a vector is denoted by a letter, its components will be denoted by a corresponding lowercase Latin or Greek letter. Thus the vector a may be written

Figure A.I gives the Greek alphabet and its corresponding Latin letters (some of the correspondences are quite artificial). 4. An m x n matrix is a rectangular array of mn scalars having m rows and n columns. The set of real mxn matrices is denoted by R m xn; the set of complex mxn matrices by C m x n . Matrices are denoted by uppercase Latin and Greek letters. 5. The scalars in a matrix are called the elements of the matrix. If a matrix is denoted by a letter, its elements will be denoted by a corresponding lowercase Latin or Greek

421

422

APPENDIX: BACKGROUND

Figure A.I: The Greek alphabet and Latin equivalents o letter. Thus the matrix A may be written

6. An n x n matrix is said to be square of order n. 1. The matrix sum and matrix product are written as usual as A -f B and AB. 8. The conjugate of a matrix A is written A. The transpose of A is written A1, and the conjugate transpose as A^. 9. If A is nonsingular, its inverse is written A~l. We also write

10. The trace of a square matrix is the sum of its diagonal elements. It is written trace(A). 11. The determinant of A is written det(A). It has the following useful properties. 1. 2. 3. 4. 5. det(AH) = det(A). If A is of order n, then det(iiA) = iin(A). det(AB) = det(A)det(). det(A~l) = det(A)-1. If A is block triangular with diagonal blocks AH , ^22, , Akk, then det(A) = det(4n) det(422) -det(Akk).

SEC. 1. SCALARS, VECTORS, AND MATRICES

423

6. det( A] is the product of the eigenvalues of A. 7. | det( A) | is the product of the singular values of A. 12. The absolute value of a matrix A is the matrix whose elements are the absolute value of the elements of A. It is written \A\.
a

13. If A and B are matrices of the same dimension, we write A < B to mean that ij < bij. Similarly for the relations A < B, A > B, and A > B.

14. Any vector whose components are all zero is called a zero vector and is written 0, or On when it is necessary to specify the dimension. 15. Any matrix whose components are all zero is called a zero matrix and is written 0, or O m X n when it is necessary to specify the dimension. 16. The vector whose Uh component is one and and whose other components are zero is called the z'th unit vector and is written e t . The vector whose components are all one is written e. 17. The matrix / whose diagonal elements are one and whose off-diagonal elements are zero is called the identity matrix of order n. When the context makes the order clear, an identity matrix is written simply /. 18. If ii,... , in is a permutation of the integers 1,... , n, the matrix

is called a permutation matrix. Premultiplying a matrix by P rearranges its rows in the order n , . . . , in. Postmultiplying a matrix by P rearranges its columns in the order
*!>,in-

19. The matrix

is called the cross operator. Premultiplying a matrix by the cross operator reverses the order of its rows. Postmultiplying a matrix by the cross operator reverses the order of its columns. 20. A matrix A is symmetric if A1 = A. It is Hermitian if AH = A. 21. A real matrix U is orthogonal if U^U I. A matrix U is unitary if UHU = /. 22. A matrix with orthonormal rows or columns is said to be orthonormal. 23. A square matrix whose off-diagonal elements are zero is said to be diagonal. A diagonal matrix whose diagonal elements are ^ j , . . . , f>n is written diag(<$i,... , Sn).

Vol II: Eigensystems

424

APPENDIX: BACKGROUND

24. A Wilkinson diagram is a device for illustrating the structure of a matrix. The following is a Wilkinson diagram of a diagonal matrix of order four:

Here the symbol "0" stands for a zero element. The symbol "X" stands for a quantity that may or may not be zero (but usually is not). Letters other than X are often used tc denote such elements, but a zero is always 0 or 0. 25. Lower and upper triangular matrices have Wilkinson diagrams of the form

26. A rectangular matrix whose elements below the main diagonal are zero is upper trapezoidal. A rectangular matrix whose elements above the main diagonal are zero is upper trapezoidal. 27. Triangular or trapezoidal matrices whose main diagonal elements are one are unit triangular or trapezoidal.

2. LINEAR ALGEBRA
1. With the exception of the sets R, C, En, etc., sets of scalars, vectors, or matrices are denoted by calligraphic letters e.g., X. 2. The dimension of a subspace X is written dim(X}. The subspace spanned by a set of vectors X is written span(^f). If X and y are disjoint subspaces, then

3. Let F be R or C depending on the underlying scalars. The column space of a m x n matrix A is the subspace H(A) = {Ax: x 6 F71}. 4. The null space of A is N(A) {x: Ax 0}. 5. The rank A is

6. The nullity of A is

SEC. 5. THE CHOLESKY DECOMPOSITION

425

7. An nxp matrix X is of full column rank if rank(J^) = p. It is of full row rank if rank(X) = n. We say that X is of full rank when the context tells whether we are referring to column or row rank (e.g., when n > p). 3. POSITIVE DEFINITE MATRICES 1. Let A be of order n. Then A is positive definite if

If x / 0 => x Ax > 0, then A is positive semidefinite. 2. In the real case, some people drop the symmetry condition and call any matrix A satisfy ing the conditions ^ 0 => xHAx > 0 a positive definite matrix. Be warned. 3. Let A be positive definite and let X G C n x p . Then X^AX is positive semidefinite. It is positive definite if and only if X is of full column rank. 4. Any principal submatrix of a positive definite matrix is positive definite. 5. The diagonal elements of a positive definite matrix are positive. 6. A is positive (semi)definite if and only if its eigenvalues are positive (nonnegative). 7. If A is positive semidefinite, its determinant is nonnegative. If A is positive definite, its determinant is positive.

i 9. If A is positive (semi)definite, then there is a positive (semi)definite matrix A 7 such that

8. If A is positive definite, then A is nonsingular and A~l is positive definite.

The matrix A 2 is unique. 4. THE LU DECOMPOSITION 1. Let A be of order n and assume that the first n-1 leading principal submatrices of A are nonsingular. Then A can be factored uniquely in the form

where L is unit lower triangular and U is upper triangular. We call the factorization the LU decomposition of A and call the matrices L and U the L-factor and the U-factor. 2. Gaussian elimination (Algorithm 1:3.1.1) computes the LU decomposition. Pivoting may be necessary for stability (see Algorithm 1:3.1.3). Vol II: Eigensystems

426

APPENDIX: BACKGROUND

5. THE CHOLESKY DECOMPOSITION


1. Any positive definite matrix can be uniquely factored in the form

where R is an upper triangular matrix with positive diagonal elements. This factorization is called the Cholesky decomposition of A. The matrix R is called the Cholesky factor of A. It is unique. 2. The Cholesky decomposition can be computed by variants of Gaussian elimination. See Algorithm 1:3.2.1. 3. There is a pivoted version of the decomposition. Specifically, there is a permutation matrix P such that

where the elements of R satisfy

Algorithm 1.5.2.2 computes a pivoted Cholesky decomposition.

6. THE QR DECOMPOSITION
1. Let X be an nxp matrix with n > p. Then there is a unitary matrix Q of order n and an upper triangular matrix R of order p with nonnegative diagonal elements such that

This factorization is called the QR decomposition of A. The matrix Q is the Q-factor of A, and the matrix R is the R-factor. 2. If we partition Q (Qx QL)-> where Qx has p columns, then we can write

which is called the QR factorization of R. 3. If X is of full rank, the QR factorization is unique. 4. If X is of full rank, then Qx is an orthonormal basis for the column space of X and Q is an orthonormal basis for the orthogonal complement of the column space of X.

SEC. 7. PROJECTORS

427

5. If X is of full rank, A = XHX is positive definite, and R is the Cholesky factor of A. 6. The QR decomposition can be computed by orthogonal triangularization (Algorithm 1.4.1.2). The QR factorization can be computed by the Gram-Schmidt algorithm (Algorithms 1.4.1.11-13). 7. There is a pivoted version of the QR decomposition. Specifically, there is a permutation matrix P such that XP has the QR decomposition

where the elements of R satisfy

Algorithm 1.5.2.1 computes a pivoted QR decomposition.

7. PROJECTORS
1. If P2 = P, then P is a projector (or projection). 2. Any projector P can be written in the form

The spaces X 7Z(X) and y = TZ(Y) uniquely define P, which is said to project onto X along the orthogonal complement y of y. 3. If P is a projector onto X along y, IP is its complementary projector. It projects onto y along X. Any vector z can be represented uniquely as the sum of a vector Px G X and a vector (/ - P)x <E y. 4. If P is a Hermitian projector, then P = X Jf H , where X is any orthonormal basis for 7(P). Such a projector is called an orthogonal projector. Its complementary projector is written Pj_.

Vol II: Eigensystems

This page intentionally left blank

REFERENCES
[1] A. C. Aitken. On Bernoulli's numerical solution of algebraic equations. Proceedings of the Royal Society of Edinburgh, 46:289-305,1926. [2] A. C. Aitken. Studies in practical mathematics, II: The evaluation of the latent roots and latent vectors of a matrix. Proceedings of the Royal Society of Edinburgh, 57:269-304,1937. [3] E. Anderson, Z. Bai, C. Bischof, J. Demmel, J. Dongarra, J. Du Croz, A. Greenbaum, S. Hammarling, A. McKenney, S. Ostrouchov, and D. Sorensen. LAPACK Users' Guide. SIAM, Philadelphia, second edition, 1995. [4] P. M. Anselone and L. B. Rail. The solution of characteristic value-vector problems by Newton's method. Numerische Mathematik, 11:38-45,1968. [5] W. E. Amoldi. The principle of minimized iterations in the solution of the matrix eigenvalue problem. Quarterly of Applied Mathematics, 9:17-29,1951. [6] J. Baglama, D. Calvetti, and L. Reichel. Iterative methods for the computation of a few eigenvalues of a large symmetric matrix. BIT, 37:400-440,1996. [7] J. Baglama, D. Calvetti, and L. Reichel. Computation of a few small eigenvalues of a large matrix with application to liquid crystal modeling. Journal of Computational Physics, 146:203-226,1998. [8] Z. Bai. Note on the quadratic convergence of Kogbetliantz's algorithm for computing the singular value decomposition. Linear Algebra and Its Applications, 104:131-140,1988. [9] Z. Bai and J. Demmel. On a block implementation of Hessenberg QR iteration. International Journal of High Speed Computing, 1:97-112, 1989. Cited in [29]. Also available online as LAPACK Working Note 8 from http: //www.netlib.org/lapack/lawns/lawn08 .ps. [10] Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst. Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide. SIAM, Philadelphia, 2000. [11] Z. Bai and J. W. Demmel. On swapping diagonal blocks in real Schur form. Linear Algebra and Its Applications, 186:73-95,1993.
429

430

REFERENCES

[12] Z. Bai and G. W. Stewart. Algorithm 776: SRRITA Fortran subroutine to calculate the dominant invariant subspace of a nonsymmetric matrix. ACM Transactions on Mathematical Software, 23:494-513,1997. [13] J. L. Barlow. Error analysis of update methods for the symmetric eigenvalue problem. SIAM Journal on Matrix Analysis and Applications, 14:598-816, 1993. [14] R. H. Bartels and G. W. Stewart. Algorithm 432: The solution of the matrix equation AX - BX = C. Communications oj'the ACM, 8:820-826,1972. [15] W. Barth, R. S. Martin, and J. H. Wilkinson. Calculation of the eigenvalues of a symmetric tridiagonal matrix by the method of bisection. Numerische Mathematik, 9:386-393,1967. Also in [305, pages 249-256]. [16] F. L. Bauer. Das Verfahren der Treppeniteration und verwandte Verfahren zur Losung algebraischer Eigenwertprobleme. Zeitschriftfur angewandte Mathematik undPhysik, 8:214-235,1957. [17] C. Bavely and G. W. Stewart. An algorithm for computing reducing subspaces by block diagonalization. SIAM Journal on Numerical Analysis, 16:359-367, 1979. [18] R. Bellman. Introduction to Matrix Analysis. McGraw-Hill, New York, second edition, 1970. [19] E. Beltrami. Sulle funzioni bilineari. Giornale di Matematiche ad Uso degli Studenti Delle Universita, 11:98-106,1873. An English translation by D. Boley is available in Technical Report 90-37, Department of Computer Science, University of Minnesota, Minneapolis, 1990. [20] A. Berman and A. Ben-Israel. A note on pencils of Hermitian or symmetric matrices. SIAM Journal on Applied Mathematics, 21:51-54,1971. [21] M. W. Berry. Large scale singular value computations. International Journal of Supercomputer Applications, 6:13-49,1992. [22] R. Bhatia. Perturbation Bounds for Matrix Eigenvalues. Pitman Research Notes in Mathematics. Longmann Scientific & Technical, Harlow, Essex, 1987. Published in the USA by John Wiley. [23] R. Bhatia. Matrix Analysis. Springer, New York, 1997. [24] R. Bhatia, L. Eisner, and G. Krause. Bounds for the variation of the roots of a polynomial and the eigenvalues of a matrix. Linear Algebra and Its Applications, 142:195-209,1990. [25] A. Bjorck. Numerical Methods for Least Squares Problems. SIAM, Philadelphia, 1996.

REFERENCES

431

[26] A. Bjorck and G. H. Golub. Numerical methods for computing angles between linear subspaces. Mathematics of Computation, 27:579-594,1973. [27] A. Bjorck, R. J. Plemmons, and H. Schneider, editors. Large-Scale Matrix Problems. North-Holland, New York, 1981. A reprint of Volumn 34,1980, of Linear Algebra and Its Applications. [28] C. W. Borchart. Bemerkung iiber die beiden vorstehenden Aufsatze. Journal fur die reine und angewandte Mathematik, 53:281283,1857. [29] K. Braman, R. Byers, and R. Mathias. The multi-shift QR-algorithm: Aggressive deflation, maintaining well focused shifts, and level 3 performance. Technical report, Department of Mathematics, University of Kansas, Lawrence, 1999. [30] J. R. Bunch, C. P. Nielsen, and D. C. Sorensen. Rank one modification of the symmetric eigenproblem. Numerische Mathematik, 31:31-48,1978. [31] A. L. Cauchy. Sur F equation a 1'aide de laquelle on determine les inegalites seculaires des mouvements des planetes. In Oeuvres Completes (IIe Serie), volume 9. 1829. [32] A. Cay ley. A memoir on the theory of matrices. Philosophical Transactions of the Royal Society of London, 148:17-37,1858. Cited and reprinted in [33, v. 2, pp. 475-496]. [33] A. Cayley. The Collected Mathematical Papers of Arthur Cayley. Cambridge University Press, Cambridge, 1889-1898. Arthur Cayley and A. R. Forsythe, editors. Thirteen volumes plus index. Reprinted 1963 by Johnson Reprint Corporation, New York. [34] T. F. Chan. Algorithm 581: An improved algorithm for computing the singular value decomposition. ACM Transactions on Mathematical Software, 8:84-88, 1982. [35] T. F. Chan. An improved algorithm for computing the singular value decomposition. ACM Transactions on Mathematical Software, 8:72-83,1982. [36] S. Chandrasekaran. An efficient and stable algorithm for the symmetric-definite generalized eigenvalue problem. SIAM Journal on Matrix Analysis and Applications, 21:1202-1228,2000. [37] J. P. Charlier, M. Vangegin, and P. Van Dooren. On efficient implementations of Kogbetliantz's algorithm for computing the singular value decomposition. Numerische Mathematik, 52:270-300,1988. [38] F. Chatelin. Valeurs Propres de Matrices. Masson, Paris, 1988. [39] F. Chatelin. Eigenvalues of Matrices. Wiley, New York, 1993. Expanded translation of [38]. VolII: Eigensystems

432

REFERENCES

[40] S. H. Cheng and N. J. Higham. The nearest definite pair for the Hermitian generalized eigenvalue problem. Linear Algebra and Its Applications, 302-303:6376, 1999. [41] M. Clint and A. Jennings. The evaluation of eigenvalues and eigenvectors of real symmetric matrices by simultaneous iteration. Computer Journal, 13:7680, 1970. [42] M. Clint and A. Jennings. A simultaneous iteration method for the unsymmetric eigenvalue problem. Journal of the Institutefor Mathematics and Applications, 8:111-121,1971. [43] C. R. Crawford. Algorithm 646 PDFIND: A routine to find a positive definite linear combination of two real symmetric matrices. ACM Transactions on Mathematical Software, 12:278-282,1986. [44] C. R. Crawford and Y. S. Moon. Finding a positive definite linear combination of two Hermitian matrices. Linear Algebra and Its Applications, 51:37-48, 1983. [45] J. Cullum and W. E. Donath. A block Lanczos algorithm for computing the Q algebraically largest eigenvalues and a corresponding eigenspace of large, sparse real symmetric matrices. In Proceedings of the 1974 IEEE Conference on Decision and Control, Phoenix, AZ, pages 505-509,1974. Cited in [94]. [46] J. Cullum and R. A. Willoughby. Computing eigenvalues of very large symmetric matricesAn implemention of a Lanczos algorithm with no reorthogonalization. Journal of Computational Physics, 44:329-358,1984. [47] J. Cullum, R. A. Willoughby, and M. Lake. A Lanczos algorithm for computing singular values and vectors of large matrices. SIAM Journal on Scientific and Statistical Computing, 4:197-215,1983. [48] J. K. Cullum and R. A. Willoughby. Lanczos Algorithms for Large Symmetric Eigenvalue Computations Volume 1: Theory. ILPrograms. Birkhauser, Stuttgart, 1985. Cited in [25]. [49] J. J. M. Cuppen. A divide and conquer method for the symmetric eigenproblem. Numerische Mathematik, 36:177-195,1981. [50] A. R. Curtis and J. K. Reid. On the automatic scaling of matrices for Gaussian elimination. Journal of the Institute for Mathematics and Applications, 10:118124,1972. [51] J.W.Daniel. The Approximation Minimization of Functionals. Prentice-Hall, Englewood Cliffs, NJ, 1971. [52] B. N. Datta. Numerical Linear Algebra and Applications. Brooks/Cole, Pacific Grove. CA. 1995.

REFERENCES

433

[53] E. R. Davidson. The iterative calculation of a few of the lowest eigenvalues and corresponding eigenvectors of large real-symmetric matrices. Journal of Computational Physics, 17:87-94,1975. [54] C. Davis and W. Kahan. The rotation of eigenvectors by a perturbation. III. SI AM Journal on Numerical Analysis, 7:1-46,1970. [55] R. S. Dembo, S. C. Eisenstat, and T. Steihaug. Inexact Newton methods. S1AM Journal on Numerical Analysis, 19:400-408,1982. [56] J. Demmel, M. Gu, S. Eisenstat, I. Slapnicar, K. Veselic, and Z. Drmac. Computing the singular value decomposition with high relative accuracy. Linear Algebra and Its Applications, 299:21-80,1997. [57] J. Demmel and B. Kagstrom. Computing stable eigendecompositions of matrix pencils. Linear Algebra and Its Applications, 88/89:139-186,1987. [58] J. Demmel and W. Kahan. Accurate singular values of bidiagonal matrices. SIAM Journal on Scientific and Statistical Computing, 11:873-912,1990. [59] J. Demmel and K. Veselic. Jacobi's method is more accurate than QR. SIAM Journal on Matrix Analysis and Applications, 13:1204-1245,1992. [60] J. W. Demmel. The condition number of equivalence transformations that block diagonalize matrix pencils. SIAM Journal on Numerical Analysis, 20:599-610, 1983. [61] J. W. Demmel. Computing stable eigendecompositions of matrices. Linear Algebra and Its Applications, 79:163-193,1986. [62] J. W. Demmel. Applied Numerical Linear Algebra. SIAM, Philadelphia, PA, 1997. [63] J. E. Dennis and J. J. More. Quasi-Newton methods, motivations and theory. SIAM Review, 19:46-89,1977. [64] J. E. Dennis and R. B. Schnabel. Numerical Methods for Unconstrained Optimization and Nonlinear Equations. Prentice-Hall, Englewood Cliffs, NJ, 1983. [65] I. S. Dhillon. A new O(n2) algorithm for the symmetric tridiagonal eigenvalue/eigenvector problem. Technical Report CSD-97-971, Computer Science Division, University of California at Berkeley, 1998. [66] J. J. Dongarra and D. C. Sorensen. A fully parallel algorithm for the symmetric eigenvalue problem. SIAM Journal on Scientific and Statistical Computing, 8:sl39-sl54,1987. [67] Z. Drmac. Implementation of Jacobi rotations for accurate singular value computation in floating point arithmetic. SIAM Journal on Scientific Computing, 18:1200-1222,1997. Vol II: Eigensystems

434

REFERENCES

[68] I. S. Duff and J. A. Scott. Computing selected eigenvalues of large sparse unsymmetric matrices using subspace iteration. ACM Transactions on Mathematical Software, 19:137-159,1993. [69] L. Eisner. On the variation of the spectra of matrices. Linear Algebra and Its Applications, 47': 127-138,1982. [70] L. Eisner. An optimal bound for the spectral variation of two matrices. Linear Algebra and Its Applications, 11:77-80,1985. [71] T. Ericsson. A generalized eigenvalue problem and the Lanczos algorithm. In J. Cullum and R. Willoughby, editors, Large Scale Eigenvalue Problems, pages 95-120. North-Holland, Amsterdam, 1986. [72] T. Ericsson and A. Ruhe. The spectral transformation Lanczos method for the numerical solution of large sparse generalized symmetric eigenvalue problems. Mathematics of Computation, 35:1251-1268,1980. [73] K. V. Fernando and B. N. Parlett. Accurate singular values and differential qd algorithms. Numerische Mathematik, 67:191-229,1994. [74] D. R. Fokkema, G. L. G. Sleijpen, and H. A. van der Vorst. Jacobi-Davidson style QR and QZ algorithms for the reduction of matrix pencils. SIAM Journal on Scientific Computing, 20:94-125,1998. [75] G. E. Forsythe and P. Henrici. The cyclic Jacobi method for computing the principle values of a complex matrix. Transaction of the American Mathematical Society, 94:1-23,1960. [76] J. G. F. Francis. The QR transformation, parts I and n. Computer Journal, 4:265-271, 332-345,1961, 1962. [77] V. Fraysse and V. Toumazou. A note on the normwise perturbation theory for the regular generalized eigenproblem Ax = \Bx. Numerical Linear Algebra with Applications, 5:1-10,1998. [78] R. W. Freund. Quasi-kernel polynomials and their use in non-Hermitian matrix iterations. Journal of Computational and Applied Mathematics, 43:135-148, 1992. [79] Roland W. Freund, M. H. Gutknecht, and N. M. Nachtigal. An implementation of the look-ahead Lanczos algorithm for non-Hermitian matrices. Research Report 91-06, Interdisciplinary Project Center for Supercomputing, Eidgenossische Technische Hochsulle Zurich, 1991. [80] F. R. Gantmacher. The Theory of Matrices, Vols. 1,11. Chelsea Publishing Company, New York, 1959.

REFERENCES

435

[81] B. S. Garbow, J. M. Boyle, J. J. Dongarra, and C. B. Moler. Matrix eigensystem routinesEISPACK guide extension. In Lecture Notes in Computer Science. Springer-Verlag, New York, 1977. [82] S. A. Gerschgorin. Uber die AbgrenzungderEigenwerteeiner Matrix. Izvestia AkademiiNauk SSSR, Mathematics and Natural Sciences, 6:749-754,1931. [83] W. Givens. Numerical computation of the characteristic values of a real matrix. Technical Report 1574, Oak Ridge National Laboratory, Oak Ridge, TN, 1954. [84] H. H. Goldstine and L. P. Horowitz. A procedure for the diagonalization of normal matrices. JournaloftheACM, 6:176-195,1959. [85] H. H. Goldstine, F. J. Murray, and J. von Neumann. The Jacobi method for real symmetric matrices. JournaloftheACM, 6:59-96,1959. [86] G. H. Golub. Least squares, singular values, and matrix approximations. Aplicace Mathematicky, 13:44-51,1968. [87] G. H. Golub. Some modified matrix eigenvalue problems. SIAM Review, 15:318-344,1973. [88] G. H. Golub and W. Kahan. Calculating the singular values and pseudo-inverse of a matrix. SIAM Journal on Numerical Analysis, 2:205-224,1965. [89] G. H. Golub, F. T. Luk, and M. L. Overton. A block Lanczos method for computing the singular values and corresponding singular vectors of a matrix. ACM Transactions on Mathematical Software, 7:149-169,1981. [90] G. H. Golub, S. Nash, and C. Van Loan. Hessenberg-Schur method for the problem AX + XB = C. IEEE Transactions on Automatic Control, AC24:909-913,1979. [91] G. H. Golub and C. Reinsch. Singular value decomposition and least squares solution. NumerischeMathematik, 14:403-420,1970. Also in [305, pages 134151]. [92] G. H. Golub and R. Underwood. The block Lanczos method for computing eigenvalues. In J. Rice, editor, Mathematical Software HI, pages 364-377. Academic Press, New York, 1977. [93] G. H. Golub, R. Underwood, and J. H. Wilkinson. The Lanczos algorithm for the symmetric Ax = XBx problem. Technical Report STAN-CS-72-270, Computer Science, Stanford University, Stanford, CA, 1972. Cited in [94]. [94] G. H. Golub and C. F. Van Loan. Matrix Computations. Johns Hopkins University Press, Baltimore, MD, second edition, 1989. [95] G. H. Golub and C. F. Van Loan. Matrix Computations. Johns Hopkins University Press, Baltimore, MD, third edition, 1996. Vol II: Eigensystems

436

REFERENCES

[96] G. H. Golub and J. H. Wilkinson. Ill-conditioned eigensystems and the computation of the Jordan canonical form. SIAM Review, 18:578-619,1976. [97] J. Grcar. Analyses of the Lanczos Algorithm and of the Approximation Problem in Richardson's Method. PhD thesis, University of Illinois at UrbanaChampaign, 1981. [98] R. G. Grimes, J. G. Lewis, and H. D. Simon. A shifted block Lanczos algorithm for solving sparse symmetric generalized eigenproblems. SIAM Journal on Matrix Analysis and Applications, 15:228-272,1994. [99] M. Gu. Finding well-conditioned similarities to block-diagonalized nonsymmetric matrices is NP-hard. Technical Report LBL-35100, Physics Division, Lawrence Berkeley Laboratory, Berkeley, CA, 1994. [100] M. Gu and S. C. Eisenstat. Stable and efficient algorithm for the rank-one modification of the symmetric eigenproblem. SIAM Journal on Matrix Analysis and Applications, 15:1266-1276,1994. [101] M. Gu and S. C. Eisenstat. A divide-and-conquer algorithm for the bidiagonal SVD. SIAM Journal on Matrix Analysis and Applications, 16:79-92,1995. [102] M. Gu and S. C. Eisenstat. A divide-and-conquer algorithm for the symmetric tridiagonal eigenvalue problem. SIAM Journal on Matrix Analysis and Applications, 16:11'2-191,1995. [103] M. H. Gutknecht. A completed theory of the unsymmetric Lanczos process and related algorithms: Part I. SIAM Journal on Matrix Analysis and Applications, 13:594-639,1992. [104] M. H. Gutknecht. A completed theory of the unsymmetric Lanczos process and related algorithms: Part II. SIAM Journal on Matrix Analysis and Applications, 15:15-58,1994. [105] M. H. Gutknecht and K. J. Ressel. Look-ahead procedures for Lanczos-type product methods based on three-term Lanczos recurrences. SIAM Journal on Matrix Analysis and Applications, 21:1051-1078,2000. [106] M. J. Hadamard. Essai sur 1'etude des fonctions donnees par leur developpement de taylor. Journ. deMath. (4e seriej, 8:101-186,1892. [107] V. Hari. On sharp quadratic convergence bounds for the serial Jacobi methods. Numerische Mathematik, 60:375-407,1991. [108] V. Hari and K. Veselic. On Jacobi methods for singular value decompositions. SIAM Journal on Scientific and Statistical Computing, 8:741-754,1987. [109] M. T. Heath, A. J. Laub, C. C. Paige, and R. C. Ward. Computing the SVD of a product of two matrices. SIAM Journal on Scientific and Statistical Computing, 7:1147-1159.1986.

REFERENCES

437

[110] P. Henrici. On the speed of convergence of cyclic and quasicyclic Jacob! methods for computing eigenvalues of Hermitian matrices. Journal of the Society for Industrial and Applied Mathematics, 6:144-162,1958. [Ill] P. Henrici. Bounds for iterates, inverses, spectral variation and fields of values of nonnormal matrices. Numerische Mathematik, 4:24-39,1962. [112] D. J. Higham and N. J. Higham. Structured backward error and condition of generalized eigenvalue problems. SIAM Journal on Matrix Analysis and Applications, 20:493-512,1998. [113] N. J. Higham. The accuracy of floating point summation. SIAM Journal on Scientific Computing, 14:783-799,1993. [114] N. J. Higham. Accuracy and Stability of Numerical Algorithms. SIAM, Philadelphia, 1996. [115] N. J. Higham. QR factorization with complete pivoting and accurate computation of the SVD. Linear Algebra and Its Applications, 309:153-174,2000. [116] D. Hilbert. Grundziige einer allgemeinen Theorie der linearen Integralgleichungen. B. G. Teubner, Leipzig and Berlin, 1912. A collection of papers that appeared in Gott. Nachr. 1904-1910. [117] W. Hoffman. Iterative algorithms for Gram-Schmidt orthogonalization. Computing, 41:335-348,1989. [118] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, Cambridge, 1985. [119] R. A. Horn and C. R. Johnson. Topics in Matrix Analysis. Cambridge University Press, Cambridge, 1991. [120] H. Hotelling. Analysis of a complex of statistical variables into principal components. Journal of Educational Psychology, 24:417'-441 and 498-520,1933. [121] A. S. Householder. The Theory of Matrices in Numerical Analysis. Dover, New York, 1964. Originally published by Blaisdell, New York. [122] A. S. Householder. The Numerical Treatment of a Single Nonlinear Equation. McGraw-Hill, New York, 1970. [123] A. S. Householder and F. L. Bauer. On certain methods for expanding the characteristic polynomial. Numerische Mathematik, 1:29-37,1958. [124] I. C. F. Ipsen. Computing an eigenvector with inverse iteration. SIAM Review, 39:254-291,1997. [125] I. C. F. Ipsen. Relative perturbation bounds for matrix eigenvalues and singular values. In Acta Numerica, pages 151-201. Cambridge University Press, Cambridge, 1998. VolII: Eigensy stems

438

REFERENCES

[126] LC. F. Ipsen. Absolute and relative perturbation bounds for invariant subspaces of matrices. Linear Algebra and Its Applications, 309:45-56,2000. [127] C. G. J. Jacobi. Ueber eine neue Auflosungsart der bei der Methode der kleinsten Quadrate vorkommenden linearen Gleichungen. Astronomische Nachrichten, 22:297-306,1845. [128] C. G. J. Jacobi. Uber ein leichtes Verfahren die in der Theorie der Sacularstorungen vorkommenden Gleichungen numerisch aufzulosen. Journal fur die reine und angewandte Mathematik, 30:51-94,1846. [129] C. G. J. Jacobi. Uber eine elementare Transformation eines in Buzug jedes von zwei Variablen-Systemen linearen und homogenen Ausdrucks. Journalfiir die reine und angewandte Mathematik, 53:265-270,1857, posthumous. [130] A. Jennings. A direct iteration method of obtaining latent roots and vectors of a symmetric matrix. Proceedings of the Cambridge Philosophical Society, 63:755-765,1967. [131] Z. Jia. Refined iterative algorithm based on Arnoldi's process for large unsymmetric eigenproblems. Linear Algebra and Its Applications, 259:1-23,1997. [132] Z. Jia. A refined subspace iteration algorithm for large sparse eigenproblems. Applied Numerical Mathematics, 32:35-52,2000. [133] Z. Jia and G. W. Stewart. On the convergence of Ritz values, Ritz vectors, and refined Ritz vectors. Technical Report TR-3986, Department of Computer Science, University of Maryland, College Park, 1999. [134] Z. Jia and G. W. Stewart. An analysis of the Rayleigh-Ritz method for approximating eigenspaces. Mathematics of Computation, 70:637-647,2001. [135] E. Jiang and Z. Zhang. A new shift of the QL algorithm for irreducible symmetric tridiagonal matrices. Linear Algebra and Its Applications, 65:261-272, 1985. [136] C.Jordan. Traite des Substitutions et des Equations Algebriques. Paris, 1870. Cited in [167]. [137] C. Jordan. Memoire sur les formes bilineaires. Journal de Mathematiques Pures et Appliquees, Deuxieme Serie, 19:35-54,1874. [138] C. Jordan. Essai sur la geometric a n dimensions. Bulletin de la Societe Mathematique,3:lQ3-174,1875. [139] B. Kagstrom and A. Ruhe. Algorithm 560: JNF, an algorithm for numerical computation of the Jordan normal form of a complex matrix. Transactions on Mathematical Software, 6:437-443,1980.

REFERENCES

439

[140] B. Kagstrom and A. Ruhe. An algorithm for numerical computation of the Jordan normal form of a complex matrix. Transactions on Mathematical Software, 6:398-419,1980. [141] B. Kagstrom and P Wiberg. Extracting partial canonical structure for large scale eigenvalue problems. Numerical Algorithms, 24:195-237,1999. [142] W. Kahan. Inclusion theorems for clusters of eigenvalues of Hermitian matrices. Technical report, Computer Science Department, University of Toronto, 1967. [143] W. Kahan and B. N. Parlett. How far should you go with the Lanczos process? In J. Bunch andD. Rose, editors, Sparse Matrix Computations, pages 131-144. Academic Press, New York, 1976. [144] W. Kahan, B. N. Parlett, and E. Jiang. Residual bounds on approximate eigensystems of nonnormal matrices. SIAM Journal on Numerical Analysis, 19:470484,1982. [145] S. Kaniel. Estimates for some computational techniques in linear algebra. Mathematics of Computation, 20:369-378,1966. [146] T. Kato. Perturbation Theory for Linear Operators. Springer-Verlag, New York, 1966. [147] M. Kline. Mathematical Thought from Ancient to Modern Times. Oxford University Press, New York, 1972. [148] A. V. Knyazev. New estimates for Ritz vectors. Mathematics of Computation, 66:985-995,1997. [149] E. G. Kogbetliantz. Solution of linear systems by diagonalization of coefficients matrix. Quarterly of Applied Mathematics, 13:123-132,1955. [150] N. Kollerstrom. Thomas Simpson and "Newtons method of approximation": An enduring myth. British Journal for the History of Science, 25:347354, 1992. [151] J. Konig. tiber eine Eigenschaft der Potenzreihen. Mathematische Annalen, 23:447^49,1884. [152] L. Kronecker. Algebraische Reduction der Schaaren bilinearer Formen. Sitzungberichte der Koniglich Preuftischen Akademie der Wissenschaften zu Berlin, pages 1225-1237,1890. [153] A. N. Krylov. O Cislennom resenii uravnenija, kotorym v techniceskih voprasah opredeljajutsja castoy malyh kolebanil materiaFnyh. Izv. Adad. Nauk SSSR old. Mat. Estest., pages 491-539,1931. Cited in [121].

Vol II: Eigensystems

440

REFERENCES

[154] V. N. Kublanovskaya. On some algorithms for the solution of the complete eigenvalue problem. Zhurnal VychislitelnoiMatematiki i Matematicheskoi Fiziki, 1:555-570,1961. In Russian. Translation in USSR Computational Mathematics and Mathematical Physics, 1:637-657,1962. [155] J.-L. Lagrange. Solution de differents problems de calcul integral. Miscellanea Taurinensia, 3,1762-1765. Cited and reprinted in [156, v. 1, pages 472-668]. [156] J.-L. Lagrange. (Euvres de Langrange. Gauthier-Villars, Paris, 1867-1892. [157] C. Lanczos. An iteration method for the solution of the eigenvalue problem of linear differential and integral operators. Journal of Research of the National Bureau of Standards, 45:255-282,1950. [158] R. Lehoucq and D. C. Sorensen. Deflation techniques for an implicitly restarted Arnoldi iteration. SIAM Journal on Matrix Analysis and Applications, 17:789821, 1996. [159] R. B. Lehoucq. The computation of elementary unitary matrices. ACM Transactions on Mathematical Software, 22:393-400,1996. [160] R. B. Lehoucq. On the convergence of an implicitly restarted Arnoldi method. Technical Report SAND99-1756J, Sandia National Laboratories, Albuquerque, NM, 1999. [161] R. B. Lehoucq and J. A. Scott. An evaluation of software for computing eigenvalues of sparse nonsymmetric matrices. Preprint MCS-P547-1195, Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL, 1996. [162] R. B. Lehoucq, D. C. Sorensen, and C. Yang. ARPACK Users' Guide: Solution of Large Scale Eigenvalue Problems by Implicitly Restarted Arnoldi Methods. SIAM, Philadelphia, 1998. [163] C.-K. Li and R. Mathias. The definite generalized eigenvalue problem: A reworked perturbation theory. Department of Mathematics, College of William & Mary, 2000. [164] R.-C. Li. Solving secular equations stably and efficiently. Technical Report UCB//CSD-94-851, Computer Science Division, University of California, Berkeley, 1993. [165] R-C. Li. Relative pertubation theory: I. Eigenvalue and singular value variations. SIAM Journal on Matrix Analysis and Applications, 19:956-982,1998. [ 166] R-C. Li. Relative pertubation theory: II. Eigenspace and singular subspace variations. SIAM Journal on Matrix Analysis and Applications, 20:471-492,1998. [167] C. C. Mac Duffee. The Theory of Matrices. Chelsea, New York, 1946.

REFERENCES

441

[168] M. Marcus and H. Mine. A Survey of Matrix Theory and Matrix Inequalities. Allyn and Bacon, Boston, 1964. [169] R. S. Martin, C. Reinsch, and J. H. Wilkinson. Householder tridiagonalization of a real symmetric matrix. Numerische Mathematik, 11:181-195,1968. Also in [305, pages 212-226]. [170] R. S. Martin and J. H. Wilkinson. Reduction of the symmetric eigenproblem Ax \Bx and related problems to standard form. Numerische Mathematik, 11:99-110,1968. Also in [305, pages 303-314]. [171] W. F. Mascarenhas. On the convergence of the Jacobi method for arbitrary orderings. SI AM Journal on Matrix Analysis and Applications, 16:1197-1209, 1995. [172] R. Mathias. Accurate eigensystem computations by Jacobi methods. SIAM Journal on Matrix Analysis and Applications, 16:977-1003,1995. [173] R. Mathias. Spectral perturbation bounds for positive definite matrices. SIAM Journal on Matrix Analysis and Applications, 18:959-980,1997. [174] R. Mathias. Quadratic residual bounds for the Hermitian eigenvalue problem. SIAM Journal on Matrix Analysis and Applications, 18:541-550,1998. [175] H. I. Medley and R. S. Varga. On smallest isolated Gerschgorin disks for eigenvalues. III. Numerische Mathematik, 11:361-369,1968. [176] K. Meerbergen and A. Spence. Implicitly restarted Arnoldi with purification for the shift-invert transformation. Mathematics of Computation, 66:667-689, 1997. [177] D. S. Mitrinovic. Analytic Inequalities. Springer-Verlag, New York, 1970. [178] C. B. Moler and G. W. Stewart. An algorithm for generalized matrix eigenvalue problems. SIAM Journal on Numerical Analysis, 10:241-256,1973. [179] R. B. Morgan. Computing interior eigenvalues of large matrices. Linear Algebra and Its Applications, 154-156:289-309,1991. [180] R. B. Morgan. On restarting the Arnoldi method for large nonsymmetric eigenvalue problems. Mathematics of Computation, 65:1213-1230,1996. [181] R. B. Morgan. Implicitly restarted GMRES and Arnoldi methods for nonsymmetric systems of equations. SIAM Journal on Matrix Analysis and Applications, 21:1112-1135,2000. [182] C. L. Miintz. Solution direct de 1'equation seculaire et de quelques problemes analogues transcendents. Comptes Rendus de I'Academie des Sciences, Paris, 156:43^6,1913. VolII: Eigensy stems

442

REFERENCES

[183] M. Newman and P. F. Flanagan. Eigenvalue extraction in NASTRAN by the tridiagonal reduction (PEER) methodReal eigenvalue analysis. NASA Contractor Report CR-2731, NASA, Washington DC, 1976. Cited in [236]. [184] B. Nour-Omid, B. N. Parlett, T. Ericsson, and P. S. Jensen. How to implement the spectral transformation. Mathematics of Computation, 48:663-67'3,1897. [185] W. Oettli and W. Prager. Compatibility of approximate solution of linear equations with given error bounds for coefficients and right-hand sides. Numerische Mathematik, 6:405-409,1964. [186] J. Olsen, P. J0rgensen, and J. Simons. Passing the one-billion limit in full configuration-interaction (FCI) calculations. Chemical Physics Letters, 169:463^72,1990. [187] E. E. Osborne. On pre-conditioning of matrices. Journalof the ACM, 7:338345,1960. [188] A. M. Ostrowski. On the convergence of the Rayleigh quotient iteration for the computation of the characteristic roots and vectors. I. Archive for Rational Mechanics and Analysis, 1:233-241,1958. [189] A. M. Ostrowski. On the convergence of the Rayleigh quotient iteration for the computation of the characteristic roots and vectors, n. Archive for Rational Mechanics and Analysis, 2:423-428,1958. [190] A. M. Ostrowski. On the convergence of the Rayleigh quotient iteration for the computation of the characteristic roots and vectors. HI (generalized Rayleigh quotient and characteristic roots with linear elementary divisors). Archive for Rational Mechanics and Analysis, 3:325-340,1959. [191] A. M. Ostrowski. On the convergence of the Rayleigh quotient iteration for the computation of the characteristic roots and vectors. IV (generalized Rayleigh quotient for nonlinear elementary divisors). Archive for Rational Mechanics and Analysis, 3:341-347,1959. [192] A. M. Ostrowski. On the convergence of the Rayleigh quotient iteration for the computation of the characteristic roots and vectors. VI (usual Rayleigh quotient for nonlinear elementary divisors). Archive for Rational Mechanics and Analysis, 4:153-165,1959. [193] A. M. Ostrowski. On the convergence of the Rayleigh quotient iteration for the computation of the characteristic roots and vectors. V (usual Rayleigh quotient for non-Hermitian matrices and linear elementary divisors). Archive for Rational Mechanics and Analysis, 3:472-481,1959. [194] A.M. Ostrowski. Solution ofEquations and Systems ofEquations. Academic Press. New York. 1960.

REFERENCES

443

[195] C. C. Paige. Practical use of the symmetric Lanczos process with reorthogonalization. BIT, 10:183-195,1970. [196] C. C. Paige. The Computation of Eigenvalues and Eigenvectors of Very Large Sparse Matrices. PhD thesis, University of London, 1971. [197] C. C. Paige. Computational variants of the Lanczos method for the eigenproblem. Journal of the Institute of Mathematics and Its Applications, 10:373381, 1972. [198] C. C. Paige. Error analysis of the Lanczos algorithm for tridiagonalizing a symmetric matrix. Journal of the Institute of Mathematics and Its Applications, 18:341-349,1976. Cited in [25]. [199] C. C. Paige. Accuracy and effectiveness of the Lanczos algorithm for the symmetric eigenproblem. Linear Algebra and Its Applications, 34:235-258,1980. Reprinted in [27]. [200] C. C. Paige. Computing the generalized singular value decomposition. SIAM Journal on Scientific and Statistical Computing, 7:1126-1146,1986. [201] C. C. Paige, B. N. Parlett, and H. van der Vorst. Approximate solutions and eigenvalue bounds from Krylov subspaces. Numerical Linear Algebra with Applications, 2:115-134,1995. [202] C. C. Paige and M. A. Saunders. Toward a generalized singular value decomposition. SIAM Journal on Numerical Analysis, 18:398-405,1981. [203] C. C. Paige and P. Van Dooren. On the quadratic convergence of Kogbetliantz's algorithm for computing the singular value decomposition. Linear Algebra and Its Applications, 77:301-313,1986. [204] B. N. Parlett. The origin and development of methods of the LR type. SIAM Review, 6:275-295,1964. [205] B. N. Parlett. A new look at the Lanczos algorithm for solving symmetric systems and linear equations. Linear Algebra and Its Applications, 29:323-346, 1980. [206] B. N. Parlett. The Symmetric Eigenvalue Problem. Prentice-Hall, Englewood Cliffs, NJ, 1980. Reissued with revisions by SIAM, Philadelphia, 1998. [207] B. N. Parlett and J. Le. Forward instability of tridiagonal qr. SIAM Journal on Matrix Analysis and Applications, 14:279-316,1993. [208] B. N. Parlett and C. Reinsch. Balancing a matrix for calculation of eigenvalues and eigenvectors. Numerische Mathematik, 13:293-304,1969. Also in [305, pages 315-326].

Vol IT. Eigensystems

444

REFERENCES

[209] B. N. Parlett and D. S. Scott. The Lanczos algorithm with selective orthogonalization. Mathematics of Computation, 33:217-238,1979. [210] B. N. Parlett, D. R. Taylor, and Z. A. Liu. A look-ahead Lanczos algorithm for unsymmetric matrices. Mathematics of Computation, 44:105-124,1985. [211] G. Peters and J. H. Wilkinson. Inverse iteration, ill-conditioned equations, and Newton's method. SIAM Review, 21:339-360,1979. Cited in [94]. [212] D. A. Pope and C. Tompkins. Maximizing functions of rotations: Experiments concerning speed of diagonalization of symmetric matrices using Jacobi's method. JournaloftheACM, 4:459-466,1957. [213] D. Porter and D. S. G. Stirling. Integral Equations. Cambridge University Press, Cambridge, 1990. [214] M. J. D. Powell. A new algorithm for unconstrained optimization. In J. B. Rosen, O. L. Mangasarian, and K. Ritter, editors, Nonlinear Programming, pages 31-65. Academic Press, New York, 1970. Cited in [64, page 196]. [215] Lord Rayleigh (J. W. Strutt). On the calculation of the frequency of vibration of a system in its gravest mode, with an example from hydrodynamics. The Philosophical Magazine, 47:556-572,1899. Cited in [206]. [216] J. L. Rigal and J. Gaches. On the compatibility of a given solution with the data of a linear system. JournaloftheACM, 14:543-548,1967. [217] W. Ritz. liber eine neue Method zur Losung gewisser Variationsprobleme der mathematischen Physik. Journal fiir die reine und angewandte Mathematik, 135:1-61,1909. [218] A. Ruhe. Perturbation bounds for means of eigenvalues and invariant subspaces. BIT, 10:343-354,1970. [219] A. Ruhe. Implementation aspects of band Lanczos algorithms for computation of eigenvalues of large sparse symmetric matrices. Mathematics of Computation, 33:680-687,1979. [220] A. Ruhe. Rational Krylov algorithms for nonsymmetric eigenvalue problems. H. Matrix pairs. Linear Algebra and Its Applications, 197-198:283-295,1994. [221] A. Ruhe. Rational Krylov subspace method. In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst, editors, Templates for the Solution of Algebraic Eigenvalue Problems, pages 246-249. SIAM, Philadelphia, 2000. [222] H. Rutishauser. Anwendungen Des Quotienten-Differenzen-Algorithmus. Zeitschrift filr angewandte Mathematik und Physik, 5:496-508,1954. [223] H. Rutishauser. Der Quotienten-Differenzen-Algorithmus. Zeitschrift fiir angewandte Mathematik und Physik, 5:233-251,1954.

REFERENCES

445

[224] H. Rutishauser. Une methode pour la determination des valeurs propres d'une matrice. Comptes Rendus de VAcademic des Sciences, Paris, 240:34-36,1955. [225] H. Rutishauser. Solution of eigenvalue problems with the LR-transformation. National Bureau of Standards Applied Mathematics Series, 49:47-81,1958. [226] H. Rutishauser. The Jacobi method for real symmetric matrices. Numerische Mathematik, 9:1-10,1966. Also in [305, pages 202-211]. [227] H. Rutishauser. Computational aspects of F. L. Bauer's simultaneous iteration method. Numerische Mathematik, 13:4-13,1969. [228] H. Rutishauser. Simultaneous iteration method for symmetric matrices. Numerische Mathematik, 16:205-223,1970. Also in [305, pages 284-301]. [229] Y. Saad. On the rates of convergence of the Lanczos and the block Lanczos methods. SIAM Journal on Numerical Analysis, 17:687-706,1980. [230] Y. Saad. Variations of Arnoldi's method for computing eigenelements of large unsymmetric matrices. Linear Algebra and Its Applications, 34:269-295,1980. [231] Y. Saad. Projection methods for solving large sparse eigenvalue problems. In B. Kagstrom and A. Ruhe, editors, Matrix Pencils, pages 121-144. SpringerVerlag, New York, 1983. [232] Y. Saad. Chebyshev acceleration techniques for solving nonsymmetric eigenvalue problems. Mathematics of Computation, 42:567'-588,1984. [233] Y. Saad. Numerical Methods for Large Eigenvalue Problems: Theory and Algorithms. John Wiley, New York, 1992. [234] J. Schur. Uber die charakteristischen Wiirzeln einer linearen Substitution mit einer Anwendung auf die Theorie der Integralgleichungen. MathematischeAnnalen, 66:448-510,1909. [235] H. R. Schwarz. Tridiagonalization of a symmetric band matrix. Numerische Mathematik, 12:231-241,1968. Also in [305, pages 273-283]. [236] D. S. Scott. The advantages of inverted operators in Rayleigh-Ritz approximations. SIAM Journal on Scientific and Statistical Computing, 3:68-75,1982. [237] H. D. Simon. Analysis of the symmetric Lanczos algorithm with reorthogonalization methods. Linear Algebra and Its Applications, 61:101-132,1984. [238] H. D. Simon. The Lanczos algorithm with partial reorthogonalization. Mathematics ofComputation, 42:115-142,1984. [239] G. L. G. Sleijpen, A. G. L. Booten, D. R. Fokkema, and Henk van der Vorst. Jacobi-Davidson type methods for generalized eigenproblems and polynomial eigenproblems. BIT, 36:595-633,1996. Vol II: Eigensystems

446

REFERENCES

[240] G. L. G. Sleijpen and H. A. van der Vorst. A Jacobi-Davidson iteration method for linear eigenvalue problems. SIAM Journal on Matrix Analysis and Applications, 17:401^25,1996. [241] G. L. G. Sleijpen and H. A. van der Vorst. Generalized Hermitian eigenvalue problems: Jacobi-Davidson methods. In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst, editors, Templates for the Solution of Algebraic Eigenvalue Problems, pages 123-127. SIAM, Philadelphia, 2000. [242] G. L. G. Sleijpen and H. A. van der Vorst. Generalized non-Hermitian eigenvalue problems: Jacobi-Davidson method. In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst, editors, Templates for the Solution of Algebraic Eigenvalue Problems, pages 238-246. SIAM, Philadelphia, 2000. [243] G. L. G. Sleijpen and H. A. van der Vorst. The Hermitian eigenvalue problem: Jacobi-Davidson methods. In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst, editors, Templates for the Solution of Algebraic Eigenvalue Problems, pages 88-105. SIAM, Philadelphia, 2000. [244] G. L. G. Sleijpen and H. A. van der Vorst. Non-Hermitian eigenvalue problems: Jacobi-Davidson methods. In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der Vorst, editors, Templates for the Solution of Algebraic Eigenvalue Problems, pages 221-228. SIAM, Philadelphia, 2000. [245] G. L. G. Sleijpen, H. A. van der Vorst, and E. Meijerink. Efficient expansion of subspaces in the Jacobi-Davidson method for standard and generalized eigenproblems. Electronic Transactions on Numerical Analysis, 7:75-89,1998. [246] D. C. Sorensen. Implicit application of polynomial filters in a fc-step Arnoldi method. SIAM Journal on Matrix Analysis and Applications, 13:357-385, 1992. [247] D. C. Sorensen and P. T. P. Tang. On the orthogonality of eigenvectors computed by divide and conquer techniques. SIAM Journal on Numerical Analysis, 28:1752-1775,1991. [248] A. Stathopoulos, Y. Saad, and Kesheng Wu. Dynamic thick restarting of the Davidson and the implicitly restarted Arnoldi algorithms. SIAM Journal on Scientific Computing, 19:227-245,1998. [249] G. W. Stewart. Accelerating the orthogonal iteration for the eigenvalues of a Hermitian matrix. Numerische Mathematik, 13:362-376,1969. [250] G. W. Stewart. Error bounds for approximate invariant subspaces of closed linear operators. SIAM Journal on Numerical Analysis, 8:796-808,1971. [251] G. W. Stewart. On the sensitivity of the eigenvalue problem Ax = \Bx. SIAM Journal on Numerical Analysis, 4:669-686,1972.

REFERENCES

447

[252] G. W. Stewart. Error and perturbation bounds for subspaces associated with certain eigenvalue problems. SIAM Review, 15:727-764,1973. [253] G. W. Stewart. Introduction to Matrix Computations. Academic Press, New York, 1973. [254] G. W. Stewart. Modifying pivot elements in Gaussian elimination. Mathematics of Computation, 28:537-542,1974. [255] G. W. Stewart. Gerschgorin theory for the generalized eigenvalue problem Ax = XBx. Mathematics of Computation, 29:600-606,1975. [256] G. W. Stewart. Algorithm 407: HQR3 and EXCHNG: FORTRAN programs for calculating the eigenvalues of a real upper Hessenberg matrix in a prescribed order. ACM Transactions on Mathematical Software, 2:275-280,1976. [257] G. W. Stewart. Simultaneous iteration for computing invariant subspaces of a non-Hermitian matrix. Numerische Mathematik, 25:123-136,1976. [258] G. W. Stewart. On the perturbation of pseudo-inverses, projections, and linear least squares problems. SIAM Review, 19:634-662,1977. [259] G. W. Stewart. Computing the CS decomposition of a partitioned orthogonal matrix. Numerische Mathematik, 40:297-306,1982. [260] G. W. Stewart. A method for computing the generalized singular value decomposition. In B. Kagstrom and A. Ruhe, editors, Matrix Pencils, pages 207-220. Springer-Verlag, New York, 1983. [261] G. W. Stewart. Two simple residual bounds for the eigenvalues of Hermitian matrices. SIAM Journal on Matrix Analysis and Applications, 12:205-208, 1991. [262] G. W. Stewart. Error analysis of QR updating with exponential windowing. Mathematics of Computation, 59:135-140,1992. [263] G. W. Stewart. On the early history of the singular value decomposition. SIAM Review, 35:551-566,1993. [264] G. W. Stewart. Afternotes Goes to Graduate School. SIAM, Philadelphia, 1998. [265] G. W. Stewart. Matrix Algorithms I: Basic Decompositions. SIAM, Philadelphia, 1998. [266] G. W. Stewart. The decompositional approach to matrix computations. Computing in Science and Engineering, 2:50-59,2000. [267] G. W. Stewart. A Krylov-Schur algorithm for large eigenproblems. Technical Report TR-4127, Department of Computer Science, University of Maryland, College Park, 2000. To appear in the SIAM Journal on Matrix Analysis and Applications. Vol II: Eigensystems

448

REFERENCES

[268] G. W. Stewart. A generalization of Saad's theorem on Rayleigh-Ritz approximations. Linear Algebra and Its Applications, 327:115-120,2001. [269] G. W. Stewart and J.-G. Sun. Matrix Perturbation Theory. Academic Press, New York, 1990. [270] W. J. Stewart and A. Jennings. Algorithm 570: LOPSI a simultaneous iteration method for real matrices. ACM Transactions on Mathematical Software, 7:230232,1981. [271] W. J. Stewart and A. Jennings. A simultaneous iteration algorithm for real matrices. ACM Transactions on Mathematical Software, 7:184-198,1981. [272] J. J. Sylvester. On a theory of the syzygetic relations etc. Phil. Trans., pages 481-84,1853. Cited in [28]. [273] J. J. Sylvester. Sur 1'equation en matrices px = xq. Comptes Rendus de I'Academie des Sciences, pages 67-71 and 115-116,1884. [274] O. Taussky. A recurring theorem on determinants. American Mathematical Monthly, 46:672-675,1949. [275] D. R. Taylor. Analysis of the Look Ahead Lanczos Algorithm. PhD thesis, Department of Mathematics, University of California, Berkeley, 1982. Cited in [79]. [276] L. N. Trefethen. Computation of pseudospectra. In ActaNumerica, pages 247295. Cambridge University Press, Cambridge, 1999. [277] L. N. Trefethen. Spectral Methods in MATLAB. SIAM, Philadelphia, 2000. [278] L. N. Trefethen and D. Bau, HI. Numerical Linear Algebra. SIAM, Philadelphia, 1997. [279] L. N. Trefethern. Pseudospectra of linear operators. SIAM Review, 39:383^06, 1997. [280] R. Underwood. An iterative block Lanczos method for the solution of large sparse symmetric eigenproblems. Technical Report STAN-CS-75-496, Computer Science, Stanford University, Stanford, CA, 1975. PhD thesis. [281] P. Van Dooren. The computation of Kronecker's canonical form of a singular pencil. Linear Algebra and Its Applications, 27:103-140,1979. [282] J. M. Van Kats and H. A. van der Vorst. Automatic monitoring of Lanczos schemes for symmetric or skew-symmetric generalized eigenvalue problems. Technical Report TR 7, Academisc Computer Centre Utrecht, Budapestlaan 6, De Vithof-Utrecht, the Netherlands, 1977. Cited in [236]. [283] C. F. Van Loan. Generalizing the singular value decomposition. SIAM Journal on Numerical Analysis, 13:76-83,1976.

REFERENCES

449

[284] C. F. Van Loan. Computing the CS and the generalized singular value decompositions. Numerische Mathematik, 46:479-491,1985. [285] R. S. Varga. On smallest isolated Gerschgorin disks for eigenvalues. Numerische Mathematik, 6:366-376,1964. [286] R. C. Ward. The combination shift QZ algorithm. SIAM Journal on Numerical Analysis, 12:835-853,1975. [287] R. C. Ward. Balancing the generalized eigenvalue problem. SIAM Journal on Scientific and Statistical Computing, 2:141-152,1981. [288] D. S. Watkins. Fundamentals of Matrix Computations. John Wiley & Sons, New York, 1991. [289] D. S. Watkins. Forward stability and transmission of shifts in the QR algorithm. SIAM Journal on Matrix Analysis and Applications, 16:469487,1995. [290] D. S. Watkins. On the transmission of shifts and shift blurring in the QR algorithm. Linear Algebra and Its Applications, 241-243:877-896,1996. [291] D. S. Watkins. Performance of the QZ algorithm in the presence of infinite eigenvalues. SIAM Journal on Matrix Analysis and Applications, 22:364-375, 2000. [292] D. S. Watkins and L. Eisner. Convergence of algorithms of decomposition type for the eigenvalue problem. Linear Algebra and Its Applications, 143:19-47, 1991. [293] K. Weierstrass. Zur Theorie der bilinearen und quadratischen Formen. Monatshefte Akadamie Wissenshaften Berlin, pages 310-338,1868. [294] H. Wielandt. Beitrage zur mathematischen Behandlung komplexer Eigenwertprobleme V: Bestimmung hoherer Eigenwerte durch gebrochene Iteration. Bericht B 44/J/37, Aerodynamische Versuchsanstalt Gottingen, Germany, 1944. [295] J. H. Wilkinson. The use of iterative methods for finding the latent roots and vectors of matrices. Mathematical Tables and Other Aids to Computation, 9:184-191,1955. [296] J. H. Wilkinson. The calculation of eigenvectors by the method of Lanczos. Computer Journal, 1:148-152,1959. [297] J. H. Wilkinson. Householder's method for the solution of the algebraic eigenvalue problem. Computer Journal, 3:23-27,1960. [298] J. H. Wilkinson. Note on the quadratic convergence of the cyclic Jacobi process. Numerische Mathematik, 4:296-300,1962. Vol II: Eigensystems

450

REFERENCES

[299] J. H. Wilkinson. Rounding Errors in Algebraic Processes. Prentice-Hall, Englewood Cliffs, NJ, 1963. [300] J. H. Wilkinson. The Algebraic Eigenvalue Problem. Clarendon Press, Oxford, 1965. [301] J. H. Wilkinson. Convergence of the LR, QR, and related algorithms. Computer Journal, 8:77-84,1965. [302] J. H. Wilkinson. Global convergence of tridiagonal QR algorithm with origin shifts. Linear Algebra and Its Applications, 1:409420,1968. [303] J. H. Wilkinson. Note on matrices with a very ill-conditioned eigenproblem. Numerische Mathematik, 19:176-178,1972. [304] J. H. Wilkinson. Kronecker's canonical form and the QZ algorithm. Linear Algebra and Its Applications, 28:285-303,1979. [305] J. H. Wilkinson and C. Reinsch. Handbook for Automatic Computation. Vol. H Linear Algebra. Springer-Verlag, New York, 1971. [306] K. Wu and H. Simon. Thick-restart Lanczos method for large symmetric eigenvalue problems. SIAM Journal on Matrix Analysis and Applications, 22:602616,2000. [307] T. J. Ypma. Historical development of the Newton-Raphson method. SIAM Review. 37:531-551.1995.

INDEX
Underlined page numbers indicate a defining entry. Slanted page numbers indicate an entry in a notes and references section. The abbreviation me indicates that there is more information at the main entry for this item. Only authors mentioned explicitly in the text are indexed.
1-norm, see norm 2-norm, see norm A (conjugate of A), 422 Au (conjugate transpose of .4), 422 A~H (conjugate transpose inverse of 4), 422 A~l (inverse of A), 422 AT (transpose of A), 422 A~T (transpose inverse of A), 422 Abel, N. H., 55 absolute norm, see norm \A\ (absolute value of A), 423 accumulation of transformations, 76 Aitken, A. C, 69,110 A < B, A < B, etc. (componentwise comparison), 423 algebraic multiplicity, see eigenvalue angle, see canonical angle approximate Newton method, 396 analysis, 400-402 and inexact Newton method, 419 constant shift approximation, 403 correction equation, 397,420 inexact solution, 403-404 solution, 398 correction formula, 397 derivation, 396-397 diagonally dominant A, 403 drawbacks, 404-405 equivalence of correction formula and equation, 398 error recurrence, 402 inner and outer iterations, 403
451

local convergence, 402 convergence rates, 402 natural approximation, 403 orthogonal correction, 399 nomenclature, 399 Arnoldi decomposition, 297,299, 315 alternate form, 300 Arnoldi factorization, 315 computation, see Arnoldi method computation of residuals, 336 hat convention, 300 QR factorization of Krylov sequence, 298 Rayleigh quotient, 301 reduced, 299, 302 termination of Krylov sequence, 300 uniqueness, 300 uniqueness of starting vector, 301 Arnoldi factorization, see Arnoldi decomposition Arnoldi method, 117, 344 Arnoldi process, 302,303-304 block, 344 comparison of implicit and Krylov-Schur restarting, 332 computation of residuals, 336 convergence criteria, 334-336,347 choice of tolerance, 341-342 shift-and-invert enhancement, 336 deflation, 337-340,347 advantages, 337 in Arnoldi decomposition, 340 in Krylov-Schur method, 340 nonorthogonal bases, 339-340

452
residual norm, 337-338 stability, 338-339 equivalence of implicit and Kry lov-Schur restarting, 331 filter polynomial, 317, 345 also see filter polynomial implicit restarting, 318, 345 contraction phase, 318-322 double shift method, 320 exact (Raylei gh quotient) shifts, 324-325 example, 323 forward instability, 325, 346 operation count, 320-323 overview, 318 the cycle, 322 truncation index, 320 Krylov-Schur restarting, 325-326, 346 exchanging eigenblocks, 326-328, me operation count, 329 the cycle, 328-329 loss of orthogonality, 117 operation count, 304 reorthogonalization, 303 restarted, 3J6, 344-345 rationale, 316 also see Arnoldi method, implicit restarting; Arnoldi method, Krylov-Schur restarting shift-and-invert enhancement, 305 convergence criteria, 336 stability, 334, 347 stagnation of Krylov subspace, 305-306,316 stability, 332-333, 346-347 shift-and-invert enhancement, 334, 347 storage requirements, 304-305,316 Arnoldi, W.E., 315,344 ARPACK, 325, 345 convergence criteria, 341 arrowhead matrix, 201 B inner product, 371 Cauchy inequality, 371 norm, 371

INDEX
orthogonal matrix, 372 orthogonality, 230,372 orthogonalization, 372-373 economizing B products, 372-373 maintaining orthogonality, 373 orthonormal matrix, 372 symmetry, 371 B-Arnoldi method, 373 deflation, 374 orthogonalization, 373 residual norms, 373-374 restarting, 374 Ritz pairs, 373 5-Lanczos method, 374-375 periodic reorthogonalization, 375 restarted, 375 backward error and unitary similarities, 10 as paradigm, 70 convergence criteria, 62 from residual, 61, 70,196,253,265, 334-335,369 in convergence testing, 10 inverse power method, 69 backward stability and complex eigenvalues of real matrices, 126 Arnoldi method, 332-333,346-347 band tridiagonalization, 189 bidiagonal QR step, 220 deflation in Arnoldi method, 338-339 divide-and-conquer algorithm for the spectral decomposition, 183 double shift QR algorithm, 126 eigenvector computation, 102 Hessenberg QR algorithm, 94 Householder's reduction to tridiagonal form, 162,170 implicit tridiagonal QR step, 167 inertia of a tridiagonal matrix, 192-193 Lanczos algorithm with full orthogonalization, 351 QZ algorithm, 152 reduction to bidiagonal form, 217 reduction to Hessenberg-triangular form, 147 spectral decomposition updating, 179

INDEX
stability in the ususal sense, 87 subspace iteration, 388 Wilkinson's contribution, 111 Bai, Z., 23,129, 346, 395 balancing, 107-108,112 and grading, 110 matrix pencil, 152-153,156 operation count, 108 Bartels, R. H., 24 Bau, D., 23 Bauer, F. L., 394 Bellman, R, 23 Beltrami, E., 226 Bhatia,R.,52 bi-Lanczos algorithm, 283,315, 367 look-ahead recurrence, 367 bidiagonal matrix, 215 complex bidiagonal matrix to real, 217 reduction to, 215-217,227 first column of the transformation, 217 operation count, 217 stability, 217 relative stability of singular values, 217,223 bidiagonal QR algorithm, 217,227-228 combined with QR decomposition, 226,228 operation count, 226 pivoting, 228 deflation, 224 detecting negligible superdiagonal elements, 223-224,227 graded matrices, 224,227-228 QR step, 219-220 operation count, 220 stability, 220 shift computation, 222-223 zero shift, 227 biorthogonal bases, 245 Bjorck, A., 264 block Krylov subspace, see Krylov subspace block triangularization of nearly block triangular matrix, 255 Braman, K, 129 Bunch, J. R., 201 Vol II: Eigensystems Byers, R., 129

453

C (complex numbers), 421 Cn (complex n-space), 421 C m x n (space of complex mxn matrices), 421 canonical angle, 248,264 angles between right and left eigenspaces, 251 between two vectors, 44 computation, 49 characterization of largest angle, 249 computation, 249,264 of a combination of subspaces, 250-251 of a vector and a subspace, 250 subspaces of unequal dimensions, 249-250 Cauchy, A., 23 Cayley, A., 23 Chan, T. E, 228 Chandrasekaran, S., 235 characteristic equation, 4, 24 characteristic polynomial, 4, 24 and companion matrix, 55 and terminating Krylov sequences, 279 in Lanczos's method, 315 matrix of order two, 4-5 characteristic value, 23 Chatelin,E,23,279 Chebyshev polynomial, 27J_, 280 as filter polynomial, 317 in complex plane, 280 in subspace iteration, 392 Cholesky algorithm, 157 Cholesky decomposition, 231,426 pivoted, 234 updating, 171 chordal distance, 138,155 Clint, M., 394 column space (K(X)), 424 column- and row-oriented algorithms, 102, 162 companion matrix, 55 complete system of eigenvectors, 7 and diagonalization, 8-9 condition

454

INDEX
Davidson, E. R., 419 Davis, C., 53,265 defectiveness, 384 and Krylov subspaces, 276 dependence of eigenvectors, 8 dominant eigenvalues, 34 eigenvalue, 7 matrix, 7, 15 sensitivity of eigenvalues, 7-8,38 definite generalized eigenvalue problem, 235-236 rotating to make B positive definite, 236 deflation, 12, 344 by inspection, 106-107 operation count, 107 complex eigenvector, 114 also see Hessenberg QR algorithm; power method; QR algorithm; etc. Dembo,R. S., 419 Demmel, J. W., 23, 129,227, 346 Dennis,!. E., 265,418 det(^l) (determinant of A), 422 Dhillon,I.S.,202 diag(<$i,... , dn] (diagonal matrix), 423 diagonalization block, 15,19-20 assessment, 25 uniqueness, 20 complete system of eigenvectors, 8-9 distinct eigenvalues, 20 dim(^) (dimension of X), 424 divide-and-conquer algorithm for the spectral decomposition, 181-183,20] depth of the recursion, 183,185 error analysis, 201 generalities, 181-182 operation count, 185 recursive vs. direct approach, 183 stability, 183 the effects of deflation, 185 unsuitability for graded matrices, 183 divide-and-conquer algorithms, 181-182 dominant eigenpair, 3 dominant eigenvalue, 3j_ defective, 34

condition number, 48 limitations, 48 eigenvalue, 48,53 condition number, 48 Hermitian matrix, 42-43,51 eigenvector, 48-51,53 condition number, 50 Hermitian matrix, 51-52 also see sep generalized eigenvalue, 140 generalized eigenvector, 143 ill conditioning, 48 simple eigenblock, 260 simple eigenspace, 261 singular values, 206 singular vector, 209-210 condition number, 210 S/PD generalized eigenvalue, 231 well conditioning, 48 condition number, see condition congruence transformation, 190 conjugate gradient method, 279 consistent norm, see norm convergence ratios, 34 convergence, normwise and componentwise, 30 Crawford, C. R., 236 cross-product algorithm for the S VD, 210-211 assessment, 214,227 attractive features, 211 inaccuracy in the singular values, 211-212 inaccuracy in the left singular vectors, 214 inaccuracy in the right singular vectors, 212-213 refined Ritz vector, 291-292,296 use by statisticians, 227 cross-product matrix, 205 CS decomposition, 236-237 algorithms, 237 Cullum, J., 280, 367 Cuppen, J. J. M., 201 Curtis, A. R., 156 Datta, B. N., 23 Davidson's algorithm, 419

INDEX
dominant eigenvector, 31. power method, 56 Donath, W. E., 280,367 Dongarra, J. J., 23,201 Duff, I. S., 395 ej (th unit vector), 423 eigenbasis, see eigenspace eigenblock, see eigenspace eigenpair, 2,24 complete system, 7, me diagonal matrix, 3 dominant, 31, me eigenvalue, 2 eigenvector, 2 left, 2 normalization, 2 perturbation theory first-order, 45-46,53 rigorous bounds, 46-47,53 real matrix, 5-6 right, 2 simple, 8 singular matrix, 3 triangular matrix, 3 also see eigenspace eigenspace, 22,115, 240, 247 deflation, 243 nonorthogonal, 243 eigenbasis, 127,242 eigenblock, 242 eigenpair, 242 behavior under similarity transformations, 242 left, 242 orthonormal, 242 right, 242 examples, 240 existence, 242 left, 242 as orthogonal complement of right eigenspace, 243 nonuniqueness, 244 representation by a basis, 240-241 representation of A with respect to a basis, 241 residual, 251,334-335 backward error, 253,265 Vol II: Eigensystems

455
optimal, 252,264 residual bounds for eigenspaces of Hermitian matrices, 262-263, 265 residual bounds for eigenvalues of Hermitian matrices, 254, 263-264,265 simple, 244, me also see simple eigenspace eigenvalue, 2 algebraic multiplicity, 4,6, 12 block triangular matrix, 5 characteristic equation, 4, me characteristic polynomial, 4, me continuity, 37-38 defective, 7, me diagonal matrix, 3 dominant, 31., me Eisner's theorem, 38,52 geometric multiplicity, 6,12 Gerschgorin's theorem, 39, me Hermitian matrix, 13 history and nomenclature, 23-24 multiple, 2, me nilpotent matrix, 12-13 normal matrix, 14 perturbation theory, 52 condition, 48, me derivatives, 47 first-order, 45-46,53 rigorous bounds, 46-47,53 simple eigenvalue, 38 simple, 8 singular matrix, 3 skew Hermitian matrix, 14 triangular matrix, 3 unitary matrix, 14 also see eigenpair; Hermitian matrix; similarity transformation eigenvector, 2 complete system, 7, me computing eigenvectors, 100 diagonal matrix, 3 dominant, 31, me Hermitian matrix, 13 history and nomenclature, 23-24 left, 4 left and right, 44,52-53

456
normal matrix, 14 normalization, 2 null space characterization, 6 perturbation theory condition, 48-50, me first-order, 45^6,53 rigorous bounds, 46-47,53 real matrix, 5-6 right, 4 simple, 8 singular matrix, 3 triangular matrix, 3 also see eigenpair; Hermitian matrix; similarity transformation eigenvectors of a symmetric band matrix, 195-200,202 attaining a small residual, 196-197 convergence, 198-200 limitations of the algorithm, 200 loss of orthogonality, 197 orthogonalization, 197-198 Gram-Schmidt algorithm, 198 tradeoffs in clustering, 200 residual, 195-196 solution of inverse power equation, 200 starting vector, 200 Eisenstat, S. C, 201, 228,419 EISPACK 2x2 blocks in QZ algorithm, 156 eigenvalues by bisection, 202 elementary reflector, see Householder transformation Eisner's theorem, 38,52,285 Eisner, L., 52, 111 6M (rounding unit), 27 Ericsson, T., 347, 379,380 exchanging eigenblocks, 326-328, 345-346 stability, 328 exponent exception computing bidiagonal QR shift, 223 computing inertia, 193 eigenvector computation, 102 implicit double shift, 119 plane rotation, 89 factorization, 67

INDEX
Fernando, K. V., 228 filter polynomial, 317, 345 Chebyshev polynomial, 317, 365 in Arnoldi method, 317 in Lanczos algorithm, 352,365 Leja points, 365 Ritz values as roots, 317 Fischer's theorem, 41 fl (floating-point evaluation), 27 flam (floating-point add and multiply), 58 in complex arithmetic, 86-87 flrot, 91 Fokkema, D. R., 346 Francis, J. G. R, 110-112, 128,170 Fraysse, V., 380 Freund, R. W., 296 Frobenius norm, see norm Caches, J., 380 Galerkin method, see Rayleigh-Ritz method Gaussian elimination, 157 and inertia, 191 band matrix, 200 generalized eigenvalue problem, 129, 296 background, J55 characteristic polynomial, 133 chordal distance, 138,155 eigenpair, 130 left, 130 perturbation of, 136-137 right, 130 eigenvalue, 130 algebraic multiplicity, 133 condition, 140 first-order expansion, 137 perturbation bound, 140 projective representation, 134,231 eigenvector, 130 condition, 143 first-order expansion, 141-142 perturbation bound, 142-143 equivalence transformation, 131 effect on eigenvalues and eigenvectors, 132 generalized Schur form, 132, me generalized shift-and-invert transform, 368, me

INDEX
Hessenberg-tri angular form, 144-147, me infinite eigenvalue, 131 algebraic multiplicity, 133 condition, 140 nonregular pencils, 130-131 pencil, 130 perturbation theory, 136, J55 also see generalized eigenvalue problem, eigenpair; generalized eigenvalue problem, eigenvalue; generalized eigenvalue problem, eigenvector QZ algorithm, 147-148, me Rayleigh quotient, 136, 138 real generalized Schur form, 143, me reduction to ordinary eigenproblem, 134, 368-369 regular pair, 131 regular pencil, 131 residual, 369 backward error, 369, 380 right and left eigenvectors, 135 shifted pencil, 134-135 simple eigenvalue, 133 Weierstrass form, 132 generalized Schur form, 55, 132, 155 order of eigenvalues, 133 real generalized Schur form, 143 generalized shift-and-invert transform, 368,379-380 bounding the residual, 370 matrix-vector product, 369 S/PD pencils, 370 generalized singular value decomposition, 236-237 computation via the CS decomposition, 236-237 relation to the S/PD eigenproblem, 236 geometric multiplicity, see eigenvalue Gerschgorin's theorem, 39, 52,193 diagonal similarities, 40-41 Gerschgorin disks, 39 Gerschgorin, S. A., 52 Givens rotation, 170 also see plane rotation Givens, W., 170,201 Vol II: Eigensystems

457

Goldstine, H. H., 203 Golub, G. H., 23,24,201,227,264, 367 graded matrix, 108, 113,200 and balancing, 110 and the QR algorithm, 108-110 bidiagonal QR algorithm, 227-228 Jacobi's method, 203 types of grading, 108 Gram-Schmidt algorithm, 198, 303 B variants, 372 gsreorthog, 198, 304 modified, 307,359 Grcar, J. R, 365 Greek-Latin equivalents, 421 Grimes, R. G., 367 gsreorthog, see GramSchmidt algorithm Gu, M., 201, 228 Gutknecht, M. H., 367 Hadamard, M. J., 110 Handbook for Automatic Computation: Linear Algebra, 112 balancing for eigenvalue computations, 112 eigenvalues by bisection, 202 eigenvectors by the inverse power method, 202 Jacobi's method, 203 singular value decomposition, 227 S/PD eigenproblem, 235 harmonic Rayleigh-Ritz method, 293, 296,411 computation, 293-294 from Krylov decomposition, 314-315 Hermitian matrix, 294 ordinary eigenproblem, 294 Rayleigh quotient, 294 exact eigenspace, 293 generalized eigenvalue problem, 296 harmonic Ritz pair, 292 Hermitian matrix, 296 Rayleigh quotient preferred to harmonic Ritz value, 294,336 screening of spurious eigenpairs, 293 Hermitian matrix eigenvalue, 13,52 condition, 42-43

458
Fischer's theorem, 41 Hoffman-Wielandt theorem, 43 interlacing theorem, 42 min-max characterization, 41 perturbation, 42 principal submatrix, 42 eigenvector, 13 residual bounds for eigenspaces, 262-263,265 residual bounds for eigenvalues, 254, 263-264,265 sep, 51 special properties, 157 also see symmetric matrix Hessenberg form, 8! Householder reduction, 83-88, accumulating transformations, 86 first column of the accumulated transformation, 87 operation count, 86 overwriting original matrix, 87 stability, 87, 111 implicit Q theorem, 116, me nonorthogonalreduction, 111 of a symmetric matrix, 158 uniqueness of reduction, 116 unreduced, 116, me Hessenberg QR algorithm ad hoc shift, 100,105 applying transformations to deflated problems, 95-96 basic QR step, 92-94 operation count, 92 stability, 94 complex conjugate shifts, 115 deflation, 94-95,112 aggressive deflation, 105-106,112, 123 applying transformations to deflated problems, 95-96 double shift algorithm, 123 detecting negligible subdiagonals, 94-95 backward stability, 94 normwise criterion, 94-95 relative criterion, 95 double shift algorithm, 123-126

INDEX
2x 2 blocks, 129 deflation, 123 operation count, 123 QR step, 120-123 stability, 126 explicit shift algorithm, 98-100 convergence, 98-100 eigenvalues only, 100 operation count, 100 searching for negligible subdiagonal elements, 96-97 stability, 98 forward instability, 325,346 Francis double shift, 115,148 implementation issues, 112 implicit double shift, 87,110, 118-123,128 general strategy, 118 real Francis shifts, 119 starting, 118-119 implicit Q theorem, US, me invariance of Hessenberg form, 92, 112 multishift, 128-129 transmission of shifts, 112 Wilkinson shift, 97,112 computation, 97-98 Hessenberg-triangular form, 144-147,156 operation count, 147 stability, 147 Higham, D. J., 380 Higham, N. J., 24,228,380 Hilbert, D., 23 Hoffman-Wielandt theorem, 43,169 Horn, R. A., 23 Horowitz, L. P., 203 Hotelling,H., 69 Householder transformation, 12,B, 111 product with a matrix, 81-82 reduction of a vector to multiple of ei, 82-83 reduction of a vector to multiple of e n , 82-83 reduction of real vectors, 83 reduction of row vectors, 82 Householder, A. S., 23, 111, 279 hump, the, 34

no-ni

INDEX
/, In (identity matrix), 423 f (cross matrix), 423 implicit Q theorem, JU6,118 inertia, 190, 201 and LU decomposition, 191 computed by Gaussian elimination, 191 invariance under congruence transformations, 190 of a tridiagonal matrix, 191-193 operation count, 192 stability, 192-193 inf (X) (smallest singular value of X), 205 oo-norm, see norm interlacing theorem, 42 interval bisection, 193 invariant subspace, see eigenspace inverse power method, 66, 70-71,170 backward error, 69 convergence, 68 dominant eigenvector, 56 effects of rounding error, 68-69 implementation, 67 residual computation, 66-67 symmetric band matrix, 195-200 use of optimal residuals, 71 Ipsen, I. C. R, 70,265 Jacobi's method, 202-203 and graded matrices, 203 as preprocessing step, 202 convergence, 202 cyclic method, 203 quadratic, 203 parallelism, 203 rediscovery, 202 threshold method, 203 Jacobi, C. G. J., 201,202,403,420 Jacobi-Davidson method, 296,381, 396, 404,405,419-420 compared with approximate Newton method, 406 convergence testing, 408-409 convergence to more than one vector, 407 retarded by inexact solution, 417-418 correction equation, 420

459
Davidson's algorithm, 419 derivation from approximate Newton method, 404-405 exact solution of correction equation, 415-416 restriction on choice of shifts, 415-416 extending partial Schur decompositions, 407-411 focal region, 405 harmonic Ritz vectors, 411412 Hermitian matrices, 412-414,420 iterative solution of correction equation, 416-418 free choice of shifts, 416-417 Krylov sequence methods, 416 preconditioning, 416 stopping, 417-418 Olsen's method, 419-420 operation count, 409 orthogonalization, 409 partial Schur decomposition, 407 residual computation, 408-409 restarting, 411 with harmonic Ritz vectors, 412 shift parameters, 405-406 solving projected systems, 414-415 ill conditioning, 415 multiple right-hand sides, 414-415 storage requirements, 409 updating the Rayleigh quotient, 409 Jennings, A., 394, 395 Jensen, P. S., 347, 380 Jia, Z., 295,296 Jiang, E., 170,265 Johnson, C. R., 23 Jordan block, see Jordan canonical form Jordan canonical form, 21,24-25,36 assessment, 22,25 Jordan block, 7,20 powers of, 34-35 principal vector, 22 sensitivity of eigenvalues, 38 uniqueness, 21 Jordan, C., 155, 226,264 Kk(A, u) (Krylov matrix), 267 fck(A, u) (Krylov subspace), 267

Vol II: Eigensystems

460

INDEX
elementary properties, 267-268 invariance under shifting, 268 Krylov matrix, 267 Krylov sequence, 266,279 multiple eigenvalues, 277 convergence, 273-274 deflation, 278 non-Hermitian matrices convergence, 274-275,280 polynomial bounds, 275-276 polynomial representation, 268 termination, 268 and characteristic polynomial, 279 and eigenspaces, 269 uniqueness of starting vector, 301 also see Arnoldi decomposition; Krylov decomposition; Lanczos algorithm Krylov, A. N., 279 Kublanovskaya, V. N., 110 Lagrange, J.-L., 23 A(A) (the spectrum of ^4), 2 Lanczos algorithm, 279,3J5 adjusted Rayleigh quotient, 351 updating, 362-363 and characteristic polynomial, 315 and Rayleigh-Ritz method, 348 as iterative method, 365 block, 280, 367 computing residual norms, 363 estimating loss of orthogonality, 356-358 filter polynomial, 352 Chebyshev polynomial, 365 Leja points, 365 full reorthogonalization, 349, 365 convergence and deflation, 352 error analysis, 365 essential tridiagonality of Rayleigh quotient, 351 implicit restarting, 351-352,365 Krylov-spectral restarting, 352,365 stability, 351 global orthogonality, 350 Lanczos decomposition, 297,307 Rayleigh quotient, 306 uniqueness, 307

Kahan, W., 53,156,170,201,227,264, 265 Kaniel, S., 280 Kato,T.,52 Kline, M, 23 K6nig,J., 110 Kogbetliantz, E. G., 228 Kollerstrom,N.,418 Krause, G., 52 Kronecker product, 24 Kronecker, L., 155 Krylov decomposition, 297,309, 316 computation of harmonic Ritz vectors, 314-315 computation of refined Ritz vectors, 314 computation of residuals, 335 economics of transforming, 312-314 equivalence, 309 to an Arnoldi decomposition, 311-312 nomenclature, 310 orthonormal, 309 Rayleigh quotient, 309 reduction to Arnoldi form, 312-314 similarity, 310 translation, 311 Krylov subspace, 267,279 and defective matrices, 276 and scaling, 268 and similarity transformations, 268 block, 277,280,367 computation, 277 convergence, 277 non-Hermitian matrices, 278 block Krylov sequence, 277 compared with power method, 266 convergence, 269,279-280,315 assessment of polynomial bounds, 274 multiple eigenvalues, 273-274 polynomial bounds, 269-272 square root effect, 272-273 to inferior eigenvector, 273 to interior eigenpairs, 273 to the subdominant eigenvector, 266 degeneracy in Krylov sequence, 298

INDEX
Lanczos recurrence, 307-308,348 alternative, 307,315 loss of orthogonality, 308 operation count, 308 storage considerations, 308 local orthogonality, 350 loss of orthogonality, 348 local and global, 350 method of minimized iterations, 279 no reorthogonalization, 349, 366 software, 366 partial reorthogonalization, 350, 365-366 software, 366 periodic reorthogonalization, 350, 358-362,365-366 example, 364 modified Gram-Schmidt algorithm, 359 software, 366 Rayleigh quotient, 347 contamination by reorthogonalization, 350 reorthogonalization, 348, 365 and semiorthogonality, 358-359 contamination of the Rayleigh quotient, 350 difficulties, 348-349 general algorithm, 349-350 updating adjusted Rayleigh quotient, 362-363 also see Lanczos algorithm, full reorthogonalization; Lanczos algorithm, no reorthogonalization; Lanczos algorithm, partial reorthogonalization; Lanczos algorithm, periodic reorthogonalization; Lanczos algorithm, selective reorthogonalization restarted, 280 selective reorthogonalization, 350, 365-366 semiorthogonality, 353,365-366 and reorthogonalization, 358-359 effects of relaxing constraint, 353 QR factorization, 353-354 Vol II: Eigensystems

461
Rayleigh quotient, 355 residual norms, 355-356 Ritz vectors, 355-356 size of reorthogonalization coefficients, 354 singular value decomposition, 366-367 termination and restarting, 350 thick restarting, 365 Lanczos decomposition, see Lanczos algorithm Lanczos recurrence, see Lanczos algorithm Lanczos, C., 279, 315,365 LAPACK, 112 2x2 blocks in QZ algorithm, 156 2x2 blocks in double shift QR algorithm, 129 ad hoc shift in QR algorithm, 105 bidiagonal QR algorithm, 228 CS decomposition, 237 differential qd algorithm, 228 divide-and-conquer algorithm for the spectral decomposition, 183 eigenvalues by bisection, 202 eigenvectors by the inverse power method, 202 eigenvectors of triangular matrices, 102 exchanging eigenblocks, 328, 346 multishiftQR algorithm, 128,129 PWK method for the tridiagonal QR algorithm, 171 reduction to tridiagonal form, 170 S/PD generalized eigenvalue problem, 235 spectral decomposition downdating, 201 storage of band matrices, 187 tridiagonal QR step, 170 Wilkinson's algorithm, 233 large matrices, 239 storage of eigenvectors, 239 storage of sparse matrices, 239 latent value, 24 Le, J., 346 left eigenpair, 2 Lehoucq, R. B., 345,346 Lewis, J. G., 367

462
Li, C. K., 235 local convergence ratio, see convergence ratios LR algorithm, 110,394 convergence, 111 LU decomposition, 193,425 and inertia, 191 Lui, Z. A., 367

INDEX
M(X) (null space of X), 424 Nash, S., 24 Newton's method, 395 application to eigenproblem, 418-419 derivation by perturbation expansion, 395-396 history, 418 relation to Rayleigh quotient method, 418 relation to the QR algorithm, 403, 418-419 Newton, I., 418 Newton-based methods, 381 Nielsen, C. P., 201 nilpotent matrix, 12-13 nonnormal matrix, 71 norm, 25, 36 l-norm,26,27 2-norm and Frobenius norm, 27 and largest singular value, 205 matrix norm, 27 of orthonormal matrix, 27 properties, 27 unitary invariance, 27 vector norm, 26 absolute norm, 28 examples, 28 and spectral radius, 31-33,36 compatable norm, 36 consistent norm, 29, 36 consistent vector norm, 29-30 construction by similarities, 30 examples, 29 equivalence of norms, 30 Euclidean norm, 26 family of norms, 26 Frobenius norm, 26 and 2-norm, 27 and singular values, 205 trace characterization, 26 unitary invariance, 27 co-norm, 26,27 limitations, 28,33,35-36,43 matrix norm, 25 operator norm, 27 rounding a matrix, 28

Martin, R. S., 113 Mathias, R., 129,235,265 matrix, 421 cross, 423 diagonal, 423 element, 421 full rank, 425 Hermitian, 423 history, 23 identity, 423 order, 422 orthogonal, 423 orthonormal, 423 permutation, 423 sum and product, 422 symmetric, 423 trapezoidal, 424 triangular, 424 unit triangular, trapezoidal, 424 unitary, 423 zero, 423 matrix powers (Ak), 33-36 behavior when computed, 36 spectral radius bounds, 33 the hump, 34 matrix-vector product effects of rounding error, 65 tridiagonal matrix, 58-59 Meerbergen, K., 380 method of minimized iterations, 279 Moler, C. B., 156 Moon, Y.S., 236 More, J.J., 265 Morgan, R. B., 296,345 multiple eigenvalue, 2 algebraic multiplicity, 4,6,12 geometric multiplicity, 6,12 multiset, 2 Murray, R J., 203

INDEX
spectral norm, see norm, 2-norm subordinate norm, 27 triangle inequality, 26 unitarily invariant norm, 27 vector norm, 26 normal matrix, 14 eigenvalues, 14 eigenvectors, 14 Nour-Omid, B., 347, 380 null space CV(X)), 424 nullity [null(A)], 424 Oettli,W., 70 Olsen, J., 419 operation count application of a plane rotation, 91 Arnoldi process, 304 balancing, 108 band tridiagonalization, 189 basic QR step in Hessenberg QR algorithm, 92 bidiagonal QR step, 220 complex arithmetic, 86-87 deflation by inspection, 107 divide-and-conquer algorithm for the spectral decomposition, 185 divide-and-conquer algorithms, 181-182 eigenvectors of a triangular matrix, 102 explicit shift Hessenberg QR algorithm, 100 Householder reduction to Hesssenberg form, 86 Householder-matrix product, 82 hybrid QRD-SVD algorithm, 226 implicit double shift QR step, 123 implicit tridiagonal QR step, 167 implicitly restarted Arnoldi, 320-323 inertia of a tridiagonal matrix, 192 Jacobi-Davidson method, 409 Krylov-Schur restarting, 329 Lanczos recurrence, 308 QZ algorithm, 150-152 reduction to bidiagonal form, 217 reduction to Hessenberg-triangular form, 147 reduction to tridiagonal form, 162 Vol II: Eigensystems

463
spectral decomposition updating, 179-181 Wilkinson's algorithm for S/PD eigenproblem, 232 orthogonal similarity, see unitary similarity Osborne, E. E., 112 Ostrowski, A. M., 36, 71 overflow, see exponent exception Paige, C. C., 237,280,296, 315, 366 Parlett, B. N., 24,169,170,228,265,279, 295,296, 346, 347, 365, 367, 379, 380 pencil, see generalized eigenvalue problem pentadiagonal matrix, 186 perturbation theory, see eigenpair; eigenvalue; eigenvector; generalized eigenvalue problem; Hermitian matrix; relative and structured perturbation theory; simple eigenspace; singular value decomposition; S/PD generalized eigenproblem Peters, G., 418,420 Petrov method, see Rayleigh-Ritz method plane rotation, 88, 111 and Wilkinson diagrams, 91 application, 89-91 operation count, 91 pre- and postmultiplication,91 exponent exception, 89 generation, 89 in the (e, j)-plane, 88 introducing a zero into a 2-vector, 88 introducing a zero into a matrix, 88-89 plane rotations Givens' method, 170 positive definite matrix, 425 positive semidefinite matrix, 425 Powell, M. J. D., 70 power method, 56, 69-70,266,381 assessment, 66 choice of starting vector, 58,60 convergence, 57 convergence criteria, 60-62 deflation, 70 effects of rounding error, 65

464
implementation, 64 Markov chain, 69 normalization, 59 operation counts, 58-59 rate of convergence, 58 Rayleigh quotients, 63 shifting, 64, 70 with two vectors, 381-382 Prager, W., 70 primitive Ritz vector, see Rayleigh-Ritz method principal vector, see Jordan canonical form projector, 427 proper value, 24 pseudospectrum, 36-37 qd-algorithm, 110 QL algorithm, see QR algorithm QR algorithm, 1, 24,55, 394, 396 as factorization of a polynomial, 76 convergence, 111 alternate shifts, 75 cubic, 75 error bounds for a QR step, 73-74 multiple eigenvalues, 75 quadratic, 75 unshifted algorithm, 77-80 history, 110 impracticality on a full matrix, 80-81 QL algorithm, 111, 113,169,170 QR step, 71 Rayleigh quotient shift, 73 relation to inverse power method, 72-73, 111 relation to Newton's method, 403, 418-419 relation to power method, 72,77, 111 shifted, 7_I unshifted, 77-80 convergence to Schur decomposition, 78-79 disorder in eigenvalues, 79 equimodular eigenvalues, 80 implications for the shifted algorithm, 80 rates of convergence, 80 variants (RQ, QL, LQ), 111, 113, 169,170,418

INDEX
Wilkinson shift, 75 also see bidiagonal QR algorithm; Hessenberg QR algorithm; QZ algorithm; subspace iteration; tridiagonal QR algorithm QR decomposition, 426-427 and QR algorithm, 110 QR step, see QR algorithm quasi-triangular matrix, 115 computing eigenvectors, 126-128 QZ algorithm, 147-148,156 2x2 blocks, 155 choice of double shift, 148 computation of eigenvectors, 155 deflation, 150,153 eigenvalues only, 152 operation count, 150-152 QZ step, 148-152 real shifts, 156 stability, 152 starting the double shift, 148 treatment of infinite eigenvalues, 153-155,156 E (real numbers), 421 R n (real n-space), 421 jpmxn (Space Of reai m x matrices), 421 R(X) (column space of A"), 424 rank, 424 Raphson, 418 rational Krylov transformation, 342-344, 347 no free lunch, 343-344 potential instability, 343 Rayleigh (J. W. Strutt), 70,295 Rayleigh quotient, 47,63,70 accuracy of, 260 and optimal residuals, 70 for generalized eigenvalue problem, 136,138 for subspaces, 252 in Arnoldi decomposition, 301 in Krylov decomposition, 309 in Lanczos decomposition, 306 Rayleigh quotient method, 69, 71,396 quadratic convergence, 69 relation to Newton's method, 418 Rayleigh quotient shift, see QR algorithm

INDEX
Rayleigh-Ritz method, 252,280,381,396 and Lanczos algorithm, 348 as a generalized eigenvalue problem, 283 choosing a primitive Ritz basis, 282 convergence, 284,295 Hermitian matrix, 286-288 residual, 289 Ritz blocks and bases, 288 Ritz value, 285-287 Ritz vector, 286-287 uniform separation condition, 287 exact eigenspace, 281 failure, 282-283 Galerkin method, 295-296 general procedure, 281 harmonic Rayleigh-Ritz method, 293, me history, 295 oblique, 283 optimal residual, 284 orthogonal, 284 Petrov method, 295-296 primitive Ritz basis, 282 primitive Ritz vector, 282 projection method, 295 residual bound, 288 Ritz basis, 282 Ritz block, 282 Ritz pair, 282 Ritz space, 282 Ritz value, 282 Ritz vector, 282 separation condition, 283 two levels of approximation, 280-281 real matrix eigenvectors, 5-6 perturbation of simple eigenvalue, 38 real Schur form, 113, 126,128 computation by double shift QR algorithm, 123-126 computation by Householder transformation, 115 computing eigenvectors, 126-128 in subspace iteration, 391 refined Ritz vector, 289, 295-296 computation, 291-292 Vol II: Eigensystems

465
basic algorithm, 291 compared with Ritz vector, 291 cross-product algorithm, 291-292, 296 from Krylov decomposition, 314 convergence, 289-290 use of Rayleigh quotient, 290 Reid, J. K., 156 Reinsch,C, 113 relative and structured perturbation theory, 54 relative error, 28 in eigenvalues, 43,231 normwise, 28 representation of symmetric matrices, 159 in two-dimensional arrays, 159 packed storage, 159 residual, 61_ backward error, 61, 70,253,265 computation in the inverse power method, 66-67 convergence testing, 62, 195-196 optimal, 63, 252, 264 resolvent, 247 reverse communication, 345 Rigal, J. L., 380 right eigenpair, 2 Ritz pair, see Rayleigh-Ritz method Ritz, W., 295 rounding unit (eM), 27 row orientation, see column- and row-oriented algorithms Ruhe, A., 23,295, 347, 367, 379,380 Rutishauser, H., 110, 203, 394, 395 Saad, Y., 23, 279,280,295, 344-347 scalar, 421 Schnabel, R. B., 478 Schur decomposition, 1,10-12, 24,55, 71 and Jordan form, 22, 24 by rowwise deflation, 72 computation by explicit shift QR algorithm, 98-100 computing eigevectors, see triangular matrix, computing eigenvectors partial, 407 Schur vector, 12, me also see real Schur form

466
Schur vector, \2 relation to eigenvectors, 12,15 Schur, I., 24 Schwarz, H. R., 201 Scott, D. S., 365, 379 Scott, J. A., 395 secular equation, 24 semidefinite 5-Lanczos and Araoldi algorithms, 375-379,380 assessment, 379 geometry, 375-376 null-space error, 376 defective matrix, 380 effect on Rayleigh quotient, 376 effect on Ritz vectors, 376-377 growth, 378, 380 purging, 378-379,380 rounding-error analysis, 380 sep, 46,53-54,143,255 and physical separation of eigenvalues, 50-51,256 Hermitian matrices, 51 properties, 256 shift-and-invert enhancement, 66 factorization, 67 solving linear systems, 67-68 <ri(X) (the ith singular value of X), 204 similarity transformation, 8 eigenvalues and eigenvectors, 9 invariance of trace, 9 unitary similarity, 10 Simon, H., 346, 365-367 simple eigenspace, 244 angles between right and left eigenespaces, 251 biorthogonal basis for left eigenspace, 245 block diagonalization, 244-246 several eigenspaces, 245-246 complementary eigenspace, 245 corresponding left eigenspace, 245 deflation of an approximate eigenspace, 254-255,265 perturbation theory, 265 accuracy of the Rayleigh quotient, 260,265 alternate bound, 265

INDEX
bounds for eigenspace, 261 bounds in terms of the error, 259 condition of an eigenblock, 260 condition of an eigenspace, 261 main theorem, 258 normalization of bases, 259 residual bounds, 257 limitations, 257 resolvent, 247 spectral projector, 247 spectral representation, 245 several eigenspaces, 246 standard representation, 245 uniqueness, 246,247 also see eigenspace Simpson, 418 singular value, 204 and 2-norm, 205 and eigenvalues of the cross-product matrix, 157,205 and Frobenius norm, 205 effects of rounding, 211 min-max characterization, 206 ordering convention, 204 perturbation theory, 206,226-227 analogue of Rayleigh quotient, 209 condition, 206, me first-order expansion, 208 second-order expansion for small singular values, 226 <ri(X) (the ith singular value ofX), 204 singular value decomposition, 55,204 and 2-norm, 27 and spectral decomposition of cross-product matrix, 205 differential qd algorithm, 228 divide-and-conquer algorithms, 225 downdating, 228 history, 226 Jacobi methods, 228-229 one-sided method, 229 two-sided method of Kogbetliantz, 228 Lanczos algorithm, 366-367 singular value, 204, me singular value factorization, 204 singular vector, 204, me

INDEX
uniqueness, 205 singular value factorization, see singular value decomposition singular vector, 204 and eigenvectors of the cross-product matrix, 157,205 left, 204 perturbation theory, 206-210, 226-227 condition, 209-210, me first-order expansion, 208 left singular vector, 210 right singular vector, 210 separation of singular values, 210 right, 204 and eigenvectors of the cross-product matrix, 205 skew Hermitian matrix, 14 eigenvalues, 14 skew symmetric matrix, see skew Hermitian matrix Sleijpen, G. L. G., 296, 346,420 solution of projected systems, 414-415 ill conditioning, 415 multiple right-hand sides, 414-415 Sorensen, D. C., 201, 316, 345, 346, 365 span(^f) (the space spanned by X}, 424 sparse matrix, 58,239 S/PD generalized eigenproblem, 157,229 B-orthogonality, 230 banded problems, 235 Chandrasekaran's method, 235 congruence transformation, 229 diagonalization by congruences, 229 eigenvalue, 230 condition number, 231 ill conditioned, 231 projective representation, 231 well conditioned eigenvalues not determined to high relative accuracy, 231 eigenvector, 230 generalized shift and invert transformation, 370 ill-conditioned B, 233-235 use of pivoted Cholesky decomposition of B, 234

467
use of spectral decomposition of B, 234 no infinite eigenvalues, 230 perturbation theory, 231,234-235 product problem (AB), 235 S/PD pencil, 229 Wilkinson's algorithm, 231-233,235 computation of R~TAR~l, 232-233 operation count, 232 storage and overwriting, 232 spectral decomposition, J_3, 158 and 2-norm, 27 effects of rounding, 211-212 updating, see spectral decomposition updating spectral decomposition updating, 171, 201 assessment, 181 basic algorithm, 171 computing eigenvectors, 177-181 stability, 179 the naive approach, 177-178 deflation, 173-175 tradeoffs, 175 operation count, 179-181 reduction to standard form, 171-173 accumulating transformations, 173 secular equation, 175 solving the secular equation, 176-177 spectral enhancement, 64 shift-and-invert enhancement, 66, me spectral norm, see norm, 2-norm spectral projector, 53 spectral radius, 3^ norm bounds, 31-33, 36 spectral representation, see simple eigenspace spectral transformation, 379 also see generalized shift-and-invert transformation spectrum, 2 Spence, A., 380 SRR, see subspace iteration, Schur-Rayleigh-Ritz refinement stability in the ususal sense, 87 Stathopoulos, A., 346 Steihaug, T., 4]9

VolII: Eigensystems

468

INDEX
band tridiagonalization, 187-189, 201 limitations, 189 operation count, 189 stability, 189 band width, 186 computing eigenvalues and eigenvectors, 186 eigenvectors, see eigenvectors of a symmetric band matrix pentadiagonal matrix, 186 representation, 187 storage, 186 symmetric matrix inertia, 190, me representation, 159 in two-dimensional arrays, 159 packed storage, 159 simplifications in the QR algorithim, 158 special properties, 157 also see Hermitian matrix symmetric positive definite generalized eigenvalue problem, see S/PD generalized eigenproblem symmetric tridiagonal matrix, see tridiagonal matrix systolic array, 203 Tang, P. T. P., 201 Taussky, 0., 52 Taylor, D. R., 367 Q(X,y) (canonical angle matrix), 248 Toumazou, V., 380 trace as sum of eigenvalues, 9 invariance under similarity transformations, 9 use in debugging, 10 trace(^) (trace of A), 422 Trefethen, L. N., 23,37 triangle inequlity, see norm triangular matrix computing eigenvectors, 100-104 operation count, 102 stability and residuals, 102-104 computing left eigenvectors, 104 tridiagonal matrix, 158,186

Stewart, G. W., 24,52,155,156,237,264, 265,295, 316, 345,346, 394, 395 Stewart, W. J., 395 Sturm sequence, 170,202 subspace iteration, 381,382, 394 and QR algorithm, 385 convergence testing, 387-388 stability, 388 convergence theory, 383 Schur-Rayleigh-Ritz refinement, 386 superiority to power method, 384 to dominant subspaces, 384 defectiveness, 384 deflation, 388 dependence in basis, 382 freedom in dimension of the basis, 384 general algorithm, 386-387 orthogonalization,382,384-385 frequent with shift and invert enhancement, 390-391 when to perform, 389-391, 393-394 Rayleigh-Ritz method, 394 real Schur form, 391 Schur-Rayleigh-Ritz refinement, 382.386,394 convergence, 386,394 when to perform, 389,394 shift-and-invert enhancement, 390 software, 395 symmetric matrix, 391 Chebyshev acceleration, 392-394, 395 economization of storage, 391-392 Treppeniteration, 394 Sun, J.-G., 52 SVD, see singular value decomposition Sylvester's equation, 2,16, 24,128 conditions for solution, 16-17 Kronecker product form, 24 numerical solution, 18,24 Sylvester operator, 16 Sylvester, J. J., 24,201 symmetric band matrix, 186

INDEX
assumed symmetric, 158 calculation of a selected eigenvalue, 193-195,201-202 accuracy, 195 use of fast root finders, 195 Givens' reduction to, 170 Householder's reduction to, 159-162, 170,189 first column of the transformation, 162 operation count, 162 stability, 162,170 using symmetry, 160 Wilkinson's contribution, 170 inertia, 191-193 operation count, 192 stability, 192-193 making a Hermitian matrix real, 162-163 representation, 160 tridiagonal QR algorithm, 128,163, 170-171 combination of Rayleigh quotient and Wilkinson shifts, 170 deflation, 168-169 detecting negligible off-diagonal elements, 168-169,170 graded matrix, 169 explicitly shifted, 164 graded matrix, 169 QL algorithm, 169,170 implicitly shifted QR step, 164-167 operation count, 167 PWK method, 169,171 stability, 167 variations, 169 local convergence, 167-168 Rayleigh quotient shift, 167,170 Wilkinson shift, 167,168,170 Twain, Mark, 20 underflow, see exponent exception Underwood, R., 280, 367 unitarily invariant norm, see norm unitary matrix eigenvalues, 14 unitary similarity, 10 backward stability, 10 VolII: Eigensystems unreduced Hessenberg matrix, 116 van der Vorst, H. A., 23, 296,346,420 Van Loan, C.F., 23,24,237 vector, 421 component, 421 unit, 423 zero, 423 von Neumann, J., 203 Vu,R,345

469

Ward, R. C., 156 Watkins, D. S., 23, 111, 112,129,156,346 Weierstrass form, 132 Weierstrass, K., 155 Wielandt,H., 70 Wilkinson, 420 Wilkinson diagram, 8J., 424 Wilkinson shift, see Hessenberg QR algorithm; QR algorithm; tridiagonal QR algorithm Wilkinson, J. H., 1,23,52,53, 70, 71, 111-113,169,170,229,235, 264,365,394,418 Wu, K., 346, 365 Yang, C., 345 Zhang, Z, 170

You might also like