Proposition: let $f:X\to Y$ be a continuous function and $Y$ be Hausdorff. Show that the graph $$G_f= \{(x,f(x))\mid x \in X\}$$ is closed in $X\times Y$.
Proof:
I will show that the closure of the graph equals itself. To do this, take $(x,y)\in \text{Cl(}{G_f})$ and suppose $y \not =f(x)$. From this we will derive a contradiction, which implies that all limit points of $G_f$ are inside itself (since $y=f(x)$), hence implying it is closed.
Since $y$ and $f(x)$ are distinct in $Y$, there are neighborhoods $V_1$ and $V_2$ of respectively $y$ and $f(x)$ that are disjoint. And, since $f$ is continuous, there is a neighborhood $U$ of $x$ such that $f(U)\subseteq V_2$.
Now, the set $U\times V_1$ is an open set containing $(x,y)$ and since this is a limit point of $G_f$, every open set containing this point must intersect $G_f$. Suppose $(z,f(z)$ is such a point in the intersection. Since this means $z\in U$, then $f(z)\in f(U)\subseteq V_2$. But then $$(z,f(z))\in(U\times V_1)\cap(U\times V_2),$$ which is a contradiction with $V_1$ and $V_2$ being disjoint.