From Surf Wiki (app.surf) — the open knowledge base
Kronecker product
Mathematical operation on matrices
Mathematical operation on matrices
In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a specialization of the tensor product (which is denoted by the same symbol) from vectors to matrices and gives the matrix of the tensor product linear map with respect to a standard choice of basis. The Kronecker product is to be distinguished from the usual matrix multiplication, which is an entirely different operation. The Kronecker product is also sometimes called matrix direct product. |access-date=2020-09-06
The Kronecker product is named after the German mathematician Leopold Kronecker (1823–1891), 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, and the Zehfuss product, after , who in 1858 described this matrix operation, but Kronecker product is currently the most widely used term. The misattribution to Kronecker rather than Zehfuss was due to Kurt Hensel.
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:
: \mathbf{A}\otimes\mathbf{B} = \begin{bmatrix} a_{11} \mathbf{B} & \cdots & a_{1n}\mathbf{B} \ \vdots & \ddots & \vdots \ a_{m1} \mathbf{B} & \cdots & a_{mn} \mathbf{B} \end{bmatrix},
more explicitly:
: {\mathbf{A}\otimes\mathbf{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}.
Using /!/ and % to denote truncating integer division and remainder, respectively, and numbering the matrix elements starting from 0, one obtains : (A\otimes B){pr+v, qs+w} = a{rs} b_{vw} : (A\otimes B){i, j} = a{i /!/ p, j /!/ q} b_{i %p, j % q}. For the usual numbering starting from 1, one obtains : (A\otimes B){p(r-1)+v, q(s-1)+w} = a{rs} b_{vw} : (A\otimes B){i, j} = a{\lceil i/p \rceil,\lceil j/q \rceil} b_{(i-1)%p +1, (j-1)%q + 1}.
If A and B represent linear transformations V1 → W1 and V2 → W2, respectively, then the tensor product of the two maps is a map V1 ⊗ V2 → W1 ⊗ W2 represented by A ⊗ B.
Examples
: \begin{bmatrix} 1 & 2 \ 3 & 4 \ \end{bmatrix} \otimes \begin{bmatrix} 0 & 5 \ 6 & 7 \ \end{bmatrix} = \begin{bmatrix} 1 \begin{bmatrix} 0 & 5 \ 6 & 7 \ \end{bmatrix} & 2 \begin{bmatrix} 0 & 5 \ 6 & 7 \ \end{bmatrix} \
3 \begin{bmatrix} 0 & 5 \ 6 & 7 \ \end{bmatrix} & 4 \begin{bmatrix} 0 & 5 \ 6 & 7 \ \end{bmatrix} \ \end{bmatrix} =
\left[\begin{array}{cc|cc} 1\times 0 & 1\times 5 & 2\times 0 & 2\times 5 \ 1\times 6 & 1\times 7 & 2\times 6 & 2\times 7 \ \hline 3\times 0 & 3\times 5 & 4\times 0 & 4\times 5 \ 3\times 6 & 3\times 7 & 4\times 6 & 4\times 7 \ \end{array}\right] =
\left[\begin{array}{cc|cc} 0 & 5 & 0 & 10 \ 6 & 7 & 12 & 14 \ \hline 0 & 15 & 0 & 20 \ 18 & 21 & 24 & 28 \end{array}\right].
Similarly:
: \begin{bmatrix} 1 & -4 & 7 \ -2 & 3 & 3 \end{bmatrix} \otimes \begin{bmatrix} 8 & -9 & -6 & 5 \ 1 & -3 & -4 & 7 \ 2 & 8 & -8 & -3 \ 1 & 2 & -5 & -1 \end{bmatrix} = \left[\begin{array}{cccc|cccc|cccc} 8 & -9 & -6 & 5 & -32 & 36 & 24 & -20 & 56 & -63 & -42 & 35 \ 1 & -3 & -4 & 7 & -4 & 12 & 16 & -28 & 7 & -21 & -28 & 49 \ 2 & 8 & -8 & -3 & -8 & -32 & 32 & 12 & 14 & 56 & -56 & -21 \ 1 & 2 & -5 & -1 & -4 & -8 & 20 & 4 & 7 & 14 & -35 & -7 \ \hline -16 & 18 & 12 & -10 & 24 & -27 & -18 & 15 & 24 & -27 & -18 & 15 \ -2 & 6 & 8 & -14 & 3 & -9 & -12 & 21 & 3 & -9 & -12 & 21 \ -4 & -16 & 16 & 6 & 6 & 24 & -24 & -9 & 6 & 24 & -24 & -9 \ -2 & -4 & 10 & 2 & 3 & 6 & -15 & -3 & 3 & 6 & -15 & -3 \end{array}\right]
Properties
Relations to other matrix operations
The Kronecker product is a special case of the tensor product, so it is bilinear and associative:
: \begin{align} \mathbf{A} \otimes (\mathbf{B} + \mathbf{C}) &= \mathbf{A} \otimes \mathbf{B} + \mathbf{A} \otimes \mathbf{C}, \ (\mathbf{B} + \mathbf{C}) \otimes \mathbf{A} &= \mathbf{B} \otimes \mathbf{A} + \mathbf{C} \otimes \mathbf{A}, \ (k\mathbf{A}) \otimes \mathbf{B} &= \mathbf{A} \otimes (k\mathbf{B}) = k(\mathbf{A} \otimes \mathbf{B}), \ (\mathbf{A} \otimes \mathbf{B}) \otimes \mathbf{C} &= \mathbf{A} \otimes (\mathbf{B} \otimes \mathbf{C}), \ \mathbf{A} \otimes \mathbf{0} &= \mathbf{0} \otimes \mathbf{A} = \mathbf{0}, \end{align}
where A, B and C are matrices, 0 is a zero matrix, and k is a scalar.
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 | hdl-access = free : \mathbf{B} \otimes \mathbf{A} = \mathbf{P} , \left(\mathbf{A} \otimes \mathbf{B}\right) , \mathbf{Q}. If A and B are square, then A ⊗ B and B ⊗ A are even permutation similar, meaning that we can take .
The matrices P and Q are perfect shuffle matrices, called the "commutation" matrix. The Commutation matrix Sp, q can be constructed by taking slices of the Ir identity matrix, where r=pq.
: \mathbf{S}_{p,q} = \begin{bmatrix} \mathbf{I}_r(1:q:r,:) \ \mathbf{I}_r(2:q:r,:) \ \vdots \ \mathbf{I}_r(q:q:r,:) \end{bmatrix}
MATLAB colon notation is used here to indicate submatrices, and Ir is the r × r identity matrix. If \mathbf{A} \in \mathbb{R}^{m_1 \times n_1} and \mathbf{B} \in \mathbb{R}^{m_2 \times n_2}, then
: \mathbf{B} \otimes \mathbf{A} = \mathbf{S}{m_1,m_2} (\mathbf{A} \otimes \mathbf{B}) \mathbf{S}^\textsf{T}{n_1,n_2}
If A, B, C and D are matrices of such size that one can form the matrix products AC and BD, then{{Cite journal| last1=Liu|first1=Shuangzhe| last2= Trenkler|first2=Götz| last3=Kollo|first3=Tõnu| last4=von Rosen|first4=Dietrich| last5=Baksalary|first5=Oskar Maria| date= 2023| title= Professor Heinz Neudecker and matrix differential calculus| journal= Statistical Papers|volume=65 |issue=4 |pages=2605–2639 | language=en| doi= 10.1007/s00362-023-01499-w}} : (\mathbf{A} \otimes \mathbf{B})(\mathbf{C} \otimes \mathbf{D}) = (\mathbf{AC}) \otimes (\mathbf{BD}).
This is called the mixed-product property, because it mixes the ordinary matrix product and the Kronecker product.
As an immediate consequence (again, taking \mathbf{A} \in \mathbb{R}^{m_1 \times n_1} and \mathbf{B} \in \mathbb{R}^{m_2 \times n_2}),
: \mathbf{A} \otimes \mathbf{B} = (\mathbf{I}{m_1} \otimes \mathbf{B} )(\mathbf{A} \otimes \mathbf{I}{n_2}) = (\mathbf{A} \otimes \mathbf{I}{m_2} )(\mathbf{I}{n_1} \otimes \mathbf{B}) .
In particular, using the transpose property from below, this means that if : \mathbf{A} = \mathbf{Q} \otimes \mathbf{U} and Q and U are orthogonal (or unitary), then A is also orthogonal (resp., unitary).
The mixed Kronecker matrix-vector product can be written as:
: \left( \mathbf{A} \otimes \mathbf{B} \right) \operatorname{vec} \left( \mathbf{V} \right) = \operatorname{vec} (\mathbf{B} \mathbf{V} \mathbf{A}^T)
where \operatorname{vec}(\mathbf{V}) is the vectorization operator applied on \mathbf{V} (formed by reshaping the matrix).
If \mathbf{A} and \mathbf{C} are square matrices of the dimension m, and \mathbf{B} and \mathbf{D} are square matrices of the dimension n, then the commutator : [\mathbf{A} \otimes \mathbf{B},\mathbf{C} \otimes \mathbf{D}]=[\mathbf{A},\mathbf{C}]\otimes (\mathbf{B}\mathbf{D}) + (\mathbf{C}\mathbf{A}) \otimes [\mathbf{B},\mathbf{D}], or : [\mathbf{A} \otimes \mathbf{B},\mathbf{C} \otimes \mathbf{D}]=[\mathbf{A},\mathbf{C}]\otimes (\mathbf{D}\mathbf{B}) + (\mathbf{A}\mathbf{C}) \otimes [\mathbf{B},\mathbf{D}].
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 : (\mathbf{A} \otimes \mathbf{B}) \circ (\mathbf{C} \otimes \mathbf{D}) = (\mathbf{A} \circ \mathbf{C}) \otimes (\mathbf{B} \circ \mathbf{D}).
It follows that A ⊗ B is invertible if and only if both A and B are invertible, in which case the inverse is given by : (\mathbf{A} \otimes \mathbf{B})^{-1} = \mathbf{A}^{-1} \otimes \mathbf{B}^{-1}.
The invertible product property holds for the Moore–Penrose pseudoinverse as well, that is : (\mathbf{A} \otimes \mathbf{B})^{+} = \mathbf{A}^{+} \otimes \mathbf{B}^{+}.
In the language of Category theory, the mixed-product property of the Kronecker product (and more general tensor product) shows that the category MatF of matrices over a field F, is in fact a monoidal category, with objects natural numbers n, morphisms n → m are n × m matrices with entries in F, composition is given by matrix multiplication, identity arrows are simply n × n identity matrices In, and the tensor product is given by the Kronecker product.
MatF is a concrete skeleton category for the equivalent category FinVectF 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 every 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.
Transposition and conjugate transposition are distributive over the Kronecker product: : (\mathbf{A}\otimes \mathbf{B})^\textsf{T} = \mathbf{A}^\textsf{T} \otimes \mathbf{B}^\textsf{T} and (\mathbf{A}\otimes \mathbf{B})^* = \mathbf{A}^* \otimes \mathbf{B}^*.
Let A be an n × n matrix and let B be an m × m matrix. Then : \left| \mathbf{A} \otimes \mathbf{B} \right| = \left| \mathbf{A} \right| ^m \left| \mathbf{B} \right| ^n . The exponent in is the order of B and the exponent in is the order of A.
If A is n × n, B is m × m, and Ik denotes the k × k identity matrix then we can define what is sometimes called the Kronecker sum, , by : \mathbf{A},\overline{\oplus},\mathbf{B} = \mathbf{A} \otimes \mathbf{I}_m + \mathbf{I}_n \otimes \mathbf{B} .
This is different from the direct sum of two matrices. This operation is related to the tensor product on Lie algebras, as detailed below (#Abstract properties) in the point "Relation to the abstract tensor product".
We have the following formula for the matrix exponential, which is useful in some numerical evaluations.
: \exp({\mathbf{N},\overline{\oplus},\mathbf{M}}) = \exp(\mathbf{N}) \otimes \exp(\mathbf{M})
Kronecker sums appear naturally in physics when considering ensembles of non-interacting systems.
If Hr is the Hamiltonian of the rth such system. Then the total Hamiltonian of the ensemble is : H_{\operatorname{Tot}}=\overline{\bigoplus_r} H^r . Let A be an m\times n matrix and B a p \times q matrix. When the order of the Kronecker product and vectorization is interchanged, the two operations can be linked linearly through a function that involves the commutation matrix, K_{qm} . That is, \operatorname{vec}(\operatorname{Kron}(A, B)) and \operatorname{Kron}(\operatorname{vec}A,\operatorname{vec}B) have the following relationship:
: \operatorname{vec}(A\otimes B) = (I_n \otimes K_{qm}\otimes I_p)(\operatorname{vec}A \otimes \operatorname{vec}B).
Furthermore, the above relation can be rearranged in terms of either \operatorname{vec}A or \operatorname{vec}B as follows:
: \operatorname{vec}(A\otimes B)= (I_n \otimes G)\operatorname{vec}A = (H\otimes I_p)\operatorname{vec}B,
where : G = (K_{qm}\otimes I_p)(I_m \otimes \operatorname{vec}B) \text{ and } H=(I_n\otimes K_{qm})(\operatorname{vec}A \otimes I_q). If x \in \mathbb{R}^n and y \in \mathbb{R}^m are arbitrary vectors, then the outer product between x and y is defined as xy^T. The Kronecker product is related to the outer product by: y\otimes x = \operatorname{vec}(xy^T).
Abstract properties
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 are : \lambda_i \mu_j, \qquad i=1,\ldots,n ,, j=1,\ldots,m.
It follows that the trace and determinant of a Kronecker product are given by : \operatorname{tr}(\mathbf{A} \otimes \mathbf{B}) = \operatorname{tr} \mathbf{A} , \operatorname{tr} \mathbf{B} \quad\text{and}\quad \det(\mathbf{A} \otimes \mathbf{B}) = (\det \mathbf{A})^m (\det \mathbf{B})^n.
If A and B are rectangular matrices, then one can consider their singular values. Suppose that A has rA nonzero singular values, namely : \sigma_{\mathbf{A},i}, \qquad i = 1, \ldots, r_\mathbf{A}.
Similarly, denote the nonzero singular values of B by : \sigma_{\mathbf{B},i}, \qquad i = 1, \ldots, r_\mathbf{B}.
Then the Kronecker product A ⊗ B has rArB nonzero singular values, namely : \sigma_{\mathbf{A},i} \sigma_{\mathbf{B},j}, \qquad i=1,\ldots,r_\mathbf{A} ,, j=1,\ldots,r_\mathbf{B}.
Since the rank of a matrix equals the number of nonzero singular values, we find that : \operatorname{rank}(\mathbf{A} \otimes \mathbf{B}) = \operatorname{rank} \mathbf{A} , \operatorname{rank} \mathbf{B}.
The Kronecker product of matrices corresponds to the abstract tensor product of linear maps. Specifically, if the vector spaces V, W, X, and Y have bases {v1, ..., v**m}, {w1, ..., w**n}, {x1, ..., x**d}, and {y1, ..., 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 {v1 ⊗ w1, v1 ⊗ w2, ..., v2 ⊗ w1, ..., v**m ⊗ w**n} of V ⊗ W and the similarly defined basis of X ⊗ Y with the property that , where i and j are integers in the proper range.
When 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.
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 {{cite web |access-date=2007-10-24 |archive-date=2019-05-13 |archive-url=https://web.archive.org/web/20190513215832/http://www-cs-faculty.stanford.edu/~knuth/fasc0a.ps.gz |url-status=dead
Matrix equations
The Kronecker product can be used to get a convenient representation for some matrix equations. Consider for instance the equation , 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 : \left(\mathbf{B}^\textsf{T} \otimes \mathbf{A}\right) , \operatorname{vec}(\mathbf{X}) = \operatorname{vec}(\mathbf{AXB}) = \operatorname{vec}(\mathbf{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 has a unique solution, if and only if A and B are invertible .
If X and C are row-ordered into the column vectors u and v, respectively, then : \mathbf{v} = \left(\mathbf{A} \otimes \mathbf{B}^\textsf{T}\right)\mathbf{u} .
The reason is that : \mathbf{v} = \operatorname{vec}\left((\mathbf{AXB})^\textsf{T}\right) = \operatorname{vec}\left(\mathbf{B}^\textsf{T}\mathbf{X}^\textsf{T}\mathbf{A}^\textsf{T}\right) = \left(\mathbf{A} \otimes \mathbf{B}^\textsf{T}\right)\operatorname{vec}\left(\mathbf{X^\textsf{T}}\right) = \left(\mathbf{A} \otimes \mathbf{B}^\textsf{T}\right)\mathbf{u} .
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 Kronecker 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 Kronecker product of two smaller matrices is known as the "nearest Kronecker product" problem, and can be solved exactly by using the SVD. To split a matrix into the Kronecker 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. |chapter-url=https://hal.inria.fr/hal-01709343v2/document
In conjunction with the least squares method, the Kronecker product can be used as an accurate solution to the hand–eye calibration problem. |display-authors=etal
Notes
References
- {{cite book
- {{cite book
- {{cite book
- {{cite book
- {{Citation |author1=Liu, Shuangzhe|author2=Trenkler, Götz| year = 2008
References
- (1983). "On the history of the kronecker product". Linear and Multilinear Algebra.
- Sayed, Ali H.. (2022-12-22). "Inference and Learning from Data: Foundations". Cambridge University Press.
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Kronecker product — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report