I am using Plot
to look at the eigenvalues of a matrix, and find that in some circumstances I get artifacts. For example
H = {{x, -g}, {g, -x}};
Eigenvalues[H]
Plot[Eigenvalues[H] /. g -> 1, {x, -4, 4}]
gives me
{-Sqrt[-g^2 + x^2], Sqrt[-g^2 + x^2]}
but
H = {{x, -1}, {1, -x}};
Eigenvalues[H]
Plot[Eigenvalues[H], {x, -4, 4}]
gives me
{-Sqrt[-1 + x^2], Sqrt[-1 + x^2]}
Fianlly, just to add to the confusion,
Plot[{-Sqrt[-1 + x^2], Sqrt[-1 + x^2]}, {x, -4, 4}]
gives
What's going on here? I thought there would be no difference between these.