Linear Algebra – Finding a Unitary Matrix That Commutes with a Positive-Definite Matrix

linear algebramatrices

If I have Hermitian matrices $x,y\in$$M_n(\mathbb{C})$ such that they have equal eigenvalues and both commute with a positive-definite matrix $A\in{M_n(\mathbb{C})}$, then can I find a unitary matrix $U\in$$U_n$ such that $xU=Uy$ and $UA=AU$?

It is easy to see that one can find a unitary matrix $U\in{U_n}$ such that $xU=Uy$ since they have equal eigenvalues and are both Hermitian. So my question is more about whether one can find one that also commutes with $A$. If not, then under what conditions would I need to put on $x$ and $y$ to get this?

Best Answer

Not always. Consider $$ A=x=\pmatrix{1\\ &2}\quad\text{and}\quad y=\pmatrix{2\\ &1}. $$ Since $A$ is a diagonal matrix with distinct diagonal elements, if $AU=UA$, then $U$ must be a diagonal matrix. Hence $U$ commutes with both $x$ and $y$. But then the equation $xU=Uy$ implies $(x-y)U=0$. Since $x-y$ is nonsingular, $U$ is necessarily zero.