reverse.kronecker: Reverses the matrices in a Kronecker product

Description Usage Arguments Value See Also Examples

View source: R/reverse.kronecker.R

Description

This function takes a matrix that is Kronecker product A \otimes B (Definition 3.5), where A is P x Q and B is N x M, and outputs the matrix B \otimes A.

Usage

1
reverse.kronecker(ab, p, qq)

Arguments

ab

The (NP) x (QM) matrix A \otimes B.

p

The number of rows of A.

qq

The number of columns of A.

Value

The (NP) x (QM) matrix B \otimes A.

See Also

kronecker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Create matrices
(A <- diag(1, 3))
(B <- matrix(1:6, ncol = 2))

# Perform kronecker
(kron <- kronecker(A, B))

# Perform reverse kronecker product
(reverse.kronecker(kron, 3, 3))

# Perform kronecker again
(kron2 <- kronecker(B, A))

msos documentation built on Oct. 31, 2020, 9:07 a.m.