Prove that if a function $f: X\to Y$ continuous then its graph is closed
a) Let $(z_n)=(x_n,f(x_n))$ be a convergent sequence of $G(f)$. If $(x,y)$ is its limit, show that $y=f(x)$.
b) Let $x\in X$ and $(x_n)$ a convergent sequence with limit $x$. You have to prove that $(f(x_n))$ is convergent in $Y$ with limit $f(x)$. Use the sequence $z_n=(x_n,f(x_n))$ and use the fact that $G(f)$ is compact to prove that $(f(x_n))$ has $f(x)$ as an accumulation point. Then prove that any subsequence of $(f(x_n))$ has $f(x)$ as an accumulation point.
Hint: For (a), every metric space is Hausdorff, the result is frue for any Hausdorff space $Y$. Choose any (x,y)\in $X\times Y\setminus G(f)$. Then $x\in X$ and $y\ne f(x)$. Use Hausdorff condition in $Y$.
We want to show that every sequence which converges in $X\times Y$ has a limit in $G(f)$.
A sequence $(x_n, y_n)$ converges to $(x, y)$ if and only if $x_n\rightarrow x$ and $y_n\rightarrow y$.
Note that $(x_n, y_n)\in N_\epsilon(x, y)\implies(x_n)\in N_\epsilon(x) $ and $(y_n)\in N_\epsilon(y)$ respectively.
Conversely, if $x_n \in N_{\epsilon/2}(x)$ and $y_n \in N_{\epsilon/2}(y)$, then $(x_n, y_n)\in N_\epsilon(x, y)$.
So now we see that if $(x_n, y_n)\in G(f)$, $(x_n,y_n) \rightarrow (x,y)$, then $y_n\rightarrow f(x_n)$ as defined by $G(f)$ and $x_n \rightarrow x, f(x_n)\rightarrow y.$
Since $f$ is assumed to be continuous, $f(x_n)\rightarrow f(x)$ so $y=f(x)$. Therefore $(x,y)\in G(f)$ and we conclude $G(f)$ is closed.