QR Factorization and Solutions to Equations of the form Ax=b
We will study another method to solve the system Ax = b. The QR factorization is also, important in finding the eigenvalues of the matrix A but that is will have to wait until we know what an eigenvalue is and why we want to find them.
The QR factorization is obtained by using the Gram-Schmidt process on the columns of A to form an orthogonal matrix. An orthogonal matrix has the property that
and
. Thus , the matrix must be square to be orthogonal. We will also use the letter Q for a non square matrix with the property that
but we will not call it an orthogonal matrix. We have all the tools necessary to find the matrices Q.
We will illustrate how to find an orthogonal matrix Q starting with a 3x3 non-singular matrix.
We know from previous work that if A is non-singular then the columns of A are linearly independent.
| > |
A:=<<1,-1,0>|<-1,1,-1>|<0,1,-1>>; |
| > |
p2:=v2-(p1^%T.v2)/(p1^%T.p1)*p1; |
| > |
p3:=v3-(p1^%T.v3)/(p1^%T.p1)*p1-(p2^%T.v3)/(p2^%T.p2)*p2; |
If we have the equation Ax = b The by multiplying by the transpose of Q we have
For our example then we will only have to multiply b by the transpose of Q and use back substitution.
| > |
x:=BackwardSubstitute(<R|QTb>); |
We will next look at the case when we do not have a square matrix. We can find a matrix that we will designate by the letter Q but it will not be an orthogonal matrix since it is not square.
QR for Non-Square Matrices.
Consider the following system
We will find a matrix Q so that
where R is an upper triangular matrix and the columns of Q are orthonormal.
| > |
C:=<<1,0,1,1>|<1,1,0,0>|<0,1,2,1>>; |
| > |
p2:=v2 - (p1^%T.v2)/(p1^%T.p1)*p1; |
| > |
p3:=v3-(p1^%T.v3)/(p1^%T.p1)*p1 - (p2^%T.v3)/(p2^%T.p2)*p2; |
| > |
Y:=BackwardSubstitute(<R|Qe>); |
We will talk about the meaning of such equation when there is no solution. The above process will
give a solution but it is not a solution as we now know it.