kronecker-product ( m1 m2 -- m )
Extra matrix operations

Prev:gram-schmidt-normalize ( matrix -- orthonormal )
Next:outer-product ( u v -- matrix )


Vocabulary
math.matrices.extras

Inputs
m1a matrix
m2a matrix


Outputs
ma matrix


Word description
Calculates the Kronecker product of two matrices. This product can be described as a generalization of the vector-based outer-product to matrices. The Kronecker product gives the matrix of the tensor product with respect to a standard choice of basis.

Notes
This word is the matrix variant of outer-product.
This word is intended for use with "flat" (2-dimensional) matrices.
This word assumes that elements of the input matrix are compatible with the following words:
* ( x y -- z )


Examples
USING: math.matrices.extras prettyprint ; { { 1 2 } { 3 4 } } { { 0 5 } { 6 7 } } kronecker-product .
{ { 0 5 0 10 } { 6 7 12 14 } { 0 15 0 20 } { 18 21 24 28 } }


Definition