The sections so far measured how far eigenvalues
move. The next section asks how far
eigenvectors move, and more generally
invariant subspaces, and before it can answer it needs a
way to say how far apart two subspaces are. For two
lines there is an obvious answer, the angle between
them. This section shows that for subspaces of dimension
one angle
is not enough, and that the right replacement is a list
of angles read
off from a singular value decomposition. It then proves
the two facts Section 9 will use: the sines of these
angles are the singular values of a matrix built from
the orthogonal complement, and the largest sine is the
distance between the two orthogonal projections.
Throughout, is or , and carries its standard
inner product , with when . For a subspace of , is the orthogonal
projection onto
(Definition 11.3.2),
identified with its matrix in the standard basis.
Singular values of a matrix with columns follow the
convention of Chapter 17 §09: for
, so that is the -th largest eigenvalue
of for
every (Eq. 17.9.1).
One angle
is not enough
For two lines and there is
one number to compute, the angle between them. For
planes the first idea is to copy it: call the angle
between and the
smallest angle between a line in and a line in .
That idea fails at once in . Two distinct
planes always meet in a line, since by Theorem 1.7.3. So
the smallest angle is for
every pair of planes: it cannot tell a
plane tilted by one degree from a plane at right
angles.
Taking the largest such angle
instead does no better in . Let and compare Each contains a vector perpendicular to all of
(namely ), so each has
a line at angle from . But shares the whole line
with , while is perpendicular to
in every
direction. One number cannot record both facts. A list
can: for
and for . The rest of this
section explains where such a list comes from in
general, when the subspaces are not lined up with the
coordinate axes.
Two subspaces can be given orthonormal bases that
face each other in pairs; the principal angles are the
angles between the partners.
Principal
angles
Everything will be computed from orthonormal bases
written as the columns of a matrix, so we first record
how such matrices behave.
Let be a subspace with . An
orthonormal basis matrix of is a matrix
whose columns form an orthonormal basis of . One exists: apply
Gram–Schmidt (Theorem 11.2.2) to
any basis of .
Lemma
20.8.1 (Orthonormal Basis Matrices)
Let have dimension and let
be an orthonormal basis matrix of .
- (a) and .
- (b) for every . For
every matrix
with rows and
every matrix
with columns,
- (c) Every
orthonormal basis matrix of is for some
(orthogonal when ).
- (d) . If moreover and is an orthonormal basis matrix of
, then the
square matrix is unitary, and
Proof.
(a) The entry of is ,
because the columns are orthonormal. By Theorem 11.3.3 (a),
for every , the last step being column-times-row expansion
of .
(b) By (a), . Hence for every , and taking the
maximum over unit (Definition 16.3.2) gives
. For the Frobenius norm, . Next, , by Theorem 0.9.6 (3). For
the spectral norm, let . By the
first sentence and (a), (Theorem 11.3.3
(c)). So by Theorem 16.3.2 (a), and
. Conversely, choose a unit with
(Lemma 16.3.1). Then is
a unit vector with , so .
(c) Let be another
orthonormal basis matrix of , and put . Each column of lies in , where is the identity, so
by (a). Then , so the square matrix
is unitary (Definition 11.7.2).
(d) For the first
identity, let and write with and ,
which is possible in exactly one way by Theorem 11.3.2 (a).
Then by Definition 11.3.2.
Since by Theorem 11.3.2 (b),
the splitting is also the one that
defines , so . As was arbitrary,
. Nothing here restricts : when ,
and both sides are .
Now let . The columns of and of are
orthonormal, and each column of is orthogonal to each
column of because . Their
number is , by Theorem 11.3.2 (c).
So the square matrix satisfies , hence is
unitary, and then as well, since . By
block multiplication (Theorem 8.1.1),
. This also re-proves
the first identity here, since by (a) applied to .
Now the definition. The question is how much of survives when it is
projected into .
By parts (a) and (b) of the lemma, for a unit vector
of the surviving length is
. So the matrix
records the answer for every direction of at once, and its
singular values are the stretch factors along the best
directions.
Definition
20.8.1 (Principal Angles)
Let be subspaces with and let and be orthonormal basis matrices of and . The principal
angles between and are the numbers determined by We write and .
In words: fix orthonormal bases of the two subspaces,
form the
matrix whose
entry is the inner product of the -th basis vector of
with the -th basis vector of
, and take its
singular values.
These lie in , as we check next, so each is the cosine of
exactly one angle in . The largest cosine gives the
smallest angle, so the decreasing
singular values produce increasing angles. The number of
angles is the smaller dimension, , and the definition
asks for ;
for a pair with , swap the names. The two notations at
the end are for use in norms: , the largest entry of a
nonnegative diagonal matrix (Lemma 17.3.5), and
.
Well-definedness. Three things need
checking. The answer must not depend on the orthonormal
bases chosen. The singular values must be at most , or there is no angle.
And when the
definition treats
and
asymmetrically, so we should check that swapping them
changes nothing.
Proposition
20.8.2 (Principal Angles Are Well
Defined)
In the setting of Definition 20.8.1,
put .
- (a) The singular
values of do not
depend on the choice of the orthonormal basis matrices
and .
- (b) , so
exist, are unique, and are nondecreasing.
- (c) for . In particular, if , the principal
angles between
and are those
between and .
- (d) If and with
, then . If also and with
, then .
Proof.
(a) By Lemma 20.8.1 (c), any
other choices are and with and . The
new matrix is , and using . Since , this is similar to , so the two have
the same characteristic polynomial (Theorem 7.10.3) and
the same eigenvalues with multiplicity. By Definition 13.9.1,
and have the same singular
values.
(b) By Theorem 16.3.2 (d) and Lemma 20.8.1 (b),
, and by Theorem 16.3.2 (c). Also
, as in
the proof of that lemma, so .
Hence by Theorem 16.3.3 (c), and all
singular values lie in . The cosine is a strictly decreasing
bijection from onto , so each is for exactly
one , and gives .
(c) Let be a
singular value decomposition (Theorem 13.9.1). Then
, where are unitary and
carries the same diagonal entries and zeros elsewhere. So this is a
factorization of of the shape in Theorem 13.9.1, and Theorem 13.9.2 gives
. Since ,
this is the first claim. When , the principal
angles between
and are defined
by ,
so they coincide with those between and .
(d) With , the
matrix is a single column, and its
one singular value is . By Lemma 20.8.1 (b) and
(a), . If and , then
, whose singular
value is .
Examples.
- Two lines in . For and
, part (d) gives ,
so . Replacing by changes neither
the line nor the answer.
- Nested subspaces. If , then every
column of is
fixed by , so
. All singular values are
and all principal
angles are . The
degenerate case is included, and it is the reason the angles
start at .
- Perpendicular subspaces. If ,
every entry of
is the inner product of a vector of with a vector of , hence , so all principal
angles are .
- The planes of the opening. For
and , take the
standard vectors as orthonormal bases. Then , with singular values , so the principal
angles are . For we are in Example
3, with angles . These are the two lists that the
single-number attempts could not tell apart.
Nonexample by minimal change. In
Example 4, replace the orthonormal basis
of by the basis
, whose vectors still have
length but are no
longer orthogonal. The matrix of inner products becomes
, with
largest singular value , and no
angle has that cosine. What fails is the orthogonality
of the columns of : without it, is not the
projection , and
the matrix no longer measures how much of survives in .
Why this definition: the principal
vectors. The singular value decomposition of
does more than
produce numbers. It produces bases of and in which the whole
configuration is visible, and this is the precise
meaning of the slogan.
Proposition
20.8.3 (Principal Vectors)
In the setting of Definition 20.8.1,
let be a singular value
decomposition (Theorem 13.9.1), with
and
unitary, columns and . Put Then is an orthonormal basis of
, is an orthonormal basis of , and
Proof. The matrix has columns , all in , and by Lemma 20.8.1 (a). So
the are
orthonormal
vectors of . They
are linearly independent (Theorem 11.1.4),
and , so
they form a basis. The same argument applies to the
in . Finally, which is the entry of : it equals
when , and
otherwise.
So and have orthonormal bases
that face each other in pairs. Each makes the
angle with
its partner , in the sense
of part (d) of the proposition, and is perpendicular to
every other . The last
vectors of
have no partner,
and they are perpendicular to all of . The vectors
are called principal vectors. Two
subspaces, however they sit in , look like a list of
independent pairs
of lines, and the principal angles are the angles within
the pairs.
The principal vectors are usually
not the basis vectors one started with.
For
with bases and , each given
basis vector of
is at angle
from each given basis vector of . The principal angles
are nevertheless , by Example 2, since the subspaces are equal.
Pairing the given columns one by one measures the bases,
not the subspaces.
Warning. Lines have no
orientation, so principal angles use
and lie in . The angle of Definition 11.1.5
is between vectors in a
real space, and it can reach . For and
in that angle is , yet and the principal angle is
. Over the vector angle is
not even defined: and
span the same complex line, is not real, and the principal
angle is again
because .
Quick check. Find the principal
angle between the line and the plane .
Solution. Here . The unit
vector spans , and , since
is an orthonormal basis of (Theorem 11.3.3
(a)). By Proposition 20.8.2
(d), . So , and , which
is the distance from to the
plane.
Sines and
the orthogonal complement
The cosines measure how much of survives projection
into . What
Section 9 can actually bound is the part that does
not survive: the component of in . Pythagoras
says the two parts are complementary, and the theorem
makes this exact.
Theorem
20.8.4 (Sines of Principal Angles)
Let with , principal angles , and orthonormal basis matrices .
- (a) Suppose , and let be an orthonormal basis matrix of
. Put
and . Then and the eigenvalues of , with
multiplicity, are . Equivalently, for , with the
convention for stated at the
start of the section.
- (b) For every , and
Idea. Split the identity of along and
sandwich it between and . That gives two
Hermitian matrices adding up to , and such matrices
share their eigenvectors, with eigenvalues and . The first has
eigenvalues by
definition, so the second has eigenvalues . Part (b)
then removes the orthonormal factors, which change no
norm.
Proof.
- (a) By Lemma 20.8.1 (d)
applied to , . Multiplying
on the left by and on the right
by , and using
(part (a) of the lemma), gives .
The matrix is Hermitian (real symmetric when ). By Corollary 12.4.3
(or Corollary 12.5.2
when ) there
is an orthonormal basis of consisting of
eigenvectors of . Since has rows, all eigenvalues of are squared
singular values (Definition 13.9.1), so
we may number the so that . Then So the unitary matrix with columns diagonalizes with diagonal
, and these are its eigenvalues
with multiplicity (Theorem 7.10.3). The
sine is increasing on , so in decreasing order they read . By Eq. 17.9.1, the -th largest eigenvalue
of is
for
every , with
the stated convention. Taking nonnegative square roots
gives .
- (b) If , then , so and every
(Example 2 above), while ; all four norms are . Suppose . By Lemma 20.8.1 (d) and
(a), and . By part (b) of the
lemma, applied to and then
to , both
matrices have the spectral and Frobenius norms of . Now by Theorem 16.3.3 (c) and part
(a). Also , which is the sum of the
eigenvalues of (Theorem 9.3.3), that
is . This proves the
theorem.
Part (b) has a plain geometric reading. For a unit
vector , the vector is the error in approximating
from , and its length is the
distance from to (Theorem 11.3.5). So
is the
largest distance from a unit vector of to , and is the worst
angle any direction of makes with . That is the number to
bound when one asks whether a computed subspace is close
to the true one, and part (a) turns it into the norm of
the concrete matrix .
In Section 9,
will be an invariant subspace of and the corresponding one
for . The
columns of will be
the remaining eigenvectors of , and will turn out to
satisfy a Sylvester equation, so the bounds of Section 7
will apply to it.
The
distance between two subspaces
A subspace is determined by its orthogonal
projection, since by Theorem 4.5.1
(b), applied to . So a second natural way to
compare and is the size of . When the
dimensions agree, this measures exactly the largest
principal angle.
Theorem
20.8.5 (The Distance Between
Projections)
Let with , and principal angles . Then
- (a) ;
- (b) ;
- (c) ,
with equality if and only if .
Idea. For (b), the
squared Frobenius norm of the Hermitian
matrix is , which expands
into traces of projections: , and
. For (a), split along . Then sends to and to , so
Pythagoras separates the two contributions. The first is
controlled by the sines for , the second by the
sines for ,
and equal dimensions make these the same list.
Proof. Put , and let
be
orthonormal basis matrices and .
(b) By Lemma 20.8.1 (a),
and are Hermitian and satisfy , . Hence is Hermitian and By Theorem 0.9.6 (3),
, likewise , and . Also and , since the eigenvalues of
are (Definition 13.9.1, Theorem 9.3.3).
Therefore which is (b).
(c) Put . By Theorem 20.8.4 (b),
. The same theorem with the roles of and exchanged, which is
allowed because , gives too, because by Proposition 20.8.2
(c) the principal angles between and are those between and .
Let , and write and (Definition 11.3.2).
Then and , so The first term lies in and the second
in , by Theorem 11.3.2, so
they are orthogonal, and by Theorem 11.1.3
(20.8.1)
We bound the two terms. Since , by Theorem 16.3.2 (a). For the
second term, is
Hermitian and idempotent and , so using Theorem 11.3.3 (b)
for (Lemma 20.8.1 (d)),
then ,
then Cauchy–Schwarz (Theorem 11.1.5)
with . Hence , the case
being trivial. Adding, and using (Theorem 11.1.3),
So . For the reverse, Theorem 20.8.4 (b)
gives , and by Lemma 16.3.1 there is a unit
with . The vector is a unit vector (Lemma 20.8.1 (b))
with , so and .
Hence .
- (c) By (a) and Proposition 20.8.2
(b), , with equality if and only
if . The square matrix has if and
only if (Theorem 13.9.1), that
is, if and only if for
some . Put ,
which is a nonzero vector of exactly when , by
Lemma 20.8.1 (b).
Then , and if and only if , again by parts (b) and (a) of the
lemma. Finally means that , by Theorem 4.5.1 (b)
applied to . So equality holds if and only if
contains a
nonzero vector of .
The factor in (b) has a clean
explanation. When , the principal vectors of Proposition 20.8.3
give and (Lemma 20.8.1 (a)), so
is a sum
of the terms
. These act in the
mutually orthogonal planes . Each term is Hermitian with trace
and rank at most
, so its nonzero
eigenvalues are a pair , and being Hermitian it is normal, so
by Theorem 12.11.1.
On the other hand, expanding the trace with and (Proposition 20.8.3),
so . Each angle is therefore counted
twice in the Frobenius norm and once in the spectral
norm. The worked example below shows the pairs explicitly.
Example
(Two Planes in Four Dimensions)
Let and , where Find the principal angles, a pair of principal
vectors for each, the sines from Theorem 20.8.4, and
in
both norms. Then check the last two numbers
directly.
Solution. Orthonormal
bases. and , so is an orthonormal basis matrix
of , and . The matrix holds the
first two entries of and : So the singular values are and , and Note , so here.
Principal vectors. The eigenvector
of for
is ,
and . By
Proposition 20.8.3,
and . Likewise ,
, ,
and , with , while . So is obtained from by tilting towards through and towards through , in two
perpendicular planes.
Sines. The vectors
and are orthogonal to , to , and to each
other: and . Also . Since (Theorem 11.3.2
(c)), is an
orthonormal basis matrix of , and Its eigenvalues are
and , and ,
as Theorem 20.8.4 (a)
says.
Distances. By Theorem 20.8.5, and .
Direct check. By Lemma 20.8.1 (a),
, and In , coordinates do not interact with coordinates , and the two blocks are
Each is symmetric with trace , so its eigenvalues are
:
and . So has eigenvalues .
By Lemma 17.3.5, , and
. Both agree with the theorem, and the
eigenvalues come in the pairs
described before the example.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define the
principal angles between subspaces with
.
- (b) True or false:
if ,
then every principal angle between and is . Justify your
answer.
- (c) True or false:
the principal angle between and , for
, is . Justify your
answer.
- (d) True or false:
if , then . Justify
your answer.
- (e) State the
formula for in terms of principal angles, with its
hypothesis.
- (f) True or false:
for two distinct lines in , . Justify your answer.
Solution.
(a) Choose
orthonormal basis matrices and . The principal angles are defined by , (Definition 20.8.1).
They do not depend on the bases (Proposition 20.8.2).
(b) True. As in
Example 2 after Proposition 20.8.2,
, so every .
(c) False. The
two lines are equal, so the angle is : with , (Proposition 20.8.2
(d)). The value
is the angle between the vectors and of Definition 11.1.5,
which is a different notion.
(d) True. Take a
unit and write
with (Lemma 20.8.1 (b)).
Then , so . With Proposition 20.8.2
(b), .
(e) If , then , the sine of the largest
principal angle (Theorem 20.8.5
(a)).
(f) False. The
two axes and
have , so by
Theorem 20.8.5 (c).
Directly, .
B. Practice
Exercise
(B1: Two planes in three dimensions)
Let and in .
- (a) Find an
orthonormal basis matrix of .
- (b) Compute the
principal angles between and .
- (c) Hence compute
and .
- (d) Explain why
could
have been predicted without computation.
Solution.
(a) Gram–Schmidt:
, and , of length , so and .
(b) With , the matrix holds
the first two entries of and : It is diagonal with nonnegative entries, so
and the singular values are
and . So and , with .
(c) By Theorem 20.8.5, and .
(d) Two planes in
meet in a
line (Theorem 1.7.3, as in
the opening of the section), and a common unit vector
forces (Exercise A1 (d)). Here the common line is
.
Exercise
(B2: Which projections are at distance one?)
Determine, for each pair, whether .
Justify your answer.
- (a) and in .
- (b) and in .
- (c) and in .
- (d) and in .
Solution.
(a) Yes. , so , and Theorem 20.8.5 (c)
applies since both dimensions are .
(b) Yes. , so , and (c) of the theorem applies with
.
(c) No. Both are
planes, and , since is orthogonal
to both spanning vectors of and . This
vector has nonzero third entry, so it is not in , and . By the theorem, . (In fact the principal angles are and , so the
distance is .)
(d) Yes, for a
different reason: the dimensions are and , and the remark after
Example (Two Planes in Four Dimensions)
shows that whenever the dimensions differ. The
theorem itself does not apply. Its principal angle is far from , which illustrates
why the projection distance is only used for equal
dimensions.
Exercise
(B3: Two lines)
Let be unit vectors and . Prove
that
Solution. Let and
, both of dimension . By Lemma 20.8.1 (a) with
and
,
and . By Proposition 20.8.2
(d), the single principal angle satisfies , so
, since on
. Now Theorem 20.8.5 (a)
and (b) with
give and , which are the two
claims.
C. Going deeper
Exercise
(C1: Counting zero and right angles)
Let with , orthonormal basis
matrices , and .
- (a) Prove that for every .
- (b) Deduce that the
number of principal angles equal to is .
- (c) Prove that the
number of principal angles equal to is .
Hint for (b): a positive semidefinite matrix
with has .
Solution.
(a) Let .
By Lemma 20.8.1 (a) and
(b), and . Since with the two parts orthogonal (Theorem 11.3.2), Theorem 11.1.3
gives .
(b) Put . It
is Hermitian, and by (a) it is positive semidefinite (Definition 13.1.1).
Its eigenvalues are , with an
orthonormal eigenbasis (as in the proof of Theorem 20.8.4). So
the number of
with
is the number of zero eigenvalues, which is .
We claim . If ,
then , so by (a), and . Conversely, if , then
by (a). Writing , this says . So whenever , and
then .
This proves the claim; the second half of it is the fact
in the hint, proved here for this .
The map is linear and injective (Lemma 20.8.1 (b)). It
carries onto
, because every vector of
is for some
. So .
- (c) exactly
when . The number of nonzero singular values of
is (Theorem 13.9.1), so
the number of zero ones among the is ,
by the Rank–Nullity Theorem (Theorem 2.3.1) for
on . Next, if and only if , because
is injective.
That holds if and only if . As in (b), carries injectively onto
,
so the count is .
Exercise
(C2: The smallest angle as a maximum)
Let with and principal angles
.
- (a) Prove that and that the maximum is attained at the
principal vectors .
- (b) Deduce that
is the
smallest principal angle between a line of and a line of , which is the notion
tried and rejected at the start of the section.
- (c) Hence explain,
in one sentence, why alone cannot
distinguish the pairs and of the opening, but the full list
can.
Solution.
(a) Let and be unit
vectors. By Lemma 20.8.1 (a) and
(b), and
with and unit vectors. Then , and by Cauchy–Schwarz
and Theorem 16.3.2 (a), using Theorem 16.3.3 (c). By Proposition 20.8.3,
the unit vectors and satisfy
, so the maximum exists and equals
.
(b) By Proposition 20.8.2
(d), the principal angle between the lines and is .
Since is
decreasing, the smallest such angle corresponds to the
largest ,
which by (a) is .
(c) Both pairs
share a line, so both have , and the
first number cannot separate them. The second angle is
for and for , by Examples 4 and
2 after Proposition 20.8.2.