# Kronecker product

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.

The Kronecker product is named after Leopold Kronecker, even though there is little evidence that he was the first to define and use it. The Kronecker product has also been called the *Zehfuss matrix*, after Johann Georg Zehfuss who in 1858 described this matrix operation, but Kronecker product is currently the most widely used.[1]

## Definition

If **A** is an *m* × *n* matrix and **B** is a *p* × *q* matrix, then the Kronecker product **A** ⊗ **B** is the *pm* × *qn* block matrix:

more explicitly:

More compactly, we have

Similarly Using the identity , where denotes the remainder of , this may be written in a more symmetric form

If **A** and **B** represent linear transformations **V**_{1} → **W**_{1} and **V**_{2} → **W**_{2}, respectively, then **A** ⊗ **B** represents the tensor product of the two maps, **V**_{1} ⊗ **V**_{2} → **W**_{1} ⊗ **W**_{2}.

### Examples

Similarly:

## Properties

### Relations to other matrix operations

**Bilinearity and associativity:**The Kronecker product is a special case of the tensor product, so it is bilinear and associative:

**A**,**B**and**C**are matrices,**0**is a zero matrix, and*k*is a scalar.**Non-commutative:**In general,

**A**⊗**B**and**B**⊗**A**are different matrices. However,**A**⊗**B**and**B**⊗**A**are permutation equivalent, meaning that there exist permutation matrices**P**and**Q**such that[2]If

**A**and**B**are square matrices, then**A**⊗**B**and**B**⊗**A**are even permutation similar, meaning that we can take**P**=**Q**^{T}.The matrices

**P**and**Q**are perfect shuffle matrices.[3] The perfect shuffle matrix**S**_{p,q}can be constructed by taking slices of the**I**_{r}identity matrix, where .MATLAB colon notation is used here to indicate submatrices, and

**I**_{r}is the*r*×*r*identity matrix. If and , then**The mixed-product property:**If

**A**,**B**,**C**and**D**are matrices of such size that one can form the matrix products**AC**and**BD**, thenThis is called the

*mixed-product property*, because it mixes the ordinary matrix product and the Kronecker product.In particular, using the

*transpose*property from below, this means that if**Q**and**U**are orthogonal (or unitary), then**A**is also orthogonal (resp., unitary).**Hadamard product (element-wise multiplication):**The mixed-product property also works for the element-wise product. If

**A**and**C**are matrices of the same size,**B**and**D**are matrices of the same size, then**The inverse of a Kronecker product:**It follows that

**A**⊗**B**is invertible if and only if both**A**and**B**are invertible, in which case the inverse is given byThe invertible product property holds for the Moore–Penrose pseudoinverse as well,[4] that is

In the language of Category theory, the mixed-product property of the Kronecker product (and more general tensor product) shows that the category

**Mat**_{F}of matrices over a field*F*, is in fact a monoidal category, with objects natural numbers*n*, morphisms*n*→*m*are*n*-by-*m*matrices with entries in*F*, composition is given by matrix multiplication, identity arrows are simply*n*×*n*identity matrices*I*, and the tensor product is given by the Kronecker product.[5]_{n}**Mat**_{F}is a concrete skeleton category for the equivalent category**FinVect**_{F}of finite dimensional vector spaces over*F*, whose objects are such finite dimensional vector spaces*V*, arrows are*F*-linear maps*L*:*V*→*W*, and identity arrows are the identity maps of the spaces. The equivalence of categories amounts to simultaneously choosing a basis in ever finite-dimensional vector space*V*over*F*; matrices' elements represent these mappings with respect to the chosen bases; and likewise the kronecker product is the representation of the tensor product in the chosen bases.**Transpose:**Transposition and conjugate transposition are distributive over the Kronecker product:

- and

**Determinant:**Let

**A**be an*n*×*n*matrix and let**B**be an*m*×*m*matrix. Then**A**| is the order of**B**and the exponent in |**B**| is the order of**A**.**Kronecker sum and exponentiation:**If

**A**is*n*×*n*,**B**is*m*×*m*and**I**_{k}denotes the*k*×*k*identity matrix then we can define what is sometimes called the**Kronecker sum**, ⊕, byThis is

