This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % PA where P = I ; 2vvT =(vT v) is a Householder
% matrix and v is an mvector.
= ;2=(vT
w = AT
A=A+v v)
v
wT 7 (3a)
(3b) Re ections
Function for a postHouseholder update
function A = col.house(A v)
% col.house: Overwrite A 2 <m n with the product
% AP where P = I ; 2vvT =(vT v) is a Householder
% matrix and v is an nvector.
= ;2=(vT
w= A
A=A+w v)
v
vT Example 4. Let A 2 <m n. Compute Q such that B = QA
has bkj = 0, k = j + 1 : m
{ Partition A
A = A11 A12
AA
21 22 where A11 2 <(j ;1) (j ;1), A12 2 <(j ;1) (n;j ), A21 2
<(m;j ) (j ;1) , and A22 2 <(m;j ) (n;j )
{ Let Q= Ij;1 0
0P vvT
=I;2 T
vv 8 0
v= v
~ Re ections
Multiply A11 A
B = QA = PA21 PA12
22 A typical case is to apply the transform to each column with
a goal of making B upper triangular
{ In this case, A21 = 0
The following code segment does the job v(j : m) = house(A(j : m j ))
A(j : m j n) = row.house(A(j : m j : n) v(j : m))
A(j + 1 : m j ) = v(j + 1 : m)
{ The rst line creates the nonzero portion of v that zeros
bkj , k = j + 1 : m
{ The second line applies the transformation Q to A22 and
stores the result back in A
{ The third line stores the nonzero portion of v in the zeroed
portion of the j th column of A 9 Re ections
Householder transformations are often applied in sequence Q = Q1Q2 Qr where v(j)(v(j))T v(j) = 0
Qj = I ; 2 (v(j))T v(j)
~
v (j )
~
{ The dimension v(j) is m ; j + 1
It is typically not necessary to store Q, but rather store the
Householder vectors v(j ), j = 1 : r
{ Suppose v(j) is stored in the lower triangular part of a
matrix A
{ The following code segment overwrites C with QC
for j = 1 : r
v(j + 1 : n) = A(j + 1 : n j )
v(j) = 1
C...
View
Full
Document
This document was uploaded on 03/16/2014 for the course CSCI 6800 at Rensselaer Polytechnic Institute.
 Fall '98
 JosephE.Flaherty

Click to edit the document details