Contents Previous Next Subchapters

Kronecker Tensor Product
Syntax kron(a,b)
See Also matrix multiplication

Description
Returns the Kronecker tensor product of a and b where a and b are an integer, real, double-precision or complex matrices. The return value is a matrix with the type that results from coercion between the types of a and b, its row dimension is equal to the product of the row dimensions of a and b, and its column dimension is equal to the product of the column dimensions of a and b. If m is the row dimension of a and n is the column dimension of a, the return value is equal to
     a(1, 1) b   a(1, 2) b   ...   a(1, nb
     a(2, 1) b   a(2, 2) b   ...   a(2, nb
           :           :         :       :
     a(m, 1) b   a(m, 2) b   ...   a(mnb

Example
If you enter
     a = {[1, 2], [3, 4]}
     b = identity(2)
     kron(a, b)
O-Matrix will respond
     {
     [ 1 , 0 , 2 , 0 ],
     [ 0 , 1 , 0 , 2 ],
     [ 3 , 0 , 4 , 0 ],
     [ 0 , 3 , 0 , 4 ]
     }