Commutation matrix proof Prove that each commutation matrix $K$ is invertible and that $K^{-1} = K^{T}$
We found that $K$ is a square matrix and because we assume that $K$ only has distinct elements it has the maximal rank and is therefore an invertible square matrix.
We don't know how to prove the last part. Could someone please help?
 A: If $A$ is an $(m,n)$ matrix, then Since $K^{(m,n)}\operatorname{vec}(A)=\operatorname{vec}(A^T)$. 
Consider the $(n,m)$ matrix $B$. Then $K^{(n,m)}\operatorname{vec}(B)=\operatorname{vec}(B^T)$, hence $K^{(n,m)}K^{(m,n)}\operatorname{vec}(A)=\operatorname{vec}(A)$, i.e. $K^{(n,m)}K^{(m,n)}=1$ and similarly $K^{(m,n)}K^{(n,m)}=1$, i.e. $K^{(n,m)}$ and $K^{(m,n)}$ are inversers of each other, especially are invertible.
Note that 
$$\langle\operatorname{vec}(A),\operatorname{vec}(B^T)\rangle=\operatorname{vec}(A)^T\operatorname{vec}(B)=\operatorname{tr}(AB)=\operatorname{tr}(A^TB^T),$$
hence 
$$\langle\operatorname{vec}(A), K^{(n,m)}\operatorname{vec}(B)\rangle
=\langle K^{(m,n)}\operatorname{vec}(A),\operatorname{vec}(B)\rangle,$$ 
i.e. $K^{(n,m)}$ and $K^{(m,n)}$   are also transposes of each other, i.e. 
$$(K^{(n,m)})^{-1}=K^{(m,n)}=(K^{(n,m)})^T.$$ 
A: Let $E_{ij}$ denotes the $(i,j)$-th elementary matrix of size $m\times n$ and $e_k$ denotes the vector of length $mn$ that has a $1$ in the $k$-th entry and zeros elsewhere. Then the commutation matrix $K=K^{(m,n)}$ is an $mn\times mn$ matrix that satisfies $K\operatorname{vec}(E_{ij}) = \operatorname{vec}(E_{ij}^T)$. That is, $Ke_{(j-1)n+i}=e_{(i-1)m+j}$ for every $1\le i\le m$ and every $1\le j\le n$. Therefore $K$ is a permutation matrix and in turn $K^{-1}=K^T$.
