reverse.kronecker {msos}R Documentation

Reverses the matrices in a Kronecker product

Description

This function takes a matrix that is Kronecker product ABA \otimes B (Definition 3.5), where AA is PxQP x Q and BB is NxMN x M, and outputs the matrix BAB \otimes A.

Usage

reverse.kronecker(ab, p, qq)

Arguments

ab

The (NP)×(QM)(NP) \times (QM) matrix ABA \otimes B.

p

The number of rows of AA.

qq

The number of columns of AA.

Value

The (NP)×(QM)(NP) \times (QM) matrix BAB \otimes A.

See Also

kronecker

Examples


# 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))

[Package msos version 1.2.0 Index]