*different*from the*direct sum*of two matrices. This operation is related to the tensor product on Lie algebras.We have the following formula for the matrix exponential, which is useful in some numerical evaluations.[6]

Kronecker sums appear naturally in physics when considering ensembles of non-interacting systems. Let

*H*be the Hamiltonian of the^{i}*i*th such system. Then the total Hamiltonian of the ensemble is- .

### Abstract properties

**Spectrum:**Suppose that

**A**and**B**are square matrices of size*n*and*m*respectively. Let*λ*_{1}, ...,*λ*_{n}be the eigenvalues of**A**and*μ*_{1}, ...,*μ*_{m}be those of**B**(listed according to multiplicity). Then the eigenvalues of**A**⊗**B**areIt follows that the trace and determinant of a Kronecker product are given by

**Singular values:**If

**A**and**B**are rectangular matrices, then one can consider their singular values. Suppose that**A**has*r*_{A}nonzero singular values, namelySimilarly, denote the nonzero singular values of

**B**byThen the Kronecker product

**A**⊗**B**has*r*_{A}*r*_{B}nonzero singular values, namelySince the rank of a matrix equals the number of nonzero singular values, we find that

**Relation to the abstract tensor product:**The Kronecker product of matrices corresponds to the abstract tensor product of linear maps. Specifically, if the vector spaces

When*V*,*W*,*X*, and*Y*have bases {*v*_{1}, ...,*v*_{m}}, {*w*_{1}, ...,*w*_{n}}, {*x*_{1}, ...,*x*_{d}}, and {*y*_{1}, ...,*y*_{e}}, respectively, and if the matrices*A*and*B*represent the linear transformations*S*:*V*→*X*and*T*:*W*→*Y*, respectively in the appropriate bases, then the matrix*A*⊗*B*represents the tensor product of the two maps,*S*⊗*T*:*V*⊗*W*→*X*⊗*Y*with respect to the basis {*v*_{1}⊗*w*_{1},*v*_{1}⊗*w*_{2}, ...,*v*_{2}⊗*w*_{1}, ...,*v*_{m}⊗*w*_{n}} of*V*⊗*W*and the similarly defined basis of*X*⊗*Y*with the property that*A*⊗*B*(*v*_{i}⊗*w*_{j}) = (*Av*_{i}) ⊗ (*Bw*_{j}), where*i*and*j*are integers in the proper range.[7]*V*and*W*are Lie algebras, and*S*:*V*→*V*and*T*:*W*→*W*are Lie algebra homomorphisms, the Kronecker sum of*A*and*B*represents the induced Lie algebra homomorphisms*V*⊗*W*→*V*⊗*W*.**Relation to products of graphs:**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.[8]

## 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 use the "vec trick" to rewrite this equation as

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 also be written as (Jain 1989, 2.8 Block Matrices and Kronecker Products) (**A** ⊗ **B**^{T})**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. This formula is also useful for representing 2D image processing operations in matrix-vector form.

Another example is when a matrix can be factored as a Hadamard product, then matrix multiplication can be performed faster by using the above formula. This can be applied recursively, as done in the radix-2 FFT and the Fast Walsh–Hadamard transform. Splitting a known matrix into the Hadamard product of two smaller matrices is known as the "nearest Kronecker Product" problem, and can be solved exactly[9] by using the SVD. To split a matrix into the Hadamard product of more than two matrices, in an optimal fashion, is a difficult problem and the subject of ongoing research; some authors cast it as a tensor decomposition problem.[10][11]

In conjunction with the least squares method, the Kronecker product can be used as an accurate solution to the hand eye calibration problem.[12]

## Related matrix operations

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 *m*_{i} × *n*_{j} blocks **A**_{ij} and *p* × *q* matrix **B** into the *p _{k}* ×

*q*blocks

_{ℓ}**B**

_{kl}with of course Σ

*=*

_{i}m_{i}*m*, Σ

*=*

_{j}n_{j}*n*, Σ

*=*

_{k}p_{k}*p*and Σ

*=*

_{ℓ}q_{ℓ}*q*.

