# Similarity transformation to the transpose

I have a real nxn matrix A and I want to find P, so that P-1AP=AT. Does such a matrix exist? How do I find it?
What if I have two matrices A,B. Does there exist a matrix P, that transforms both of them to their transposes?
Thanks

Fredrik
Staff Emeritus
Gold Member
This isn't exactly what you're asking for, so I don't know if it's useful or not, but if we let X be the n×n matrix with 1 on the diagonal from lower left to upper right and 0 everywhere else, we have XAX=AT.

This isn't exactly what you're asking for, so I don't know if it's useful or not, but if we let X be the n×n matrix with 1 on the diagonal from lower left to upper right and 0 everywhere else, we have XAX=AT.

No, I need X-1AX=AT.

HallsofIvy
Homework Helper
But it's exactly the same thing. If X is the matrix with ones on the "anti-diagonal" (running from upper right to lower left) then $X= X^{-1}$.

Last edited by a moderator:
Fredrik
Staff Emeritus
Gold Member
Lol, I didn't even realize that myself. (That's why I said "this isn't exactly what you're asking for").

But it doesn't work. X with anti-diagonal 1's doesn't give the transpose, it gives a kind of mirroring of the matrix.

I'm also looking for an X such that X^-1AX=A^T. Shouldn't there be a method for generically finding a similarity transformation that gives you a matrix B, whether it's the transpose of A or something else?

Fredrik
Staff Emeritus
Gold Member
Ah, crap. You're right, if we e.g. consider a 5×5 matrix, the element on row 4, column 1 will end up on row 2, column 5.

I don't know any such method.

For any particular matrix A, a solution for X can be found.
A X - X A^T = 0 is just a linear equation for the coefficients of X.
Experimentation shows that in general, for a n*n system, only n (n-1) components of X are fixed. So there is some freedom in the choice of X.

Some experimentation also shows that, in general, it's not possible to find an X that transposes two matrices, ie such that
A X = X A^T and B X = X B^T.
I'm not sure what conditions A and B would have to satisfy such that a solution exists.

Note that if it does hold true for A and B, ie
A X = X A^T and B X = X B^T
then you must have a strange antihomorphism
A B X = A X X^{-1} B X = X A^T B^T = X (B A)^T
I'm not sure what that means. But it does extend to the entire group generated by A and B...

I found the following. For a given matrix A and vectors b,c, this will transform AT into A and also give c = Pb.
$$C=\begin{bmatrix} b & Ab & \dots & A^{n-1}b \end{bmatrix}$$
$$O=\begin{bmatrix} c & A'c & \dots & (A')^{n-1}c \end{bmatrix}$$
$$P= O C ^{-1}$$