Orthogonal Bases and the QR Algorithm



Similar documents
Inner Product Spaces and Orthogonality

Numerical Analysis Lecture Notes

ISOMETRIES OF R n KEITH CONRAD

3. INNER PRODUCT SPACES

Solution of Linear Systems

LINEAR ALGEBRA. September 23, 2010

Lectures notes on orthogonal matrices (with exercises) Linear Algebra II - Spring 2004 by D. Klain

1 VECTOR SPACES AND SUBSPACES

Chapter 6. Orthogonality

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Factorization Theorems

CS3220 Lecture Notes: QR factorization and orthogonal transformations

Similarity and Diagonalization. Similar Matrices

Applied Linear Algebra I Review page 1

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Recall the basic property of the transpose (for any A): v A t Aw = v w, v, w R n.

7 Gaussian Elimination and LU Factorization

Orthogonal Diagonalization of Symmetric Matrices

CONTROLLABILITY. Chapter Reachable Set and Controllability. Suppose we have a linear system described by the state equation

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

LINEAR ALGEBRA W W L CHEN

Numerical Analysis Lecture Notes

x1 x 2 x 3 y 1 y 2 y 3 x 1 y 2 x 2 y 1 0.

Au = = = 3u. Aw = = = 2w. so the action of A on u and w is very easy to picture: it simply amounts to a stretching by 3 and 2, respectively.

Orthogonal Projections

Notes on Determinant

Chapter 17. Orthogonal Matrices and Symmetries of Space

Recall that two vectors in are perpendicular or orthogonal provided that their dot

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Eigenvalues and Eigenvectors

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

Direct Methods for Solving Linear Systems. Matrix Factorization

3. Let A and B be two n n orthogonal matrices. Then prove that AB and BA are both orthogonal matrices. Prove a similar result for unitary matrices.

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Section Inner Products and Norms

Solving Systems of Linear Equations

3 Orthogonal Vectors and Matrices

Systems of Linear Equations

Section 1.1. Introduction to R n

Nonlinear Iterative Partial Least Squares Method

8 Square matrices continued: Determinants

Lecture 3: Finding integer solutions to systems of linear equations

The Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression

Continued Fractions and the Euclidean Algorithm

Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components

α = u v. In other words, Orthogonal Projection

1 Sets and Set Notation.

The Characteristic Polynomial

SOLVING LINEAR SYSTEMS

Inner product. Definition of inner product

General Framework for an Iterative Solution of Ax b. Jacobi s Method

Lecture 14: Section 3.3

Linear algebra and the geometry of quadratic equations. Similarity transformations and orthogonal matrices

NOTES ON LINEAR TRANSFORMATIONS

Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

13 MATH FACTS a = The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Inner products on R n, and more

Lecture 1: Schur s Unitary Triangularization Theorem

ALGEBRAIC EIGENVALUE PROBLEM

[1] Diagonal factorization

by the matrix A results in a vector which is a reflection of the given

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = i.

Inner Product Spaces

26. Determinants I. 1. Prehistory

The Determinant: a Means to Calculate Volume

Data Mining: Algorithms and Applications Matrix Math Review

( ) which must be a vector

Math 215 HW #6 Solutions

CHAPTER 8 FACTOR EXTRACTION BY MATRIX FACTORING TECHNIQUES. From Exploratory Factor Analysis Ledyard R Tucker and Robert C.

Notes on Symmetric Matrices

Solution to Homework 2

Section 4.4 Inner Product Spaces

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

Linear Algebra Review. Vectors

Lecture notes on linear algebra

THREE DIMENSIONAL GEOMETRY

Linear Codes. Chapter Basics

MAT188H1S Lec0101 Burbulla

A note on companion matrices

9.2 Summation Notation

Operation Count; Numerical Linear Algebra

Lecture 5: Singular Value Decomposition SVD (1)

