Density of sets I have got a problem on whether a set is dense or not but not quite sure on how to approach it.
Consider the space $M_2(R)$ with its usual topology.Consider the set $ S$ of all matrices with both eigen values real and the set $M$ of all matrices with trace=$0$.Are $S,M$ dense sets ?Is  the set of all invertible matrices $I$ dense?
 A: Here's an idea for the set $M$: 
$M_2 \cong \mathbb R^4$ as vector spaces. Say we put the $\max$ norm on it. The trace maps a vector in $\mathbb R^4$ to a value in $\mathbb R$. Also the trace is continuous and $M = \mathrm{trace}^{-1}(\{0\})$ is closed. So it equals its closure. Therefore unless $M$ equals the whole space it is not dense. 
A: The set $U$ of matrices in $\mathscr M_2(\mathbb R)$ with complex eigenvalues is an open set. Indeed,
$$
U=\left\{(a,b,c,d): (a+d)^2-4(ad-bc)<0\right\}.
$$
so $\mathscr M_2(\mathbb R)\smallsetminus U$ is closed and hence
$\overline{\mathscr M_2(\mathbb R)\smallsetminus U}=\mathscr M_2(\mathbb R)\smallsetminus U$. Thus no matrix with complex eigenvalues can be approximated by matrices with real eigenvalues.
In the case of the trace, once again the matrices with zero trace constitute a closed set, and those of non-zero trace an open set. Once again, no hope to approximate a matrix with non-zero trace with matrices of zero trace.
Note.  $M_2(\mathbb R)$ is homeomorphic to $\mathbb R^4$, and all norms there are equivalent. 
A: The map $\mathrm{trace}$ is a linear form of $M_2(\Bbb R)$, hence its kernel is an hyperplane of $M_2(\Bbb R)$. So $\ker\mathrm{trace }$  is a proper subspace of $M_2(\Bbb R)$ (finite dimensional) , hence not dense.
