Given $p<n$, $g:\mathbb{R}^n\to\mathbb{R}^p$ a $C^1$ function with $g(a)=0$ and $Dg(a): \mathbb{R}^n\to\mathbb{R}^p$ surjective. And using the identification $\mathbb{R}^p\cong \mathbb{R}^p\times \{0\}\subset\mathbb{R}^n$.
I have to show that there are $j_1<...<j_p$ such that $Dg(a)(e_{j_k})$ for $k=1,...,p$ spans $\mathbb{R}^p$.
What I have tried: Since $Dg(a)$ is surjective, we know that the image of $Dg(a)$ equals and thus also spans $\mathbb{R}^p$. We also know $Dg(a)$ is linear, so $Dg(a)(e_1 + e_2)=Dg(a)(e_1)+Dg(a)(e_2)$ for example. So I guess I have to show that if two vectors are linearly independent in $\mathbb{R}^n$ they are still linearly independent under the transformation that is $Dg(a)$?
I also know that if $A\in \text{Lin}(\mathbb{R}^n,\mathbb{R}^p)$ has rank $r$, then there exist $\Phi\in\text{Aut}(\mathbb{R}^p)$ and $\Psi\in\text{Aut}(\mathbb{R}^n)$ such that $$ \Phi\circ A\circ \Psi(x) = (x_1, ..., x_r, 0, ..., 0)\in\mathbb{R}^p, $$ but I don't know if that's useful and how I'd use it. What would be the rank of $Dg(a)$?
If $G: \mathbb{R}^n \to \mathbb{R}^p$ is linear and surjective, then $Ge_1,...,Ge_n$ must span $\mathbb{R}^p$ and hence must contain a basis.