Section 2 turned a basis into an orthonormal basis
one vector at a time, and every step was bookkeeping:
each new vector recorded in terms of those already
produced. Collect that bookkeeping into a matrix and the
Gram–Schmidt process becomes a
factorization — an orthogonal
counterpart of the factorization of Definition 3.6.1.
This section proves it and its uniqueness, then builds
it a second time out of reflections, a route that
survives dependent columns. The same reflections,
applied on both sides, bring any square
matrix to an almost-triangular form by a unitary
similarity. Throughout, is or , and carries the standard
inner product, linear in the first slot.
Let have columns , and suppose they are linearly
independent. Apply Theorem 11.2.2 to
the list . It returns an orthonormal list
in with for every . In particular lies in , and Theorem 11.2.1 (a),
applied inside that subspace, expands it:
Now read
as a matrix product. Put and let have
entries Then
is upper triangular (Definition 0.9.5), and
says that
the -th column of
equals times the -th column of . That is exactly .
Nothing has been computed; the factorization is
the Gram–Schmidt output, rewritten.
Two features of the rewriting matter later. First the
diagonal: in the notation of Theorem 11.2.2,
with ,
so comparing with gives strictly positive because
. Second, is recoverable from
and : since the columns of
are orthonormal,
by Definition 11.1.2,
so
and .
Theorem
11.8.1 (QR Factorization)
Let have linearly
independent columns. Then there are matrices
and with
- (a) the columns of
orthonormal,
equivalently ;
- (b) upper triangular with
positive real diagonal entries;
- (c) .
Moreover and
are
unique: any pair satisfying (a), (b),
(c) is this one. The pair is the
QR factorization of .
Idea. Existence is the paragraph
above: run Gram–Schmidt and read off the coefficients.
For uniqueness, suppose . We
cannot cancel ,
which is not square, but turns into and makes the
’s vanish. That
leaves , so the matrix carrying to is upper triangular
with positive diagonal and satisfies . Such a
matrix has no room to be anything but : column by column,
orthogonality to the earlier columns kills every entry
above the diagonal.
Proof. Existence. Apply Theorem 11.2.2 to
the columns of ,
which is legitimate because they are independent, and
define and as above. Then (a)
holds by orthonormality of the output, (b) holds because
, and (c) is .
Uniqueness. Suppose
with both pairs satisfying (a) and (b). Each has nonzero diagonal
entries, hence is invertible by Lemma 3.6.2. Using
twice, Put , so that . The matrix
is upper
triangular: its -th column is the
solution
of , and solving from the bottom row
upward gives for every , exactly as in the proof of Lemma 3.6.2. Hence
is upper
triangular, being a product of upper triangular
matrices: in a term can
be nonzero only when and , which is impossible for , and for only the term survives. So its
diagonal entries are , a quotient
of positive reals. Substituting into the
display gives , and multiplying by on the left and on the right
leaves
Claim. An upper triangular with and
positive real diagonal entries is .
Proof. Write for the columns of . As computed before
the theorem, says . We show
by induction on .
Let
and suppose for every (no assumption
when ). For
, so every entry of above the
diagonal vanishes; and for because is upper triangular.
Hence , and forces .
Since , this gives and .
By the Claim, , so and therefore . This proves uniqueness.
The positivity in (b) is a normalization and nothing
deeper: without it, scaling by any of modulus and row of by gives another
factorization. Exercise (C1: All the QR factorizations of a matrix)
describes all of them.
Warning. In the matrix
is usually not
square, and . Only holds.
For the
matrix of Example (A QR, and a
least-squares problem) below, whose trace is , not . This is the “identity
on what?” trap of Theorem 11.7.3: the
columns of are
an orthonormal basis of a plane, and
is the
orthogonal projection onto it (Theorem 11.3.3).
Quick check. Each factor of a QR
factorization is recoverable from the other: and . One of
the two recoveries needs an invertibility hypothesis and
the other does not. Which, and why?
Solution. The second. Multiplying
on the
left by
gives , which uses only : nothing
is inverted, and
is not even square. Multiplying on the right by presupposes that
is invertible —
true by Lemma 3.6.2, but
only because clause (b) makes the diagonal positive.
Least
squares through QR
An inconsistent system was
handled in Section 4 by the normal equations (Theorem 11.4.2).
When the columns of are independent, the
QR factorization simplifies those equations to a
triangular system.
Substituting and using , so the normal equations read . Now is invertible by Lemma 3.6.2, hence
so is , with
— conjugate-transpose . So
cancels:
By Corollary 11.4.4
the least-squares solution is unique here, and is a triangular
system, solved by back substitution. The deeper reason
to prefer it is not the operation count: forming squares the
sensitivity of the problem to rounding, while never forms
that product at all. Chapter 24 makes “sensitivity”
precise and proves the comparison; here we record only
the practice.
Example
(A QR,
and a least-squares problem)
Let
- (a) Find the QR
factorization of .
- (b) Find the
minimizing , using (a).
Solution.
- (a) Write and
. They are independent, since neither is
a multiple of the other.
Step 1. , so and .
Step 2. , so with and . Hence Check. has first column
and second column , which is .
- (b) By we need . Here
and , so the system
is Back substitution gives , so , and then , so . The
minimizer is .
Check against the normal equations. and .
Subtracting the first equation from the second gives
, and then
. The same
answer, with the same arithmetic done in a worse
order.
Reflections
Gram–Schmidt builds out of the columns of
. There is an
entirely different route to a triangular , modeled on
elimination: hit
on the left with simple matrices that create zeros, one
column at a time, and collect the inverses. Chapter 3
used shears and got ; if every matrix we hit with is
unitary instead, the collected product
is unitary and we get . Which unitary matrices are simple enough?
A rotation in the plane of two coordinates is one
answer, taken up below. The more efficient answer is a
reflection, because one reflection can flatten an entire
column at once.
A reflection in a hyperplane sends a vector to
its mirror image: keep the part perpendicular to , and reverse the
part along .
Definition
11.8.1 (Householder Reflection)
Let be nonzero. The
Householder reflection determined by
is
In words: is
an
matrix (a column times a row), and for any the
product is
the scalar . So
the definition says where the last equality is Theorem 11.3.3 with
the orthonormal basis
of the line . Writing
as in Theorem 11.3.2, we
see that keeps the
component of in
and reverses the component along . That is a
mirror reflection in the hyperplane .
Note at once that for every nonzero scalar , since and . Only the
line through
matters.
Examples.
- The smallest case. In take : then , the
map .
The “hyperplane” is , and this is the
only nontrivial isometry of the line.
- A coordinate reflection. In take , so
and : the reflection in the -axis.
- A diagonal reflection. In take , so
and , which swaps the
coordinates. It is the reflection in the line , and
is that line.
- A complex one. In take :
then , over either field.
Nonexample by minimal change. Drop
the factor : the
matrix is , the orthogonal projection
onto .
It is Hermitian, as is, but
not unitary and not invertible: it
sends to
. Halving
the coefficient turns “reverse the component along ” into “delete
it”, an isometry into a shadow.
Proposition
11.8.2 (Properties of a Householder
Reflection)
Let be nonzero and .
Then
- (a) ( is Hermitian);
- (b) , so ;
- (c) is unitary;
- (d) ,
and for every ;
- (e) .
Proof.
(a) By Definition 11.1.2,
, and is a
real number (Theorem 11.1.1
(a)), so .
(b) Since ,
because the last two terms cancel.
(c) By (a) and
(b), , which is the criterion of Definition 11.7.2.
(d) Both
statements are read off : gives , and gives .
(e) Extend the
unit vector
to an orthonormal basis of with , which is possible by
Corollary 11.2.3,
and let . By (d), and
for , that
is,
with . The matrix is unitary, hence
invertible, so . Taking determinants, by Theorem 7.5.4 and Corollary 7.5.6, and
by Theorem 7.4.6.
So a Householder reflection is a unitary involution
of determinant :
cheap to store (one vector) and cheap to apply, by . What makes it
useful is the following choice of .
Theorem
11.8.3 (A Reflection Flattening a
Vector)
Let be nonzero, and let Then and In particular is
a multiple of of length
.
Over , is the sign of
(or if ), and according to that
sign.
Idea. Picture the real plane. We
want a mirror line taking to a point on
the first axis at the same distance from the origin.
There are two such points, ,
and for each the mirror is the perpendicular bisector of
the segment joining to it — whose
normal direction is the difference
. So the vector is forced, up to
which of the two targets we aim at, and all that remains
is to check that the coefficient
in comes
out exactly , so
that . The role of is to choose the
target on the far side from .
Proof. Note first that in both cases, and .
Expanding with (IP1) and Theorem 11.1.1 (b),
where the second line uses , and . Since
we have ,
so and . Likewise so that . Hence by , Finally by Theorem 11.1.2 (b),
as it must be, since is unitary.
This proves the theorem.
Why that sign. The opposite choice
also works
whenever , giving ; in exact
arithmetic the two are equally good, and in floating
point they are not. The first entry of is , a difference of two
numbers of modulus and — and
when is
close to a multiple of those two are
nearly equal, so the leading digits cancel and the
computed first entry keeps only the few digits they did
not share. The other entries of are copied
from and
stay exact, so the computed points in a
noticeably wrong direction, and so does the reflection
built from it. With
the first entry has modulus : like-signed quantities,
nothing to cancel. (The same computation shows
always, whereas
exactly when , the extreme
case of that cancellation.) Chapter 24 quantifies the
loss; the summary here is that both signs are correct
mathematics and only one is correct arithmetic.
Warning. Do not build the
matrix in order to
use it. Forming it and multiplying costs operations per
column, while applies the
same reflection with one inner product and one scaled
subtraction, about . Every “multiply by
” below is really
an instance of ; the matrix is
a proof device.
Quick check. Let . Find and as
in Theorem 11.8.3, and
say why the sign question does not arise here.
Solution. and
, so and . Then . With there is no
cancellation to avoid: the first entry of is either way, and
both choices are equally accurate. The convention is only a
convention.
QR by
reflections
One reflection makes the first column a multiple of
—
exactly the zeros an upper triangular matrix needs in
column . Repeating
on the trailing submatrix triangularizes everything.
Theorem
11.8.4 (QR by Householder Reflections)
Let . Then there are a
unitary and an
with
whenever ,
such that Moreover can be taken to be a
product of at most Householder reflections. No
hypothesis on the columns of is
needed.
Idea. Induction on the number of
columns. Step one is Theorem 11.8.3
applied to the first column: after it, the first column
is
and what is left to triangularize is the trailing block.
Feed that block to the induction hypothesis, and lift
the unitary matrix it returns to by putting a in the top-left corner
— a block matrix of that shape does not touch the first
row or the first column, so it cannot spoil the zeros
just created.
Proof. We induct on , the statement being
asserted for every at once.
If , then
has no entries
below its diagonal, so and work. Assume from now on that .
Let be
the first column of . If , put
and ; otherwise let
be the reflection of Theorem 11.8.3 for
, and . In both cases is unitary and
Hermitian with — by Proposition 11.8.2
(a)–(c) for a reflection, and because in the degenerate case — and . Hence, by Theorem 8.1.1,
for some and , where the is a column of
zeros.
Base case . There is no block , and
already has for . So is of the required form with .
Induction step. Let and assume the
statement for
columns. Applied to , which has rows, it
gives a unitary and an with zeros below
the diagonal and . Put Then by Theorem 8.1.1, so
is unitary, and
by the
same computation. Also has zeros below its
diagonal: in column this is the block ; and for and , the -entry of is the -entry of , which vanishes
because .
Therefore , and is unitary as a product of unitary
matrices (Proposition 11.7.4).
Unwinding the induction, is a product of one
reflection (or ) for each of the
columns , since the recursion stops once one row is
left. This proves the theorem.
Example
(A QR by
reflections)
Triangularize by Householder reflections, and read off and .
Solution. Step 1. The
first column is with and
, so
and
Apply to each
column: .
All three columns pair with to give , so each loses exactly
one copy of : (As predicted, the first column is .)
Step 2. Work now in the trailing block, whose
first column is with and
. So
,
and inside we
reflect in , which fixes and so leaves
column alone;
here .
The second and third columns of pair with to
give
and , so
they lose one copy and a third of a copy respectively:
The unitary factor. By Proposition 11.8.2
(b), , so . Computing the product, whose columns have length and are pairwise
orthogonal, as one checks from the integer entries: for
instance .
Check. by expansion along the first row, and by Theorem 7.4.6,
consistent with from Proposition 11.8.2
(e).
The diagonal of here is , not
positive: the reflection route produces
a factorization, not
the one of Theorem 11.8.1. The
two are related by flipping the sign of each row of
with a negative
diagonal entry, and of the matching column of ; Exercise (B2: The same matrix by reflections)
carries this out on the matrix of Example (A QR, and a
least-squares problem).
Warning. “The QR
factorization” is definite only with the positivity
normalization. Theorem 11.8.1 pins
the pair down by demanding ; the
reflection algorithm ignores that demand and chooses
signs for stability instead. So two correct computations
of “the QR factorization of ” can differ by signs.
Compare , and the lines spanned by the
columns of .
Where Gram–Schmidt cannot follow. Theorem 11.8.4
assumed nothing about the columns, and that is a genuine
gain. Let the columns of be dependent, and let
be the first
index with . The
Gram–Schmidt recursion then produces and
stops, because the next step divides by ; Exercise (C2: Gram–Schmidt on a dependent list)
works this out. Nor is the failure an artifact of the
method: if with and upper triangular with
positive diagonal, then is invertible by Lemma 3.6.2, so
and the columns were independent after all.
A QR factorization in the sense of Theorem 11.8.1
exists exactly for matrices of full column
rank. The reflection route is untroubled: a
dependent column simply puts a zero on the diagonal of
where the
dependence appears, and the algorithm continues (Exercise (C2: Reflections do not mind dependence)).
Givens
rotations
A reflection zeroes a whole column at once. Sometimes
that is too much: if is nearly triangular
already, we would rather kill the few offending entries
one at a time and leave the rest alone.
Definition
11.8.2 (Givens Rotation)
Let and let with . The Givens rotation is the identity matrix with the four
entries in rows and columns replaced by
The two columns involved are orthonormal, since and , and every
other column of
is a standard basis vector, orthogonal to both; so and is orthogonal, with
by expansion along those other columns (Theorem 7.6.1).
Moreover acts as
the identity on every coordinate other than and . Given a vector with ,
set Then the -th entry of is and
the -th is ,
while every other entry is unchanged. One
rotation, one new zero.
Here is one rotation at work. To clear the -entry of the matrix
below, take
, , and for its first
column, so that and , , . Then replaces row by and row by , and leaves row alone: The new -entry is and the new -entry is , as designed; the zero already sitting in
position
survives because row was never touched. A
reflection would have flattened the whole first column
in one step, at the price of rewriting row as well.
Applied in a suitable order, rotations triangularize
any real matrix, which is a second proof of Theorem 11.8.4 over
at the cost of
more steps: a full matrix needs about rotations where
reflections need .
For a nearly triangular matrix the count reverses, which
is why the Hessenberg matrices below are handled with
rotations in practice. Over one takes , with , and in place of
; to zero the
-th entry of one puts and takes
and when , and , when .
So far the unitary matrices acted on one side. A
similarity needs both: to preserve eigenvalues we must
pass from to
, not to
. What can
reflections achieve under that constraint?
Not triangularity, and the reason is worth seeing
before the theorem. Suppose we reflect so that the first
column becomes .
Multiplying on the right must not disturb column , so the right factor
must fix
— and so must the left factor, since they are the same
matrix. But a reflection fixing acts only on
the coordinates , so in column the best it can do is
compress rows into row . The entry just
below the diagonal survives, by necessity. That
is exactly the pattern we can reach.
Idea. Work column by column, as in
Theorem 11.8.4, but
apply each reflection on both sides. At step it is chosen to fix
and to flatten the part of column
in rows . Two
observations do the bookkeeping. On the
left it only recombines rows , and in the
earlier columns those rows are already zero, so a
combination of them is still zero. On the
right it only recombines columns , so the
columns already in shape are untouched.
Proof. For say that
satisfies
if
whenever
and .
Every matrix satisfies vacuously, and
says
precisely that
is upper Hessenberg, since the conditions with and are empty.
Put .
Let and suppose satisfies . Let be
the vector of entries in rows of column
of . If , put
;
otherwise let be the reflection of Theorem 11.8.3 with
, where . Set The block is unitary and
Hermitian with — by Proposition 11.8.2
(a)–(c) for a reflection, and because otherwise — so by Theorem 8.1.1 is unitary and
Hermitian with , and for every .
Claim 1. satisfies
, and
its entries in rows of column are .
Proof. By Theorem 8.1.1, the
rows of
are
those of ,
and each of the rows is a linear combination of the rows
of
. Fix a
column .
By ,
the entries of that column in rows vanish, and
, so
all the entries being combined are and the combination is
. Hence survives. In
column , the
entries in rows form the vector , whose entries after the first
are ; these sit in
rows .
Claim 2.
has the same first columns as .
Proof. For , the -th column of is , the -th column of .
Combining the two claims, satisfies : columns keep the
zeros guaranteed by Claim 1, and column has zeros in rows , also by
Claim 1, and both survive the right multiplication by
Claim 2.
Running produces satisfying , that is,
upper Hessenberg. Put , unitary as a product of
unitary matrices (Proposition 11.7.4).
Since each , which proves the theorem. (For there are no
steps and every matrix is already Hessenberg.)
Because , the matrices and are similar (Definition 4.2.2),
so they share their characteristic polynomial, their
eigenvalues, and their trace. The reduction is not
merely tidying: it removes entries
and keeps the whole spectrum.
Example
(Hessenberg form of a matrix)
Reduce to upper Hessenberg form by a unitary
similarity.
Solution. Only occurs, and only
the entry
has to be killed. The relevant vector is , with and
, so and Hence , and Left multiplication by exchanges rows and and negates them, and
right multiplication does the same to columns and : Entry is and entry is , as
Theorem 11.8.3
predicts. Watch column through the second
multiplication: it is untouched, because . Both matrices have trace , as similarity
requires.
Warning. Hessenberg form is
not one small step from triangular form. A few
more reflections will not clear the subdiagonal, and not
merely because the argument above breaks. The diagonal
of a triangular matrix similar to lists the eigenvalues
of (Theorem 9.7.4), so a
finite procedure using only arithmetic and square roots
that always produced one would extract the roots of an
arbitrary polynomial from its coefficients by those
operations alone. No such procedure exists: from degree
five on, the roots of a general polynomial cannot be
written with arithmetic and radicals at all. That is a
theorem of Abel and Ruffini, which this book does not
prove and which nothing later depends on; we quote it
only to explain why the algorithms of Chapter 24 iterate
instead of terminating. Over a triangularizing
unitary does exist (Theorem 9.7.2); what
does not exist is a finite algorithm of this kind
producing it. Over even the existence
fails: a rotation in with no real
eigenvalue is already Hessenberg and is orthogonally
similar to no real triangular matrix.
Hessenberg form is where the practical computation of
eigenvalues begins. One applies the reduction once, then
iterates a cheap step that preserves the pattern: factor
and
replace by , again
a unitary similarity. Chapter 24 develops that iteration
and explains why every implementation starts with the
reduction proved here.
Quick check. In the reduction of a
matrix,
how many reflections are used, and how many entries does
the second one set to zero?
Solution. Three, namely . The step
chooses a
reflection acting on the coordinates and sets the
entries in rows
and of column
to zero: two
entries. (Step
sets three, step
sets one, for in total.)
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) State Theorem 11.8.1 in
full, including the two normalizations that make and unique.
- (b) Which hypothesis
on does Theorem 11.8.1
need, and which does Theorem 11.8.4
need? Explain the difference in one sentence.
- (c) Write down the
Householder reflection determined by , and list three
of its properties.
- (d) In Theorem 11.8.3,
which of the two possible targets
is chosen, and why?
- (e) True or false:
applying reflections on both sides, as in Theorem 11.8.5, can
be pushed to make every complex matrix unitarily similar
to an upper triangular one. Justify your answer.
- (f) Why must the
reflection used at step of Theorem 11.8.5 fix
?
Solution.
(a) If the
columns of are independent, then with upper triangular; the
normalizations are that the columns of are
orthonormal and that the diagonal of
is
positive real. With both, the pair is
unique.
(b) Theorem 11.8.1
needs independent columns; Theorem 11.8.4
needs nothing. A positive diagonal forces to be invertible and
hence ,
while the reflection route is content to put a zero on
the diagonal where a dependence occurs.
(c) (Definition 11.8.1);
it is Hermitian, unitary, equal to its own inverse, and
has determinant
(Proposition 11.8.2).
(d) The target
,
where is the
phase (over ,
the sign) of —
that is, the target on the opposite
side from . The
reason is arithmetic: this makes the first entry of
a sum of
like-signed quantities, with no cancellation of leading
digits.
(e) False. A
reflection preserving the zeros already created must fix
, and then it cannot touch the entry
in row of
column . More
decisively, such a finite procedure would compute the
roots of an arbitrary polynomial by arithmetic and
square roots alone, which the theorem of Abel and
Ruffini quoted in the warning rules out.
(f) Because the
same matrix multiplies on the right, and right
multiplication by changes column only if . Fixing is exactly what leaves columns , and the
zeros in them, alone.
B. Practice
Exercise
(B1: QR by Gram–Schmidt)
Find the QR factorization of in the sense of Theorem 11.8.1, and
verify that for the top-left entries.
Solution. Step 1. has
, so and .
Step 2. , so with . Hence and
.
Step 3. and , so with and . Therefore where . All three diagonal
entries are positive, as required.
For the verification, and ; also and .
Solution.
(a) The first
column is with and
, so
and
, with .
By ,
.
Since and , each column loses one copy of :
(b) The trailing
vector is , with
and , so and . By Theorem 11.8.3, the
reflection sends to .
Embedding it as , we get and because each is its own inverse
(Proposition 11.8.2
(b)).
(c) In Example (A QR, and a
least-squares problem), . Deleting the
zero row of
leaves with
its first row negated, and
correspondingly the first column of is while the
second is . The
reflection route did not aim for a positive diagonal,
and by the uniqueness in Theorem 11.8.1
signs are the only discrepancy possible.
Exercise
(B3: A least-squares fit through QR)
Fit a line to the data in the least-squares sense, by finding
the QR factorization of the design matrix and solving
. Compute the residual and check
the answer against the normal equations.
Solution. The system is
with Gram–Schmidt: , so and . Then and so and . Now and , so reads Back substitution gives and then
, so . The fitted line is , with residual and .
Check. and .
Subtracting the first normal equation from the second
gives , and
then , so . The residual is orthogonal to both
columns of :
and ,
which is what the normal equations of Theorem 11.4.2
say.
Exercise
(B4: Determine which are QR factorizations)
Determine which of the following are QR
factorizations of the matrix on the left in the sense of
Theorem 11.8.1.
Justify your answer; for those that are not, name the
clause that fails and repair it if possible.
- (a) .
- (b) .
- (c) .
Solution.
(a) Yes. The
product is the columns of the left factor are and , both of
length and
orthogonal, and the diagonal entries and are
positive. All three clauses hold, so by the uniqueness
in Theorem 11.8.1 this
is the QR factorization.
(b) No. The
identity is correct, and is upper triangular
with positive diagonal, but the columns of the left
factor have length , not , so clause (a) of Theorem 11.8.1
fails. Repair it by dividing each column of by and multiplying
the matching row of by :
(c) No. The
identity is correct and the columns of are
orthonormal, but , so clause (b) fails. Repair it by
moving the sign across: , whose columns are still
orthonormal, and , whose diagonal is positive. This is the
move described in Exercise (C1: All the QR factorizations of a matrix)
with .
C. Going deeper
Exercise
(C1: All the QR factorizations of a matrix)
Let have independent columns, with QR
factorization as in Theorem 11.8.1.
- (a) Prove that an
upper triangular with is
diagonal, with diagonal entries of modulus .
- (b) Deduce that the
pairs
with ,
upper triangular and invertible, and , are
exactly the pairs for
with .
- (c) Hence give a
second proof of the uniqueness statement of Theorem 11.8.1.
Solution.
(a) Let be the columns of ; as in the proof of Theorem 11.8.1,
says . We show with ,
by induction on .
Suppose this holds for every . For such , and , so . Together with upper triangularity this gives
, and
gives .
(b) If for
all , then , so ; the matrix is upper triangular
and invertible; and .
Suppose as stated. Exactly as in the proof of
Theorem 11.8.1,
, and is upper triangular with . By (a),
is diagonal
with . Then and .
- (c) If in addition
both and have positive
real diagonal entries, then is a positive real number
of modulus , so
for every
. Hence , , and .
Exercise
(C2: Reflections do not mind dependence)
Let whose third column is the sum of the first
two.
- (a) Run the
Gram–Schmidt process of Theorem 11.2.2 on
the columns of
and say precisely which step fails.
- (b) Carry out the
Householder reduction of Theorem 11.8.4 on
and exhibit
.
- (c) Explain, using
Theorem 11.8.1, why
no factorization with and upper triangular with
positive diagonal can exist.
Solution.
(a) Steps and go through: and, since , and . At step , lies in , so by Theorem 11.2.1 (a)
the vector subtracted from is itself and
. The normalization divides by and fails. This is the
situation of Exercise (C2: Gram–Schmidt on a dependent list).
(b) The first
column is ,
so as in Exercise (B2: The same matrix by reflections)
we take with ,
and .
The inner products of the three columns with are , , and , so The trailing vector of column is , which by Exercise (B2: The same matrix by reflections)
(b) the second reflection sends to ; it
sends the trailing vector of column , which is the same
vector , to
the same place. Hence upper triangular, with a zero in position
exactly where
the dependence sits. No step of the algorithm divided by
zero.
(c) Such an would be invertible by
Lemma 3.6.2, so
. But , so the columns are dependent and
, a
contradiction. The positive-diagonal factorization
exists precisely for matrices of full column
rank.
Exercise
(C3: Triangularizing with rotations)
- (a) Let be
nonzero and . Verify that the Givens rotation
of Definition 11.8.2
with and
satisfies
,
and that .
- (b) Use (a) to write
as with and upper triangular with
positive diagonal.
- (c) How many Givens
rotations does it take to triangularize a general real matrix, and
which entries does each one kill? Compare with the
number of Householder reflections.
Solution.
(a) .
Also ,
so the columns of are orthonormal and
; hence .
(b) The first
column is , so
, , , and . Then whose diagonal entries and are positive.
Since , we get with . As a check, .
(c) Three: one
for (rows
), one for
(rows ), and one for the
new -entry
(rows ). The
last acts on rows
and , which by
then have zeros in column , so it does not undo
the earlier work. Householder needs two reflections, one
per column, since each clears a whole column at
once.