-1
$\begingroup$

How to check if two 2x2 unitary matrices are similar using python..Is there a speacial function for it

$\endgroup$
0
$\begingroup$

I don't quite know if there is a thing in Python for this, but two $2\times 2$ matrices (not necessarily in $U(2)$) are similar if and only if all of the following hold:

  1. $\operatorname{tr} A=\operatorname{tr} B$

  2. $\det A=\det B$

  3. one of the following holds:

    • $\operatorname{tr}^2 A-4\det A\ne 0$
    • $\operatorname{tr}^2 A-4\det A=0$ and $A=\frac{\operatorname{tr A}}2I=B$
    • $\operatorname{tr}^2 A-4\det A=0$, $A\ne \frac{\operatorname{tr A}}2I$ and $B\ne \frac{\operatorname{tr A}}2I$

It must be noted, however, that since unitary matrices are always diagonalizable, $A,B\in U(2)$ together with $(1)\land(2)$ already imply $(3)$.

$\endgroup$
3
  • $\begingroup$ So if I have two matrices in SU(2) is condition 1 sufficient to prove they are similar? Also does two similar matrix always diagonalize to the same diagonal matrix . $\endgroup$ – Debarghya Kundu Jun 12 '18 at 17:20
  • $\begingroup$ Yes to both claims. $\endgroup$ – Saucy O'Path Jun 12 '18 at 20:12
  • $\begingroup$ Thanks Saucy O'Path $\endgroup$ – Debarghya Kundu Jun 13 '18 at 4:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.