So far the unknown in a matrix equation has been a
vector: . Many natural questions have a matrix
as the unknown instead. Which matrices commute with a
given ? Which
solve ? Such
an equation is still linear in the entries of , so in principle it is
an ordinary linear system. The trouble is bookkeeping:
we need to know what the coefficient matrix of that
system is. This section builds it from and with one operation,
the Kronecker product, and turns matrix equations into
systems we already know how to solve.
From a
matrix equation to a linear system
Take and an unknown ,
and look at the equation . By Definition 0.9.9,
applied twice, So each entry of is a linear
combination of the four unknowns , and the coefficient of in entry is the product
:
an entry of times an entry of
.
Writing the four equations as a system, every
coefficient is such a product. For instance, if we list
the unknowns column by column as and the equations in the same order,
the first row of the coefficient matrix is The left half of this row is times row of , and the right half is
times row
of .
That is a recurring pattern: a big matrix whose
entries are all the products of the entries of two small
matrices, arranged in blocks. It deserves a name.
The
Kronecker product
The Kronecker product of and is the block matrix
obtained by replacing each entry of by the block .
Definition
8.4.1 (Kronecker product)
Let and , of any sizes. The
Kronecker product of and is the block matrix
with
rows and columns
of blocks, each block of size (Definition 8.1.1).
In words: the outer layout is the layout of , and the inner pattern
of every block is . The sizes multiply,
rows with rows and columns with columns. No condition on
the sizes is needed, unlike for an ordinary product.
To work with single entries we need to know where
each product sits. Block
occupies
rows and columns .
Inside it, entry is . So Every entry is reached exactly
once. Division with remainder writes each row
index uniquely as with and (divide by ), and likewise for
columns. So
is a complete description of , and it is
the formula we use in proofs. In words, the rows of
are
labeled by pairs (row of , row of ) in dictionary order,
and the columns by pairs (column of , column of ) in dictionary
order.
Examples.
- A example. With and , Check one entry against : row and
column give , as displayed.
- Vectors. For column vectors and
(so ),
lists all products in dictionary
order. In particular, for standard basis vectors, : the only
nonzero product is in position . For a column
and a row , is the matrix with
entries ,
which is the outer product of Corollary 8.1.3.
- Identity blocks. has in each diagonal block
and zero blocks elsewhere, so it is the block diagonal
matrix with copies of (Definition 8.1.2).
By contrast, replaces each entry by the block . Taking both,
: by its entries are
,
which is exactly
when the row and column labels and agree.
- The degenerate case . If
is , then ; if
, then
. So a factor behaves like a scalar, and . This
case is worth keeping in mind: it shows that the
Kronecker product extends scalar multiplication, which
is why it is bilinear below.
Nonexample by minimal change. Swap
the two factors of Example 1: It has the same size and the same multiset of
entries, since both list all products . What fails
is the position formula : in the
outer layout comes from , so the products sit
in different places. For instance, the -entry is in but in .
Why this definition. The dictionary
order in is
a convention, and the other order would simply give
. We
fix it because it makes the block picture true: the
Kronecker product is literally “ with entries replaced
by blocks”, so block multiplication (Theorem 8.1.1)
applies to it directly. The symbol anticipates the
tensor product of Chapter 15, of which this is the
matrix version.
Warning. The Kronecker
product is not commutative, and it is not the ordinary
product. The two matrices in Example 1 and the
nonexample differ, so in general, even
for square matrices of the same size. Also do not
confuse with : for , is while is , and is defined for all sizes. We will see below
that
and
are always similar when and are square, so they
share rank, trace, and determinant, but they are not
equal.
Algebraic
properties
The Kronecker product interacts well with every
operation we have. The most useful rule is the one
connecting it to ordinary multiplication: multiply the
two left factors together and the two right factors
together.
Theorem
8.4.1 (Properties of the Kronecker
Product)
Let .
Whenever the sizes make each side defined:
- (a)
(Bilinearity) , , and .
- (b)
(Associativity) for all ,
, .
- (c) (Mixed
product rule) For ,
, , and ,
- (d)
(Transpose) .
- (e)
(Inverse) If and are
invertible, then is invertible and .
Idea. Parts (a), (b), and (d) are
entry checks with . For (c), both
factors on the left are block matrices, and the columns
of blocks of ( of
them, each wide)
match the rows of blocks of ( of them, each tall). So we may
multiply blockwise, and each block of the product is a
sum in which the scalars come
out. Part (e) is (c) with , .
Proof.
(a) By , the entry of
in position
is , which is the entry of in the same position. The other identities
are checked the same way, using .
(b) Both sides
are .
Let ,
,
, and
similarly
for columns. Applying twice, the entry
of in row and column is . Likewise the entry of in row and column is
.
Since , and
similarly for columns, the two matrices have the same
entry in every position; every position arises from
exactly one choice of indices, by division with
remainder. Hence they are equal.
(c) Partition
into
rows and columns of blocks as in
Definition 8.4.1,
each block , and into
rows and columns
of blocks, each . The column partition of the first matrix
( parts of size
) equals the row
partition of the second, so the partitions are
conformable, and by Theorem 8.1.1 the
block of the
product is where the first equality uses Theorem 0.9.4 (4) and
the second uses Definition 0.9.9. This
is the block
of , a matrix partitioned into rows and columns of blocks. So the
two matrices agree block by block, hence entry by
entry.
(d) is
. By Definition 0.9.10 and
, its entry
in row
and column is , which by is the entry of
in the same position.
(e) By (c) and
Example 3, , and
similarly . By Definition 0.9.13,
is
invertible with inverse .
The mixed product rule is the engine of everything
that follows. One immediate consequence splits a
Kronecker product of square matrices into two simpler
factors: for and , and in the same way . So and commute,
even though and
have nothing to
do with each other.
For example, with , , , and , multiplying two matrices
directly gives while the rule needs only two products,
and , whose Kronecker
product is the same matrix.
Swapping
the factors
The warning said that and differ. They differ only in the
order in which rows and columns are labeled: uses (index
of , index of
) in dictionary
order, the reverse order. Relabeling rows and
columns by the same permutation is conjugation by a
permutation matrix, and that is what the next result
makes precise.
First, a fact about permutation matrices. Recall that
for ,
the permutation matrix has -th column , and
(Definition 3.4.2,
Lemma 3.4.7). For
every , Indeed, by Theorem 0.9.2 column
of is ,
which is column of . Row of is ,
so by the same theorem row of is row
of , for any . Combining
the two gives .
Proposition
8.4.2 (Swapping the Factors Is a Permutation
Similarity)
Let .
There is a permutation matrix ,
depending only on
and , such that
In particular , and .
Proof. Every
can be written uniquely as with and . Define . As runs over all pairs, so does , and each value
is taken
by exactly one pair; hence is a bijection of
,
that is, . Put .
Let and . By applied to , . By applied to , So by , and agree in every entry, and by Lemma 3.4.7 (b).
The last claim is the case .
For example, when ,
fixes and and swaps and , so is the elementary
matrix :
conjugating by it swaps rows and columns . Doing this to in Example
1 does give , as a direct check shows. For rectangular
and , the same argument gives
with one
permutation for the rows and another for the
columns.
Rank,
trace, and determinant
Each of the three basic numbers attached to a matrix
behaves multiplicatively. The formulas for trace and
rank are what one would guess. The determinant is
subtler, because the sizes enter as exponents.
Theorem
8.4.3 (Rank, Trace, and Determinant of a
Kronecker Product)
- (a) For
and , .
- (b) For and , .
- (c) For and , .
Idea. For rank, bring both factors
to rank normal form, and . The mixed product rule
moves the invertible factors outside, where they do not
change rank, and visibly has rank . Trace is a sum over
diagonal entries, and the diagonal entries of are the
products . For the
determinant, split
by . The
second factor is block diagonal with copies of . The first is not, but
by Proposition 8.4.2
it is similar to , which is block diagonal with copies of .
Proof.
- (a) Let and . By Theorem 4.3.3 (b)
and Definition 4.3.1,
there are invertible with and
,
where and have , in the top left
corner and zeros elsewhere. Hence and , and by Theorem 8.4.1 (c),
used twice, The outer factors are invertible by Theorem 8.4.1 (e),
so by Theorem 3.5.9.
By , the
entry of in position
is if and , and otherwise. So for each
of the pairs
with , , column equals , and
every other column is zero. Distinct pairs give distinct
standard basis vectors, so these columns are linearly
independent and span the column space. Hence by Definition 3.5.4,
which proves (a). (If or , the matrix is zero and both sides are .)
(b) By with , the diagonal
entries of are those with ,
that is and
by uniqueness
of division with remainder, and they equal . By Definition 0.9.12,
(c) First, a
block diagonal matrix with square blocks
has determinant . For there is nothing to
prove, and for the matrix is , so Theorem 8.1.4 (d)
(or Theorem 7.8.4) and
induction on give
the claim.
By Example 3, with
blocks, so . Likewise with blocks, so . By Proposition 8.4.2,
is
similar to , so by Corollary 7.5.7.
Finally, by and Theorem 7.5.4,
The exponents are easy to get backwards, and a size
count fixes them. In with , , the matrix is “used” times (once for each
index of ), so
appears to
the power , the
size of the other factor. For and ,
has determinant , which confirms the
exponent.
For the matrices of the example after Theorem 8.4.1,
, , , and , so , , and . Directly, the diagonal of is , with sum
.
Quick check. Let have
, , and let
have ,
. Find
,
, and .
Solution. By Theorem 8.4.3,
and . With the roles swapped, , as it must be since
(Proposition 8.4.2).
The common wrong answer puts each matrix’s own size in its
exponent.
Vectorization
We return to the question of the opening: turning a
matrix equation into a linear system. For that we need
to flatten the unknown matrix into a column, in an order
that matches .
To vectorize a matrix is to stack its columns
into one long column.
Definition
8.4.2 (Vectorization)
Let have columns . Its vectorization is the
column vector whose entry in position is , for , .
For example, , read
down the first column and then down the second. For a
column (the case ), . The map is linear, since each entry of is an entry of
, and bijective,
since it only rearranges entries; so it is an
isomorphism. It sends the matrix unit to (Example 2, with the index
of the column first). More generally, for and
:
column of is
.
Two conventions are in use, and they differ. Some
books stack the rows instead, which
exchanges the roles of the two factors in the next
theorem. We always stack columns.
Theorem
8.4.4 (The vec Identity)
Let , , and .
Then
Idea. Both sides are columns in
. We compare
one entry, using the formula for a triple product on the
left and on
the right. The factor acts on the row index
of , which is the
inner index in ; the factor acts on the column
index, which is the outer index. That is why comes first, and it
enters transposed because it multiplies from the right.
Proof. Both sides lie in : , and acts on
. Fix and , and consider position . By Definition 8.4.2
and Definition 0.9.9
applied twice, the left side has entry On the right, write the column index of
uniquely as with , . By , , and by Definition 8.4.2
the -th entry of
is . Hence the entry
of the right side in position is which equals the left side. As ranges over all
pairs,
ranges over all positions, so the two vectors are
equal.
Taking
or gives
the two one-sided forms, which are used most often:
The first says that multiplying by on the left multiplies
each column of
by : acts on the stacked columns one at a
time.
Now every linear matrix equation built from products
becomes a linear system. The most important one is the
Sylvester equation for an unknown . Applying , which is linear,
and the two one-sided forms, So the Sylvester equation has exactly
one solution for every if and only if the
matrix
is invertible (Theorem 3.4.4,
transported through the isomorphism ). The equation
of
the opening, which describes the matrices commuting with
, is the case
, : its solutions
form the null space of .
Example
(A Sylvester Equation as a Linear System)
Solve over , where
Solution. Here . Compute the
two Kronecker products from Definition 8.4.1:
With and , the system is The coefficient matrix is upper triangular
with nonzero diagonal entries , so its
determinant is (Theorem 7.4.6) and
the solution is unique. Back substitution gives ; then , so
; then
, so
; then
, so . Hence Check: and , whose sum is . As a check on the
bookkeeping, row
of the system is the entry of , namely .
In this example the coefficient matrix came out
triangular, with diagonal entries . That is
no accident when
is upper triangular and lower triangular, as
Exercise (C2: Kronecker sums)
below shows. In general, whether is invertible depends on the eigenvalues
of and : over , the equation is
uniquely solvable for every exactly when and have no common
eigenvalue. That criterion needs eigenvalues and is
proved in Chapter 12, and its quantitative form appears
in Chapter 20.
Warning. Keep the order and
the transpose in .
Both and look plausible, and both are wrong.
With , , and , we get , and indeed ,
because the first column of is
zero. But . So fails. A
similar test with , , refutes . If a formula is in doubt, test
it on matrix units.
The Kronecker product is the coordinate shadow of a
basis-free construction: the tensor product of linear
maps, in Chapter 15, whose matrix in suitable bases is
exactly . The dictionary order in will reappear
there as an ordering of a basis .
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define for
and , and state its size.
- (b) True or false:
for all , . Justify your answer.
- (c) State the mixed
product rule, including the conditions on the
sizes.
- (d) True or false:
for all .
Justify your answer.
- (e) State the vec
identity, and name the matrix with for , .
Solution.
(a) is the
block
matrix with
block (Definition 8.4.1);
equivalently, its entry in position
is .
(b) False. For
and , the entry of is and that
of is
.
The two are similar (Proposition 8.4.2),
not equal.
(c) If ,
, , and ,
then (Theorem 8.4.1 (c)).
The conditions are exactly that and are
defined.
(d) False. By Theorem 8.4.3,
. For , has
determinant ,
while .
(e) (Theorem 8.4.4).
With ,
.
B. Practice
Exercise
(B1: Computing with Kronecker products)
Let and over .
- (a) Write out and .
- (b) Compute , , and of from Theorem 8.4.3, and
check the trace directly.
- (c) Compute and use
it to write down without multiplying matrices.
Justify the step.
- (d) Hence find .
Solution.
(a) By Definition 8.4.1,
(b) , , , , and both
have rank . By Theorem 8.4.3,
, , and .
Directly, the diagonal of is , with sum .
(c) By the mixed
product rule (Theorem 8.4.1 (c))
with and
, . Here and , so
(d) and by Theorem 0.9.8. By Theorem 8.4.1 (e),
Multiplying by gives .
Exercise
(B2: One-sided equations)
Let and , and consider for .
- (a) Write the
equation in the form ,
and describe as
a block matrix.
- (b) Explain why the
system splits into separate systems, one
for each column of .
- (c) Hence show that
has
exactly one solution for every if and only if is invertible.
- (d) Solve over by the same method,
where and .
Solution.
(a) By Theorem 8.4.4 with
, , so ,
with
blocks.
(b) Write and as stacks of
the columns and . By Theorem 8.1.1,
is the stack of the . So the
system says for , and the unknowns of different
columns never meet.
(c) If is invertible, then
forces
, and
this is a
solution. Suppose
is
solvable for every . Given , take
with every
column equal to ; by (b), a
solution gives with . So
is solvable for every , and is invertible by Theorem 3.4.4 ((e)
(a)).
(d) By Theorem 8.4.4 with
the left factor , . With , , and ,
the system is This time the system splits by the
rows of : equations involve only , and
equations only
.
From and we get , . From and
we get , . Hence Check: .
Exercise
(B3: Which identities hold?)
Determine which of the following statements hold for
all . Justify your answer.
- (a) .
- (b) .
- (c) .
- (d)
implies or
.
- (e) .
- (f) .
Solution.
(a) Holds, by the
mixed product rule (Theorem 8.4.1
(c)).
(b) Holds, by
bilinearity (Theorem 8.4.1
(a)).
(c) Fails. By Theorem 8.4.1 (d),
, and this differs from in
general. Take and . By , the entry of is
, while that of is
. Unlike , the order of the factors
does not reverse.
(d) Holds. If
and , then and , so by Theorem 8.4.3 (a),
and . (Directly: if and , the entry
of
is
nonzero.)
(e) Holds: both
equal
by Theorem 8.4.3
(b).
(f) Fails, since
it is equivalent to , which is false for
the matrices of Example 1 after Definition 8.4.1
(see the nonexample there).
C. Going deeper
Exercise
(C1: When is a Kronecker product invertible?)
- (a) Let and . Prove that
is
invertible if and only if both and are invertible.
- (b) Let
and with , so that is square. Prove that if , then is
not invertible.
- (c) Give an example
of a
matrix and a
matrix
for which is a
nonzero
matrix, and compute its rank.
Solution.
(a) By Theorem 8.4.3 (c),
. In a field a product is
nonzero if and only if each factor is, so this is
nonzero if and only if and (here ). By Theorem 7.5.2,
applied to all three matrices, is
invertible if and only if and are.
(b) Suppose . Since and , we get . By Theorem 8.4.3 (a)
and the bound (number of rows) and (number of columns),
so the matrix is not invertible (Theorem 7.5.3 (d)).
If , then
, and in the same
way.
(c) Take and . Then , the outer product
, of rank
: its
second row is twice its first. So it is square and
nonzero but singular, as (b) predicts.
Exercise
(C2: Kronecker sums)
Let and , and put .
- (a) Prove that , and
deduce that .
- (b) Show that for
, .
- (c) Suppose and are upper triangular.
Prove that is
upper triangular with diagonal entries , and
deduce that has exactly one solution for every
if and only if for all .
- (d) For and over , decide whether is
solvable for every . If not, find a with no solution.
Solution.
(a) By the mixed
product rule, both products equal , as
in .
Expanding by
distributivity (Theorem 0.9.4) gives
. The middle
terms are both , and the outer ones are and
by the mixed product rule.
(b) By Theorem 8.4.4,
and . Add, using linearity of .
(c) By , the entry of
in
position is , which
is zero unless and ; in that case . The entry of there is
,
zero unless
and , and
again the row index is at most the column index. So both
are upper triangular, hence so is . On the diagonal,
and , and the entry is
. By
Theorem 7.4.6, . By (b), the equation is ,
and since is
an isomorphism, it has exactly one solution for every
if and only if
is invertible
(Theorem 3.4.4),
that is (Theorem 7.5.2), that
is every .
(d) The diagonal
entries are , , , , so by (c) the equation is not solvable for
every .
Explicitly, whose third row is zero. So always has
third entry , and
any with has no solution, for example . (Directly:
the entry of
is
.)