Matrix multiplication is not the only way to multiply
two matrices of the same size. There is a much simpler
product — multiply the entries in matching positions —
which is useless for composing linear maps and extremely
useful everywhere else. This section introduces it and
proves the one theorem that makes it interesting: it
preserves positivity. A determinant inequality follows,
and it contains Hadamard’s inequality of Section 7 as a
special case.
Throughout, or .
The
entrywise product
Two matrices of the same shape can be multiplied the
way two lists of numbers are: position by position. The
operation has no interpretation in terms of linear maps,
which is one reason it looks like a curiosity at first
sight, and it is written with a small circle to keep it
away from ordinary multiplication.
The Hadamard product multiplies matrices the way
a spreadsheet would.
Definition
13.8.1 (Hadamard Product)
Let . Their Hadamard
product, or entrywise product,
is the matrix with
Both factors must have the same
shape, and the result has that shape too; there
is no rule like “columns of the first match rows of the
second”. The operation is commutative and associative,
and it is bilinear — and — because each of these is
a statement about numbers, checked one entry at a time.
Its identity element is the all-ones matrix , not .
Examples.
- .
- : multiplying
entrywise by the identity erases
everything off the diagonal, where ordinary
multiplication by changes nothing.
- , so
is the identity for .
- For two diagonal matrices, : both products are . For matrices in general the two
have nothing to do with each other, though they can
coincide by accident:
and
have equal Hadamard and matrix products without either
being diagonal.
- For column vectors , regarded as matrices, .
Nonexample by minimal change. Take
and
. Then , but . The two products
differ, and they differ in the most basic way: is its own inverse and
its own Hadamard square.
Warning. is not , and almost nothing
carries over. Two invertible matrices can have
a singular entrywise product:
where the two factors have determinants and and the product has
determinant .
There is no formula for in
terms of
and , no
relation between the eigenvalues, and no rule . The one structural property that does
survive is the subject of this section, and it is a
genuine surprise.
The name is the same one that Section 7 attached to a
determinant inequality. That is a coincidence of a busy
mathematician, not of the mathematics: Hadamard’s
inequality and the Hadamard product are unrelated
statements, and this section will nonetheless prove one
from the other.
The Schur
product theorem
Positivity is a statement about the quadratic form
,
and the quadratic form of has no visible relation to those of
and . So the following
theorem cannot be proved by staring at the form. What
works is to break both matrices into the simplest
positive pieces there are — rank-one matrices —
and to notice that the entrywise product of two such
pieces is again one.
Lemma
13.8.1 (Entrywise product of two rank-one
positive matrices)
Let . Then
Proof. Compare the entries. The entry of is
and
that of is
, so
the left-hand side has entry
the rearrangement using commutativity of and . The vector
has -th entry
, so the
right-hand side has entry
as well. The two matrices agree entry by entry.
That one line is the whole theorem; everything else
is bookkeeping over the spectral decompositions.
Theorem
13.8.2 (Schur Product Theorem)
Let .
- (a) If and , then .
- (b) If and , then .
Idea. For (a): the spectral theorem
writes and
with all
. Expand by bilinearity into terms; by Lemma 13.8.1 each term
is a nonnegative multiple of a matrix , and
those are positive semidefinite. A sum of positive
semidefinite matrices is positive semidefinite, so we
are done.
For (b), do not redo the argument with strict
inequalities: the vectors need not span, and the bookkeeping
becomes unpleasant. Instead peel a multiple of the
identity off . If
is the smallest eigenvalue of , then with , so and is the diagonal matrix of the , which are
strictly positive. Part (a) handles the first term, and
a positive definite matrix plus a positive semidefinite
one is positive definite.
Proof.
- (a) Both and are Hermitian, so each
has an orthonormal basis of eigenvectors. Let be one for , with , and let be the unitary matrix
with these columns, so that with
by Corollary 12.4.3
over and Corollary 12.5.2
over . The
columns of are
and the rows of are , so Corollary 8.1.3
gives
which over
is Corollary 12.5.4.
In the same way . Every
and
every ,
by Theorem 13.1.4
(b).
The Hadamard product is bilinear, so expanding both
sums,
where and the second
equality is Lemma 13.8.1. Each
is positive semidefinite by Example (Five Positive Matrices)
(b), and each coefficient is a
nonnegative real number. A nonnegative combination of
positive semidefinite matrices is positive semidefinite
(Exercise (C2: The cone of positive matrices)
(a)): the combination is Hermitian, being a real
combination of Hermitian matrices, and for every , every term being a product of nonnegative
reals. So .
- (b) Let be the
smallest eigenvalue of , which is positive by
Theorem 13.1.5 (b).
The matrix is Hermitian with eigenvalues
, so by Theorem 13.1.4 (b).
Since is
bilinear and ,
The first term is positive semidefinite by (a). In
the second, because
and
, so by Example (Five Positive Matrices)
(a). For , the quadratic form of the sum is
plus , hence . So , and
the theorem is proved.
The theorem is a genuine addition to the list of
operations that preserve positivity. Sums and
nonnegative multiples were easy (Exercise (C2: The cone of positive matrices)),
congruence was easy (Proposition 13.1.2),
and the ordinary product is not on the list at all,
since need not
even be Hermitian. The entrywise product is on the list,
and nothing in the definition of positivity suggests it
should be.
Example
(A
Entrywise Product)
Let
Check that and , compute , and verify directly that it is
positive definite.
Solution. The leading principal
minors of are
, and, expanding
along the first row, . All are positive, so by
Sylvester’s criterion (Theorem 13.1.5
(d)).
Those of are
, , and . All positive, so .
Entry by entry,
whose leading principal minors are , , and . All positive, so , as
Theorem 13.8.2 (b)
promised. Note that the eigenvalues of have nothing
to do with those of and , and that is
much larger than . The next theorem explains
part of that: it forces . Getting down to the
product needs
Hadamard’s inequality (Theorem 13.7.3) as
well, which is Exercise (C2: The product of the determinants).
Quick check. Let and . Compute
and
decide whether it is positive definite. Does this
contradict Theorem 13.8.2
(b)?
Solution. ,
with leading principal minors and , so it is positive
definite. There is no contradiction: Theorem 13.8.2 (b) is
an implication, not an equivalence. Here is only positive
semidefinite (, so ), and the theorem’s hypothesis fails — but
the conclusion happens to hold anyway. Part (a) is what
applies, and it correctly predicts .
Oppenheim’s inequality
Hadamard’s inequality of Section 7 compared with the product
of the diagonal entries of . Oppenheim’s
inequality does the same for a Hadamard product, and it
contains Hadamard’s as the special case .
Theorem
13.8.3 (Oppenheim’s Inequality)
Let with and . Then
Idea. Induct on , taking both matrices
positive definite first. Split off the entry of each: the
Schur complements and are positive
definite of size , and a short computation, whose only real
step is Lemma 13.8.1 again,
shows that the Schur complement of the corner in is
a positive definite matrix plus a positive
semidefinite one. So its determinant is at least that of
the first term, by Lemma 13.7.1, and the
inductive hypothesis handles that. The semidefinite case
follows by replacing and with and and letting
shrink to .
Proof. Case 1: and . Induct
on . For both sides are
.
Let , and
split both matrices with a partition:
with , , and . The Schur complements are
and both are positive definite by Theorem 13.6.1 (b).
Since conjugation acts entrywise, , so
and , so this matrix too has a Schur complement at
its corner:
By Lemma 13.8.1 the
subtracted term is . Substituting
and expanding
by bilinearity,
and the last term of this is exactly . It therefore
cancels, leaving
The first term is positive definite by Theorem 13.8.2 (b),
since and (the latter by Theorem 13.6.1 (a)
applied to ). The
second is positive semidefinite by Theorem 13.8.2 (a),
since by Example (Five Positive Matrices)
(b) and , and .
Now compute. By Theorem 8.3.2
applied to , then with Lemma 13.7.1, then the
inductive hypothesis applied to the pair and :
By Theorem 8.3.2
again, now for ,
we have . Substituting and canceling
,
which completes the induction.
Case 2: and . For real , the matrices and are positive
definite, as in the proof of Corollary 13.7.2. Case
1 gives
Every entry of is a polynomial in , so both sides are
polynomial, hence continuous, functions of (Theorem 7.4.3).
Letting decrease
to preserves the
inequality and gives the statement. This proves the
theorem.
Where this
gets used
The natural home of the Hadamard product is data. A
covariance matrix is a Gram matrix (Theorem 11.2.5),
hence positive semidefinite, and rescaling each variable
to unit variance turns it into a correlation
matrix: positive semidefinite with every
diagonal entry equal to . The Schur product
theorem says that the entrywise product of two
correlation matrices is another one — the diagonal
entries stay — so one can damp the correlations of one
model by those of another and still have a legitimate
covariance structure. Nothing in the definition of
“positive semidefinite” makes that obvious, and it is
the reason the theorem is quoted far outside linear
algebra.
Warning. Entrywise products
preserve positivity; entrywise inverses do not.
Let , which is positive
definite, with leading principal minors and . Replacing each entry
by its reciprocal gives , whose
determinant is : not positive semidefinite.
The entrywise reciprocal is not the Hadamard inverse of
anything useful, and the matrix inverse , which
is positive definite (Exercise (B3: The inverse of a positive definite matrix)),
has nothing to do with it.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define , and say what
shapes the two factors must have.
- (b) What is ? What is
?
- (c) State the Schur
product theorem.
- (d) True or false:
if ,
then the matrix with entries (assuming no
entry is ) is
positive definite. Justify your answer.
- (e) What does
Oppenheim’s inequality say when ?
Solution.
(a) For of the same shape, , and has that same
shape (Definition 13.8.1).
(b) , and , since has every entry .
(c) If and , then ;
if both are positive definite, so is (Theorem 13.8.2).
(d) False. For
, the entrywise reciprocal is , with
determinant .
(e) By Theorem 13.8.3 it says
, that is : Hadamard’s inequality, Theorem 13.7.3
(a).
B. Practice
Exercise
(B1: Compute and decide)
For each pair below, compute and determine
whether it is positive definite, positive semidefinite
but not definite, or neither. Say in each case whether
Theorem 13.8.2
applies.
- (a) , .
- (b) , .
- (c) , .
Solution.
(a) . Both
factors are (Example (Five Positive Matrices)
(b)), so Theorem 13.8.2 (a)
applies and predicts . The product has determinant , so it is positive
semidefinite but not definite.
(b) , whose
determinant is : neither. The theorem does not apply,
since is not
positive semidefinite (its determinant is ). This is what the
hypothesis is for.
(c) (minors , ) and (minors , ), so Theorem 13.8.2 (b)
applies. Indeed , with minors and , is positive definite.
Theorem 13.8.3 also
checks out: .
Exercise
(B2: Entrywise squares)
Let .
- (a) Show that .
- (b) Compute , the matrix
of squared entries, and verify that it is positive
definite.
- (c) Explain why (b)
needed no computation.
Solution.
(a) The leading
principal minors are , and, expanding
along the first row, . All positive, so by Theorem 13.1.5
(d).
(b) , with leading
principal minors ,
, and
. All positive, so it is
positive definite.
(c) Theorem 13.8.2 (b)
with gives
immediately.
C. Going deeper
Exercise
(C1: Polynomials applied entrywise)
Let with .
- (a) Prove that the
entrywise power , with entry , is positive
semidefinite for every integer .
- (b) Let have nonnegative real
coefficients. Prove that the matrix with entry is positive
semidefinite.
- (c) Give an example
of
and a polynomial
with a negative coefficient for which is not
positive semidefinite.
Solution.
(a) Induct on
. For the claim is the
hypothesis. If , then by Theorem 13.8.2
(a).
(b) By definition
of the entries, ,
since each side has entry (with , which is
the entry of
). Now
by Example (Five Positive Matrices)
(b), each by (a), and each . A nonnegative
combination of positive semidefinite matrices is
positive semidefinite (Exercise (C2: The cone of positive matrices)
(a)).
(c) Take ,
which is positive semidefinite, and . Then has every
entry , that is
, and . So the hypothesis on the
coefficients cannot be dropped.
Exercise
(C2: The product of the determinants)
Let with and . Prove that
Is the inequality ever an equality with both matrices
positive definite?
Solution. By Theorem 13.8.3, . By Theorem 13.7.3 (a)
applied to , . Both and (the
diagonal entries of a positive semidefinite matrix are
by Exercise (C1: Zero trace forces zero)
(a)), so multiplying the second inequality by and
chaining,
Yes, equality can occur: take , so that
and all three quantities are . More generally, take
diagonal and .
Exercise
(C3: The rank of an entrywise product)
Let with and , of ranks and . Prove that
Hint: how many terms in the proof of Theorem 13.8.2 (a) are
actually nonzero?
Solution. Write and
as in the
proof of Theorem 13.8.2 (a).
The number of nonzero eigenvalues of is :
diagonalizing, with invertible, so by Theorem 3.5.9, and
counts the
nonzero .
Likewise exactly
of the are
nonzero. Dropping the vanishing terms,
a sum of
matrices, each of rank at most , since every column of
lies in . The
rank of a sum of two matrices is at most the sum of
their ranks (Exercise (C1: Rank of a sum));
applying that repeatedly to the summands gives .