### Tracy–Singh product

The **Tracy–Singh product** is defined as[13][14]

which means that the (*ij*)-th subblock of the *mp* × *nq* product **A** **B** is the *m _{i} p* ×

*n*matrix

_{j}q**A**

_{ij}

**B**, of which the (

*kℓ*)-th subblock equals the

*m*×

_{i}p_{k}*n*matrix

_{j}q_{ℓ}**A**

_{ij}⊗

**B**

_{kℓ}. 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.:

we get:

### Khatri–Rao product

The **Khatri–Rao product**
is defined as[15][16]

in which the *ij*-th block is the *m _{i}p_{i}* ×

*n*sized Kronecker product of the corresponding blocks of

_{j}q_{j}**A**and

**B**, assuming the number of row and column partitions of both matrices is equal. The size of the product is then (Σ

*) × (Σ*

_{i}m_{i}p_{i}*). Proceeding with the same matrices as the previous example we obtain:*

_{j}n_{j}q_{j}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) and also may be called the block Kronecker 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 *m*_{1} = *m*, *p*_{1} = *p*, *n* = *q* and for each *j*: *n _{j}* =

*p*= 1. The resulting product is a

_{j}*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:

so that:

This column-wise version of the Khatri-Rao product is useful in linear algebra approaches to data analytical processing[17] and in optimizing the solution of inverse problems dealing with a diagonal matrix.[18][19]

The alternative concept of the matrix product, which uses row-wise splitting of matrices with a given quantity of rows, was proposed by V. Slyusar in 1996.[20][21][22]

This matrix operation was named the "face-splitting product" of matrices or the "transposed Khatri-Rao product". This type of operation is based on row-by-row Kronecker products of two matrices. Using the matrices from the previous examples with the rows partitioned:

can be get:

#### Main properties

**Transpose:**[20]**The mixed-product property:**[21][23]- ,

where denotes the Hadamard product.

- .

## See also

## Notes

