1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>QR Factorization</TITLE>
<META NAME="description" CONTENT="QR Factorization">
<META NAME="keywords" CONTENT="lug_l2h">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="lug_l2h.css">
<LINK REL="next" HREF="node41.html">
<LINK REL="previous" HREF="node39.html">
<LINK REL="up" HREF="node39.html">
<LINK REL="next" HREF="node41.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html4710"
HREF="node41.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next_motif.png"></A>
<A NAME="tex2html4704"
HREF="node39.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up_motif.png"></A>
<A NAME="tex2html4698"
HREF="node39.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="previous_motif.png"></A>
<A NAME="tex2html4706"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents_motif.png"></A>
<A NAME="tex2html4708"
HREF="node152.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index_motif.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html4711"
HREF="node41.html">LQ Factorization</A>
<B> Up:</B> <A NAME="tex2html4705"
HREF="node39.html">Orthogonal Factorizations and Linear</A>
<B> Previous:</B> <A NAME="tex2html4699"
HREF="node39.html">Orthogonal Factorizations and Linear</A>
  <B> <A NAME="tex2html4707"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html4709"
HREF="node152.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H3><A NAME="SECTION03242100000000000000">
<I>QR</I> Factorization</A>
</H3>
<P>
The most
common, and best known, of the factorizations
is the <B><I>QR</I></B> <B>factorization</B><A NAME="2569"></A>
given by
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
A = Q\left( \begin{array}{c}R\\0\end{array}\right), \quad \mbox{if $m \ge n$,}
\end{displaymath}
-->
<IMG
WIDTH="204" HEIGHT="54" BORDER="0"
SRC="img102.png"
ALT="\begin{displaymath}
A = Q\left( \begin{array}{c}R\\ 0\end{array}\right), \quad \mbox{if $m \ge n$,}
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
where <B><I>R</I></B> is an <B><I>n</I></B>-by-<B><I>n</I></B> upper triangular matrix and <B><I>Q</I></B> is an <B><I>m</I></B>-by-<B><I>m</I></B>
orthogonal (or unitary) matrix. If <B><I>A</I></B> is of full rank <B><I>n</I></B>, then <B><I>R</I></B> is
non-singular.
It is sometimes convenient to write the factorization as
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
A = \left( \begin{array}{cc} Q_1 & Q_2\end{array} \right)
\left( \begin{array}{c}R\\0\end{array}\right)
\end{displaymath}
-->
<IMG
WIDTH="183" HEIGHT="54" BORDER="0"
SRC="img103.png"
ALT="\begin{displaymath}
A = \left( \begin{array}{cc} Q_1 & Q_2\end{array} \right)
\left( \begin{array}{c}R\\ 0\end{array}\right)
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
which reduces to
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
A = Q_1 R ,
\end{displaymath}
-->
<B>
<I>A</I> = <I>Q</I><SUB>1</SUB> <I>R</I> ,
</B>
</DIV>
<BR CLEAR="ALL">
<P></P>
where <B><I>Q</I><SUB>1</SUB></B> consists of the first <B><I>n</I></B> columns of <B><I>Q</I></B>, and <B><I>Q</I><SUB>2</SUB></B> the
remaining <B><I>m</I>-<I>n</I></B> columns.
<P>
If <B><I>m</I> < <I>n</I></B>, <B><I>R</I></B> is trapezoidal, and the factorization can be written
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
A = Q\left( \begin{array}{cc}R_1 & R_2\end{array}\right), \quad
\mbox{if $m < n$,}
\end{displaymath}
-->
<IMG
WIDTH="242" HEIGHT="37" BORDER="0"
SRC="img104.png"
ALT="\begin{displaymath}
A = Q\left( \begin{array}{cc}R_1 & R_2\end{array}\right), \quad
\mbox{if $m < n$,}
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
where <B><I>R</I><SUB>1</SUB></B> is upper triangular and <B><I>R</I><SUB>2</SUB></B> is rectangular.
<P>
The routine xGEQRF<A NAME="2584"></A><A NAME="2585"></A><A NAME="2586"></A><A NAME="2587"></A>
computes the <B><I>QR</I></B> factorization. The matrix <B><I>Q</I></B> is not
formed explicitly, but is represented as a product of elementary reflectors,
<A NAME="2588"></A>
<A NAME="2589"></A>
as described in section <A HREF="node128.html#secorthog">5.4</A>.
Users need not be aware of the details of this representation,
because associated routines are provided to work with <B><I>Q</I></B>:
xORGQR<A NAME="2591"></A><A NAME="2592"></A> (or xUNGQR<A NAME="2593"></A><A NAME="2594"></A>
in the complex case) can generate all or part of <B><I>Q</I></B>,
while xORMQR<A NAME="2595"></A><A NAME="2596"></A> (or xUNMQR<A NAME="2597"></A><A NAME="2598"></A>) can pre- or post-multiply
a given matrix by <B><I>Q</I></B> or <B><I>Q</I><SUP><I>T</I></SUP></B>
(<B><I>Q</I><SUP><I>H</I></SUP></B> if complex).
<P>
The <B><I>QR</I></B> factorization can be used to solve the linear least squares
problem (<A HREF="node27.html#llsq">2.1</A>)<A NAME="2600"></A> when <IMG
WIDTH="53" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img105.png"
ALT="$m \geq n$">
and
<B><I>A</I></B> is of full rank, since
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
\|b - Ax\|_2 = \| Q^T b - Q^T A x\|_2 =
\left\|\begin{array}{c} c_1 - Rx \\c_2 \end{array}\right \|_2, \quad
\mbox{where } c \equiv
\left( \begin{array}{c} c_1 \\c_2 \end{array} \right) =
\left( \begin{array}{c} Q_1^T b \\Q_2^T b \end{array} \right) =
Q^T b;
\end{displaymath}
-->
<IMG
WIDTH="652" HEIGHT="55" BORDER="0"
SRC="img106.png"
ALT="\begin{displaymath}
\Vert b - Ax\Vert _2 = \Vert Q^T b - Q^T A x\Vert _2 =
\left...
...egin{array}{c} Q_1^T b \\ Q_2^T b \end{array} \right) =
Q^T b;
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
<B><I>c</I></B> can be computed by xORMQR<A NAME="2611"></A><A NAME="2612"></A> (or xUNMQR
<A NAME="2613"></A><A NAME="2614"></A>), and <B><I>c</I><SUB>1</SUB></B> consists of its first
<B><I>n</I></B> elements. Then
<B><I>x</I></B> is the solution of the upper triangular system
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
Rx = c_1
\end{displaymath}
-->
<B>
<I>Rx</I> = <I>c</I><SUB>1</SUB>
</B>
</DIV>
<BR CLEAR="ALL">
<P></P>
which can be computed by xTRTRS<A NAME="2615"></A><A NAME="2616"></A><A NAME="2617"></A><A NAME="2618"></A>.
The residual vector <B><I>r</I></B> is given by
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
r = b - A x = Q \left( \begin{array}{c} 0 \\c_2 \end{array} \right) ,
\end{displaymath}
-->
<IMG
WIDTH="186" HEIGHT="54" BORDER="0"
SRC="img107.png"
ALT="\begin{displaymath}
r = b - A x = Q \left( \begin{array}{c} 0 \\ c_2 \end{array} \right) ,
\end{displaymath}">
</DIV>
<BR CLEAR="ALL">
<P></P>
and may be computed using xORMQR<A NAME="2622"></A><A NAME="2623"></A> (or xUNMQR
<A NAME="2624"></A><A NAME="2625"></A>).
The residual sum of squares <B>|r|<SUB>2</SUB><SUP>2</SUP></B> may be computed without forming <B><I>r</I></B>
explicitly, since
<BR><P></P>
<DIV ALIGN="CENTER">
<!-- MATH
\begin{displaymath}
\|r\|_2 = \|b - Ax\|_2 = \|c_2\|_2.
\end{displaymath}
-->
<B>
|r|<SUB>2</SUB> = |b - <I>Ax</I>|<SUB>2</SUB> = |c<SUB>2</SUB>|<SUB>2</SUB>.
</B>
</DIV>
<BR CLEAR="ALL">
<P></P>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html4710"
HREF="node41.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next_motif.png"></A>
<A NAME="tex2html4704"
HREF="node39.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up_motif.png"></A>
<A NAME="tex2html4698"
HREF="node39.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="previous_motif.png"></A>
<A NAME="tex2html4706"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents_motif.png"></A>
<A NAME="tex2html4708"
HREF="node152.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index_motif.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html4711"
HREF="node41.html">LQ Factorization</A>
<B> Up:</B> <A NAME="tex2html4705"
HREF="node39.html">Orthogonal Factorizations and Linear</A>
<B> Previous:</B> <A NAME="tex2html4699"
HREF="node39.html">Orthogonal Factorizations and Linear</A>
  <B> <A NAME="tex2html4707"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html4709"
HREF="node152.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
<I>Susan Blackford</I>
<BR><I>1999-10-01</I>
</ADDRESS>
</BODY>
</HTML>
|