Kronecker product

From Wikipedia, the free encyclopedia
(Redirected from Kronecker sum)
Jump to navigation Jump to search

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

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 Johann Georg Zehfuss (de), who in 1858 described this matrix operation, but Kronecker product is currently the most widely used term.[2][3] The misattribution to Kronecker rather than Zehfuss was due to Kurt Hensel.[4]

Definition

[edit | edit source]

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

𝐀𝐁=[a11𝐁a1n𝐁am1𝐁amn𝐁],

more explicitly:

𝐀𝐁=[a11b11a11b12a11b1qa1nb11a1nb12a1nb1qa11b21a11b22a11b2qa1nb21a1nb22a1nb2qa11bp1a11bp2a11bpqa1nbp1a1nbp2a1nbpqam1b11am1b12am1b1qamnb11amnb12amnb1qam1b21am1b22am1b2qamnb21amnb22amnb2qam1bp1am1bp2am1bpqamnbp1amnbp2amnbpq].

Using // and % to denote truncating integer division and remainder, respectively, and numbering the matrix elements starting from 0, one obtains

(AB)pr+v,qs+w=arsbvw
(AB)i,j=ai//p,j//qbi%p,j%q.

For the usual numbering starting from 1, one obtains

(AB)p(r1)+v,q(s1)+w=arsbvw
(AB)i,j=ai/p,j/qb(i1)%p+1,(j1)%q+1.

If A and B represent linear transformations V1W1 and V2W2, respectively, then the tensor product of the two maps is a map V1V2W1W2 represented by AB.

Examples

[edit | edit source]
[1234][0567]=[1[0567]2[0567]3[0567]4[0567]]=[1×01×52×02×51×61×72×62×73×03×54×04×53×63×74×64×7]=[0501067121401502018212428].

Similarly:

[147233][8965134728831251]=[89653236242056634235134741216287212849288383232121456562112514820471435716181210242718152427181526814391221391221416166624249624249241023615336153]

Properties

[edit | edit source]

Relations to other matrix operations

