Prove that the graph of a function is a manifold I know how to show this if $X$ and $Y$ are euclidean spaces using IFT but wanted to confirm proofs about the abstract case.
Q) a) $X$, $Y$ are smooth manifolds and $f:X\rightarrow Y$ is smooth. Show that $graph(f)$ is a manifold. 
My attempt: Since $X$ and $Y$ are smooth manifolds, $\exists$ atlases $\{U_{\alpha},\phi_{\alpha}\}_{\alpha \in I}$, $\{V_{\beta},\psi_{\beta}\}_{\beta \in J}$ on $X$ and $Y$. Let $\stackrel{\sim}\phi$ be a coordinate chart on $graph(f)$ such that $\stackrel{\sim}\phi(p,f(p)) = \phi(p)$ on $U\times V$and thus $graph(f)$ is a manifold? 
b) Use (a) to show that $F: X\rightarrow graph(f)$ is a diffeomorphism.
My attempt: I mean the coordinate functions of $F$ which are identity and $f$ are smooth, thus $F$ is smooth and $\exists F^{-1}$ which is the projection map which is also smooth. Thus $F$ is a diffeomorphsim but wanted to check how to use (a) to prove the same. I can again define a coordinate chart $\stackrel{\sim}\phi(p,f(p)) = \phi(p)$ on $graph(f)$ and thus $\phi^{-1}\circ F \circ \stackrel{\sim}\phi(x) = x$ which is smooth and thus $F$ is smooth? Same logic holds for the inverse.
 A: I don't think there's any need of charts.  You can show that the graph of a smooth map $f : X \to Y$ is an embedded submanifold of $X \times Y$ and hence a manifold in its own right.
Let $F : X \to X \times Y$ be defined by $F(x) = (x,f(x))$ for all $x \in X$.  It is a smooth map and we will show that it is an embedding and hence its image is an embedded submanifold, but observe that the image of $F$ is the graph of $f$ in $X \times Y$.
Let $\pi: X \times Y \to X$ be the (smooth) cartesian projection.  Notice that $\pi \circ F = \operatorname{id}_X$.  This shows that $F$ is injective:  if $F(x) = F(x')$ then, applying $\pi$, we see that $x = x'$.  
Differentiating and using the chain rule $\pi_* \circ F_* = (\operatorname{id}_X)_*$ we see that $F$ is an immersion: if $F_* v = 0$, then applying $\pi_*$ we see that $v=0$.
Finally, to show that it is an embedding, let $U \subset X$ be an open set, then $\pi^{-1}(U) \subset X \times Y$ is open (since $\pi$ is continuous) and $F(U) = F(X) \cap \pi^{-1}(U)$ is open in the subspace topology.  Hence $F$ is an embedding.
