Ref: Link
Consider ${ \mathbb{R} ^{m \times n} . }$ Let ${ r \leq \min \lbrace m, n \rbrace . }$
We are interested in the set
$${ \mu _r := \lbrace A \in \mathbb{R} ^{m \times n} : \text{rk}(A) = r \rbrace . }$$
We are to show
$${ \text{To show:} \quad \mu _r \text{ is a submanifold of } \mathbb{R} ^{m \times n} . }$$
We can first consider ${ U \cap \mu _r , }$ where
$${ U := \left \lbrace A = \begin{pmatrix} A _{11} & A _{12} \\ A _{21} & A _{22} \end{pmatrix} \in \mathbb{R} ^{m \times n} : A _{11} \in \mathbb{R} ^{r \times r} \text{ is invertible} \right \rbrace . }$$
Note that ${ U \subseteq _{\text{open}} \mathbb{R} ^{m \times n} . }$
Note that ${ U = f ^{-1} (\mathbb{R} \setminus \lbrace 0 \rbrace ), }$ where ${ f : \mathbb{R} ^{m \times n} \to \mathbb{R}, }$ ${ f(A) = \det(A _{11}) .}$
Note that
$${ {\begin{aligned} &\, U \cap \mu _r \\ = &\, \lbrace A \in \mathbb{R} ^{m \times n} : \det(A _{11}) \neq 0, \text{rk}(A) = r \rbrace \\ = &\, \lbrace A \in \mathbb{R} ^{m \times n} : \det(A _{11}) \neq 0, \text{ Schur complement } \Delta _{A _{11}} = O \rbrace \\ = &\, \lbrace A \in \mathbb{R} ^{m \times n} : \det(A _{11}) \neq 0, A _{22} - A _{21} A _{11} ^{-1} A _{12} = O \rbrace \\ = &\, \left \lbrace \begin{pmatrix} A _{11} & A _{12} \\ A _{21} & A _{21} A _{11} ^{-1} A _{12} \end{pmatrix} : \det (A _{11}) \neq 0 \right \rbrace . \end{aligned}} }$$
Hence
$${ U \cap \mu _r = \text{im}(\Phi) }$$
where
$${ {\begin{aligned} &\, \Phi : GL(r, \mathbb{R}) \times \mathbb{R} ^{r \times (n-r)} \times \mathbb{R} ^{(m-r) \times r} \longrightarrow \mathbb{R} ^{m \times n}, \\ &\, \Phi (A, B, C) := \begin{pmatrix} A & B \\ C & C A ^{-1} B \end{pmatrix} . \end{aligned}} }$$
Note that ${ \Phi }$ is a smooth embedding.
Note that ${ \Phi }$ is a smooth immersion, and ${ \Phi : GL(r, \mathbb{R}) \times \mathbb{R} ^{r \times (n-r)} \times \mathbb{R} ^{(m-r) \times r} \longrightarrow \text{im}(\Phi) }$ is a homeomorphism of topological spaces.
Hence
$${ {\begin{aligned} &\, U \cap \mu _r = \text{im}(\Phi) \text{ is a submanifold of } \mathbb{R} ^{m \times n} \\ &\, \text{of dimension } r ^2 + r(n-r) + (m-r) r . \end{aligned}} }$$
Let ${ A \in \mu _r . }$ We can pick permutation matrices ${ P _A , Q _A }$ such that ${ P _A A Q _A \in U \cap \mu _r . }$
It suffices to show there are index sets ${ I, J }$ such that the submatrix ${ A _{I, J} }$ is an ${ r \times r }$ invertible matrix.
Pick rows with indices ${ i _1, \ldots, i _r }$ such that the ${ r \times n }$ matrix formed is of rank ${ r . }$ Now pick columns with indices ${ j _1 , \ldots , j _r }$ such that the ${ r \times r }$ matrix formed is of rank ${ r . }$ Note that the submatrix ${ A _{I, J} }$, where ${ I = \lbrace i _1, \ldots, i _r \rbrace }$ and ${ J = \lbrace j _1, \ldots, j _r \rbrace , }$ is an ${ r \times r }$ invertible matrix.
Hence ${ A \in P _A ^{-1} (U \cap \mu _r) Q _A ^{-1} . }$
Hence
$${ \mu _r \subseteq \bigcup _{P, Q \text{ perm matrices}} P(U \cap \mu _r) Q . }$$
Hence
$${ \mu _r = \bigcup _{P, Q \text{ perm matrices}} P(U \cap \mu _r)Q . }$$
This gives an atlas of ${ \mu _r . }$
Hence ${ \mu _r }$ is a submanifold of ${ \mathbb{R} ^{m \times n} }$ of dimension ${ r ^2 + r(n-r) + (m-r) r .}$