In mathematics, the Kronecker product , denoted by
⊗
{\displaystyle \otimes }
, is an operation on two matrices of arbitrary size resulting in a block matrix . It is a special case of a tensor product . The Kronecker product should not be confused with the usual matrix multiplication , which is an entirely different operation. It is named after German mathematician Leopold Kronecker .
If A is an m -by-n matrix and B is a p -by-q matrix, then the Kronecker product
A
⊗
B
{\displaystyle A\otimes B}
is the mp -by-nq block matrix
A
⊗
B
=
[
a
11
B
⋯
a
1
n
B
⋮
⋱
⋮
a
m
1
B
⋯
a
m
n
B
]
.
{\displaystyle A\otimes B={\begin{bmatrix}a_{11}B&\cdots &a_{1n}B\\\vdots &\ddots &\vdots \\a_{m1}B&\cdots &a_{mn}B\end{bmatrix}}.}
More explicitly, we have
A
⊗
B
=
[
a
11
b
11
a
11
b
12
⋯
a
11
b
1
q
⋯
⋯
a
1
n
b
11
a
1
n
b
12
⋯
a
1
n
b
1
q
a
11
b
21
a
11
b
22
⋯
a
11
b
2
q
⋯
⋯
a
1
n
b
21
a
1
n
b
22
⋯
a
1
n
b
2
q
⋮
⋮
⋱
⋮
⋮
⋮
⋱
⋮
a
11
b
p
1
a
11
b
p
2
⋯
a
11
b
p
q
⋯
⋯
a
1
n
b
p
1
a
1
n
b
p
2
⋯
a
1
n
b
p
q
⋮
⋮
⋮
⋱
⋮
⋮
⋮
⋮
⋮
⋮
⋱
⋮
⋮
⋮
a
m
1
b
11
a
m
1
b
12
⋯
a
m
1
b
1
q
⋯
⋯
a
m
n
b
11
a
m
n
b
12
⋯
a
m
n
b
1
q
a
m
1
b
21
a
m
1
b
22
⋯
a
m
1
b
2
q
⋯
⋯
a
m
n
b
21
a
m
n
b
22
⋯
a
m
n
b
2
q
⋮
⋮
⋱
⋮
⋮
⋮
⋱
⋮
a
m
1
b
p
1
a
m
1
b
p
2
⋯
a
m
1
b
p
q
⋯
⋯
a
m
n
b
p
1
a
m
n
b
p
2
⋯
a
m
n
b
p
q
]
.
{\displaystyle A\otimes B={\begin{bmatrix}a_{11}b_{11}&a_{11}b_{12}&\cdots &a_{11}b_{1q}&\cdots &\cdots &a_{1n}b_{11}&a_{1n}b_{12}&\cdots &a_{1n}b_{1q}\\a_{11}b_{21}&a_{11}b_{22}&\cdots &a_{11}b_{2q}&\cdots &\cdots &a_{1n}b_{21}&a_{1n}b_{22}&\cdots &a_{1n}b_{2q}\\\vdots &\vdots &\ddots &\vdots &&&\vdots &\vdots &\ddots &\vdots \\a_{11}b_{p1}&a_{11}b_{p2}&\cdots &a_{11}b_{pq}&\cdots &\cdots &a_{1n}b_{p1}&a_{1n}b_{p2}&\cdots &a_{1n}b_{pq}\\\vdots &\vdots &&\vdots &\ddots &&\vdots &\vdots &&\vdots \\\vdots &\vdots &&\vdots &&\ddots &\vdots &\vdots &&\vdots \\a_{m1}b_{11}&a_{m1}b_{12}&\cdots &a_{m1}b_{1q}&\cdots &\cdots &a_{mn}b_{11}&a_{mn}b_{12}&\cdots &a_{mn}b_{1q}\\a_{m1}b_{21}&a_{m1}b_{22}&\cdots &a_{m1}b_{2q}&\cdots &\cdots &a_{mn}b_{21}&a_{mn}b_{22}&\cdots &a_{mn}b_{2q}\\\vdots &\vdots &\ddots &\vdots &&&\vdots &\vdots &\ddots &\vdots \\a_{m1}b_{p1}&a_{m1}b_{p2}&\cdots &a_{m1}b_{pq}&\cdots &\cdots &a_{mn}b_{p1}&a_{mn}b_{p2}&\cdots &a_{mn}b_{pq}\end{bmatrix}}.}
[
1
2
3
4
]
⊗
[
0
5
6
7
]
=
[
1
⋅
0
1
⋅
5
2
⋅
0
2
⋅
5
1
⋅
6
1
⋅
7
2
⋅
6
2
⋅
7
3
⋅
0
3
⋅
5
4
⋅
0
4
⋅
5
3
⋅
6
3
⋅
7
4
⋅
6
4
⋅
7
]
=
[
0
5
0
10
6
7
12
14
0
15
0
20
18
21
24
28
]
{\displaystyle {\begin{bmatrix}1&2\\3&4\\\end{bmatrix}}\otimes {\begin{bmatrix}0&5\\6&7\\\end{bmatrix}}={\begin{bmatrix}1\cdot 0&1\cdot 5&2\cdot 0&2\cdot 5\\1\cdot 6&1\cdot 7&2\cdot 6&2\cdot 7\\3\cdot 0&3\cdot 5&4\cdot 0&4\cdot 5\\3\cdot 6&3\cdot 7&4\cdot 6&4\cdot 7\\\end{bmatrix}}={\begin{bmatrix}0&5&0&10\\6&7&12&14\\0&15&0&20\\18&21&24&28\end{bmatrix}}}
.
[
a
11
a
12
a
21
a
22
a
31
a
32
]
⊗
[
b
11
b
12
b
13
b
21
b
22
b
23
]
=
[
a
11
b
11
a
11
b
12
a
11
b
13
a
12
b
11
a
12
b
12
a
12
b
13
a
11
b
21
a
11
b
22
a
11
b
23
a
12
b
21
a
12
b
22
a
12
b
23
a
21
b
11
a
21
b
12
a
21
b
13
a
22
b
11
a
22
b
12
a
22
b
13
a
21
b
21
a
21
b
22
a
21
b
23
a
22
b
21
a
22
b
22
a
22
b
23
a
31
b
11
a
31
b
12
a
31
b
13
a
32
b
11
a
32
b
12
a
32
b
13
a
31
b
21
a
31
b
22
a
31
b
23
a
32
b
21
a
32
b
22
a
32
b
23
]
{\displaystyle {\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\\a_{31}&a_{32}\end{bmatrix}}\otimes {\begin{bmatrix}b_{11}&b_{12}&b_{13}\\b_{21}&b_{22}&b_{23}\end{bmatrix}}={\begin{bmatrix}a_{11}b_{11}&a_{11}b_{12}&a_{11}b_{13}&a_{12}b_{11}&a_{12}b_{12}&a_{12}b_{13}\\a_{11}b_{21}&a_{11}b_{22}&a_{11}b_{23}&a_{12}b_{21}&a_{12}b_{22}&a_{12}b_{23}\\a_{21}b_{11}&a_{21}b_{12}&a_{21}b_{13}&a_{22}b_{11}&a_{22}b_{12}&a_{22}b_{13}\\a_{21}b_{21}&a_{21}b_{22}&a_{21}b_{23}&a_{22}b_{21}&a_{22}b_{22}&a_{22}b_{23}\\a_{31}b_{11}&a_{31}b_{12}&a_{31}b_{13}&a_{32}b_{11}&a_{32}b_{12}&a_{32}b_{13}\\a_{31}b_{21}&a_{31}b_{22}&a_{31}b_{23}&a_{32}b_{21}&a_{32}b_{22}&a_{32}b_{23}\end{bmatrix}}}
.
Bilinearity and associativity [ edit ]
The Kronecker product is a special case of the tensor product, so it is bilinear and associative :
A
⊗
(
B
+
C
)
=
A
⊗
B
+
A
⊗
C
,
{\displaystyle A\otimes (B+C)=A\otimes B+A\otimes C\qquad ,}
(
A
+
B
)
⊗
C
=
A
⊗
C
+
B
⊗
C
,
{\displaystyle (A+B)\otimes C=A\otimes C+B\otimes C\qquad ,}
(
k
A
)
⊗
B
=
A
⊗
(
k
B
)
=
k
(
A
⊗
B
)
,
{\displaystyle (kA)\otimes B=A\otimes (kB)=k(A\otimes B),}
(
A
⊗
B
)
⊗
C
=
A
⊗
(
B
⊗
C
)
,
{\displaystyle (A\otimes B)\otimes C=A\otimes (B\otimes C),}
where A , B and C are matrices and k is a scalar.
The Kronecker product is not commutative : in general, A
⊗
{\displaystyle \otimes }
B and B
⊗
{\displaystyle \otimes }
A are different matrices. However, A
⊗
{\displaystyle \otimes }
B and B
⊗
{\displaystyle \otimes }
A are permutation equivalent, meaning that there exist permutation matrices P and Q such that
A
⊗
B
=
P
(
B
⊗
A
)
Q
.
{\displaystyle A\otimes B=P\,(B\otimes A)\,Q.}
If A and B are square matrices, then A
⊗
{\displaystyle \otimes }
B and B
⊗
{\displaystyle \otimes }
A are even permutation similar , meaning that we can take P = Q T .
The mixed-product property [ edit ]
If A , B , C and D are matrices of such size that one can form the matrix products AC and BD , then
(
A
⊗
B
)
(
C
⊗
D
)
=
A
C
⊗
B
D
.
{\displaystyle (A\otimes B)(C\otimes D)=AC\otimes BD.}
This is called the mixed-product property, because it mixes the ordinary matrix product and the Kronecker product. It follows that A
⊗
{\displaystyle \otimes }
B is invertible if and only if A and B are invertible, in which case the inverse is given by
(
A
⊗
B
)
−
1
=
A
−
1
⊗
B
−
1
.
{\displaystyle (A\otimes B)^{-1}=A^{-1}\otimes B^{-1}.}
Kronecker sum and exponentiation [ edit ]
If A is n -by-n , B is m -by-m and
I
k
{\displaystyle I_{k}}
denotes the k -by-k identity matrix then we can define the Kronecker sum ,
⊕
{\displaystyle \oplus }
, by
A
⊕
B
=
A
⊗
I
m
+
I
n
⊗
B
.
{\displaystyle A\oplus B=A\otimes I_{m}+I_{n}\otimes B.}
We have the following formula for the matrix exponential which is useful in the numerical evaluation of certain continuous-time Markov processes ,
e
A
⊕
B
=
e
A
⊗
e
B
.
{\displaystyle e^{A\oplus B}=e^{A}\otimes e^{B}.}
Suppose that A and B are square matrices of size n and q respectively. Let λ1 , ..., λn be the eigenvalues of A and μ1 , ..., μq be those of B (listed according to multiplicity). Then the eigenvalues of A
⊗
{\displaystyle \otimes }
B are
λ
i
μ
j
,
i
=
1
,
…
,
n
,
j
=
1
,
…
,
q
.
{\displaystyle \lambda _{i}\mu _{j},\qquad i=1,\ldots ,n,\,j=1,\ldots ,q.}
It follows that the trace and determinant of a Kronecker product are given by
tr
(
A
⊗
B
)
=
tr
A
tr
B
and
det
(
A
⊗
B
)
=
(
det
A
)
q
(
det
B
)
n
.
{\displaystyle \operatorname {tr} (A\otimes B)=\operatorname {tr} A\,\operatorname {tr} B\quad {\mbox{and}}\quad \det(A\otimes B)=(\det A)^{q}(\det B)^{n}.}
If A and B are rectangular matrices, then one can consider their singular values . Suppose that A has r A nonzero singular values, namely
σ
A
,
i
,
i
=
1
,
…
,
r
A
.
{\displaystyle \sigma _{A,i},\qquad i=1,\ldots ,r_{A}.}
Similarly, denote the nonzero singular values of B by
σ
B
,
i
,
i
=
1
,
…
,
r
B
.
{\displaystyle \sigma _{B,i},\qquad i=1,\ldots ,r_{B}.}
Then the Kronecker product A
⊗
{\displaystyle \otimes }
B has r A r B nonzero singular values, namely
σ
A
,
i
σ
B
,
j
,
i
=
1
,
…
,
r
A
,
j
=
1
,
…
,
r
B
.
{\displaystyle \sigma _{A,i}\sigma _{B,j},\qquad i=1,\ldots ,r_{A},\,j=1,\ldots ,r_{B}.}
Since the rank of a matrix equals the number of nonzero singular values, we find that
rank
(
A
⊗
B
)
=
rank
A
rank
B
.
{\displaystyle \operatorname {rank} (A\otimes B)=\operatorname {rank} A\,\operatorname {rank} B.}
Relation to the abstract tensor product [ edit ]
The Kronecker product of matrices corresponds to the abstract tensor product of linear maps. Specifically, if the matrices A and B represent linear transformations V 1 → W 1 and V 2 → W 2 , respectively, then the matrix A
⊗
{\displaystyle \otimes }
B represents the tensor product of the two maps, V 1
⊗
{\displaystyle \otimes }
V 2 → W 1
⊗
{\displaystyle \otimes }
W 2 .
Relation to products of graphs [ edit ]
The Kronecker product of the adjacency matrices of two graphs is the adjacency matrix of the tensor product graph . The Kronecker sum of the adjacency matrices of two graphs is the adjacency matrix of the Cartesian product graph . See [ 1] , answer to Exercise 96.
The operation of transposition is distributive over the Kronecker product:
(
A
⊗
B
)
T
=
A
T
⊗
B
T
.
{\displaystyle (A\otimes B)^{T}=A^{T}\otimes B^{T}.}
The Kronecker product can be used to get a convenient representation for some matrix equations. Consider for instance the equation AXB = C , where A , B and C are given matrices and the matrix X is the unknown. We can rewrite this equation as
(
B
⊤
⊗
A
)
vec
(
X
)
=
vec
(
A
X
B
)
=
vec
(
C
)
.
{\displaystyle (B^{\top }\otimes A)\,\operatorname {vec} (X)=\operatorname {vec} (AXB)=\operatorname {vec} (C).}
It now follows from the properties of the Kronecker product that the equation AXB = C has a unique solution if and only if A and B are nonsingular (Horn & Johnson 1991 , Lemma 4.3.1).
Here, vec(X ) denotes the vectorization of the matrix X formed by stacking the columns of X into a single column vector .
If X is row-ordered into the column vector x then
A
X
B
{\displaystyle AXB}
can be also be written as
(
A
⊗
B
⊤
)
x
{\displaystyle (A\otimes B^{\top })x}
(Jain 1989 , 2.8 block Matrices and Kronecker Products)
The Kronecker product is named after Leopold Kronecker , even though there is little evidence that he was the first to define and use it. Indeed, in the past the Kronecker product was sometimes called the Zehfuss matrix, after Johann Georg Zehfuss .
Two related matrix operators are the Tracy-Singh and Khatri-Rao products which operate on partitioned matrices . Let the
m
{\displaystyle m}
-by-
n
{\displaystyle n}
matrix
A
{\displaystyle A}
be partitioned into the
m
i
{\displaystyle m_{i}}
-by-
n
j
{\displaystyle n_{j}}
blocks
A
i
j
{\displaystyle A_{ij}}
and
p
{\displaystyle p}
-by-
q
{\displaystyle q}
matrix
B
{\displaystyle B}
into the
p
k
{\displaystyle p_{k}}
-by-
q
l
{\displaystyle q_{l}}
blocks B kl with of course
Σ
i
m
i
=
m
{\displaystyle \Sigma _{i}m_{i}=m}
,
Σ
j
n
j
=
n
{\displaystyle \Sigma _{j}n_{j}=n}
,
Σ
k
p
k
=
p
{\displaystyle \Sigma _{k}p_{k}=p}
and
Σ
l
q
l
=
q
.
{\displaystyle \Sigma _{l}q_{l}=q.}
We then define the Tracy-Singh product to be
A
∘
B
=
(
A
i
j
∘
B
)
i
j
=
(
(
A
i
j
⊗
B
k
l
)
k
l
)
i
j
{\displaystyle A\circ B=(A_{ij}\circ B)_{ij}=((A_{ij}\otimes B_{kl})_{kl})_{ij}}
which means that the
(
i
j
)
{\displaystyle (ij)}
th subblock of the
m
p
{\displaystyle mp}
-by-
n
q
{\displaystyle nq}
product
A
∘
B
{\displaystyle A\circ B}
is the
m
i
p
{\displaystyle m_{i}p}
-by-
n
j
q
{\displaystyle n_{j}q}
matrix
A
i
j
∘
B
{\displaystyle A_{ij}\circ B}
, of wich the
(
k
l
)
{\displaystyle (kl)}
th subblock equals the
m
i
p
k
{\displaystyle m_{i}p_{k}}
-by-
n
j
q
l
{\displaystyle n_{j}q_{l}}
matrix
A
i
j
⊗
B
k
l
{\displaystyle A_{ij}\otimes B_{kl}}
.
For example, if
A
{\displaystyle A}
and
B
{\displaystyle B}
both are
2
{\displaystyle 2}
-by-
2
{\displaystyle 2}
partitioned matrices e.g.:
A
=
[
A
11
A
12
A
21
A
22
]
=
[
1
2
3
4
5
6
7
8
9
]
,
B
=
[
B
11
B
12
B
21
B
22
]
=
[
1
4
7
2
5
8
3
6
9
]
,
{\displaystyle A=\left[{\begin{array}{c | c}A_{11}&A_{12}\\\hline A_{21}&A_{22}\end{array}}\right]=\left[{\begin{array}{c c | c}1&2&3\\4&5&6\\\hline 7&8&9\end{array}}\right],\quad B=\left[{\begin{array}{c | c}B_{11}&B_{12}\\\hline B_{21}&B_{22}\end{array}}\right]=\left[{\begin{array}{c | c c}1&4&7\\\hline 2&5&8\\3&6&9\end{array}}\right],}
we get:
A
∘
B
=
[
A
11
∘
B
A
12
∘
B
A
21
∘
B
A
22
∘
B
]
=
[
A
11
⊗
B
11
A
11
⊗
B
12
A
12
⊗
B
11
A
12
⊗
B
12
A
11
⊗
B
21
A
11
⊗
B
22
A
12
⊗
B
21
A
12
⊗
B
22
A
21
⊗
B
11
A
21
⊗
B
12
A
22
⊗
B
11
A
22
⊗
B
12
A
21
⊗
B
21
A
21
⊗
B
22
A
22
⊗
B
21
A
22
⊗
B
22
]
{\displaystyle A\circ B=\left[{\begin{array}{c | c}A_{11}\circ B&A_{12}\circ B\\\hline A_{21}\circ B&A_{22}\circ B\end{array}}\right]=\left[{\begin{array}{c | c | c | c }A_{11}\otimes B_{11}&A_{11}\otimes B_{12}&A_{12}\otimes B_{11}&A_{12}\otimes B_{12}\\\hline A_{11}\otimes B_{21}&A_{11}\otimes B_{22}&A_{12}\otimes B_{21}&A_{12}\otimes B_{22}\\\hline A_{21}\otimes B_{11}&A_{21}\otimes B_{12}&A_{22}\otimes B_{11}&A_{22}\otimes B_{12}\\\hline A_{21}\otimes B_{21}&A_{21}\otimes B_{22}&A_{22}\otimes B_{21}&A_{22}\otimes B_{22}\end{array}}\right]}
=
[
1
2
4
7
8
14
3
12
21
4
5
16
28
20
35
6
24
42
2
4
5
8
10
16
6
15
24
3
6
6
9
12
18
9
18
27
8
10
20
32
25
40
12
30
48
12
15
24
36
30
45
18
36
54
7
8
28
49
32
56
9
36
63
14
16
35
56
40
64
18
45
72
21
24
42
63
48
72
27
54
81
]
{\displaystyle =\left[{\begin{array}{c c | c c c c | c | c c}1&2&4&7&8&14&3&12&21\\4&5&16&28&20&35&6&24&42\\\hline 2&4&5&8&10&16&6&15&24\\3&6&6&9&12&18&9&18&27\\8&10&20&32&25&40&12&30&48\\12&15&24&36&30&45&18&36&54\\\hline 7&8&28&49&32&56&9&36&63\\\hline 14&16&35&56&40&64&18&45&72\\21&24&42&63&48&72&27&54&81\end{array}}\right]}
The Khatri-Rao product is defined as
A
∗
B
=
(
A
i
j
⊗
B
i
j
)
i
j
{\displaystyle A\ast B=(A_{ij}\otimes B_{ij})_{ij}}
in which the
(
i
j
)
{\displaystyle (ij)}
th block is the
m
i
p
i
{\displaystyle m_{i}p_{i}}
-by-
n
j
q
j
{\displaystyle n_{j}q_{j}}
-sized Kronecker product of the corresponding blocks of
A
{\displaystyle A}
and
B
{\displaystyle B}
, assuming that the 'horizontal' and 'vertical' number of subblocks of both matrices is equal. The size of the product is then
Σ
i
m
i
p
i
{\displaystyle \Sigma _{i}m_{i}p_{i}}
-by-
Σ
j
n
j
q
j
{\displaystyle \Sigma _{j}n_{j}q_{j}}
. Proceeding with the same matrices as the previous example we obtain:
A
∗
B
=
[
A
11
⊗
B
11
A
12
⊗
B
12
A
21
⊗
B
21
A
22
⊗
B
22
]
=
[
1
2
12
21
4
5
24
42
14
16
45
72
21
24
54
81
]
{\displaystyle A\ast B=\left[{\begin{array}{c | c}A_{11}\otimes B_{11}&A_{12}\otimes B_{12}\\\hline A_{21}\otimes B_{21}&A_{22}\otimes B_{22}\end{array}}\right]=\left[{\begin{array}{c c | c c}1&2&12&21\\4&5&24&42\\\hline 14&16&45&72\\21&24&54&81\end{array}}\right]}
A column-wise Kronecker product,also called the Khatri-Rao product of two matrices assumes the partitions of the matrices as their columns. In this case
m
1
=
m
{\displaystyle m_{1}=m}
,
p
1
=
p
{\displaystyle p_{1}=p}
,
n
=
q
{\displaystyle n=q}
and
∀
j
:
n
j
=
p
j
=
1
{\displaystyle \forall j:n_{j}=p_{j}=1}
. The resulting product is a
m
p
{\displaystyle mp}
-by-
n
{\displaystyle n}
matrix of which each column is the Kronecker product of the corresponding columns of
A
{\displaystyle A}
and
B
{\displaystyle B}
. We can only use the matrices from the previous examples if we change the partitions:
C
=
[
C
1
C
2
C
3
]
=
[
1
2
3
4
5
6
7
8
9
]
,
D
=
[
D
1
D
2
D
3
]
=
[
1
4
7
2
5
8
3
6
9
]
,
{\displaystyle C=\left[{\begin{array}{c | c | c}C_{1}&C_{2}&C_{3}\end{array}}\right]=\left[{\begin{array}{c | c | c}1&2&3\\4&5&6\\7&8&9\end{array}}\right],\quad D=\left[{\begin{array}{c | c | c }D_{1}&D_{2}&D_{3}\end{array}}\right]=\left[{\begin{array}{c | c | c }1&4&7\\2&5&8\\3&6&9\end{array}}\right],}
so that:
C
∗
D
=
[
C
1
⊗
D
1
C
2
⊗
D
2
C
3
⊗
D
3
]
=
[
1
8
21
2
10
24
3
12
27
4
20
42
8
25
48
12
30
54
7
32
63
14
40
72
21
48
81
]
{\displaystyle C\ast D=\left[{\begin{array}{c | c | c }C_{1}\otimes D_{1}&C_{2}\otimes D_{2}&C_{3}\otimes D_{3}\end{array}}\right]=\left[{\begin{array}{c | c | c }1&8&21\\2&10&24\\3&12&27\\4&20&42\\8&25&48\\12&30&54\\7&32&63\\14&40&72\\21&48&81\end{array}}\right]}
Horn, Roger A.; Johnson, Charles R. (1991), Topics in Matrix Analysis , Cambridge University Press, ISBN 0-521-46713-6 .
Jain, Anil K. (1989), Fundamentals of Digital Image Processing , Prentice Hall, ISBN 0-13-336165-9 .