Does certain matrix commutes with square root of another one?
Solution 1:
In more generality, if $B$ is positive semidefinite and $AB=BA$, then $A\sqrt B=\sqrt B\,A$. The key observation is that there exists a polynomial $p\in\mathbb{R}[x]$ such that $\sqrt B=p(B)$. Then we have $$ AB^2=(AB)B=(BA)B=B(AB)=B(BA)=B^2A; $$ similarly we deduce that $AB^n=B^nA$ for any $n\in\mathbb{N}$, and so $Ap(B)=p(B)A$ for any polynomial.
The existence of the required polynomial is shown as follows: as $B$ is positive semidefinite, it is diagonalizable, so $B=SDS^{-1}$ with $D$ diagonal. Now choose a polynomial $p$ such that $p(d_{jj})=\sqrt{d_{jj}}$. Then $$ \sqrt{B}=S\sqrt{D}S^{-1}=Sp(D)S^{-1}=p(SDS^{-1})=p(B). $$
Solution 2:
$AA^T$ and $\sqrt{AA^T}$ are diagonalized by the same matrix $O$, and they have the same pattern of equal or distinct eigenvalues. We can also form $O^TAO$, which commutes with $O^TAA^TO=\Lambda$. The matrices that commute with a given diagonal matrix $\Lambda$ are all matrices that have non-zero entries $a_{ij}$ only where $\lambda_i=\lambda_j$. Since this condition is the same for $\Lambda$ and $\sqrt\Lambda$, the same matrices commute with $\Lambda$ and $\sqrt\Lambda$. Since $O^TAO$ commutes with $\Lambda$, it also commutes with $\sqrt\Lambda$, and thus $A$ commutes with $O\sqrt\Lambda O^T=\sqrt{AA^T}$.