[Math] Testing if two matrices are unitarily equivalent

linear algebramatrices

So im kind of self teaching here and am a bit lost on unitary equivalence for matrices, my understanding is that two matrices unitarily equivalent if their linear transformations are unitarily equivalent, ie there is a unitary linear transformation u such that g=u^-1.f.u, where f and g are the matrices.

Im a bit lost on the process though, can someone outline whats the standard efficient way to do questions such as these for example?

$\begin{bmatrix}1 & 1\\0 & 1\end{bmatrix}$ and $\begin{bmatrix}0 & 0\\1 & 0\end{bmatrix}$, Answer: Not unitarily equivalent

$\begin{bmatrix}0 & 0 & 2\\0 & 0 & 0\\2 & 0 & 0\end{bmatrix}$ and $\begin{bmatrix}1 & 1 & 0\\1 & 1 & 0\\0 & 0 & -1\end{bmatrix}$ , Answer: Not unitarily equivalent

$\begin{bmatrix}0 & 1 & 0\\-1 & 0 & 0\\0 & 0 & -1\end{bmatrix}$ and
$\begin{bmatrix}-1 & 0 & 0\\0 & i & 0\\0 & 0 & -i\end{bmatrix}$ , Answer: Unitarily Equivalent

I suppose just some standard protocol one would follow would be awesome if someone could let me know 🙂

Best Answer

The first two matrices have distinct traces, and therefore they are not unitarily equivalent. The same argument applies to the third and fourth matrices. Finally, diagonalize the fifth matrix, and you will get something really close to the sixth one.

Also (although this is not needed for these pairs of matrices), if two matrices are unitarily equivalent, then they have the same characteristic polynomials.