KroneckerProduct - Maple Help

# Online Help

###### All Products    Maple    MapleSim

LinearAlgebra

 KroneckerProduct
 construct the Kronecker tensor product of two Matrices

 Calling Sequence KroneckerProduct(A, B, options)

Parameters

 A, B - Matrices options - (optional); constructor options for the result object

Description

 • The KroneckerProduct function computes the Kronecker tensor product of the matrices A and B.
 • If A has $m$ rows and $n$ columns, and B has $p$ rows and $q$ columns, then the output is a Matrix with $m$*$p$ rows and $n$*$q$ columns. The output can be thought of as a partitioned matrix with $m$ by $n$ blocks of size $p$ by $q$.  The ($i,j$)th block in the output is then ${A}_{i,j}·B$.
 • The KroneckerProduct function can be used to compute the abstract tensor product of the two linear transformations represented by A and B, but is additionally very useful in constructing block matrices.
 • The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).
 • This function is part of the LinearAlgebra package, and so it can be used in the form KroneckerProduct(..) only after executing the command with(LinearAlgebra).  However, it can always be accessed through the long form of the command by using LinearAlgebra[KroneckerProduct](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A≔\mathrm{Matrix}\left(\left[\left[1,2,3\right],\left[4,5,6\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {4}& {5}& {6}\end{array}\right]$ (1)
 > $B≔\mathrm{Matrix}\left(\left[\left[0,x\right],\left[-x,1\right]\right]\right)$
 ${B}{≔}\left[\begin{array}{cc}{0}& {x}\\ {-}{x}& {1}\end{array}\right]$ (2)
 > $\mathrm{KroneckerProduct}\left(A,B\right)$
 $\left[\begin{array}{cccccc}{0}& {x}& {0}& {2}{}{x}& {0}& {3}{}{x}\\ {-}{x}& {1}& {-}{2}{}{x}& {2}& {-}{3}{}{x}& {3}\\ {0}& {4}{}{x}& {0}& {5}{}{x}& {0}& {6}{}{x}\\ {-}{4}{}{x}& {4}& {-}{5}{}{x}& {5}& {-}{6}{}{x}& {6}\end{array}\right]$ (3)
 > $\mathrm{KroneckerProduct}\left(B,A\right)$
 $\left[\begin{array}{cccccc}{0}& {0}& {0}& {x}& {2}{}{x}& {3}{}{x}\\ {0}& {0}& {0}& {4}{}{x}& {5}{}{x}& {6}{}{x}\\ {-}{x}& {-}{2}{}{x}& {-}{3}{}{x}& {1}& {2}& {3}\\ {-}{4}{}{x}& {-}{5}{}{x}& {-}{6}{}{x}& {4}& {5}& {6}\end{array}\right]$ (4)
 > $P≔\mathrm{BandMatrix}\left(\left[2,4,6\right],1,2\right)$
 ${P}{≔}\left[\begin{array}{cc}{4}& {6}\\ {2}& {4}\end{array}\right]$ (5)
 > $Q≔\mathrm{BandMatrix}\left(\left[x,2x,3x\right],1,2\right)$
 ${Q}{≔}\left[\begin{array}{cc}{2}{}{x}& {3}{}{x}\\ {x}& {2}{}{x}\end{array}\right]$ (6)
 > $\mathrm{Multiply}\left(P,Q\right)-\mathrm{Multiply}\left(Q,P\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (7)
 > $B≔\mathrm{KroneckerProduct}\left(\mathrm{Matrix}\left(\left[\left[1,0\right],\left[0,1\right]\right]\right),P\right)+\mathrm{KroneckerProduct}\left(\mathrm{Matrix}\left(\left[\left[0,1\right],\left[1,0\right]\right]\right),Q\right)$
 ${B}{≔}\left[\begin{array}{cccc}{4}& {6}& {2}{}{x}& {3}{}{x}\\ {2}& {4}& {x}& {2}{}{x}\\ {2}{}{x}& {3}{}{x}& {4}& {6}\\ {x}& {2}{}{x}& {2}& {4}\end{array}\right]$ (8)
 > $\mathrm{Determinant}\left(B\right)$
 ${{x}}^{{4}}{-}{8}{}{{x}}^{{2}}{+}{16}$ (9)
 > $\mathrm{Determinant}\left(\mathrm{Multiply}\left(P,P\right)-\mathrm{Multiply}\left(Q,Q\right)\right)$
 ${{x}}^{{4}}{-}{8}{}{{x}}^{{2}}{+}{16}$ (10)

 See Also