Learn R Programming

tensr (version 1.0.2)

Kom: Commutation matrix.

Description

Construct the communtation matrix.

Usage

Kom(m, n)

Value

K The m * n by m * n commutation matrix.

Arguments

m

a natural number.

n

another natural number.

Author

Peter Hoff.

Details

This function constructs the commutation matrix K, which maps c(A) to c(t(A)) for an \(m\) by \(n\) matrix A.

References

  • Magnus, J. R., & Neudecker, H. (1979). The commutation matrix: some properties and applications. The Annals of Statistics, 381-394. tools:::Rd_expr_doi("10.1214/aos/1176344621")

  • Tracy, D. S., & Dwyer, P. S. (1969). Multivariate maxima and minima with matrix derivatives. Journal of the American Statistical Association, 64(328), 1576-1594. tools:::Rd_expr_doi("10.1080/01621459.1969.10501078")

Examples

Run this code
m <- 5 ; n <- 4
A <- matrix(stats::rnorm(m * n), m, n)
Kom(5, 4) %*% c(A) - c(t(A))

Run the code above in your browser using DataLab