Let X and Y be topological spaces and f: X $\to$ Y a continuous function. The graph of f is the set $\Gamma_f $ = {(x, f (x)): $x \in X$}. Let X and Y be topological spaces and f: X $\to$ Y a continuous function. The graph of f is the set  $\Gamma_f $ = {(x, f (x)): $x \in X$}.
a) Show that if Y is hausdorff then $ \Gamma_f $ is closed at X $ \times $ Y.
b) Show that X is homeomorphic to $ \Gamma_f $ where $ \Gamma_f $ is seen as a subspace of X $ \times $ Y.
====================================================================
a) We know that f is continuous and Y is hausdorff , so there is a point (x,y) outside of the graph and  exist an open neighborhood that does not intersect the graph. So the complement of the graph is open, and, therefore the graph is closed.
Let f(x) $\in$ V and y $\neq$ f(x) $\in V'$ where v, v'are two disjoint open neighborhoods, because Y is Hausdorff.But f is continuous, so, U= $f^{-1}$(V) is open and x $\in$ U  and U $\times$ V' is an open neighborhood of (x,y) such that it does not intersect the graph, so (z,f(z))$\in U \times V'$, and that implies f(z) $ \in V \cap V'$.
b) We say that f is a homeomorphism if f is bijective, continuous and its inverse is also continuous.
That's what I've done so far.
 A: I would rewrite your proof for part a as follows.
Part a:
We proceed by showing that a point $(x,y)$ that is not on the graph has a neighborhood that does not intersect the graph. We then conclude that the complement of the graph is open, which means that the graph is closed.
Let $(x,y)$ be such a point. Because $y \neq f(x)$ and $Y$ is Hausdorff, there exist disjoint open sets $V,V'$ with $f(x) \in V$ and $y \in V'$. $f$ is continuous, so $U = f^{-1}(V)$ is open with $x \in U$.
We see that $U \times V'$ is an open neighborhood of $x,y$ that does not intersect the graph. Indeed, if we suppose (for contradiction) that $(z,f(z)) \in U \times V'$, then it would follow that $f(z) \in V'$. However, $z \in U = f^{-1}(V)$, which means that $f(z) \in V$. Thus, $f(z) \in V \cap V'$, contradicting the fact that $V,V'$ are disjoint.

For part $b$, the homeomorphism between $X$ and the graph needs to be a map $g:X \to \Gamma_f \subset X \times Y$. However, you never define such a map.
Define $g$ by $g(x) = (x,f(x))$. Why is $g$ invertible, even if $f$ is not?
