# Can the matrix transpose be represented by $X^T = AXB$ for a given $A$ and $B$?

Can the matrix transpose be represented by $X^T = AXB$ for a given $A$ and $B$?

I think it is possible, but please correct me if I am wrong--please see my attempt below.

My thinking (not sure whether I am on the right path) is that one could employ $\mbox{vec}$ and Kronecker product operator. However, I am not sure whether this formally proves it, does it?

If I vectorize both sides, i.e., \begin{align} X^T &= AXB \\ \Downarrow \\ \mbox{vec}\left( X^T \right) &= \mbox{vec}\left( AXB \right) \\ \mbox{vec}\left( X^T \right) &= \underbrace{\left(B^T \otimes A\right)}_{\equiv \ \ T_{m,n}}\mbox{vec}\left( X \right) \\ \mbox{vec}\left( X^T \right) &= T_{m,n}\mbox{vec}\left( X \right), \\ \end{align} where $T_{m,n}$ is some permutation matrix (cf. http://www4.ncsu.edu/~pfackler/MatCalc.pdf).

Similar question: Solve $AXB=X^\top$

• An interesting approach. Now the question is, can you find a decomposition of the form $$T_{m,n} = B^T\otimes A$$ If you can, then it would support your hypothesis. Of course, you can always find a Kronecker decomposition of the form $$T_{m,n} = \sum_{k=1}^{r}B^T_k\otimes A_k$$ but it is very rare to find a decomposition with $r=1$. – greg May 23 '18 at 8:19

No, there are no such matrices $$A$$ and $$B$$.

If there were, we would have $$\operatorname{Id}=\operatorname{Id}^T=A\operatorname{Id}B=AB$$ and therefore $$B=A^{-1}$$.

Now, is there an invertible $$2\times2$$ matrix $$A=\left(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\right)$$ such that$$\begin{pmatrix}0&1\\0&0\end{pmatrix}=A\begin{pmatrix}0&0\\1&0\end{pmatrix}A^{-1}?$$It is easy to see that the only such matrices are those of the type $$\left(\begin{smallmatrix}0&1/c\\c&0\end{smallmatrix}\right)$$.

However,$$\begin{pmatrix}0&1/c\\c&0\end{pmatrix}\begin{pmatrix}1&0\\0&0\end{pmatrix}\begin{pmatrix}0&1/c\\c&0\end{pmatrix}^{-1}=\begin{pmatrix}0&0\\0&1\end{pmatrix}\neq\begin{pmatrix}1&0\\0&0\end{pmatrix}^T.$$

I partially answer this question based on your thoughts and the comment given by @greg .

$$\mbox{vec}(X^T)=T_{m,n} \mbox{vec}(X)$$

Note that $$T_{m,n}$$ can be written as the following way (cf. https://en.wikipedia.org/wiki/Commutation_matrix $$K^{(r,m)}$$)

$$T_{m,n}=\displaystyle\sum^m_{i=1}\displaystyle\sum^n_{j=1}J^{ij}_{mn}\otimes (J^{ij}_{mn})^T$$, where $$(J^{ij}_{mn})^T=J^{ji}_{nm}$$.

$$J^{ij}_{mn}$$ is the single-entry matrix (cf. https://en.wikipedia.org/wiki/Single-entry_matrix), with the matrix size $$m\times n$$. Hence,

\begin{align} \mbox{vec}(X^T) &= \left(\displaystyle\sum^m_{i=1}\displaystyle\sum^n_{j=1}J^{ij}_{mn}\otimes (J^{ij}_{mn})^T\right) \mbox{vec}(X)\\ &= \displaystyle\sum^m_{i=1}\displaystyle\sum^n_{j=1}\left(J^{ij}_{mn}\otimes J^{ji}_{nm}\right) \mbox{vec}(X)\\ &= \displaystyle\sum^m_{i=1}\displaystyle\sum^n_{j=1}\mbox{vec}\left( J^{ji}_{nm} X (J^{ij}_{mn})^T \right)\\ &= \mbox{vec}\left( \displaystyle\sum^m_{i=1}\displaystyle\sum^n_{j=1} J^{ji}_{nm} X J^{ji}_{nm} \right) \end{align}

Therefore, we have

\begin{align} X^T= \displaystyle\sum^m_{i=1}\displaystyle\sum^n_{j=1} J^{ji}_{nm} X J^{ji}_{nm} \end{align}

You can obtain this relationship via directly using the definition of single-entry matrix as well. And if you could do some tranformation to remove two summations, then we can completely answer your question. Hope it helps.