[edit | edit source]
  1. Bilinearity and associativity:

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

    𝐀(𝐁+𝐂)=𝐀𝐁+𝐀𝐂,(𝐁+𝐂)𝐀=𝐁𝐀+𝐂𝐀,(k𝐀)𝐁=𝐀(k𝐁)=k(𝐀𝐁),(𝐀𝐁)𝐂=𝐀(𝐁𝐂),𝐀𝟎=𝟎𝐀=𝟎,
    where A, B and C are matrices, 0 is a zero matrix, and k is a scalar.
  2. Non-commutative:

    In general, AB and BA are different matrices. However, AB and BA are permutation equivalent, meaning that there exist permutation matrices P and Q such that[5]

    𝐁𝐀=𝐏(𝐀𝐁)𝐐.

    If A and B are square, then AB and BA are even permutation similar, meaning that we can take P = QT.

    The matrices P and Q are perfect shuffle matrices, called the "commutation" matrix.[6] The Commutation matrix Spq can be constructed by taking slices of the Ir identity matrix, where r=pq.

    𝐒p,q=[𝐈r(1:q:r,:)𝐈r(2:q:r,:)𝐈r(q:q:r,:)]

    MATLAB colon notation is used here to indicate submatrices, and Ir is the r × r identity matrix. If 𝐀m1×n1 and 𝐁m2×n2, then

    𝐁𝐀=𝐒m1,m2(𝐀𝐁)𝐒n1,n2𝖳
  3. 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, then[7]

    (𝐀𝐁)(𝐂𝐃)=(𝐀𝐂)(𝐁𝐃).

    This is called the mixed-product property, because it mixes the ordinary matrix product and the Kronecker product.

    As an immediate consequence (again, taking 𝐀m1×n1 and 𝐁m2×n2),

    𝐀𝐁=(𝐈m1𝐁)(𝐀𝐈n2)=(𝐀𝐈m2)(𝐈n1𝐁).

    In particular, using the transpose property from below, this means that if

    𝐀=𝐐𝐔

    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:

    (𝐀𝐁)vec(𝐕)=vec(𝐁𝐕𝐀T)
    where vec(𝐕) is the vectorization operator applied on 𝐕 (formed by reshaping the matrix).
  4. Commutator property:

    If 𝐀 and 𝐂 are square matrices of the dimension m, and 𝐁 and 𝐃 are square matrices of the dimension n, then the commutator

    [𝐀𝐁,𝐂𝐃]=[𝐀,𝐂](𝐁𝐃)+(𝐂𝐀)[𝐁,𝐃],

    or

    [𝐀𝐁,𝐂𝐃]=[𝐀,𝐂](𝐃𝐁)+(𝐀𝐂)[𝐁,𝐃].
  5. 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[7]

    (𝐀𝐁)(𝐂𝐃)=(𝐀𝐂)(𝐁𝐃).
  6. The inverse of a Kronecker product:

    It follows that AB is invertible if and only if both A and B are invertible, in which case the inverse is given by

    (𝐀𝐁)1=𝐀1𝐁1.

    The invertible product property holds for the Moore–Penrose pseudoinverse as well,[7][8] 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 MatF of matrices over a field F, is in fact a monoidal category, with objects natural numbers n, morphisms nm 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.[9]

    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 : VW, 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.
  7. Transpose:

    Transposition and conjugate transposition are distributive over the Kronecker product:

    (𝐀𝐁)𝖳=𝐀𝖳𝐁𝖳 and (𝐀𝐁)*=𝐀*𝐁*.
  8. Determinant:

    Let A be an n × n matrix and let B be an m × m matrix. Then

    |𝐀𝐁|=|𝐀|m|𝐁|n.
    The exponent in |A| is the order of B and the exponent in |B| is the order of A.
  9. Kronecker sum and exponentiation:

    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

    𝐀𝐁=𝐀𝐈m+𝐈n𝐁.

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

    exp(𝐍𝐌)=exp(𝐍)exp(𝐌)

    Kronecker sums appear naturally in physics when considering ensembles of non-interacting systems.[citation needed] Let Hk be the Hamiltonian of the kth such system. Then the total Hamiltonian of the ensemble is

    HTot=kHk.
  10. Vectorization of a Kronecker product:

    Let A be an m×n matrix and B a p×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, Kqm. That is, vec(Kron(A,B)) and Kron(vecA,vecB) have the following relationship:

    vec(AB)=(InKqmIp)(vecAvecB).

    Furthermore, the above relation can be rearranged in terms of either vecA or vecB as follows:

    vec(AB)=(InG)vecA=(HIp)vecB,

    where

    G=(KqmIp)(ImvecB) and H=(InKqm)(vecAIq).
  11. Outer Product:
    If xn and ym are arbitrary vectors, then the outer product between x and y is defined as xyT. The Kronecker product is related to the outer product by: yx=vec(xyT).

Abstract properties

[edit | edit source]
  1. 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 AB are

    λiμj,i=1,,n,j=1,,m.

    It follows that the trace and determinant of a Kronecker product are given by

    tr(𝐀𝐁)=tr𝐀tr𝐁anddet(𝐀𝐁)=(det𝐀)m(det𝐁)n.
  2. Singular values:

    If A and B are rectangular matrices, then one can consider their singular values. Suppose that A has rA nonzero singular values, namely

    σ𝐀,i,i=1,,r𝐀.

    Similarly, denote the nonzero singular values of B by

    σ𝐁,i,i=1,,r𝐁.

    Then the Kronecker product AB has rArB nonzero singular values, namely

    σ𝐀,iσ𝐁,j,i=1,,r𝐀,j=1,,r𝐁.

    Since the rank of a matrix equals the number of nonzero singular values, we find that

    rank(𝐀𝐁)=rank𝐀rank𝐁.
  3. 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 V, W, X, and Y have bases {v1, ..., vm}, {w1, ..., wn}, {x1, ..., xd}, and {y1, ..., ye}, respectively, and if the matrices A and B represent the linear transformations S : VX and T : WY, respectively in the appropriate bases, then the matrix AB represents the tensor product of the two maps, ST : VWXY with respect to the basis {v1w1, v1w2, ..., v2w1, ..., vmwn} of VW and the similarly defined basis of XY with the property that AB(viwj) = (Avi) ⊗ (Bwj), where i and j are integers in the proper range.[11]

    When V and W are Lie algebras, and S : VV and T : WW are Lie algebra homomorphisms, the Kronecker sum of A and B represents the induced Lie algebra homomorphisms VWVW.[citation needed]
  4. 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.[12]

Matrix equations

[edit | edit source]

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

