# How to plot complex eigenvalues of a matrix?

I have a matrix , for instance, like this :

matrix[a_ ] := {{0, a}, {-a, 1}};
Eigenvalues[matrix[a]]


and this give the eigenvalues that depends on a

{1/2 (1 - Sqrt[1 - 4 a^2]), 1/2 (1 + Sqrt[1 - 4 a^2])}

If I plot this eigenvalues,

Plot[Eigenvalues[mat[a, b, q]], {a, -1 , 2}]


this just give me the real value. I would like to have the real part of the complex number too. How can I get the real part of the complex eigenvalue?

• Welcome to Mma.SE. Start by taking the tour now and learning about asking and what's on-topic. Always edit if improvable, show due diligence, give brief context, include minimal working example of your code and data in formatted form. By doing all this you help us to help you and likely you will inspire great answers. The site depends on participation, as you receive give back: vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. – rhermans Sep 7 '18 at 19:59

You can use ReIm or Re or Im:
mat[a_] := {{0, a}, {-a, 1}}; 