next up previous contents index
Next: LQ Factorization Up: Orthogonal Factorizations and Linear Previous: Orthogonal Factorizations and Linear

QR Factorization

 

The most common, and best known, of the factorizations is the QR factorization  given by
displaymath13230
where R is an n-by-n upper triangular matrix and Q is an m-by-m orthogonal (or unitary) matrix. If A is of full rank n, then R is nonsingular. It is sometimes convenient to write the factorization as
displaymath13231
which reduces to
displaymath13232
where tex2html_wrap_inline13270 consists of the first n columns of Q, and tex2html_wrap_inline13276 the remaining m-n columns.

If m < n, R is trapezoidal, and the factorization can be written
displaymath13233
where tex2html_wrap_inline13286 is upper triangular and tex2html_wrap_inline13288 is rectangular.

The routine PxGEQRF     computes the QR factorization  . The matrix Q is not formed explicitly, but is represented as a product of elementary reflectors,     as described in section 3.4. Users need not be aware of the details of this representation, because associated routines are provided to work with Q: PxORGQR   (or PxUNGQR   in the complex case) can generate all or part of Q, while PxORMQR   (or PxUNMQR)   can pre- or post-multiply a given matrix by Q or tex2html_wrap_inline13300 (tex2html_wrap_inline13302 if complex).

The QR factorization can be used to solve the linear least squares problem (3.1)   when tex2html_wrap_inline13306 and A is of full rank, since
displaymath13234
c can be computed by PxORMQR   (or PxUNMQR  ), and tex2html_wrap_inline13312 consists of its first n elements. Then x is the solution of the upper triangular system
displaymath13235
which can be computed by PxTRTRS    . The residual vector r is given by
displaymath13236
and may be computed using PxORMQR   (or PxUNMQR  ). The residual sum of squares tex2html_wrap_inline13320 may be computed without forming r explicitly, since
displaymath13237


next up previous contents index
Next: LQ Factorization Up: Orthogonal Factorizations and Linear Previous: Orthogonal Factorizations and Linear

Susan Blackford
Tue May 13 09:21:01 EDT 1997