Harman Patil (Editor)

Kronecker product

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In mathematics, the Kronecker product, denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a generalization of the outer product (which is denoted by the same symbol) from vectors to matrices, and gives the matrix of the tensor product with respect to a standard choice of basis. The Kronecker product should not be confused with the usual matrix multiplication, which is an entirely different operation.

Contents

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 who in 1858 described the matrix operation we now know as the Kronecker product.

Definition

If A is an m × n matrix and B is a p × q matrix, then the Kronecker product AB is the mp × nq block matrix:

A B = [ a 11 B a 1 n B a m 1 B a m n B ] ,

more explicitly:

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 ] .

More compactly, we have ( A B ) p ( r 1 ) + v , q ( s 1 ) + w = a r s b v w

If A and B represent linear transformations V1W1 and V2W2, respectively, then AB represents the tensor product of the two maps, V1V2W1W2.

Example

[ 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 ] .

Matrix equations

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 T A ) vec ( X ) = vec ( A X B ) = vec ( C ) .

Here, vec(X) denotes the vectorization of the matrix X formed by stacking the columns of X into a single column vector. 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).

If X is row-ordered into the column vector x then AXB can be also be written as (Jain 1989, 2.8 Block Matrices and Kronecker Products) (ABT)x.

Applications

For an example of the application of this formula, see the article on the Lyapunov equation. This formula also comes in handy in showing that the matrix normal distribution is a special case of the multivariate normal distribution.

Two related matrix operations are the Tracy–Singh and Khatri–Rao products which operate on partitioned matrices. Let the m × n matrix A be partitioned into the mi × nj blocks Aij and p × q matrix B into the pk × q blocks Bkl with of course Σi mi = m, Σj nj = n, Σk pk = p and Σ q = q.

Tracy–Singh product

The Tracy–Singh product is defined as

A B = ( A i j B ) i j = ( ( A i j B k l ) k l ) i j

which means that the (ij)-th subblock of the mp × nq product AB is the mi p × nj q matrix AijB, of which the (kℓ)-th subblock equals the mi pk × nj q matrix AijBkℓ. Essentially the Tracy–Singh product is the pairwise Kronecker product for each pair of partitions in the two matrices.

For example, if A and B both are 2 × 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 ] ,

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 ] = [ 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 ] .

Khatri–Rao product

The Khatri–Rao product is defined as

A B = ( A i j B i j ) i j

in which the ij-th block is the mipi × njqj sized Kronecker product of the corresponding blocks of A and B, assuming the number of row and column partitions of both matrices is equal. The size of the product is then i mipi) × (Σj njqj). 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 ] .

This is a submatrix of the Tracy–Singh product of the two matrices (each partition in this example is a partition in a corner of the Tracy–Singh product).


A column-wise Kronecker product of two matrices may also be called the Khatri–Rao product. This product assumes the partitions of the matrices are their columns. In this case m1 = m, p1 = p, n = q and for each j: nj = pj = 1. The resulting product is a mp × n matrix of which each column is the Kronecker product of the corresponding columns of A and B. Using the matrices from the previous examples with the columns partitioned:

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 ] ,

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 ] .

This column-wise version of the Khatri-Rao product is useful in linear algebra approaches to data analytical processing.

References

Kronecker product Wikipedia