I have the following problem for complex matrices: $G$ is a positive-definite, hermitian 2x2-matrix and $W$ an invertible 2x2 matrix. Moreover, $WGW^\dagger = G$ holds. Does this imply that $W$ is unitary (with respect to the standard scalar product)?
(Edit: The answer is NO. See the counter example below!) At first sight, it seemed obvious to me that the answer is YES. However, I still could not prove it. One should probably use the fact that $G = UDU^\dagger$ for unitary $U$ and a positive-definite diagonal matrix $D$. Furthermore, $\text{det}(WGW^\dagger) = \text{det}(W) \text{det}(G) \text{det}(W^\dagger) = \text{det}(G)$ and combined with $\text{det}(G) >0$ this yields $|\text{det}(G)| = 1$.
This is indication for the fact that $W$ could be unitary, but it's of course not enough.
Any help is welcome! Thanks a lot!
Cheers Qwerkopf
PS: What would the answer be in case of dxd-matrices?
Write that $G = MM^\dagger$ (e.g. via the Cholesky decomposition). Then we have $$ WGW^\dagger = G \iff\\ (WM)(WM)^\dagger = MM^\dagger \iff\\ (M^{-1}WM)(M^{-1}WM)^\dagger = I $$ That is, this is equivalent to saying that $M^{-1}WM$ is unitary, which is to say that $W = MUM^{-1}$ for some unitary $U$.
That is, in general: all we can know is that $M$ is similar to a unitary matrix (so it is diagonalizable with the correct eigenvalues, but won't necessarily satisfy $WW^\dagger = I$).
Counterexample: Take $$ M = \pmatrix{1&1\\0&1}, \quad G = MM^\dagger = \pmatrix{2&1\\1&1}\\ $$ Now, take $$ W = M \pmatrix{1\\&-1}M^{-1} = \pmatrix{1&-2\\0&-1} $$