# Is a certain subset of $M_2(\mathbb{R})$ closed?

I am trying to prove that the set M of all matrices in the normed linear space $M_2(\mathbb{R})$ such that both eigen values are real is closed (under metric topology; metric induced by the norm).

Following is my attempt. I recall the property that finite dimensional subspaces of normed spaces are complete. And since complete metric spaces are closed, if I can prove it is a vector subspace of $M_2(\mathbb{R})$, I am done. But I don't know if M is closed under "vector" addition. Is it true that the sum of two "real- eigenvalued" matrices have real eigen values?

$$\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} + \begin{pmatrix} 0 & 0 \\ -1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$$ So it's not a subspace. But to show it's closed, you can produce a continuous function $f : M_2(\mathbb{R}) \to \mathbb{R}$ such that $M = f^{-1}([0,\infty))$. Hint: look at the characteristic polynomial of a matrix $A$, and think about the discriminant of a quadratic equation.

• +1 good counterexample. I'd be interested to see a solution to the main question though. – goblin Jan 20 '16 at 17:04
• thank you. I have obtained f = (tr(A))2 - 4*det(A) which is continuous and would give me $f^{-1}([0,\infty))$ as M. – user166305 Jan 20 '16 at 17:20
• @user166305: Great! Well done. – Nate Eldredge Jan 20 '16 at 19:25

It's not true, as Nate Eldredge counterexemple show.

For your original question, you can look at it this way :

the eigenvalue of $M = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ are the roots of the polynomial

$$P(x) = \begin{vmatrix} a-x & b \\ c & d-x \end{vmatrix}$$

This is a 2nd degree polynomial, so it has real roots if the discriminant is positive.

Hence, if $\Delta(a,b,c,d)$ is the discriminant of $P$, the set of matrix with real eigenvalues is

$$\left\{ \begin{pmatrix} a & b \\ c & d \end{pmatrix} \mid (a,b,c,d)\in \Bbb R, \Delta(a,b,c,d) \geq 0 \right\}$$

So if you can prove that $\Delta(a,b,c,d)$ is continuous, you've won (do you see why?)

• discriminant turns out to be Tr(M)^2 - 4*det(M) which is continuous as it is a linear combination of continuous functions (Tr^2 is composition of two continuous functions). Thus my original set is the inverse image of [0,\infty) under this cont map and thus closed – user166305 Jan 20 '16 at 17:26