- G. Zehfuss (1858), "Ueber eine gewisse Determinante",
*Zeitschrift für Mathematik und Physik*,**3**: 298–301. - H. V. Henderson; S. R. Searle (1980). "The vec-permutation matrix, the vec operator and Kronecker products: A review" (PDF).
*Linear and Multilinear Algebra*.**9**(4): 271–288. doi:10.1080/03081088108817379. hdl:1813/32747. - Charles F. Van Loan (2000). "The ubiquitous Kronecker product".
*Journal of Computational and Applied Mathematics*.**123**(1–2): 85–100. doi:10.1016/s0377-0427(00)00393-9. - Langville, Amy N.; Stewart, William J. (June 1, 2004). "The Kronecker product and stochastic automata networks".
*Journal of Computational and Applied Mathematics*.**167**(2): 429–447. doi:10.1016/j.cam.2003.10.010. - MacEdo, Hugo Daniel; Oliveira, José Nuno (2013). "Typing linear algebra: A biproduct-oriented approach".
*Science of Computer Programming*.**78**(11): 2160–2191. CiteSeerX 10.1.1.747.2083. doi:10.1016/j.scico.2012.07.012. - J. W. Brewer (1969). "A Note on Kronecker Matrix Products and Matrix Equation Systems".
*SIAM Journal on Applied Mathematics*.**17**(3): 603–606. doi:10.1137/0117057. - Dummit, David S.; Foote, Richard M. (1999).
*Abstract Algebra*(2 ed.). New York: John Wiley and Sons. pp. 401–402. ISBN 978-0-471-36857-1. - See answer to Exercise 96, D. E. Knuth: "Pre-Fascicle 0a: Introduction to Combinatorial Algorithms", zeroth printing (revision 2), to appear as part of D.E. Knuth:
*The Art of Computer Programming Vol. 4A* - Van Loan, C; Pitsianis, N (1992).
*Approximation with Kronecker Products*. Ithaca, NY: Cornell University. - Kronecker product approximation with multiple factor matrices via the tensor product algorithm, Wu et al., 2016 IEEE International Conference on Systems, Man, and Cybernetics (SMC)
- Learning fast dictionaries for sparse representations using low-rank tensor decompositions, Dantas et al., LVA/ICA 2018 - 14th International Conference on Latent Variable Analysis and Signal Separation, Jul 2018, Guildford, United Kingdom. pp.456-466, ff10.1007/978-3-319-93764-9_42
- Algo Li, et al. "Simultaneous robot-world and hand-eye calibration using dual-quaternions and Kronecker product." International Journal of the Physical Sciences Vol. 5(10), pp. 1530-1536, 4 September 2010.
- Tracy, D. S.; Singh, R. P. (1972). "A New Matrix Product and Its Applications in Matrix Differentiation".
*Statistica Neerlandica*.**26**(4): 143–157. doi:10.1111/j.1467-9574.1972.tb00199.x. - Liu, S. (1999). "Matrix Results on the Khatri–Rao and Tracy–Singh Products".
*Linear Algebra and Its Applications*.**289**(1–3): 267–277. doi:10.1016/S0024-3795(98)10209-4. - Khatri C. G., C. R. Rao (1968). "Solutions to some functional equations and their applications to characterization of probability distributions".
*Sankhya*.**30**: 167–180. - Zhang X; Yang Z; Cao C. (2002), "Inequalities involving Khatri–Rao products of positive semi-definite matrices",
*Applied Mathematics E-notes*,**2**: 117–124 - See e.g. H.D. Macedo and J.N. Oliveira. A linear algebra approach to OLAP. Formal Aspects of Computing, 27(2):283–307, 2015.
- Lev-Ari, Hanoch (2005-01-01). "Efficient Solution of Linear Matrix Equations with Application to Multistatic Antenna Array Processing".
*Communications in Information & Systems*.**05**(1): 123–130. doi:10.4310/CIS.2005.v5.n1.a5. ISSN 1526-7555. - Masiero, B.; Nascimento, V. H. (2017-05-01). "Revisiting the Kronecker Array Transform".
*IEEE Signal Processing Letters*.**24**(5): 525–529. doi:10.1109/LSP.2017.2674969. ISSN 1070-9908. - Slyusar, V. I. (1997-05-20). "Analytical model of the digital antenna array on a basis of face-splitting matrix products" (PDF).
*Proc. ICATT- 97, Kyiv*: 108–109. - Slyusar, V. I. (1999). "A Family of Face Products of Matrices and its Properties" (PDF).
*Cybernetics and Systems Analysis C/C of Kibernetika I Sistemnyi Analiz*.**35**(3): 379–384. doi:10.1007/BF02733426. - Slyusar, V. I. (2003). "Generalized face-products of matrices in models of digital antenna arrays with nonidentical channels" (PDF).
*Radioelectronics and Communications Systems*.**46**(10): 9–17. - Slyusar, V. I. (1997-09-15). "New operations of matrices product for applications of radars" (PDF).
*Proc. Direct and Inverse Problems of Electromagnetic and Acoustic Wave Theory (DIPED-97), Lviv.*: 73–74.

## References

- Horn, Roger A.; Johnson, Charles R. (1991),
*Topics in Matrix Analysis*, Cambridge University Press, ISBN 978-0-521-46713-1. - Jain, Anil K. (1989),
*Fundamentals of Digital Image Processing*, Prentice Hall, ISBN 978-0-13-336165-0. - Steeb, Willi-Hans (1997),
*Matrix Calculus and Kronecker Product with Applications and C++ Programs*, World Scientific Publishing, ISBN 978-981-02-3241-2 - Steeb, Willi-Hans (2006),
*Problems and Solutions in Introductory and Advanced Matrix Calculus*, World Scientific Publishing, ISBN 978-981-256-916-5

## External links

- Hazewinkel, Michiel, ed. (2001) [1994], "Tensor product",
*Encyclopedia of Mathematics*, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4 - "Kronecker product".
*PlanetMath*. - MathWorld Kronecker Product
- New Kronecker product problems
- Earliest Uses: The entry on The Kronecker, Zehfuss or Direct Product of matrices has historical information.
- Generic C++ and Fortran 90 codes for calculating Kronecker products of two matrices.
- RosettaCode Kronecker Product (in more than 30 languages).