Is the set $\mathcal{A}$ of all matrices whose trace is $0$ nowhere dense in $\mathbb{M}_n(\mathbb{R}),n \ge 2$?

Your set is closed (as it is the inverse image of the closed set $\{0\}\subseteq \Bbb R$ under the continuous trace function), and it has empty interior (as any $\epsilon$-ball around a matrix with trace $0$ will contain a matrix with non-zero trace). So it is nowhere dense.


Result: If $A$ is a subset of a metric space $(X,d)$, then $A$ is nowhere dense in $X$ if and only if $\overline{A}^c$ is dense in $X$

[For a proof, see this]

Note that $\mathcal{A}$ is closed

So, In order to prove $\mathcal{A}$ is nowhere dense in $M_n(\Bbb{R})$, we prove $\overline{\mathcal{A}}^c=\mathcal{A}^c=M_n(\Bbb{R}) \setminus \mathcal{A}$ is dense in $M_n(\Bbb{R})$

To prove $M_n(\Bbb{R}) \setminus \mathcal{A}$ is dense in $M_n(\Bbb{R})$, we prove every point of $M_n(\Bbb{R})$ is either a point of $M_n(\Bbb{R}) \setminus \mathcal{A}$ or a limit point of $M_n(\Bbb{R}) \setminus \mathcal{A}$.

Suppose $B \in M_n(\Bbb{R}) \setminus \mathcal{A}$ ,then we are done! So asume $B \notin M_n(\Bbb{R}) \setminus \mathcal{A}$. That is $B \in \mathcal{A}$. In this case we prove $B$ is a limit point of $M_n(\Bbb{R}) \setminus \mathcal{A}$

take $B=\begin{pmatrix}a_{11} & a_{12} &\dots&a_{1n} \\ a_{21} & a_{22} \ &\dots&a_{2n} \\ \vdots \\a_{n1} & a_{n2} &\dots&a_{nn}\end{pmatrix}$ with $a_{11}+\dots+a_{nn}=0$

Then consider the sequence of elements of $M_n(\Bbb{R})\setminus \mathcal{A}$ $$A_k=\begin{pmatrix}a_{11}+1/k & a_{12} &\dots&a_{1n} \\ a_{21} & a_{22}+1/k \ &\dots&a_{2n} \\ \vdots \\a_{n1} & a_{n2} &\dots&a_{nn}+1/k\end{pmatrix}$$ Then $A_k \rightarrow B$ and so $B$ is a limit point!


Your set is a finite dimensional (and hence closed) proper subspace of $\mathbb{M}_n(\mathbb{R})$ so it is nowhere dense because every proper subspace of a normed space has empty interior.