Density of the matrices with all eigenvalues of non-zero real part. I've found and interesting problem but a little difficult for me.
The problem is to prove that the set of matrices with all eigenvalues of nonzero real part is dense in $\mathbb{R}^{n^2}$ with the usual topology.
 A: Let's fix some notation: $n$ is a fixed positive integer, and for any $n \times n$ real matrix $A$ let $\sigma(A)$ denote the set of (complex) eigenvalues of $A$.  Denote the $n \times n$ identity matrix by $I$.
Fixing any real $n \times n$ matrix $M$, recall that for any real $t$, one has
$$
\sigma(M + tI) = \{s + t: s \in \sigma(M)\}.
$$
[Sketch of proof: It is evident that for any nonzero vector $v$ in $\mathbb{C}^n$ and any $\lambda$ in $\mathbb{C}$, one has
$(M + tI)v = \lambda v$ if and only if $M v= (\lambda - t) v$.  It follows that a complex number $\lambda$ is in $\sigma(M + tI)$ if and only if $\lambda - t$ is in $\sigma(M)$.  This is equivalent to the desired result.]
It follows that as long as $t$ is not in the finite set of real numbers $\{-\operatorname{Re}(s): s \in \sigma(M)\}$, then every eigenvalue of the real matrix $M + tI$ has nonzero real part.  In particular, there must be some $\epsilon > 0$ with the property that all of the matrices
$$
M + tI, \qquad 0 < t < \epsilon,
$$
have all eigenvalues with nonzero real part.  And clearly any open subset of $\mathbb{R}^{n^2}$ containing $M$ must contain a matrix of this form.
