powered by
n
x
vec(x)
vec(t(x))
commutation(n = 2)
Magnus, J.R., and Neudecker, H. (1999). Matrix Differential Calculus with Applications in Statistics and Econometrics, 2nd Edition. Wiley, New York.
a <- matrix(1:9, ncol = 3) kmat <- commutation(nrow(a)) vec <- as.vector(a) ## vectorization of t(a): kmat %*% vec
Run the code above in your browser using DataLab