Chapter 11 solved twice over: when there is no solution it
produced a least-squares solution, and when there are
too many it produced the shortest one. It then left an
IOU. The two answers “are usually wanted together: given
any and , first minimize , then
among the minimizers take the shortest. Chapter 13
packages the combined answer as a single matrix, the
pseudoinverse , with in all
cases at once.” This section builds that matrix and pays
the debt.
Throughout, or , , and , with singular values (Definition 13.8.1), so
exactly for .
Here is the state of play at the end of Chapter 11.
To answer “what is the best ?” we had three
different recipes, and choosing between them required
knowing something about first.
- If is square
and invertible, .
- If the columns of are independent, (Corollary 11.4.4).
- If is
consistent but
has a kernel, , the unique solution orthogonal to
(Theorem 11.4.5).
Three recipes, three hypotheses, and a gap: when
has both a
kernel and a column space missing , none of them applies.
That is not an exotic case. It is what happens whenever
a large table of measurements has both redundant columns
and noise.
The goal, stated before we know how to reach it, is a
single matrix , depending on
alone, for which
is
the right answer in every case. Reading the goal
backwards tells us what must do, and the
singular value decomposition tells us how to build
it.
Inverting
what can be inverted
Why is there no inverse in general? Two obstructions,
and they are the two halves of Theorem 11.6.5. The
map
may fail to be injective, because ; and
it may fail to be surjective, because . Neither
obstruction is fatal if we are willing to sacrifice part
of the domain and part of the codomain.
Restrict the map to , which throws away the kernel.
What is left is a bijection onto , and a bijection
has an inverse. Extend that inverse to all of by declaring it on , where
nothing in the image can tell us anything. That is the
whole construction, and it is the same trick that turns
into : shrink the
domain until the function is injective, shrink the
codomain until it is surjective, invert, and say clearly
what was given up.
Invert what can be inverted, and send the rest to
zero.
The singular value decomposition performs all three
operations at once, because it presents as a diagonal matrix
in orthonormal coordinates, and a diagonal matrix is
inverted one entry at a time.
Definition
13.11.1 (Moore–Penrose pseudoinverse)
Let and let be a singular value
decomposition (Theorem 13.8.1), so
that
and
are unitary and has the singular values
on its diagonal and zeros elsewhere. Let be the matrix with for , and all other entries . The
Moore–Penrose pseudoinverse of is
Clause by clause. The matrix is
transposed and then inverted where inversion is
legal: the shape flips from to , each non-zero
diagonal entry is replaced by its reciprocal, and each
zero diagonal entry is left alone — not
replaced by anything, since does not exist.
The outer factors are exchanged and starred, exactly as
they would be in if were invertible.
And the result is , the shape an inverse of would have to be.
Well-definedness is a real question here, not
a formality. The singular values are
determined by ,
but the unitary factors are not (Theorem 13.8.2), so
the recipe above is applied to a choice, and nothing so
far says that two choices give the same answer. They
do.
Proposition
13.11.1 (The pseudoinverse does not depend on
the decomposition)
Let and let be any singular value
decomposition (Theorem 13.8.1). Then
is the unique matrix in
such that
- (i) for every , is the unique vector
of
that sends to
;
- (ii) for every .
In particular depends on alone.
Idea. Conditions (i) and (ii)
mention only , so
if one matrix satisfies them, that matrix is determined
by . The work is
to check that they can be satisfied at all — which is
the “restrict, invert, extend” story of the previous
page written out — and that the matrix built from an
arbitrary decomposition is the one that satisfies them.
For the second part, the singular vectors are
orthonormal bases of the subspaces involved, so both
conditions can be checked on basis vectors.
Proof. The conditions
determine at most one matrix. First, maps bijectively
onto .
Injectivity: if and , then , since by Theorem 11.6.5 (b).
Surjectivity: the image is contained in , and by
injectivity it has dimension , the middle equality by
Corollary 11.6.6
(a) applied to . So (i) prescribes on and (ii)
prescribes it on ; since
by Theorem 11.3.2 (a),
a linear map is determined by the two prescriptions.
The matrix satisfies them.
Write and for the columns of and . Since rank is
unchanged by invertible factors (Theorem 3.5.9),
is the number of non-zero . By Corollary 13.8.4,
is an orthonormal basis of , the remaining
are an
orthonormal basis of , and
is an orthonormal basis of . Multiplying
out the definition, so for and for . The second
statement gives (ii) by linearity.
For (i), let . Then , and
since (the rank-one expansion of Theorem 13.8.3 read
one column at a time), By the injectivity proved above, is the
unique vector of with this
property. This proves (i), and with it the
proposition.
So is an
honest function of . Five examples,
simplest first.
Example
(Five pseudoinverses)
- (a) invertible.
Then ,
is
invertible and , so . The
pseudoinverse extends the inverse, which is the first
thing it had to do.
- (b) . Every singular value is , so and
. The degenerate case is worth keeping in
mind: the pseudoinverse of the worst possible matrix is
not undefined, it is zero, which is what “invert
nothing, kill everything” means.
- (c)
Diagonal. . The
zero is left where it is.
- (d) A single
non-zero column . Here ,
and , so
, a row vector. Then but is the orthogonal
projection onto .
- (e) . This
is with
and
, since . Hence
A non-example by minimal change.
Item (a) of the list is often written , and Theorem 13.11.3 below
confirms that formula whenever the columns of are independent.
Change one column of a matrix into a multiple of the other,
and the formula stops existing: is then singular
(Lemma 11.4.3), so
is
not a matrix at all. The pseudoinverse survives the
change; the formula does not. That is the difference
between a definition and a recipe.
Why this definition. It is forced.
Any reasonable “inverse” must undo where can be undone; there
is exactly one subspace on which is a bijection and
which meets only in while being determined
by alone, namely
;
and setting the answer to on is the
only choice that keeps the map linear without inventing
information. The names are those of the two people who
published the idea, thirty-five years apart: Moore in
1920 through a projection formula, Penrose in 1955
through the four conditions of the next theorem.
Warning. is not the
identity, and is . Two
habits from the invertible case have to go. First the
shape: if is
then
is , so is and is — they are not
even the same size, let alone both . Second the identity:
for of Example (Five pseudoinverses)
(e), The right question is not “is it the
identity?” but “the identity on what?”, and Theorem 13.11.3
answers it: is the identity
on and
zero on .
Quick check. Let . Find , then compute
and and identify
each as a projection.
Solution. Here has rank
one, so with and , and Therefore Neither is . The first is the
orthogonal projection onto ;
the second is the orthogonal projection onto , the row space. Each is the
identity exactly on the subspace named, and zero on its
orthogonal complement — which is what “as close to the
identity as the shapes allow” means.
The four
Penrose conditions
The definition builds out of a
decomposition. The following theorem characterizes it by
four equations that mention nothing but , and the star. It is
the second, and better, answer to the well-definedness
question, and it is how one verifies a
candidate pseudoinverse in practice: guess, then check
four identities.
Theorem
13.11.2 (The Penrose Conditions)
Let . Then is the unique matrix in
satisfying all four of
- (P1) ;
- (P2) ;
- (P3) ;
- (P4) .
Idea. Existence is a computation
with : each
condition collapses to an identity between , and the
diagonal matrix of ones. Uniqueness is a
puzzle. Given two solutions and , the goal is a chain
of equalities starting at and ending at , so the plan is to
walk to a symmetric midpoint: get by
pushing in
from the right, then run the mirror image of the same
argument with
as the subject. Two preliminary identities make the walk
possible, and both come from starring one of the
conditions — the move that manufactures an when the
hypotheses offer only .
Proof. Existence.
Let and .
Using and , Now is diagonal with
in the first
diagonal places and elsewhere, and is diagonal with the same pattern. Both
are real diagonal, hence Hermitian, so and are Hermitian, which
is (P3) and (P4). Moreover and , because multiplying a diagonal
matrix by a diagonal matrix of ones and zeros keeps
exactly the entries in the positions marked , and those are the
positions where and are non-zero
anyway. Hence which is (P1) and (P2).
Uniqueness. Suppose satisfies (P1)–(P4).
Two consequences: For the first, by (P2), and by (P3), so . For the second, by (P1), and
by (P4), so . Starring the second identity of
gives the
form we also need,
Now let and
both satisfy
(P1)–(P4). Starting from and working towards
a term containing , The first equality is for ; the second replaces
by , which is (P1)
for ; the third
reverses the product under the star; the fourth is (P3)
for ; and the
last is for
again, applied
to the first three factors.
Now the mirror argument, with as the subject:
Here the first equality replaces by , which
is for ; the second is for ; the fourth is (P4)
for ; and the
last is (P2) for .
Hence . Since satisfies the four
conditions, every matrix satisfying them equals . This proves the
theorem.
Both halves of the argument are the same two moves:
star a condition to trade for , then use to collapse a
triple product. The conditions are also exactly what one
should check when an explicit candidate is on the table,
and several of the proofs below do nothing else.
What the
pseudoinverse does
Theorem
13.11.3 (Properties of the
pseudoinverse)
Let . Then:
- (a)
and , the orthogonal projections
onto the column space of in and onto the column
space of in
;
- (b) ;
- (c) ;
- (d) ;
- (e) if is invertible; if ; and if .
Idea. Clause (a) is the computation
already done in the existence half of Theorem 13.11.2, read
through Theorem 11.3.3.
Clauses (b) and (c) are one line each, because the
Penrose conditions are almost symmetric in and , and starring all four
of them produces the four conditions for . Clause (e) is
three checks of the same kind: write down the candidate
and confirm (P1)–(P4).
Proof.
(a) With and
the notation of Proposition 13.11.1,
the existence computation gave , where is
diagonal with
ones followed by zeros. Multiplying out, For this sends to , which by Theorem 11.3.3 (a)
is the orthogonal projection of onto (Corollary 13.8.4). The
same computation with gives
.
(b) The four
Penrose conditions for the pair become, when the
roles of and
are exchanged,
the list (P2), (P1), (P4), (P3) — the same four
conditions. So
satisfies the Penrose conditions for , and Theorem 13.11.2 gives
.
(c) Put and
check the four conditions for . Using
throughout, which are (P1) and (P2). Next, by (P4) for , and is Hermitian, so
(P3) holds; and by (P3) for , which is Hermitian,
so (P4) holds. By uniqueness, .
(d) with invertible, so
by Theorem 3.5.9, the
last equality because has exactly
non-zero entries,
all in distinct rows and columns.
(e) The
invertible case is Example (Five pseudoinverses)
(a). Suppose . Then is invertible
(Corollary 11.4.4),
so is defined, and since is Hermitian.
Then which is Hermitian, giving (P4); and (P1),
(P2) follow at once, since and
. For (P3), , whose conjugate
transpose is itself. So .
For the last formula, suppose . Then is the
number of columns of , so the case just
proved applies to and gives . By (c), using that is Hermitian,
hence so is its inverse. This proves the theorem.
Clause (a) is the one to remember, and it answers the
question the warning raised. The products and are not
identities; they are the identity restricted to
the subspaces where is
invertible, and zero on the complements. Clause
(e) shows that the three recipes of Chapter 11 were all
the pseudoinverse in disguise, each written in the
notation that its hypothesis made available.
Warning. in general. The rule
does not survive. Take The Quick check above found , and one may confirm it
against Theorem 13.11.2: the
two products computed there are Hermitian, and , .
Meanwhile is
Hermitian and idempotent, so satisfies
(P1)–(P4) and . Now , so The two differ by a factor of . The reversal rule does
hold under extra hypotheses — for instance when has independent
columns and has
independent rows, which is Exercise C2 — but never
assume it.
Least
squares and minimum norm, in one matrix
Everything is now in place to pay Chapter 11’s
debt.
Theorem
13.11.4 (The pseudoinverse solves both problems
at once)
Let and , and put . Then:
- (a) is a least-squares
solution of , that is, for every ;
- (b) for every other least-squares
solution ;
- (c) if is consistent,
is its
minimum-norm solution in the sense of Theorem 11.4.5; if
is invertible,
.
Idea. Both halves are already
proved; the pseudoinverse only has to be recognized
inside them. For (a), is
the projection of onto , which is
precisely condition (b) of the Least Squares Theorem.
For (b), the least-squares solutions are the solutions
of one consistent system, so the Minimum-Norm Solution
Theorem applies to that system and singles out the
solution lying in ; and
lies
there, because every column of does.
Proof.
(a) By Theorem 13.11.3 (a),
with . This is condition (b) of Theorem 11.4.2, so
is a
least-squares solution.
(b) By Theorem 11.4.2, the
least-squares solutions of are exactly the
solutions of the system , which is consistent because .
Apply Theorem 11.4.5 to
that system: exactly one of its solutions lies in , and it
is strictly shorter than all the others.
It remains to see that is that one. By
(P2), using
Theorem 13.11.3 (a),
so every column of , and hence every
vector ,
lies in . By Theorem 11.6.5 (b),
. So is the
minimum-norm solution of , which by
the previous paragraph is what (b) asserts.
- (c) If is consistent
then , so and the least-squares solutions are the
actual solutions; (b) then says is the shortest of
them, which is Theorem 11.4.5’s
. If is invertible, by Theorem 13.11.3 (e).
This proves the theorem.
The promise, discharged. Section 4
of Chapter 11 said that the two answers are usually
wanted together — first minimize , then
among the minimizers take the shortest — and that
Chapter 13 would package the combined answer as a single
matrix , with
in
all cases at once. That is Theorem 13.11.4, word
for word: clause (a) does the minimizing, clause (b)
takes the shortest, and clause (c) plus Theorem 13.11.3 (e)
checks that the three special recipes of Chapter 11 are
recovered as special cases. There is no hypothesis on
anywhere in the
statement.
The notation, settled. Chapter 11
wrote for
the minimum-norm solution of a consistent
system and left the symbol without a formula. From now
on it has one, and its meaning extends to every system:
the minimum-norm least-squares solution of
. For a
consistent system this agrees with Chapter 11’s , by Theorem 13.11.4 (c);
for an inconsistent one it is the shortest of the
minimizers of , by clauses (a) and (b). One symbol, one
formula, no case distinction.
Example
(Chapter 11’s minimum-norm solution, recomputed)
In Chapter 11 the system was solved for its shortest solution by
intersecting the solution line with , as Theorem 11.4.5
prescribes. Recompute as .
Solution. Here The two rows are independent, so and Theorem 13.11.3 (e)
gives . Now since the determinant is . Therefore
and This is exactly the answer Chapter 11 obtained
by hand, and as before. The system is
consistent — and — so no projection was needed; what the
pseudoinverse did was replace a geometric argument by
one matrix product.
The next example is the case no formula of Chapter 11
reaches: the system is inconsistent and
underdetermined at the same time.
Solution. The system reads and , so it is
inconsistent; and , so the
columns are dependent. Neither nor
exists. From Example (Five pseudoinverses)
(e), , so
Check. , and the projection
of onto
it is . Indeed , so the
residual is , of squared length — the smallest
possible. The least-squares solutions are all with , that is
,
and which is smallest exactly at . So is the shortest
least-squares solution, as Theorem 13.11.4 (b)
predicts.
The block
criterion, finished
Section 6 tested a block matrix for positive
definiteness one block at a time, and had to assume the
corner block invertible: the Schur complement is meaningless otherwise. The
pseudoinverse removes that hypothesis, and the promise
Section 6 made is paid here.
Proposition
13.11.5 (The Semidefinite Block
Criterion)
Let and be self-adjoint and put Then if and only if , every column of lies in , and .
Idea. Section 6 cleared the corner
with the shear .
Write in
place of
and the same shear still clears it — but only because
is the
projection onto , so exactly
when the columns of are already in . That condition
is not a technicality: it is what the two-sided test
forces.
Proof. Suppose first that . Taking
gives
, so . For the column condition, let and , and put for
. Then
using . A real affine function of that is non-negative
for every has
zero slope, so
for all ;
replacing by
over kills the imaginary
part too. Hence for
every , that is
. So
, and taking orthogonal complements
with Theorem 11.6.5
gives , since is self-adjoint.
Now assume and ; we show is
equivalent to , which finishes both
directions. By Theorem 13.11.3 (a),
, so ; taking
adjoints, and using that and are self-adjoint
(Theorem 13.11.3 (c)),
also . Put which is invertible. Multiplying out and
canceling with the two identities just recorded, Since
is invertible, Proposition 13.1.2 (a)
applied to and
then to
shows that if and only if , and
a block diagonal matrix is positive semidefinite exactly
when both blocks are. This shows the three conditions
together are equivalent to .
The column condition cannot be dropped. With the choice has its column in and gives , so . The choice does not,
and there is not
positive semidefinite even though , and makes
the third condition hold trivially.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define in terms of a
singular value decomposition of (Theorem 13.8.1), and
say what size it is.
- (b) State the four
Penrose conditions, and say what Theorem 13.11.2
asserts about them.
- (c) What are and ? Under what
condition on is
the second of them ?
- (d) Write down for the zero
matrix , and for an invertible
.
- (e) True or false:
whenever the product is defined. Justify
your answer.
Solution.
(a) If ,
then , where has in the
place for
each and zeros elsewhere. It is , the transpose
of the shape of .
(b) , , , . The
theorem says
satisfies all four and is the only matrix that does; so
the four conditions may be used as a definition, and
checking them is enough to identify a
candidate.
(c)
and (Theorem 13.11.3 (a)).
The second is
exactly when , that is when , that is when
the columns of
are independent.
(d) ; when is
invertible.
(e) False. With
and
the two
sides are and , as
computed in the warning above.
B. Practice
Exercise
(B1: Four pseudoinverses)
Compute
for each of the following, stating which method you
used.
- (a) ;
- (b) ;
- (c) ;
- (d) .
Solution.
(a) A diagonal
matrix is its own singular value decomposition (Theorem 13.8.1) up to
ordering, so invert the non-zero entries in place: .
(b) A single
non-zero column, so Example (Five pseudoinverses)
(d) applies with :
(c) Rank one:
with
and
. Then
with and
,
so (Check: is Hermitian and
idempotent, and .)
(d) The rows are
independent, so and Theorem 13.11.3 (e)
gives . Here with
inverse , so
Exercise
(B2: A system that is both inconsistent and
underdetermined)
Let Compute and .
Verify that is the
orthogonal projection of onto , and compare
with the norm of one other least-squares solution.
Solution. Both columns are
multiples of , so with , and . Then , and ,
with and . Hence Therefore
Projection. and
, so . And . They agree.
Shortest. The least-squares solutions are
the with . Another one is ,
of squared norm , against
. The
pseudoinverse solution is shorter, as Theorem 13.11.4 (b)
requires.
Exercise
(B3: Checking a candidate)
Let and . Verify the four Penrose
conditions for ,
and hence find the minimum-norm least-squares solution
of .
Solution. Compute the two products
first: (P4): is Hermitian. (P3): is visibly
symmetric. (P1): . (P2): . All
four hold, so by Theorem 13.11.2.
Then (The columns of are independent, so
this is also ,
and it is the unique least-squares solution; the normal
equations confirm
it.)
C. Going deeper
Exercise
(C1: Pseudoinverses of )
Let .
- (a) Prove that .
- (b) Deduce that
, the formula
with the inverse replaced by the pseudoinverse.
Hint: use a singular value decomposition and
reduce each identity to an identity between diagonal
matrices.
Solution. Write .
(a) Then , and is diagonal with entries followed by zeros. That display is a
singular value decomposition of in the sense of
Theorem 13.8.1 (both
outer factors are , which is unitary, and
the middle factor is diagonal with non-negative
entries), so where
is diagonal with entries for and elsewhere. On the other
side, , so The middle factor
is diagonal with entries for and elsewhere, which is
.
Hence the two sides agree.
(b) Using (a) and
, Now ,
which is the diagonal matrix with ones and then zeros;
and
multiplied by it on the right is , since has non-zero
entries only in the first columns. So the
right-hand side is .
Exercise
(C2: When the reversal rule does hold)
Let with and with . Prove that
Hint: write both pseudoinverses with the
formulas of Theorem 13.11.3 (e)
and verify the Penrose conditions for the
product.
Solution. By Theorem 13.11.3 (e),
and , the two inverses
existing because and . Put Throughout we use and , which
the two formulas give at once.
(P1): .
(P2): .
(P3): , which equals its own
conjugate transpose, since is Hermitian and
so is its inverse.
(P4): , Hermitian for the same
reason.
All four hold, so by Theorem 13.11.2.
Exercise
(C3: When the pseudoinverse is the adjoint)
Let .
- (a) Prove that if and
only if .
- (b) Deduce that
if
and only if every non-zero singular value of equals .
- (c) Give an example
of such an in
which is
neither unitary nor an orthogonal projection.
Solution.
- (a) If , then
(P1) reads .
Suppose and put . Then (P1) is the hypothesis; (P2) is
; (P3) is , true for every ; and (P4) is , likewise. By Theorem 13.11.2, .
(b) With we
have and . Since and are invertible, if and
only if , that is if and only if
for every ,
that is if and only if every non-zero singular value is
(the equation
with
forces ).
(c) Take Then , so and (a)
applies. Its singular values are and , matching (b). It is
not unitary, since it is singular, and not an orthogonal
projection, since . Such a matrix maps
isometrically onto and sends to : a unitary matrix on
the part of the space where it is invertible, and
nothing at all elsewhere.