Kronecker Sum

Author

Eric W. Weisstein
February 7, 2009

This notebook downloaded from http://mathworld.wolfram.com/notebooks/LinearAlgebra/KroneckerSum.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/KroneckerSum.html.

©2009 Wolfram Research, Inc. except for portions noted otherwise

Code

KroneckerSum[a_List?MatrixQ,b_List?MatrixQ]:=KroneckerProduct[a,IdentityMatrix[Length[b]]]+KroneckerProduct[IdentityMatrix[Length[a]],b]/;Equal@@Dimensions[a]&&Equal@@Dimensions[b]

Examples

SubscriptForm[expr_]:=TraditionalForm[expr/.{a[x__]:>Subscript[a,InvisibleComma@x],b[x__]:>Subscript[b,x]}]

(({{1, 2}, {3, 4}}))⊕(({{0, 5}, {6, 7}}))

𝒜={{1,2},{3,4}};
ℬ={{0,5},{6,7}};

KroneckerProduct[{{1,2},{3,4}},{{0,5},{6,7}}]//TraditionalForm

KroneckerProduct[MatrixExp[𝒜],MatrixExp[ℬ]]-MatrixExp[KroneckerSum[𝒜,ℬ]]

(({{(Subscript[a, 1,1]), (Subscript[a, 1,2])}, {(Subscript[a, 2,1]), (Subscript[a, 2,2])}}))⊕(({{(Subscript[b, 1,1]), (Subscript[b, 1,2])}, {(Subscript[b, 2,1]), (Subscript[b, 2,2])}}))

(𝒜=Array[a,{2,2}])//SubscriptForm

(ℬ=Array[b,{2,2}])//SubscriptForm

KroneckerSum[𝒜,ℬ]

KroneckerSum[𝒜,ℬ]//SubscriptForm

FullSimplify[With[{𝒜=Array[a,{2,2}],ℬ=Array[b,{2,2}]},KroneckerProduct[MatrixExp[𝒜],MatrixExp[ℬ]]-MatrixExp[KroneckerSum[𝒜,ℬ]]]]//Timing

FullSimplify[Together//@With[{𝒜=Array[a,{2,2}],ℬ=Array[b,{2,2}]},KroneckerProduct[MatrixExp[𝒜],MatrixExp[ℬ]]-MatrixExp[KroneckerSum[𝒜,ℬ]]]]//Timing

SeedRandom[1];
With[{
𝒜=RandomComplex[{-1,1}(I+1),{2,2}],
ℬ=RandomComplex[{-1,1}(I+1),{2,2}]
},
(KroneckerProduct[MatrixExp[𝒜],MatrixExp[ℬ]]-MatrixExp[KroneckerSum[𝒜,ℬ]])]//Chop

𝒜=Array[a,{2,2}];
ℬ=Array[b,{2,2}];

KroneckerProduct[MatrixExp[𝒜/.rules],MatrixExp[ℬ/.rules]]

MatrixExp[KroneckerSum[𝒜,ℬ]/.rules]

(({{(Subscript[a, 1,1]), (Subscript[a, 1,2])}, {(Subscript[a, 2,1]), (Subscript[a, 2,2])}}))⊕(({{(Subscript[b, 1,1]), (Subscript[b, 1,2]), (Subscript[b, 1,3])}, {(Subscript[b, 2,1]), (Subscript[b, 2,2]), (Subscript[b, 2,3])}, {(Subscript[b, 3,1]), (Subscript[b, 3,2]), (Subscript[b, 3,3])}}))

(𝒜=Array[a,{2,2}])//SubscriptForm

(ℬ=Array[b,{3,3}])//SubscriptForm

KroneckerSum[𝒜,ℬ]//SubscriptForm

SeedRandom[1];
With[{
𝒜=RandomComplex[{-1,1}(I+1),{2,2}],
ℬ=RandomComplex[{-1,1}(I+1),{3,3}]
},
(KroneckerProduct[MatrixExp[𝒜],MatrixExp[ℬ]]-MatrixExp[KroneckerSum[𝒜,ℬ]])]//Chop