0% found this document useful (0 votes)
47 views2 pages

GramSchmidt PDF

The QR decomposition decomposes a matrix A into an orthogonal matrix Q and an upper triangular matrix R. The Gram-Schmidt process is one method for computing the QR decomposition. It works by taking the columns of A as vectors and orthonormalizing them to produce the columns of Q. This orthonormalization process results in Q and R that satisfy A = QR. An example demonstrates computing the QR decomposition of a sample matrix using Gram-Schmidt.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

GramSchmidt PDF

The QR decomposition decomposes a matrix A into an orthogonal matrix Q and an upper triangular matrix R. The Gram-Schmidt process is one method for computing the QR decomposition. It works by taking the columns of A as vectors and orthonormalizing them to produce the columns of Q. This orthonormalization process results in Q and R that satisfy A = QR. An example demonstrates computing the QR decomposition of a sample matrix using Gram-Schmidt.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

QR Decomposition with Gram-Schmidt

Igor Yanovsky (Math 151B TA)

The QR decomposition (also called the QR factorization) of a matrix is a decomposition


of the matrix into an orthogonal matrix and a triangular matrix. A QR decomposition of
a real square matrix A is a decomposition of A as

A = QR,

where Q is an orthogonal matrix (i.e. QT Q = I) and R is an upper triangular matrix. If


A is nonsingular, then this factorization is unique.
There are several methods for actually computing the QR decomposition. One of such
method is the Gram-Schmidt process.

1 Gram-Schmidt process
Consider the GramSchmidt procedure, with the vectors to be considered in the process as
columns of the matrix A. That is,



A = a1 a2 an .

Then,
u1
u1 = a1 , e1 = ,
||u1 ||
u2
u2 = a2 (a2 e1 )e1 , e2 = .
||u2 ||
uk+1
uk+1 = ak+1 (ak+1 e1 )e1 (ak+1 ek )ek , ek+1 = .
||uk+1 ||
Note that || || is the L2 norm.

1.1 QR Factorization
The resulting QR factorization is

a1 e1 a2 e1 an e1

0 a2 e2 an e2
A= a1 a2 an =
e1 e2 en .. .. .. .. = QR.
. . . .
0 0 an en

Note that once we find e1 , . . . , en , it is not hard to write the QR factorization.

1
2 Example
Consider the matrix

1 1 0
A = 1 0 1 ,
0 1 1

with the vectors a1 = (1, 1, 0)T , a2 = (1, 0, 1)T , a3 = (0, 1, 1)T .


Note that all the vectors considered above and below are column vectors. From now on,
I will drop T notation for simplicity, but we have to remember that all the vectors are
column vectors.
Performing the Gram-Schmidt procedure, we obtain:

u1 = a1 = (1, 1, 0),

u1 1 1 1
e1 = = (1, 1, 0) = , , 0 ,
||u1 || 2 2 2

1 1 1 1 1
u2 = a2 (a2 e1 )e1 = (1, 0, 1) , , 0 = , ,1 ,
2 2 2 2 2

u2 1 1 1 1 1 2
e2 = =p , , 1 = , , ,
||u2 || 3/2 2 2 6 6 6

u3 = a3 (a3 e1 )e1 (a3 e2 )e2



1 1 1 1 1 1 2 1 1 1
= (0, 1, 1) , ,0 , , = , , ,
2 2 2 6 6 6 6 3 3 3

u3 1 1 1
e3 = = , , .
||u3 || 3 3 3
Thus,

1 1 13

2 6

Q = e1 e2 en = 1 16 1 ,
2 3
0 2 1
6 3
2
1 1
a1 e1 a2 e1 a3 e1 2 2 2
3 1
R = 0 a2 e2 a3 e2 = 0 6 6 .
0 0 a3 e3 0 0 23

You might also like