I'm trying to work through the following problem.
Let $M$ be an $m$-dimensional manifold. Prove that the graph of any smooth map $f:M\to\mathbb{R}$ is a closed, embedded submanifold of $M\times\mathbb{R}$.
My Attempt (so far): We recall the Regular Value Theorem.
If $F:M^{m}\to N^{n}$ is a smooth map and $q\in N$ is a regular value of $F$ (i.e. the differential $DF$ is onto for each $p\in f^{-1}(q)$), then $F^{-1}(q)$ is a closed, embedded submanifold of $M$.
Let $\Gamma_{f}=\{(p,q)\in M\times\mathbb{R}~:~q=f(p)\}$ be the graph of the smooth map $f:M\to\mathbb{R}$. Define $\phi:M\times\mathbb{R}\to\mathbb{R}$ by $\phi(p,q)=q$. Then $\phi$ is smooth and $$\phi^{-1}(f(p))=\{(p,q)\in M\times\mathbb{R}~:~\phi(p,q)=q=f(p)\}=\Gamma_{f}.$$ To show that $\Gamma_{f}$ is a closed, embedded submanifold of $M\times\mathbb{R}$, it will suffice (by the Regular Value Theorem) to show that $f(p)$ is a regular value of $\phi$. Hence, we must show that the differential $D\phi$ is onto for each point in $\phi^{-1}(f(p))$.
My Questions/Concerns: Does this argument look okay so far? If it does, my only concern is I'm not sure how to show that the differential is surjective.
Thanks in advance for any suggestions!
Consider the maps $\pi:M\times \mathbb{R} \rightarrow M: (p,t) \mapsto p$, and $\phi:M \rightarrow M\times \mathbb{R}: p \mapsto (p,\phi(p))$. Clearly $\pi \circ \phi = id_M$, so if we take the tangent map (alternative name for the differential) we have $T_{(p,\phi(p))}\pi \circ T_p\phi=T_p id_M=id_{T_p M}$, form this one sees that $T_p\phi$ must be injective for every $p$, hence $\phi$ is an immersion. To proof that it is an embedding we have to provide a local inverse which is continous, then $\phi$ will become a local homeomorphism onto its image, to see this, on $\Gamma_f$ one has that $\phi \circ \pi\mid_{\Gamma_f} = id_{\Gamma_f}$ moreover $\pi$ is continous almost by definition of product topology, so a conclusion is reached.