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

QR Factorization with Column Pivoting

To solve a linear least squares problem (2.1) when A is not of full rank, or the rank of A is in doubt, we can perform either a QR factorization with column pivoting or a singular value decomposition (see subsection 2.4.6).

The QR factorization with column pivoting is given by

\begin{displaymath}
A = Q\left( \begin{array}{c}R\\ 0\end{array}\right)P^T, \quad m \ge n,
\end{displaymath}

where Q and R are as before and P is a permutation matrix, chosen (in general) so that

\begin{displaymath}
\vert r_{11}\vert \ge \vert r_{22}\vert \ge \ldots \ge \vert r_{nn}\vert
\end{displaymath}

and moreover, for each k,

\begin{displaymath}
\vert r_{kk}\vert \ge \Vert R_{k:j,j}\Vert _2 \quad \mbox{for $j = k+1, \ldots, n$.}
\end{displaymath}

In exact arithmetic, if $\mbox{rank}(A) = k$, then the whole of the submatrix R22 in rows and columns k+1 to n would be zero. In numerical computation, the aim must be to determine an index k, such that the leading submatrix R11 in the first k rows and columns is well-conditioned, and R22 is negligible:

\begin{displaymath}
R = \left( \begin{array}{cc}R_{11} & R_{12} \\ 0 & R_{22} \e...
... \begin{array}{cc}R_{11} & R_{12} \\ 0 & 0\end{array}\right) .
\end{displaymath}

Then k is the effective rank of A. See Golub and Van Loan [55] for a further discussion of numerical rank determination.

The so-called basic solution to the linear least squares problem (2.1) can be obtained from this factorization as

\begin{displaymath}
x = P \left( \begin{array}{c} R_{11}^{-1} \hat{c}_1 \\ 0 \end{array} \right),
\end{displaymath}

where $\hat{c}_1$ consists of just the first k elements of c = QT b.

The QR factorization with column pivoting can be computed either by subroutine xGEQPF or by subroutine xGEQP3. Both subroutines compute the factorization but do not attempt to determine the rank of A. xGEQP3 is a Level 3 BLAS version of QR with column pivoting and is considerably faster than xGEQPF, while maintaining the same numerical behavior. The difference between the two routines can best be described as follows. For each column, the subroutine xGEQPF selects one column, permutes it, computes the reflector that zeroes some of its components, and applies it to the rest of the matrix via Level 2 BLAS operations. The subroutine xGEQP3, however, only updates one column and one row of the rest of the matrix (information necessary for the next pivoting phase) and delays the update of the rest of the matrix until a block of columns has been processed. This resulting block of reflectors is then applied to the rest of the matrix as a Level 3 BLAS operation. xGEQPF has been retained for compatibility with Release 2.0 of LAPACK, but we omit references to this routine in the remainder of this users' guide.

For both subroutines, the matrix Q is represented in exactly the same way as after a call of xGEQRF, and so the routines xORGQR and xORMQR can be used to work with Q (xUNGQR and xUNMQR if Q is complex).


next up previous contents index
Next: Complete Orthogonal Factorization Up: Orthogonal Factorizations and Linear Previous: LQ Factorization   Contents   Index
Susan Blackford
1999-10-01