(𝐁𝖳𝐀)vec(𝐗)=vec(𝐀𝐗𝐁)=vec(𝐂).

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 invertible (Horn & Johnson 1991, Lemma 4.3.1).

If X and C are row-ordered into the column vectors u and v, respectively, then (Jain 1989, 2.8 Block Matrices and Kronecker Products)

𝐯=(𝐀𝐁𝖳)𝐮.

The reason is that

𝐯=vec((𝐀𝐗𝐁)𝖳)=vec(𝐁𝖳𝐗𝖳𝐀𝖳)=(𝐀𝐁𝖳)vec(𝐗𝖳)=(𝐀𝐁𝖳)𝐮.

Applications

[edit | edit source]

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[13] 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.[14][15]

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

[edit | edit source]

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

[edit | edit source]

The Tracy–Singh product is defined as[17][18][19]

𝐀𝐁=(𝐀ij𝐁)ij=((𝐀ij𝐁kl)kl)ij

which means that the (ij)-th subblock of the mp × nq product A B is the mi p × nj q matrix Aij B, 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.:

𝐀=[𝐀11𝐀12𝐀21𝐀22]=[123456789],𝐁=[𝐁11𝐁12𝐁21𝐁22]=[147258369],

we get:

𝐀𝐁=[𝐀11𝐁𝐀12𝐁𝐀21𝐁𝐀22𝐁]=[𝐀11𝐁11𝐀11𝐁12𝐀12𝐁11𝐀12𝐁12𝐀11𝐁21𝐀11𝐁22𝐀12𝐁21𝐀12𝐁22𝐀21𝐁11𝐀21𝐁12𝐀22𝐁11𝐀22𝐁12𝐀21𝐁21𝐀21𝐁22𝐀22𝐁21𝐀22𝐁22]=[1247814312214516282035624422458101661524366912189182781020322540123048121524363045183654782849325693663141635564064184572212442634872275481].

Khatri–Rao product

[edit | edit source]
  • Block Kronecker product
  • Column-wise Khatri–Rao product

Face-splitting product

[edit | edit source]

Mixed-products properties[20]

𝐀(𝐁𝐂)=(𝐀𝐁)𝐂,

where denotes the Face-splitting product.[21][22]

(𝐀𝐁)(𝐂𝐃)=(𝐀𝐂)(𝐁𝐃),

Similarly:[23]

(𝐀𝐋)(𝐁𝐌)(𝐂𝐒)=(𝐀𝐁𝐂)(𝐋𝐌𝐒),
𝐜𝖳𝐝𝖳=𝐜𝖳𝐝𝖳,

where 𝐜 and 𝐝 are vectors,[24]

(𝐀𝐁)(𝐜𝐝)=(𝐀𝐜)(𝐁𝐝),

where 𝐜 and 𝐝 are vectors, and denotes the Hadamard product.

Similarly:

(𝐀𝐁)(𝐌𝐍𝐜𝐐𝐏𝐝)=(𝐀𝐌𝐍𝐜)(𝐁𝐐𝐏𝐝),
(C(1)xC(2)y)=(C(1)C(2))(xy)=C(1)xC(2)y,

where is vector convolution and is the Fourier transform matrix (this result is an evolving of count sketch properties[25]),[21][22]

(𝐀𝐋)(𝐁𝐌)(𝐂𝐒)(𝐊𝐓)=(𝐀𝐁𝐂𝐊)(𝐋𝐌𝐒𝐓),

where denotes the column-wise Khatri–Rao product.

Similarly:

(𝐀𝐋)(𝐁𝐌)(𝐂𝐒)(cd)=(𝐀𝐁𝐂𝐜)(𝐋𝐌𝐒𝐝),
(𝐀𝐋)(𝐁𝐌)(𝐂𝐒)(𝐏𝐜𝐐𝐝)=(𝐀𝐁𝐂𝐏𝐜)(𝐋𝐌𝐒𝐐𝐝),

where 𝐜 and 𝐝 are vectors.

See also

[edit | edit source]

Notes

[edit | edit source]
  1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  12. ^ See Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). to appear as part of Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  18. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  21. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  22. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  24. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

References

[edit | edit source]
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
[edit | edit source]
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). The entry on the Kronecker, Zehfuss, or Direct Product of matrices has historical information.
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). Software source in more than 40 languages.