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!