kron | R Documentation |
Kronecker tensor product of two matrices.
kron(a, b)
a |
real or complex matrix |
b |
real or complex matrix |
The Kronecker product is a large matrix formed by all products between the
elements of a
and those of b
. The first left block is a11*b,
etc.
an (n*p x m*q
-matrix, if a
is (n x m
and
b
is (p x q)
.
kron()
is an alias for the R function kronecker()
, which can
also be executed with the binary operator ‘%x%’.
a <- diag(1, 2, 2)
b <- matrix(1:4, 2, 2)
kron(a, b)
kron(b, a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.