TITLE: Unitary invariance
QUESTION [5 upvotes]: Why is it that for any non-negative matrix $M$ and unitary matrix $U$, we have 
$$\sqrt{UMU^\dagger}=U\sqrt{M}U^\dagger$$?
This question has to do with Problem 2c from this sheet. I think I am allowed to assume the "fact" but I'd like to know why.

REPLY [10 votes]: Suppose $\sqrt{ U M U^\dagger } = B$. Then
$$
B^2 = U M U^\dagger \implies U^\dagger B^2 U = M \implies \left( U^\dagger B U \right) \left( U^\dagger B U \right) = M
$$
This implies
$$
 \left( U^\dagger B U \right)^2  = M
$$
Now since $M$ is a positive definite operator, we can take a square root of both sides. We then find 
$$
U^\dagger B U = \sqrt{M} \implies B = U \sqrt{M} U^\dagger
$$
Thus
$$
\boxed{ \sqrt{U M U^\dagger} =  U \sqrt{M} U^\dagger } 
$$

REPLY [6 votes]: Hint: Use that to prove that two non-negative operators $P,Q\geq 0$ are equal $P=Q$, it is enough to prove that $P^2=Q^2$.

REPLY [2 votes]: Lets take $M = P D P^{-1}$, where $D$ is diagonal, (assuming $M > 0$), then
$\sqrt{M} = P D^{\frac{1}{2}} P^{-1}$
so
$\sqrt{U M U^\dagger } = (P U)  D^{\frac{1}{2}} (P U)^{-1}$
where now $PU$ diagonalizes $M$ (and the eigenvalues are unchanged, so the diagonal matrix is still $D$.
$D = P^{-1} M P = P^{-1} (U^{-1} U) M (U^{-1} U) P = (UP)^{-1} M (UP)$
Hmm, I have my Us and Ps mixed up. Will fix when I have a chance.