Positive-definite 2x2 matrix invariant under conjugation with W -> W unitary? 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?
 A: This implies that $W$ is unitary with respect to the scalar product defined by $G$, i.e. $\langle v,w \rangle = v^T G \overline{w}.$
This is because the adjoint of $W$ is $G^{-1} \overline{W^T} G$: You can verify $$\langle Wv, w \rangle = v^T W^T G \overline{w} = v^T G\overline{G^{-1} \overline{W^T} G w} = \langle v, G^{-1} \overline{W^T} G w \rangle.$$
Typically this does not mean that $W$ will be unitary with respect to the Euclidean scalar product though.
A: 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}
$$
