I know that $$\begin{pmatrix}0&Z\\Z^*&0\end{pmatrix} \quad\text{has eigenvalues}\quad \lambda_\pm=\pm|Z|$$
but Mathematica gives me
Eigenvalues@{{0,z},{Conjugate[z],0}}
(* { -Sqrt[z]Sqrt[Conjugate[z]], Sqrt[z]Sqrt[Conjugate[z]] } *)
I think this is not right because we have $\,\sqrt{ZZ^*}\neq\sqrt{Z}\sqrt{Z^*}$.
e.g. For $Z=-1$ we have $\sqrt{1}\neq (\sqrt{-1})^2\,$.
So, given this, I wonder if there is a way to solve this and output the result as $\pm|Z|$, even for the cases where instead of Z we had a product, or a sum of products.
z0 = -1.; Sort@Eigenvalues[{{0, z}, {Conjugate[z], 0}} /. z -> z0] == Sort@(Eigenvalues@{{0, z}, {Conjugate[z], 0}} /. z -> z0)
returnsTrue
. Is it the case that $\pm\,\sqrt{ZZ^*}=\pm\sqrt{Z}\sqrt{Z^*}$ in some order? $\endgroup$mat
defined as the matrix above,Eigenvalues@(mat /. z -> -1)
gives{-1,1}
while(Eigenvalues@mat) /. z -> -1
gives{1, -1}
. $\endgroup$E^((1/2)*I*(Arg[z] + Arg[Conjugate[z]]))
andArg[z] + Arg[Conjugate[z]]
is either0
or2 Pi
. Thus the factor is $\pm1$. $\endgroup$m = {{0, x + I y}, {x - I y, 0}}; Eigenvalues[m]
$\endgroup$