Connectedness of the sets $\{A \in M(n,\mathbb R) : \mathrm{rank}(A) =m\}$ and $\{A \in M(n,\mathbb R) : \mathrm{rank}(A)\ge r\}$ Let $r>0$ , I know that $\{A \in M(n,\mathbb R) : \mathrm{rank}(A) < r\}$ is path connected in $M(n,\mathbb R)$ . My question is ; for positive integer $m < n$ , is the set $\{A \in M(n,\mathbb R) : \mathrm{rank}(A) =m\}$ connected ? For positive real $r \le n-1$ , is the set  $\{A \in M(n,\mathbb R) : \mathrm{rank}(A) \ge r\}$ connected ? What if we replace $\mathbb R$ by $\mathbb C$ ?
 A: The set $\{A \in M(n,\mathbb C) : \mathrm{rank}(A) =p\}$ is connected. Indeed this set is $\phi(GLn(\mathbb{C})^2)$ where $\phi$ : $$GLn(\mathbb{C})^2 \rightarrow Mn(\mathbb{C})$$
$$(P,Q) \mapsto PJ_pQ^{-1} $$
And $J_p=\begin{pmatrix} I_p & 0 \\ 0 & 0 \end{pmatrix}$.
Since $\phi$ is continuous and $GLn(\mathbb{C})$ is connected, we have that $\{A \in M(n,\mathbb C) : rank A =p\}$ is connected.
For $\{A \in M(n,\mathbb C) : rank A \ge r\}$ you can prove directly prove directly that two matrices are path connected, using the previous result. You can chose two esay matrices of different rank $\ge r$ and connect them in $\{A \in M(n,\mathbb C) : rank A \ge r\}$ , and since $\{A \in M(n,\mathbb C) : rank A =p\}$ is connected, you proved that $\{A \in M(n,\mathbb C) : rank A \ge r\}$ is connected.
For the case $\mathbb R$, you have that $GLn(\mathbb{R})$ is not connected, I think you can go from there. So $GLn(\mathbb{R})$ has two connective components $GLn(\mathbb{R})=GLn(\mathbb{R})^+\cup GLn(\mathbb{R})^-$. You will show that for the function $\psi$, $$GLn(\mathbb{R})^2 \rightarrow Mn(\mathbb{R})$$
$$(P,Q) \mapsto PJ_mQ^{-1} $$ You can chose $P$ and $Q$ in $GLn(\mathbb{R})^+$, for example is $P \in GLn(\mathbb{R})$ is a matrix which works, then $\begin{pmatrix} I_{n-1} & 0 \\0&-1 \end{pmatrix}P$ will also works and one of these two matrices will be in $GLn(\mathbb{R})^+$. We do the same with $Q$. So for $m<n$, the set $\{A∈M(n,\mathbb R):rank(A)=m\}$ is connected because it is the image by $\psi$ of $(GLn(\mathbb{R})^+)^2$.
