The following problem is part of an assignment in my Differential Topology course.
Exercise. Show the graph of a $C^k$ function $f : M \to N$ between two $C^k$ manifolds $M$ and $N$ defined by $\Gamma(f)=\{(x,y) \in M \times N : y=f(x) \}$ is a closed embedded submanifold of $M \times N$ and is diffeomorphic to $M$.
I have managed to solve this exercise and I have posted my solution below. My instructor sketched an alternative solution, which I am unable to complete. I would appreciate any help on this.
Sketch of Proof. Consider the map $\varphi : M \times N \to N$ given by $\varphi(x,y) = y - f(x)$. Then $\Gamma(f) = \varphi^{-1}(0)$. We will show that $0 \in N$ is a regular value of $f$ by showing that $\mathrm{Jac}(\varphi)|_p$ has maximal rank for all $p \in \varphi^{-1}(0)$. Now, $\mathrm{Jac}(\varphi)$ clearly has the $n \times n$ minor $\begin{pmatrix} \frac{\partial \varphi}{\partial y_i}\Big|_p \end{pmatrix}_{n \times n}$ equal to $I_{n \times n}$. Hence, by the regular level set theorem, we have that $\Gamma(f) = \varphi^{-1}(0)$ is a closed embedded submanifold of $M \times N$. $\tag*{$\blacksquare$}$
Now, by my understanding we need to choose coordinate charts $(V_1,\psi_1)$ and $(V_2,\psi_2)$ around $y$ and $f(x)$, respectively, so that $y - f(x)$ makes sense.
Ideally, I would like to be able to take both charts to be the same, because only when both charts are the same can I be assured that $y$ and $f(x)$ have the same coordinates precisely when $y = f(x)$. However, it won't always happen that $f(x)$ and $y$ lie in the same chart for all values of $x \in M$ and $y \in N$.
More importantly, if the charts are distinct then I don't see how to define which point on $N$ corresponds to $y - f(x)$. I've tried playing around with the charts, trying to subtract the images, and pull them back to $N$, etc. but I've either ended up in dead ends or I've started defining nonsense.
At this point, I think I'm either missing something completely straightforward, or this method cannot be used to prove that $\Gamma(f)$ is an embedded submanifold of $M \times N$. Any help is appreciated.
As mentioned previously, I have posted my solution to the problem (not using the above idea) in an answer below. Comments for improvements to that solution are also welcome. I have chosen to not post the answer in the question details because it will be easier to receive feedback this way, and it will not clutter the page so much in my opinion. In any case, I have tagged this question with [alternative-proof].
Thanks in advance.
To show that the set $$\Gamma(f) = \{ (x,y) \in M \times N : y = f(x) \}$$ is a closed embedded submanifold of $M \times N$, it suffices to show that $\Gamma(f)$ is locally the inverse image of a regular value.
So, let $(U,\varphi)$ and $(V,\psi)$ be charts around $p \in M$ and $f(p) \in N$, respectively, such that $f(U) \subset V$. Let $x_1,\dots,x_m$ be the local coordinates on $U$ and $y_1,\dots,y_n$ the local coordinates on $V$. Consider the map $g \colon U \times V \to \Bbb{R}^n$ given by $g(x,y) = \psi(y) - \psi(f(x))$. Then, $g(p,f(p)) = 0$ and if $g \equiv (g_1,\dots,g_n)$, then $$ \left( \frac{\partial g_i}{\partial y_j}\bigg|_{(p,f(p))} \right)_{n \times n} = I_n, $$ so this matrix is invertible. So the implicit function theorem is applicable: there exists a neighbourhood $W \subset U$ of $p$ and a unique $C^k$ function $h : W \to \Bbb{R}^n$ such that $h(p) = f(p)$ and for all $(x,y) \in U \times V$, $g(x,y) = 0$ if and only if $y = h(x)$. In particular, $g^{-1}(0) \cap (W \times V)$ is an embedded submanifold of $M \times N$.
But, $g(x,f(x)) = 0$ for all $x \in W$, so $h = f|_W$ by the uniqueness of $h$. Hence, $g^{-1}(0) \cap (W \times V) = \Gamma(f) \cap (W \times V)$, so $\Gamma(f)$ is locally an embedded submanifold of $M \times N$.
$\Gamma(f)$ is closed because the graph of a continuous function into a Hausdorff space is closed.
$\Gamma(f)$ is diffeomorphic to $M$ because every point in $M \times N$ lying in $\Gamma(f)$ has a neighbourhood $W \times V \subset M \times N$ such that the coordinates on $\Gamma(f) \cap (W \times V)$ is exactly given by the coordinates on $W$.