Section 5.3. Section 5.3. u m ] l jj. = l jj u j + + l mj u m. v j = [ u 1 u j. l mj

Solving Linear Systems, Continued and The Inverse of a Matrix

Orthogonal Projections and Orthonormal Bases

Math 312 Homework 1 Solutions

1 Solving LPs: The Simplex Algorithm of George Dantzig

Chapter 7. Lyapunov Exponents. 7.1 Maps

Linear Algebra Done Wrong. Sergei Treil. Department of Mathematics, Brown University

Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

Numerical Methods I Eigenvalue Problems

THE DIMENSION OF A VECTOR SPACE

Vector and Matrix Norms

CITY UNIVERSITY LONDON. BEng Degree in Computer Systems Engineering Part II BSc Degree in Computer Systems Engineering Part III PART 2 EXAMINATION

More than you wanted to know about quadratic forms

The Matrix Elements of a 3 3 Orthogonal Matrix Revisited

Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA

Transcription:

Orthogonal Bases and the QR Algorithm Orthogonal Bases by Peter J Olver University of Minnesota Throughout, we work in the Euclidean vector space V = R n, the space of column vectors with n real entries As inner product, we will only use the dot product v w = v T w and corresponding Euclidean norm v = v v Two vectors v,w V are called orthogonal if their inner product vanishes: v w = In the case of vectors in Euclidean space, orthogonality under the dot product means that they meet at a right angle A particularly important configuration is when V admits a basis consisting of mutually orthogonal elements Definition A basis u,,u n of V is called orthogonal if u i u j = for all i j The basis is called orthonormal if, in addition, each vector has unit length: u i =, for all i =,, n The simplest example of an orthonormal basis is the standard basis e =, e =, e n = Orthogonality follows because e i e j =, for i j, while e i = implies normality Since a basis cannot contain the zero vector, there is an easy way to convert an orthogonal basis to an orthonormal basis Namely, we replace each basis vector with a unit vector pointing in the same direction Lemma If v,,v n is an orthogonal basis of a vector space V, then the normalized vectors u i = v i / v i, i =,, n, form an orthonormal basis Example The vectors v =, v =, v =, are easily seen to form a basis of R Moreover, they are mutually perpendicular, v v = v v = v v =, and so form an orthogonal basis with respect to the standard dot 6// c Peter J Olver

product on R When we divide each orthogonal basis vector by its length, the result is the orthonormal basis u = 6 = 6 6, u = =, u = =, 6 satisfying u u = u u = u u = and u = u = u = The appearance of square roots in the elements of an orthonormal basis is fairly typical A useful observation is that any orthogonal collection of nonzero vectors is automatically linearly independent Proposition 4 If v,,v k V are nonzero, mutually orthogonal elements, so v i and v i v j = for all i j, then they are linearly independent Proof : Suppose c v + + c k v k = Let us take the inner product of this equation with any v i Using linearity of the inner product and orthogonality, we compute = c v + + c k v k v i = c v v i + + c k v k v i = c i v i v i = c i v i Therefore, provided v i, we conclude that the coefficient c i = Since this holds for all i =,, k, the linear independence of v,,v k follows QED As a direct corollary, we infer that any collection of nonzero orthogonal vectors forms a basis for its span Theorem Suppose v,,v n V are nonzero, mutually orthogonal elements of an inner product space V Then v,,v n form an orthogonal basis for their span W = span {v,,v n } V, which is therefore a subspace of dimension n = dim W In particular, if dim V = n, then v,,v n form a orthogonal basis for V Computations in Orthogonal Bases What are the advantages of orthogonal and orthonormal bases? Once one has a basis of a vector space, a key issue is how to express other elements as linear combinations of the basis elements that is, to find their coordinates in the prescribed basis In general, this is not so easy, since it requires solving a system of linear equations In high dimensional situations arising in applications, computing the solution may require a considerable, if not infeasible amount of time and effort However, if the basis is orthogonal, or, even better, orthonormal, then the change of basis computation requires almost no work This is the crucial insight underlying the efficacy of both discrete and continuous Fourier analysis, least squares approximations and statistical analysis of large data sets, signal, image and video processing, and a multitude of other applications, both classical and modern 6// c Peter J Olver

Theorem 6 Let u,,u n be an orthonormal basis for an inner product space V Then one can write any element v V as a linear combination in which its coordinates v = c u + + c n u n, () c i = v u i, i =,, n, () are explicitly given as inner products Moreover, its norm v = c + + c n = n v u i is the square root of the sum of the squares of its orthonormal basis coordinates i= () Proof : Let us compute the inner product of () with one of the basis vectors Using the orthonormality conditions { i j, u i u j = (4) i = j, and bilinearity of the inner product, we find n v u i = c j u j ; u i = j= To prove formula (), we similarly expand v = v v = n i,j= n j= c j u j u i = c i u i = c i c i c j u i u j = again making use of the orthonormality of the basis elements n i= c i, QED Example 7 Let us rewrite the vector v = (,, ) T in terms of the orthonormal basis u =, u =, u =, 6 6 6 constructed in Example Computing the dot products we immediately conclude that v u = 6, v u =, v u = 4, v = 6 u + u + 4 u Needless to say, a direct computation based on solving the associated linear system is more tedious 6// c Peter J Olver

While passage from an orthogonal basis to its orthonormal version is elementary one simply divides each basis element by its norm we shall often find it more convenient to work directly with the unnormalized version The next result provides the corresponding formula expressing a vector in terms of an orthogonal, but not necessarily orthonormal basis The proof proceeds exactly as in the orthonormal case, and details are left to the reader Theorem 8 If v,,v n form an orthogonal basis, then the corresponding coordinates of a vector v = a v + + a n v n are given by a i = v v i v i () In this case, its norm can be computed using the formula n n ( ) v v = a i v vi i = (6) v i i= Equation (), along with its orthonormal simplification (), is one of the most useful formulas we shall establish, and applications will appear repeatedly throughout the sequel Example 9 The wavelet basis v =, v =, v =, v 4 =, (7) is an orthogonal basis of R 4 The norms are i= v =, v =, v =, v 4 = Therefore, using (), we can readily express any vector as a linear combination of the wavelet basis vectors For example, 4 v = = v v + v v 4, where the wavelet coordinates are computed directly by v v v = 8 4 =, v v v = 4 4 =, v v v = 6 = v v 4 v 4 = 4 = Finally, we note that 46 = v = v +( ) v + v +( ) v 4 = 4 4+ 4+9 +4, in conformity with (6) 6// 4 c Peter J Olver

The Gram Schmidt Process Once we become convinced of the utility of orthogonal and orthonormal bases, a natural question arises: How can we construct them? A practical algorithm was first discovered by Pierre Simon Laplace in the eighteenth century Today the algorithm is known as the Gram Schmidt process, after its rediscovery by the nineteenth century mathematicians Jorgen Gram and Erhard Schmidt The Gram Schmidt process is one of the premier algorithms of applied and computational linear algebra We assume that we already know some basis w,,w n of V, where n = dim V Our goal is to use this information to construct an orthogonal basis v,,v n We will construct the orthogonal basis elements one by one Since initially we are not worrying about normality, there are no conditions on the first orthogonal basis element v, and so there is no harm in choosing v = w Note that v, since w appears in the original basis The second basis vector must be orthogonal to the first: v v = Let us try to arrange this by subtracting a suitable multiple of v, and set v = w cv, where c is a scalar to be determined The orthogonality condition = v v = w v cv v = w v c v requires that c = w v / v, and therefore v = w w v v v () Linear independence of v = w and w ensures that v (Check!) Next, we construct v = w c v c v by subtracting suitable multiples of the first two orthogonal basis elements from w We want v to be orthogonal to both v and v Since we already arranged that v v =, this requires and hence = v v = w v c v v, = v v = w v c v v, c = w v v, c = w v v Therefore, the next orthogonal basis vector is given by the formula v = w w v v v w v v v Since v and v are linear combinations of w and w, we must have v, as otherwise this would imply that w,w,w are linearly dependent, and hence could not come from a basis 6// c Peter J Olver

Continuing in the same manner, suppose we have already constructed the mutually orthogonal vectors v,,v k as linear combinations of w,,w k The next orthogonal basis element v k will be obtained from w k by subtracting off a suitable linear combination of the previous orthogonal basis elements: v k = w k c v c k v k Since v,,v k are already orthogonal, the orthogonality constraint requires = v k v j = w k v j c j v j v j c j = w k v j v j for j =,, k () In this fashion, we establish the general Gram Schmidt formula v k = w k k j= w k v j v j v j, k =,, n () The Gram Schmidt process () defines an explicit, recursive procedure for constructing the orthogonal basis vectors v,,v n If we are actually after an orthonormal basis u,,u n, we merely normalize the resulting orthogonal basis vectors, setting u k = v k / v k for each k =,, n Example The vectors w =, w =, w =, (4) are readily seen to form a basis of R To construct an orthogonal basis (with respect to the standard dot product) using the Gram Schmidt procedure, we begin by setting The next basis vector is v = w = v = w w v v v = = 4 This will, in fact, be a consequence of the successful completion of the Gram Schmidt process and does not need to be checked in advance If the given vectors were not linearly independent, then eventually one of the Gram Schmidt vectors would vanish, v k =, and the process will break down 6// 6 c Peter J Olver

The last orthogonal basis vector is v = w w v v v w v v v = 7 4 4 = The reader can easily validate the orthogonality of v,v,v An orthonormal basis is obtained by dividing each vector by its length Since v = 4 7, v =, v = we produce the corresponding orthonormal basis vectors u =, u = 4 4 4 4, u = 4 4 4 () Modifications of the Gram Schmidt Process With the basic Gram Schmidt algorithm now in hand, it is worth looking at a couple of reformulations that have both practical and theoretical advantages The first can be used to directly construct the orthonormal basis vectors u,,u n from the basis w,,w n We begin by replacing each orthogonal basis vector in the basic Gram Schmidt formula () by its normalized version u j = v j / v j The original basis vectors can be expressed in terms of the orthonormal basis via a triangular system w = r u, w = r u + r u, w = r u + r u + r u, w n = r n u + r n u + + r nn u n (6) The coefficients r ij can, in fact, be computed directly from these formulae Indeed, taking the inner product of the equation for w j with the orthonormal basis vector u i for i j, we find, in view of the orthonormality constraints (4), w j u i = r j u + + r jj u j u i = r j u u i + + r jj u n u i = r ij, and hence r ij = w j u i (7) On the other hand, according to (), w j = r j u + + r jj u j = r j + + r j,j + r jj (8) 6// 7 c Peter J Olver

The pair of equations (7 8) can be rearranged to devise a recursive procedure to compute the orthonormal basis At stage j, we assume that we have already constructed u,,u j We then compute r ij = w j u i, for each i =,, j (9) We obtain the next orthonormal basis vector u j by computing r jj = w j r j r j,j, u j = w j r j u r j,j u j r jj () Running through the formulae (9 ) for j =,, n leads to the same orthonormal basis u,,u n as the previous version of the Gram Schmidt procedure Example Let us apply the revised algorithm to the vectors w =, w =, w =, of Example To begin, we set r = w =, u = w = r The next step is to compute r = w u = 4, r = w r =, u = w r u = r The final step yields r = r = w u =, r = w u =, w r r = 7, u = w r u r u r = 4 4 4 As advertised, the result is the same orthonormal basis vectors that we found in Example 4 4 4 4 When j =, there is nothing to do 6// 8 c Peter J Olver

For hand computations, the original version () of the Gram Schmidt process is slightly easier even if one does ultimately want an orthonormal basis since it avoids the square roots that are ubiquitous in the orthonormal version (9 ) On the other hand, for numerical implementation on a computer, the orthonormal version is a bit faster, as it involves fewer arithmetic operations However, in practical, large scale computations, both versions of the Gram Schmidt process suffer from a serious flaw They are subject to numerical instabilities, and so accumulating round-off errors may seriously corrupt the computations, leading to inaccurate, non-orthogonal vectors Fortunately, there is a simple rearrangement of the calculation that obviates this difficulty and leads to the numerically robust algorithm that is most often used in practice The idea is to treat the vectors simultaneously rather than sequentially, making full use of the orthonormal basis vectors as they arise More specifically, the algorithm begins as before we take u = w / w We then subtract off the appropriate multiples of u from all of the remaining basis vectors so as to arrange their orthogonality to u This is accomplished by setting w () k = w k w k u u for k =,, n The second orthonormal basis vector u = w () / w() is then obtained by normalizing We next modify the remaining w (),,w() n to produce vectors w () k = w () k w () k u u, k =,, n, that are orthogonal to both u and u Then u = w () / w() is the next orthonormal basis element, and the process continues The full algorithm starts with the initial basis vectors w j = w () j, j =,, n, and then recursively computes u j = w(j) j w (j) j, w(j+) k = w (j) k w (j) k u j u j, j =,, n, k = j +,, n () (In the final phase, when j = n, the second formula is no longer needed) The result is a numerically stable computation of the same orthonormal basis vectors u,,u n Example Let us apply the stable Gram Schmidt process () to the basis vectors w () = w =, w () = w = The first orthonormal basis vector is u = w () = w () w () u u = 4 w() w () =, w () = w = Next, we compute, w () = w () w () u u = 6// 9 c Peter J Olver

The second orthonormal basis vector is u = w () = w () w () u u = w() w () =, u = w() w () = The resulting vectors u,u,u form the desired orthonormal basis Orthogonal Matrices Finally, 6 6 Matrices whose columns form an orthonormal basis of R n relative to the standard Euclidean dot product play a distinguished role Such orthogonal matrices appear in a wide range of applications in geometry, physics, quantum mechanics, crystallography, partial differential equations, symmetry theory, and special functions Rotational motions of bodies in three-dimensional space are described by orthogonal matrices, and hence they lie at the foundations of rigid body mechanics, including satellite and underwater vehicle motions, as well as three-dimensional computer graphics and animation Furthermore, orthogonal matrices are an essential ingredient in one of the most important methods of numerical linear algebra: the QR algorithm for computing eigenvalues of matrices Definition A square matrix Q is called an orthogonal matrix if it satisfies Q T Q = I () The orthogonality condition implies that one can easily invert an orthogonal matrix: Q = Q T () In fact, the two conditions are equivalent, and hence a matrix is orthogonal if and only if its inverse is equal to its transpose The second important characterization of orthogonal matrices relates them directly to orthonormal bases Proposition A matrix Q is orthogonal if and only if its columns form an orthonormal basis with respect to the Euclidean dot product on R n Proof : Let u,,u n be the columns of Q Then u T,,uT n are the rows of the transposed matrix Q T The (i, j) entry of the product Q T Q is given as the product of the i th row of Q T times{ the j th column of Q Thus, the orthogonality requirement () implies, i = j, u i u j = u T i u j = which are precisely the conditions (4) for u, i j,,,u n to form an orthonormal basis QED Warning: Technically, we should be referring to an orthonormal matrix, not an orthogonal matrix But the terminology is so standard throughout mathematics that we have no choice but to adopt it here There is no commonly accepted name for a matrix whose columns form an orthogonal but not orthonormal basis 6// c Peter J Olver

u u u θ θ u u = Example A matrix Q = ( ) ( a b,u c = d Figure Orthonormal Bases in R ( ) a b is orthogonal if and only if its columns c d ), form an orthonormal basis of R Equivalently, the requirement ( ) ( ) Q T a c a b Q = = b d c d ( ) a + c ab + cd ab + cd b + d = implies that its entries must satisfy the algebraic equations a + c =, ab + cd =, b + d = ( ), The first and last equations say that the points (a, c ) T and (b, d ) T lie on the unit circle in R, and so a = cos θ, c = sin θ, b = cos ψ, d = sin ψ, for some choice of angles θ, ψ The remaining orthogonality condition is = ab + cd = cos θ cos ψ + sin θ sin ψ = cos(θ ψ), which implies that θ and ψ differ by a right angle: ψ = θ ± π The ± sign leads to two cases: b = sin θ, d = cos θ, or b = sin θ, d = cos θ As a result, every orthogonal matrix has one of two possible forms ( ) ( ) cos θ sin θ cos θ sin θ or, where θ < π () sin θ cos θ sin θ cos θ The corresponding orthonormal bases are illustrated in Figure The former is a right handed basis, and can be obtained from the standard basis e,e by a rotation through angle θ, while the latter has the opposite, reflected orientation 6// c Peter J Olver

Example 4 A orthogonal matrix Q = (u u u ) is prescribed by mutually perpendicular vectors of unit length in R For instance, the orthonormal basis constructed in () corresponds to the orthogonal matrix Q = 4 4 4 4 4 4 4 Lemma An orthogonal matrix has determinant det Q = ± Proof : Taking the determinant of (), = det I = det(q T Q) = det Q T det Q = (det Q), which immediately proves the lemma QED An orthogonal matrix is called proper or special if it has determinant + Geometrically, the columns of a proper orthogonal matrix form a right handed basis of R n An improper orthogonal matrix, with determinant, corresponds to a left handed basis that lives in a mirror image world Proposition 6 The product of two orthogonal matrices is also orthogonal Proof : If Q T Q = I = QT Q, then (Q Q )T (Q Q ) = Q T QT Q Q = QT Q = I, and so the product matrix Q Q is also orthogonal QED This property says that the set of all orthogonal matrices forms a group The orthogonal group lies at the foundation of everyday Euclidean geometry, as well as rigid body mechanics, atomic structure and chemistry, computer graphics and animation, and many other areas 4 Eigenvalues of Symmetric Matrices Symmetric matrices play an important role in a broad range of applications, and enjoy a number of important properties not shared by more general matrices Not only are the eigenvalues of a symmetric matrix necessarily real, the eigenvectors always form an orthogonal basis In fact, this is by far the most common way for orthogonal bases to appear as the eigenvector bases of symmetric matrices Let us state this important result, but defer its proof until the end of the section Theorem 4 Let A = A T be a real symmetric n n matrix Then (a) All the eigenvalues of A are real (b) Eigenvectors corresponding to distinct eigenvalues are orthogonal (c) There is an orthonormal basis of R n consisting of n eigenvectors of A In particular, all symmetric matrices are complete 6// c Peter J Olver

Example 4 Consider the symmetric matrix A = 4 4 A straightforward computation produces its eigenvalues and eigenvectors: λ = 9, λ =, λ =, v =, v =, v = As the reader can check, the eigenvectors form an orthogonal basis of R An orthonormal basis is provided by the unit eigenvectors u =, u =, u = 6 6 Proof of Theorem 4: First, if A = A T is real, symmetric, then 6 (Av) w = v (Aw) for all v,w C n, (4) where indicates the Euclidean dot product when the vectors are real and, more generally, the Hermitian dot product v w = v T w when they are complex To prove property (a), suppose λ is a complex eigenvalue with complex eigenvector v C n Consider the Hermitian dot product of the complex vectors Av and v: On the other hand, by (4), (Av) v = (λv) v = λ v (Av) v = v (Av) = v (λv) = v T λv = λ v Equating these two expressions, we deduce λ v = λ v Since v, as it is an eigenvector, we conclude that λ = λ, proving that the eigenvalue λ is real To prove (b), suppose Av = λv, Aw = µw, where λ µ are distinct real eigenvalues Then, again by (4), λv w = (Av) w = v (Aw) = v (µw) = µv w, and hence (λ µ)v w = 6// c Peter J Olver

Since λ µ, this implies that v w = and hence the eigenvectors v,w are orthogonal Finally, the proof of (c) is easy if all the eigenvalues of A are distinct Part (b) proves that the corresponding eigenvectors are orthogonal, and Proposition 4 proves that they form a basis To obtain an orthonormal basis, we merely divide the eigenvectors by their lengths: u k = v k / v k, as in Lemma To prove (c) in general, we proceed by induction on the size n of the matrix A To start, the case of a matrix is trivial (Why?) Next, suppose A has size n n We know that A has at least one eigenvalue, λ, which is necessarily real Let v be the associated eigenvector Let V = { w R n v w = } denote the orthogonal complement to the eigenspace V λ the set of all vectors orthogonal to the first eigenvector Since dimv = n, we can choose an orthonormal basis y,,y n Now, if w is any vector in V, so is Aw, since, by (4), v (Aw) = (Av ) w = λ v w = Thus, A defines a linear transformation on V represented by an (n ) (n ) matrix with respect to the chosen orthonormal basis y,,y n It is not hard to prove that the representing matrix is symmetric, and so our induction hypothesis then implies that there is an orthonormal basis of V consisting of eigenvectors u,,u n of A Appending the unit eigenvector u = v / v to this collection will complete the orthonormal basis of R n QED The orthonormal eigenvector basis serves to diagonalize the symmetric matrix, resulting in the so-called spectral factorization formula Theorem 4 Let A be a real, symmetric matrix Then there exists an orthogonal matrix Q such that A = Q Λ Q = Q Λ Q T, (4) where Λ = diag (λ,, λ n ) is a real diagonal matrix The eigenvalues of A appear on the diagonal of Λ, while the columns of Q are the corresponding orthonormal eigenvectors Proof : Equation (4) can be rewritten as A Q = Q Λ The k th column of the latter matrix equation reads Av k = λ k v k, where v k is the k th column of Q But this is merely the condition that v k be an eigenvector of A with eigenvalue λ k Theorem 4 serves to complete the proof QED Remark: The term spectrum refers to the eigenvalues of a matrix or, more generally, a linear operator The terminology is motivated by physics The spectral energy lines of atoms, molecules and nuclei are characterized as the eigenvalues of the governing quantum mechanical Schrödinger operator The Spectral Theorem 4 is the finite-dimensional version for the decomposition of quantum mechanical linear operators into their spectral eigenstates The most important subclass of symmetric matrices are the positive definite matrices 6// 4 c Peter J Olver

Definition 44 An n n symmetric matrix A is called positive definite if it satisfies the positivity condition x T Ax > for all x R n (4) Theorem 4 A symmetric matrix A = A T is positive definite if and only if all of its eigenvalues are strictly positive Proof : First, if A is positive definite, and v is an eigenvector with (necessarily real) eigenvalue λ, then (4) implies < v T Av = v T (λv) = λ v, (44) which immediately proves that λ > Conversely, suppose A has all positive eigenvalues Let u,,u n be the orthonormal eigenvector basis of R n guaranteed by Theorem 4, with Au j = λ j u j Then, writing x = c u + + c n u n, we find Ax = c λ u + + c n λ n u n Therefore, using the orthonormality of the eigenvectors, for any x, x T Ax = (c u T + + c n ut n ) (c λ u + + c n λ n u n ) = λ c + + λ n c n > since only x = has c = = c n = This proves that A is positive definite QED The Q R Factorization The Gram Schmidt procedure for orthonormalizing bases of R n can be reinterpreted as a matrix factorization This is more subtle than the L U factorization that results from Gaussian Elimination, but is of comparable significance, and is used in a broad range of applications in mathematics, statistics, physics, engineering, and numerical analysis Let w,,w n be a basis of R n, and let u,,u n be the corresponding orthonormal basis that results from any one of the three implementations of the Gram Schmidt process We assemble both sets of column vectors to form nonsingular n n matrices A = (w w w n ), Q = (u u u n ) Since the u i form an orthonormal basis, Q is an orthogonal matrix Moreover, the Gram Schmidt equations (6) can be recast into an equivalent matrix form: r r r n r A = QR, where R = r n () r nn is an upper triangular matrix whose entries are the coefficients in (9 ) Since the Gram Schmidt process works on any basis, the only requirement on the matrix A is that its columns form a basis of R n, and hence A can be any nonsingular matrix We have therefore established the celebrated QR factorization of nonsingular matrices 6// c Peter J Olver

start QR Factorization of a Matrix A for j = to n set r jj = a j + + a nj if r jj =, stop; print A has linearly dependent columns else for i = to n next i set a ij = a ij /r jj for k = j + to n set r jk = a j a k + + a nj a nk for i = to n end set a ik = a ik a ij r jk next i next k next j Theorem Any nonsingular matrix A can be factored, A = QR, into the product of an orthogonal matrix Q and an upper triangular matrix R The factorization is unique if all the diagonal entries of R are assumed to be positive We will use the compacted term positive upper triangular to refer to upper triangular matrices with positive entries along the diagonal Example The columns of the matrix A = are the same as the basis vectors considered in Example The orthonormal basis () constructed using the Gram Schmidt algorithm leads to the orthogonal and positive upper triangular matrices 4 4 4 Q =, R = 4 () 4 4 4 4 The reader may wish to verify that, indeed, A = QR While any of the three implementations of the Gram Schmidt algorithm will produce the QR factorization of a given matrix A = (w w w n ), the stable version, as encoded in equations (), is the one to use in practical computations, as it is the least likely to fail 6// 6 c Peter J Olver 7

due to numerical artifacts produced by round-off errors The accompanying pseudocode program reformulates the algorithm purely in terms of the matrix entries a ij of A During the course of the algorithm, the entries of the matrix A are successively overwritten; the final result is the orthogonal matrix Q appearing in place of A The entries r ij of R must be stored separately Example Let us factor the matrix A = using the numerically stable QR algorithm As in the program, we work directly on the matrix A, gradually changing it into orthogonal form In the first loop, we set r = to be the norm of the first column vector of A We thennormalize the first column by dividing by r ; the resulting matrix is The next entries r = 4, r =, r 4 =, are obtained by taking the dot products of the first column with the other three columns For j =,,, we subtract r j times the first column from the j th 6 4 column; the result is a matrix whose first column is normalized to have unit length, and whose second, third and fourth columns are orthogonal to it In the next loop, we normalize the second column by dividing by its norm r = 7 6 4 4, and so obtain the matrix 7 7 We then take dot products of the second column with the remaining two columns to produce r = 6 7, r 4 = 7 Subtracting these multiples of the second column from the third and fourth columns, we obtain 7 7 4 6 7 4 7 7 7 6 7 9 4, which now has its first two columns orthonormalized, and orthogonal to the last two columns We then normalize the third column by dividing 6// 7 c Peter J Olver

7 4 6 by r =, and so 7 7 4 7 6 9 Finally, we subtract r = 4 7 4 7 times the third column from the fourth column Dividing the resulting fourth column by its norm r 44 = Q = 6 results in the final formulas, 7 6 7 4 6 7 7 4 for the A = QR factorization, R = 6 Numerical Calculation of Eigenvalues 4 4 6 7 7 7 We are now ready to apply these results to the problem of numerically approximating eigenvalues of matrices Before explaining the Q R algorithm, we first review the elementary power method The Power Method We assume, for simplicity, that A is a complete n n matrix, meaning that it has an eigenvector basis v,,v n, with corresponding eigenvalues λ,, λ n It is easy to see that the solution to the linear iterative system 6, v (k+) = Av (k), v () = v, (6) is obtained by multiplying the initial vector v by the successive powers of the coefficient matrix: v (k) = A k v If we write the initial vector in terms of the eigenvector basis then the solution takes the explicit form v = c v + + c n v n, (6) v (k) = A k v = c λ k v + + c n λk n v n (6) Suppose further that A has a single dominant real eigenvalue, λ, that is larger than all others in magnitude, so λ > λ j for all j > (64) This is not a very severe restriction Theorem 4 implies that all symmetric matrices are complete Moreover, perturbations caused by round off and/or numerical inaccuracies will almost inevitably make an incomplete matrix complete 6// 8 c Peter J Olver

As its name implies, this eigenvalue will eventually dominate the iteration (6) Indeed, since λ k λ j k for all j > and all k, the first term in the iterative formula (6) will eventually be much larger than the rest, and so, provided c, v (k) c λ k v for k Therefore, the solution to the iterative system (6) will, almost always, end up being a multiple of the dominant eigenvector of the coefficient matrix To compute the corresponding eigenvalue, we note that the i th entry of the iterate v (k) is approximated by v (k) i c λ k v,i, where v,i is the ith entry of the eigenvector v Thus, as long as v,i, we can recover the dominant eigenvalue by taking a ratio between selected components of successive iterates: λ v(k) i, provided that v (k ) v (k ) i (6) i Example 6 Consider the matrix A = 4 As you can check, its eigenvalues and eigenvectors are 9 7 λ =, v =, λ =, v =, λ =, v = Repeatedly multiplying an initial vector v = (,, ) T, say, by A results in the iterates v (k) = A k v listed in the accompanying table The last column indicates the ratio λ (k) = v (k) /v(k ) between the first components of successive iterates (One could equally well use the second or third components) The ratios are converging to the dominant eigenvalue λ =, while the vectors v (k) are converging to a very large multiple of the corresponding eigenvector v = (,, ) T Variants of the power method for finding other eigenvalues include the inverse power method based on iterating the inverse matrix A, with eigenvalues λ,, λ n and the shifted inverse power method, based on (A µ I ), with eigenvalues (λ k µ) The power method only produces the dominant (largest in magnitude) eigenvalue of a matrix A The inverse power method can be used to find the smallest eigenvalue Additional eigenvalues can be found by using the shifted inverse power method, or deflation However, if we need to know all the eigenvalues, such piecemeal methods are too time-consuming to be of much practical value The QR Algorithm The most popular scheme for simultaneously approximating all the eigenvalues of a matrix A is the remarkable Q R algorithm, first proposed in 96 independently by Francis 6// 9 c Peter J Olver

and Kublanovskaya The underlying idea is simple, but surprising The first step is to factor the matrix A = A = Q R into a product of an orthogonal matrix Q and a positive (ie, with all positive entries along the diagonal) upper triangular matrix R Next, multiply the two factors together in the wrong order! The result is the new matrix A = R Q We then repeat these two steps Thus, we next factor A = Q R using the Gram Schmidt process, and then multiply the factors in the reverse order to produce A = R Q The complete algorithm can be written as A = Q R, R k Q k = A k+ = Q k+ R k+, k =,,,, (66) where Q k, R k come from the previous step, and the subsequent orthogonal matrix Q k+ and positive upper triangular matrix R k+ are computed by using the numerically stable form of the Gram Schmidt algorithm The astonishing fact is that, for many matrices A, the iterates A k V converge to an upper triangular matrix V whose diagonal entries are the eigenvalues of A Thus, after a sufficient number of iterations, say k, the matrix A k will have very small entries below the diagonal, and one can read off a complete system of (approximate) eigenvalues along its diagonal For each eigenvalue, the computation of the corresponding eigenvector can be done by solving the appropriate homogeneous linear system, or by applying the shifted inverse power method ( ) Example 6 Consider the matrix A = The initial Gram Schmidt fac- torization A = Q R yields Q = ( 77 77 77 77 ), R = These are multiplied in the reverse order to give ( ) 4 A = R Q = ( ) 884 884 44 We refactor A = Q R via Gram Schmidt, and then reverse multiply to produce ( ) ( ) 97 4 4 4 Q =, R 4 97 =, 97 ( ) 488 7647 A = R Q = 94 6// c Peter J Olver

The next iteration yields Q = ( ) 998 79 79 998 A 4 = R Q = ( 466 79, R = 989 ( ) 478 94 69 98 Continuing in this manner, after 9 iterations we find, to four decimal places, Q = ( ), R = ( ) 4, A = R Q = ), ( ) 4 The eigenvalues of A, namely 4 and, appear along the diagonal of A Additional iterations produce very little further change, although they can be used for increasing the accuracy of the computed eigenvalues If the original matrix A is symmetric, positive definite, and with distinct eigenvalues, then, in most situations (see below for the precise requirement), the iterates converge, A k V = Λ, to a diagonal matrix containing the eigenvalues of A in decreasing order Moreover, if, in this case, we recursively define S = Q, S k = S k Q k = Q Q Q k Q k, k >, (67) then S k S have, as their limit, an orthogonal matrix whose columns are the orthonormal eigenvector basis of A Example 6 Consider the symmetric matrix A = The initial A = Q R factorization produces 6 8944 48 86 6 6 447 S = Q = 447 86 6, R = 449 66, 48 99 and so 94 A = R Q = 94 87 87 46667 We refactor A = Q R and reverse multiply to produce 99 74 7 7 44 6 Q = 4 7488 67, S = S Q = 7 686 66, 68 797 4 869 496 97 7 78 74 86 R = 46 484, A = R Q = 86 4 64 4 9 6// c Peter J Olver

Continuing in this manner, after iterations we find 67 7 667 8 Q = 67, S = 8 7679 9, 9468 987 94 69 647 6 4 R = 8 6, A = 4 8 87 87 After iterations, the process has completely settled down, and Q = 7 67 8, S = 69 77 9, 949 9 94 64 R = 79, A = 64 79 87 87 The eigenvalues of A appear along the diagonal of A, while the columns of S are the corresponding orthonormal eigenvector basis, listed in the same order as the eigenvalues, both correct to 4 decimal places We will devote the remainder of this section to a justification of the QR algorithm for a general class of symmetric matrices We begin by assuming that A is an n n symmetric, positive definite matrix, with distinct eigenvalues λ > λ > > λ n > (68) According to the Spectral Theorem 4, the corresponding unit eigenvectors u,,u n form an orthonormal basis of R n After treating this case, the analysis will be extended to a broader class of symmetric matrices, having both positive and negative eigenvalues The secret is that the QR algorithm is, in fact, a well-disguised adaptation of the more primitive power method If we were to use the power method to capture all the eigenvectors and eigenvalues of A, the first thought might be to try to perform it simultaneously on a complete basis v (),,v() n of Rn instead of just one individual vector The problem is that, for almost all vectors, the power iterates v (k) j = A k v () j all tend to a multiple of the dominant eigenvector u Normalizing the vectors at each step is not any better, since then they merely converge to one of the two dominant unit eigenvectors ±u However, if, inspired by the form of the eigenvector basis, we orthonormalize the vectors at each step, then we effectively prevent them from all accumulating at the same dominant unit eigenvector, and so, with some luck, the resulting vectors will converge to the full system of eigenvectors Since orthonormalizing a basis via the Gram Schmidt process is equivalent to a QR matrix factorization, the mechanics of the algorithm is not so surprising In detail, we start with any orthonormal basis, which, for simplicity, we take to be the standard basis vectors of R n, and so u () = e,,u () n of the algorithm, we set u (k),,u(k) n = e n At the k th stage to be the orthonormal vectors that result from 6// c Peter J Olver

applying the Gram Schmidt algorithm to the power vectors v (k) j language, the vectors v (k),,v(k) n = A k e j In matrix are merely the columns of A k, and the orthonormal basis u (k),,u(k) n are the columns of the orthogonal matrix S k in the QR decomposition of the k th power of A, which we denote by A k = S k P k, (69) where P k is positive upper triangular Note that, in view of (66) and, in general, A = Q R, A = Q R Q R = Q Q R R, A = Q R Q R Q R = Q Q R Q R R = Q Q Q R R R, A k = ( Q Q Q k Q k ) ( Rk R k R R ) (6) The product of orthogonal matrices is also orthogonal The product of positive upper triangular matrices is also positive upper triangular Therefore, comparing (69, ) and invoking the uniqueness of the QR factorization, we conclude that S k = Q Q Q k Q k = S k Q k, P k = R k R k R R = R k P k (6) Let S = (u u u n ) denote an orthogonal matrix whose columns are unit eigenvectors of A The Spectral Theorem 4 tells us that A = S Λ S T, where Λ = diag (λ,, λ n ) is the diagonal eigenvalue matrix Substituting the spectral factorization into (69), we find A k = S Λ k S T = S k P k We now make one additional assumption on the matrix A by requiring that S T be a regular matrix, meaning that we can factor S T = LU into a product of special lower and upper triangular matrices, or, equivalently, that Gaussian Elimination can be performed on the linear system S T x = b without any row interchanges Regularity holds generically, and is the analog of the condition that our initial vector in the power method includes a nonzero component of the dominant eigenvector We can assume that, without loss of generality, the diagonal entries of the upper triangular matrix U that is, the pivots of S T are all positive Indeed, this can be arranged by multiplying each row of S T by the sign of its pivot this amounts to possibly changing the signs of some of the unit eigenvectors u i, which is allowed since it does not affect their status as an orthonormal eigenvector basis Under these two assumptions, A k = SΛ k LU = S k P k, and hence S Λ k L = S k P k U Multiplying on the right by Λ k, we obtain S Λ k L Λ k = S k T k, where T k = P k U Λ k (6) 6// c Peter J Olver

is also a positive upper triangular matrix, since we are assuming that the eigenvalues, ie, the diagonal entries of Λ, are all positive Now consider what happens as k The entries of the lower triangular matrix N = Λ k L Λ k are l ij (λ i /λ j ) k, i > j, n ij = l ii =, i = j,, i < j Since we are assuming λ i < λ j when i > j, we immediately deduce that and hence Λ k L Λ k I, S k T k = S Λ k L Λ k S as k (6) We now appeal to the following lemma, whose proof will be given after we finish the justification of the QR algorithm Lemma 64 Let S, S, and S be orthogonal matrices and T, T, positive upper triangular matrices Then S k T k S as k if and only if S k S and T k I Therefore, as claimed, the orthogonal matrices S k do converge to the orthogonal eigenvector matrix S By (6), Moreover, by (6 ), Q k = S k S k I as k (64) R k = P k P k = ( T k Λ k U ) ( T k Λ k U ) = T k Λ T k Since both T k and T k converge to the identity matrix, in the limit R k Λ as k (6) Combining (64, ), we deduce that the matrices appearing in the Q R algorithm converge to the diagonal eigenvalue matrix, as claimed: A k = Q k R k Λ as k (66) Note that the eigenvalues appear in decreasing order along the diagonal, which is a consequence of our regularity assumption on the transposed eigenvector matrix S T The last remaining item is a proof of Lemma 64 We write S = (u u u n ), S k = (u (k),,u(k) n ) in columnar form Let t(k) ij denote the entries of the positive upper triangular matrix T k The first column of the limiting equation S k T k S reads t (k) u(k) u Since both u (k) and u are unit vectors, and t (k) >, t (k) u(k) = t (k) u =, and hence u (k) u 6// 4 c Peter J Olver

The second column reads t (k) u(k) + t (k) u(k) u Taking the inner product with u (k) u and using orthonormality, we deduce t (k) and so t (k) u(k) u, which, by the previous reasoning, implies t (k), and u(k) u The proof is completed by working in order through the remaining columns, employing a similar argument at each step To modify the preceding proof for symmetric, but non-positive definite matrices, we introduce the diagonal orthogonal matrix = = diag (signλ,, signλ n ), so that Λ = Λ = diag ( λ,, λ n ) whose diagonal entries are the signs of the eigenvalues (So in the positive definite case = I ) Set S k = S k k, Tk = k T k Thus, (6) can be rewritten as S k Tk = S k T k = S Λ k L Λ k S as k Recalling (6), the diagonal entries of the upper triangular matrix T k = k T k are seen to be strictly positive, and hence Lemma 64 implies Therefore, S k S, Tk I, as k Q k = S k S k = k S S k k k, R k = T k Λ T k = k Tk Λ T k k Λ, The convergence of the QR matrices immediately follows: as k (67) A k = Q k R k Λ = Λ as k Keep in mind that, in non-positive definite cases, the orthogonal matrices S k no longer converge, since the nonzero entries in the columns corresponding to negative eigenvalues switch their signs back and forth as k increases; however, by eliminating the sign changes which, in practice can be done by inspection their modifications S k = S k k S will converge to the eigenvector matrix This completes the proof of the convergence of the QR algorithm for a broad class of symmetric matrices Theorem 6 If A is symmetric, satisfies λ > λ > > λ n >, (68) and its transposed eigenvector matrix S T is regular, then the matrices appearing in the QR algorithm applied to A converge to the diagonal eigenvalue matrix: A k Λ = diag (λ,, λ n ) as k 6// c Peter J Olver

v u u H v Figure Elementary Reflection Matrix Tridiagonalization In practical implementations, the direct Q R algorithm often takes too long to provide reasonable approximations to the eigenvalues of large matrices Fortunately, the algorithm can be made much more efficient by a simple preprocessing step The key observation is that the Q R algorithm preserves the class of symmetric tridiagonal matrices, and, moreover, like Gaussian Elimination, is much faster when applied to this class of matrices It turns out that, although diagonalizinjg a matrix is effectively the same as finding its eigenvectors, one can tridiagonalize the matrix by a sequence of fairly elementary matrix operations, based on the following class of matrices Consider the Householder or elementary reflection matrix H = I uu T (69) in which u is a unit vector (in the Euclidean norm) The matrix H represents a reflection of vectors through the subspace u = {v v u = } of vectors orthogonal to u, as illustrated in Figure The matrix H is symmetric and orthogonal: H T = H, H = I, H = H (6) The proof is straightforward: symmetry is immediate, while H H T = H = ( I uu T ) ( I uu T ) = I 4uu T + 4u (u T u)u T = I since, by assumption, u T u = u = By suitably forming the unit vector u, we can construct an elementary reflection matrix that interchanges any two vectors of the same length Lemma 66 Let v,w R n with v = w Set u = (v w)/ v w and let H = I uu T be the corresponding elementary reflection matrix Then H v = w and H w = v 6// 6 c Peter J Olver

Proof : Keeping in mind that x and y have the same Euclidean norm, we compute H v = ( I uu T )v = v (v w)(v w)t v v w = v (v w) ( v w v ) v = v (v w) = w v w The proof of the second equation is similar QED In Householder s approach to the Q R factorization, we were able to convert the matrix A to upper triangular form R by a sequence of elementary reflection matrices Unfortunately, this procedure does not preserve the eigenvalues of the matrix the diagonal entries of R are not the eigenvalues and so we need to be a bit more clever here We begin by recalling that similar matrices have the same eigenvalues Lemma 67 If H = I uu T is an elementary reflection matrix, with u a unit vector, then A and B = HAH are similar matrices and hence have the same eigenvalues Proof : According to (6), H = H, and hence B = H AH is similar to A If λ is any eigenvalue of A, soav = λv for v, then Bw = λw where w = H v, which implies that λ remains an eigenvalue of B,l and conversely QED Given a symmetric n n matrix A, our goal is to devise a similar tridiagonal matrix by applying a sequence of Householder reflections We begin by setting a ±r x = a, y = a n, where r = x = y, so that x contains all the off-diagonal entries of the first column of A Let H = I u u T, where u = x y x y be the corresponding elementary reflection matrix that maps x to y Either ± sign in the formula for y works in the algorithm; a good choice is to set it to be the opposite of the sign of the entry a, which helps minimize the possible effects of round-off error when computing the unit vector u By direct computation, based on Lemma 66 and the fact that the first entry of u is zero, A = H A H = a r r ã ã ã n ã ã ã n ã n ã n ã nn (6) 6// 7 c Peter J Olver

for certain ã ij ; the explicit formulae are not needed Thus, by a single Householder transformation, we convert A into a similar matrix A whose first row and column are in tridiagonal form We repeat the process on the lower right (n ) (n ) submatrix of A We set x = ã ã 4 ã n, y = ±r, where r = x = y, and the ± sign is chosen to be the opposite of that of ã Setting we construct the similar matrix H = I u u T, where u = x y x y, A = H A H = a r r ã r r â â 4 â n â 4 â 44 â 4n â n â n4 â nn whose first two rows and columns are now in tridiagonal form The remaining steps in the algorithm should now be clear Thus, the final result is a tridiagonal matrix T = A n that has the same eigenvalues as the original symmetric matrix A Let us illustrate the method by an example 4 4 Example 68 To tridiagonalize A =, we begin with its first 4 4 column We set x = 6, so that y = vector is u = x y x y = 449 Therefore, the unit 89, with corresponding Householder matrix 4 486 H = I u u T = 48 48 86 48 886 67 86 67 66 6// 8 c Peter J Olver

Thus, 4 449 449 86 899 A = H A H = 86 4944 46 899 46 477 In the next phase, x =, y 86 =, so u 948 =, and 896 899 4 H = I u u T = 4 9 9 4 The resulting matrix 4 449 449 948 T = A = H A H = 948 46667 is now in tridiagonal form Since the final tridiagonal matrix T has the same eigenvalues as A, we can apply the QR algorithm to T to approximate the common eigenvalues (The eigenvectors must then be computed separately, eg, by the shifted inverse power method) It is not hard to show that, if A = A is tridiagonal, so are all the iterates A, A, Moreover, far fewer arithmetic operations are required For instance, in the preceding example, after we apply iterations of the QR algorithm directly to T, the upper triangular factor has become R = 6 6 466 484 The eigenvalues of T, and hence also of A, appear along the diagonal, and are correct to 4 decimal places Finally, even if A is not symmetric, one can still apply the same sequence of Householder transformations to simplify it The final result is no longer tridiagonal, but rather a similar upper Hessenberg matrix, which means that all entries below the subdiagonal are zero, but those above the superdiagonal are not necessarily zero For instance, a upper Hessenberg matrix looks like, 6// 9 c Peter J Olver

where the starred entries can be anything It can be proved that the QR algorithm maintains the upper Hessenberg form, and, while not as efficient as in the tridiagonal case, still yields a significant savings in computational effort required to find the common eigenvalues Acknowledgments: I would like to thank Raphaéle Herbin for comments on an earlier version of these notes 6// c Peter J Olver