Wikipedia

Commutation matrix

In mathematics, especially in linear algebra and matrix theory, the commutation matrix is used for transforming the vectorized form of a matrix into the vectorized form of its transpose. Specifically, the commutation matrix K(m,n) is the nm × mn matrix which, for any m × n matrix A, transforms vec(A) into vec(AT):

K(m,n) vec(A) = vec(AT) .

Here vec(A) is the mn × 1 column vector obtain by stacking the columns of A on top of one another:

where A = [Ai,j].

The commutation matrix is a special type of permutation matrix, and is therefore orthogonal. Replacing A with AT in the definition of the commutation matrix shows that K(m,n) = (K(n,m))T. Therefore in the special case of m = n the commutation matrix is an involution and symmetric.

The main use of the commutation matrix, and the source of its name, is to commute the Kronecker product: for every m × n matrix A and every r × q matrix B,

It is much used in developing the higher order statistics of Wishart covariance matrices.[1]

An explicit form for the commutation matrix is as follows: if er,j denotes the j-th canonical vector of dimension r (i.e. the vector with 1 in the j-th coordinate and 0 elsewhere) then

Example

Let M be a 2×2 square matrix.

Then we have

And K(2,2) is the 4×4 square matrix that will transform vec(M) into vec(MT)


For both square and rectangular matrices of M rows and N columns, the commutation matrix can be generated by this pseudocode, which is similar to an article at Stack Exchange[2] and demonstrably gives the correct result though is presented without proof.

for i = 1 to M for j = 1 to N K(i + M*(j - 1), j + N*(i - 1)) = 1 end end 

Thus the following matrix has two possible vectorizations as follows:

and the code above yields

giving the expected results

References

  1. ^ von Rosen, Dietrich (1988). "Moments for the Inverted Wishart Distribution". Scand J Statistics. 15: 97–109.
  2. ^ "Kronecker product and the commutation matrix". Stack Exchange. 2013.
  • Jan R. Magnus and Heinz Neudecker (1988), Matrix Differential Calculus with Applications in Statistics and Econometrics, Wiley.


This article is copied from an article on Wikipedia® - the free encyclopedia created and edited by its online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of Wikipedia® encyclopedia articles provide accurate and timely information, please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.

Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.