Let $n \in \mathbb N$ and $ I \subset [| 1, n |]$. Find a necessary and sufficient condition on $I$ so that $\{M \in M_n(\mathbb R), \ rank(M) \in I \}$ is connected.
I know that $\{M \in M_n(\mathbb R), \ rank(M) =n\}$ is not connected since $\det$ is continuous while $\mathbb R^*$ is not connected.
Do you have a hint for this ? Thank you.
Hints.