Chapter 11 attached to every list of vectors the
matrix of its pairwise inner products and read three
facts off it: it is Hermitian, its quadratic form is a
squared length, and it is invertible exactly when the
list is independent (Definition 11.2.3,
Theorem 11.2.5).
One question was left standing. Given a square matrix,
is it the Gram matrix of something? The answer
is the shortest possible one: exactly when it is
positive semidefinite. This section proves that, and
then spends it twice — the determinant of a Gram matrix
is a squared volume, and a ratio of two Gram
determinants is a distance to a subspace.
Throughout, or and all inner product spaces are over . When the list must be
named we write for its Gram matrix, whose entries
are
as in Definition 11.2.3.
Which
matrices are Gram matrices?
Half of the answer is already proved. By Theorem 11.2.5 (a)
and (b), a Gram matrix is Hermitian and
satisfies
for every . That is word for word the definition of
positive semidefiniteness (Definition 13.1.1). So
being positive semidefinite is
necessary. The content of the next
theorem is that nothing else is needed, and this is
where the chapter’s second signature move earns its
keep: a positive semidefinite matrix factors as , and the columns
of are then the
list we were looking for.
Theorem
13.3.1 (Gram Matrices Are Exactly the Positive
Semidefinite Matrices)
Let . The following are equivalent.
- (a) is the Gram matrix of
some list of
vectors in some inner product space over ;
- (b) is the Gram matrix of
some list of
vectors in
with the standard inner product, where ;
- (c) .
Moreover the list is unique up to an isometry: if
in and in have the same Gram
matrix, then there is an isometry from onto carrying to for every
.
Idea.
- (a) (c) is the
display above. For (c) (b),
diagonalize: the spectral theorem writes with
diagonal and, by
Theorem 13.1.4, with
nonnegative diagonal. Then is a
square root of
in the
sense, and its rows beyond the -th are zero, so the
columns already live in . For the uniqueness
clause, the Gram matrix is the recipe for every
inner product among the vectors, so the obvious map
has no choice but to
preserve them; the only thing needing care is that it is
well defined, and part (b) of Theorem 11.2.5 says
precisely that.
Proof.
(b) (a) is
immediate, since with the standard
inner product is an inner product space.
(c) (c). Let
be the Gram
matrix of . By Theorem 11.2.5 (a),
, and by
(b) of the same theorem for
every . Hence by Definition 13.1.1.
(d) (b). Since
is Hermitian,
the spectral theorem for matrices gives a unitary and a diagonal with (Corollary 12.4.3
over ; Corollary 12.5.2
over , with
orthogonal and
real). The
diagonal entries of are the eigenvalues of
, so they are
real and by
Theorem 13.1.4, and we
may prescribe their order: let
and . Here
is the number of nonzero eigenvalues, which is , because and have the same
rank.
Put , where . Then using . Rows of are zero, since row
of is times row
of . Let consist of the first rows of ; deleting zero rows
changes no entry of , so
as well. Let be the columns of
. With the
standard inner product on , so is
the Gram matrix of .
The uniqueness clause. Let in and in both have Gram matrix
, and put and . Define by
This is well defined: if , let be the
vector with entries ; then Theorem 11.2.5 (b),
applied to each list in turn, gives so . The same
display with every shows for every , so is an isometry (Definition 11.7.1);
it is linear and surjective by its definition on
spanning vectors. This proves the theorem.
Three consequences are worth naming at once.
First, the corollary promised in Chapter 7 is now
proved from the right principle. Corollary 7.7.3 said
that for real , with equality exactly
when the rows of
are dependent, and it proved this by writing the
determinant as a sum of squares of minors. The
structural reason is the theorem above: is a Gram matrix,
hence positive semidefinite, hence has nonnegative
eigenvalues, and its determinant is their product.
Positivity of the determinant is not an accident of
Cauchy–Binet; it is one shadow of a much stronger
property, and the other shadows come free —
every principal minor of a Gram matrix
is too, since
a principal submatrix of is the Gram matrix of a
sublist.
Second, the smallest space that can hold a
realization of
has dimension , and no smaller one will do: a list of vectors in a space of
dimension has a
Gram matrix of rank at most , because for the
coordinate matrix of the list and by Corollary 11.6.6
(b).
Third, the theorem is a free source of examples in
both directions: any vectors at all produce a positive
semidefinite table, and conversely positivity is a real
constraint on a table of numbers — a stronger one than
most readers expect.
Warning. Plausible-looking
symmetric tables need not be Gram matrices. The
condition is not “symmetric with nonnegative diagonal”,
and it is not even “every principal minor is ”. Take Its three principal minors are all , so
any two of the three vectors would be a legitimate pair.
But , so is an eigenvalue and
:
no three vectors in any inner product space have this
table. In words, three vectors of squared length cannot be
pairwise at an angle with cosine ; two of them
can.
Quick check. Is the matrix with
every entry equal to a Gram matrix? If so,
exhibit a list; if not, say which clause fails.
Solution. It is. Take for any unit vector : then for all . Consistently, the matrix has rank , and Theorem 13.3.1 (b)
predicts a realization in ; the list in is one.
The Gram
determinant is a squared volume
Chapter 7 defined the volume of a parallelepiped
spanned by
vectors of as
of
the matrix of their coordinates (Definition 7.9.1).
That definition needs a square matrix,
so it says nothing about two vectors in . The missing notion
was already present in Chapter 7’s motivation, though:
volume is base times height. Turning that into a
definition costs one line, now that we have distances to
subspaces.
Definition
13.3.1 (Volume of a list)
Let be a list in an inner product space
over . Its -dimensional
volume is defined recursively by
where and
is
the distance of Definition 11.3.3.
In words: the volume of the last vector’s
parallelepiped is the volume of the one below it, times
the height of the last vector above the subspace the
others span. For this is base times height for a
parallelogram, and it is exactly when lies on the
line through .
The recursion is easy to state and awkward to compute
with, because each step needs a projection. The Gram
determinant computes all of it at once.
Lemma
13.3.2 (Bordering a Gram matrix)
Let be a list in an inner product space
, let , and let . Then
Idea. Replace by .
That is a column operation on the list, and a
column operation on the list is a congruence on
the Gram matrix, with unitriangular, so the
determinant does not move. After the replacement the
last vector is orthogonal to all the others, and the
Gram matrix has become block diagonal.
Proof. First record how the Gram
matrix responds to a change of list. If for a matrix , then by
sesquilinearity which is the -entry of ; that is,
.
Now write with and , which is
possible by Theorem 11.3.2 (a).
Since , there are scalars with
. Let be the
identity matrix with its last column replaced by .
Applying the rule above to the list and this turns it into , so The matrix is triangular with
ones on the diagonal, so by Theorem 7.4.6, and
. By Theorem 7.5.4 the two
Gram determinants are equal.
Finally, gives for every
, so whose determinant is by cofactor
expansion along the last row. Since by Definition 11.3.3,
this proves the lemma.
The recursion names the vectors in a particular
order, and the last one plays a special role. The value
does not depend on that choice: Theorem 13.3.3 below
identifies with , and permuting the
list permutes the rows of and the columns in the
same way, which leaves the determinant unchanged (Theorem 7.5.1 (a)
applied once to the rows and once to the columns, so the
two sign changes cancel). So the volume is an invariant
of the list as a set of vectors, and we are free to
order it however a computation prefers.
Theorem
13.3.3 (The Gram Determinant Is the Squared
Volume)
Let be a list in an inner product space
over . Then In particular, if
has columns , then .
Proof. Induction on . For , and .
Let and
assume the statement for . With , Lemma 13.3.2 and then
the induction hypothesis give and the right-hand side is by Definition 13.3.1.
For the last claim, in
with the
standard inner product, so , and the volume is the nonnegative
square root of its determinant.
Two checks that the definition is the right one. If
and , then is square and by Theorem 7.5.4 and Theorem 7.4.5, so
: Definition 13.3.1
agrees with Definition 7.9.1
whenever both apply. And for in , Exercise (C1: Area of a triangle in space)
defined the area of a parallelogram in space to
be and
promised a justification from inner products; the
theorem is that justification, since base times height
is what an area should be.
The volume vanishes exactly when the list is
dependent, which is Theorem 11.2.5 (d)
read through the theorem: a flat parallelepiped has no
volume.
Distance
to a subspace, by determinants
Dividing in Lemma 13.3.2 gives a
formula for a distance with no projection in sight.
Proof. The list is independent, so by Theorem 11.2.5 (d)
and the quotient is defined. Dividing the identity of Lemma 13.3.2 by it
gives the formula.
No orthonormal basis, no Gram–Schmidt, and no
projection: two determinants and a division. The price
is a determinant in the numerator, so for
large the
projection route of Chapter 11 is faster. The quotient
is also a ratio of squared volumes, : volume over base area, which is
the height.
Solution. The vectors
and lie in and are independent,
and , so
they are a basis of . Their inner products
are , , , and with : , , . Hence The first determinant is . Expanding the
second along the first row, So and .
Example (Distance from a point to a plane)
obtained by projecting onto the normal line. The
two routes never meet on the page, and they agree.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) State the
criterion for a matrix to be the Gram matrix of some list
of vectors.
- (b) Determine
whether the following statement is correct, and justify
your answer: every symmetric matrix with nonnegative
entries is a Gram matrix.
- (c) A list of vectors in has a Gram matrix.
What are the possible values of its rank, and what is
its determinant?
- (d) Write down the
formula for in terms of Gram determinants, saying what
list is used.
- (e) Define the -dimensional volume of a
list, and say what Theorem 13.3.3 asserts
about it.
Solution.
(a) is a Gram matrix if
and only if (Theorem 13.3.1). The
list may then be taken in with .
(b) Incorrect.
has nonnegative entries
and eigenvalues
and , so it is
not positive semidefinite and by Theorem 13.3.1 it is
no Gram matrix. (Concretely: two unit vectors cannot
have inner product , by Cauchy–Schwarz, Theorem 11.1.5.)
(c) The rank is
,
so it is or
; in particular
is singular and
. (A
list of vectors
in a -dimensional
space is dependent, so Theorem 11.2.5 (d)
gives
directly.)
(d) If is a basis of
, then by Theorem 13.3.4.
(e) and (Definition 13.3.1). Theorem 13.3.3 says
.
B. Practice
Exercise
(B1: Which are Gram matrices?)
Determine which of the following are Gram matrices of
some list of vectors in some real inner product space.
For those that are, exhibit a list; for those that are
not, give a reason.
- (i)
- (ii)
- (iii)
- (iv)
Solution.
(i) Yes. It is
symmetric with eigenvalues and , both , so it is positive
definite and Theorem 13.3.1
applies. A list: , in
, whose Gram
matrix is exactly this.
(ii) No. It is
not symmetric, so it is not Hermitian and Definition 13.1.1
fails at once; a Gram matrix over is symmetric by Theorem 11.2.5
(a).
(iii) Yes. Its
rank is : the rows
sum to zero, and the top-left minor is . Its eigenvalues
are (eigenvector
) and (twice, on the plane
), all
. A list in
, as Theorem 13.3.1 (b)
promises with : the three vectors , , , three vectors of length
at to each
other.
(iv) No. It is
symmetric, but its leading principal minors are , and the
determinant of a positive semidefinite matrix is (its eigenvalues
are ). So it
is not positive semidefinite, and by Theorem 13.3.1 it is
not a Gram matrix. (Its eigenvalues are and , one of
which is negative.)
Exercise
(B2: A volume two ways)
In , let
, , .
Compute with Theorem 13.3.3, and
check the answer against Definition 7.9.1.
Solution. The pairwise dot products
give and expanding along the first row, . By Theorem 13.3.3, .
Directly, the matrix with these columns has
, so Definition 7.9.1
gives . The two agree, as they must, since .
Exercise
(B3: A distance in )
In with
the dot product, let and .
Find
using Theorem 13.3.4.
Solution. Write
and ; they are independent, hence a basis
of . The inner
products are , , , , . So with determinants and .
Hence and .
Check. The projection is , so , of norm
.
C. Going deeper
Exercise
(C1: Rank of a Gram matrix)
Let be a list in a finite-dimensional
inner product space over , with Gram matrix .
- (a) Prove that .
- (b) Deduce Theorem 11.2.5 (c):
is invertible if
and only if the list is independent.
Hint for (a): the coordinate matrix of the list
in an orthonormal basis of the span.
Solution.
(a) Let , , and let be an orthonormal basis of , which exists by Theorem 11.2.2. Let
have as its -th column the
coordinate vector of . As computed
in the proof of Theorem 11.2.5 (d),
. By
Corollary 11.6.6
(b), . Finally : the columns
of span , because the
coordinate map is an isomorphism carrying the spanning
list of to the columns of .
(b) is a matrix, so it
is invertible if and only if (Theorem 7.5.3 (d)).
By (a) that says , which holds exactly when the
list is independent.
Exercise
(C2: Why the conjugate is not optional)
Over , one
might try to build a table of inner products with the
bilinear expression ,
without any conjugate. Let .
- (a) Compute and
, and
explain why only one of them is a legitimate squared
length.
- (b) The list is
independent, yet the “bilinear Gram matrix” is
singular. Which hypothesis of Theorem 13.3.1 is
being violated, and which statement of Chapter 7 does
this illustrate?
Solution.
(a) , while . A squared
length must be and must vanish only for the zero vector (Definition 11.1.1),
and ; so
cannot be one, and is the correct
value.
(b) Theorem 13.3.1 is a
statement about the Gram matrix of Definition 11.2.3,
whose entries are . The matrix is not that matrix, so the theorem simply
does not apply; the genuine Gram matrix here is , which is positive
definite, as it must be for an independent list. This is
exactly the failure recorded after Corollary 7.7.3: over
, has rank while , so the
real equality case of that corollary has no complex
analogue — unless the transpose is replaced by the
conjugate transpose.
Exercise
(C3: Height and volume)
Let be an independent list in an inner
product space over . For each , write for the span of .
- (a) Prove that ,
with equality if and only if the list is
orthogonal.
- (b) Deduce that
.
Hint for (a): compare each height with the
corresponding length.
Solution.
(a) Fix and write with , as in Theorem 11.3.2 (a).
The two summands are orthogonal, so Theorem 11.1.3
gives with equality if and only if . Multiplying the inequalities (with read
as ) and
using Definition 13.3.1
repeatedly gives All factors are , since the list is
independent, so equality holds if and only if it holds
in every factor, that is for every . That says each
is
orthogonal to , hence to every
earlier ;
and conversely an orthogonal list has by Theorem 11.3.3
(a).
(b) Square (a)
and apply Theorem 13.3.3.