Kmat {lazy.mat} | R Documentation |
Commutation Matrix
Kmat(nr, nc, method = 1)
nr |
# of rows |
nc |
# of columns |
method |
= 1 to use vecvecindex function |
vec(t(A)) == Kmat(nr,nc) %*% vec(A)
https://en.wikipedia.org/wiki/Commutation_matrix
nr <- 3 nc <- 2 A <- demomat(nr,nc) Print( vec(A), vec(t(A)), Kmat(nr,nc)%*%vec(A) ) Print( vec(A), vec(t(A)), t(Kmat(nr,nc))%*%vec(t(A)) )