Solution of $A^\top M A=M$ for all $M$ positive-definite I am trying to find all matrices $A$ such that for all positive-definite matrices $M$, $A^\top M A=M$. $I$ and $-I$ are obvious solutions. I can't find out it there are other such matrices and if so, how  to find them.
Necessarily, $A$ is invertible since $\det(A)^2\det(M)=\det(M)\neq 0$ and more precisely, $\det A=\pm 1$. But that certainly not sufficient.
 A: Note that since this holds for all positive definite $M$, it holds for $M = I$. So, we must have
$$
A^TA = I
$$
which is to say that $A$ is an orthogonal (unitary) matrix.
We may therefore rewrite the equation as 
$$
A^{-1}MA = M \implies  MA = AM
$$
That is, $A$ must commute with all positive definite matrices.  However, this means that $A$ must also commute with all complex linear combinations of positive definite matrices, which is to say that $A$ must commute with every matrix.
It is well known that the only matrices that commute with any matrix are the multiples of the identity.
Thus, we conclude that $A$ is an orthogonal (unitary) matrix and a multiple of the identity. If $A$ is real, conclude that $A = \pm I$.  If $A$ is complex (and we take the $A^T$ to refer to the complex-conjugate), conclude that $A = \lambda I$ for some $\lambda$ with $|\lambda| = 1$.
A: As you pointed out, $\det(A) \neq 0$, and then $A^{-1}$ exists.
Now:
$$A^\top M A=M \Rightarrow \\(A^\top)^{-1}A^\top M AA^{-1}=(A^\top)^{-1}MA^{-1} \Rightarrow\\
M = (A^\top)^{-1}MA^{-1} \Rightarrow\\
M = (A^{-1})^\top MA^{-1}.
$$
This suggests that all matrices such that $A = A^{-1}$ and $\det(A) = \pm 1$ satisfy your requirement.
