10.7. THE QR FACTORIZATION 215

As in the above problem Q1a1 = b and so Q1A=

(|a1| ∗0 A2

)where A2 is a m−1×n−1

matrix. Now find in the same way as was just done a n−1×n−1 matrix Q̂2 such that

Q̂2A2 =

(∗ ∗0 A3

)

Let Q2 ≡

(1 00 Q̂2

).Then

Q2Q1A =

(1 00 Q̂2

)(|a1| ∗0 A2

)=

|a1| ∗ ∗

... ∗ ∗0 0 A3

Continuing this way until the result is upper triangular, you get a sequence of orthogonalmatrices QpQp−1 · · ·Q1 such that

QpQp−1 · · ·Q1A = R (10.3)

where R is upper triangular.Now if Q1 and Q2 are orthogonal, then from properties of matrix multiplication,

Q1Q2 (Q1Q2)T = Q1Q2QT

2 QT1 = Q1IQT

1 = I

and similarly(Q1Q2)

T Q1Q2 = I.

Thus the product of orthogonal matrices is orthogonal. Also the transpose of an orthogonalmatrix is orthogonal directly from the definition. Therefore, from 10.3

A = (QpQp−1 · · ·Q1)T R≡ QR,

where Q is orthogonal. This suggests the proof of the following theorem.

Theorem 10.7.5 Let A be any real m× n matrix. Then there exists an orthogonal matrixQ and an upper triangular matrix R having nonnegative entries down the main diagonalsuch that

A = QR

and this factorization can be accomplished in a systematic manner.

Proof: The theorem is clearly true if A is a 1×m matrix. Suppose it is true for A ann×m matrix. Thus, if A is any n×m matrix, there exists an orthogonal matrix Q such that

QA = R

where R is upper triangular. Suppose A is an (n+1)×m matrix. Then, as indicated above,there exists an orthogonal (n+1)× (n+1) matrix Q1 such that

Q1A =

(a b0 A1

)

10.7. THE QR FACTORIZATION 215|ai|0 Azmatrix. Now find in the same way as was just done an— 1 x n— 1 matrix O> such thatA * *om= (5 ‘)1Lsor= ( 5 )2* *1 0 lay aZ al « ) of.0 0 A;As in the above problem Qa; = band so Q}A= ( where Az isam—1xn—1Continuing this way until the result is upper triangular, you get a sequence of orthogonalmatrices Q,Qp—1---Q such thatQpQp-1°::QiA=R (10.3)where R is upper triangular.Now if Q; and Q are orthogonal, then from properties of matrix multiplication,Q1Q2(0102)" = 01005 Of = QiI0t =1and similarly(Q1Q2)" Q1Q2 =1.Thus the product of orthogonal matrices is orthogonal. Also the transpose of an orthogonalmatrix is orthogonal directly from the definition. Therefore, from 10.3A = (QpQp-1++-Q1)' R= OR,where Q is orthogonal. This suggests the proof of the following theorem.Theorem 10.7.5 Let A be any real m xn matrix. Then there exists an orthogonal matrixQ and an upper triangular matrix R having nonnegative entries down the main diagonalsuch thatA=QRand this factorization can be accomplished in a systematic manner.Proof: The theorem is clearly true if A is a 1 x m matrix. Suppose it is true for A ann Xm matrix. Thus, if A is any n x m matrix, there exists an orthogonal matrix Q such thatOA=Rwhere R is upper triangular. Suppose A is an (n+ 1) x m matrix. Then, as indicated above,there exists an orthogonal (n+ 1) x (n+ 1) matrix Q; such thata boa-( 5 .)