Prove that if $X$ is Hausdorff, $\Delta$ is closed in $X\times X$ Prove that if $X$ is Hausdorff, $\Delta=\{(x, x)\mid x\in X\}$ is closed in $X\times X$ (with the product topology).

My attempt:

Let $x_1, x_2\in X$ s.t. $x_1\ne x_2$.

There exist neighborhoods $U_1$ and $U_2$ of $x_1$ and $x_2$ that are disjoint.

$U_1\times U_2$ is a basis element in the product topology on $X\times X$. So, $U_1\times U_2$ is open in $X\times X$.

Let $x\in X$. 

$(x, x)\in U_1\times U_2\implies x\in U_1$ and $x\in U_2\implies x\in U_1\cap U_2$, which contradicts the fact that $U_1$ and $U_2$ are disjoint.

So, $(x, x)\notin U_1\times U_2$.

I feel that I'm on the right track but don't know how to proceed. Could someone please help me out?
You're basically there, you just need to interpret your result. You found that for any point $(x_1,x_2)\in X\times X-\Delta$, there exists a neighborhood of $(x_1,x_2)$ contained in $X\times X-\Delta$. That is, $X\times X-\Delta$ is open. Therefore $\Delta$ is...
Let $(x, y)\in X\times X-\Delta$

$\implies(x, y)\in X\times X$ and $(x, y)\notin\Delta$

$\implies x, y\in X\text{ and }x\ne y$

There exist neighborhoods $U_x$ and $U_y$ of $x$ and $y$ respectively that are disjoint.

$U_x\times U_y$ is a basis element in the product topology on $X\times X$.

$(x, y)\in U_x\times U_y$ --------------------------------------------- (1)

Let $(u, v)\in U_x\times U_y$. --------------------------------------------- (2)

$\implies u\in U_x$ and $v\in U_y$

Since $U_x\subset X$ and $U_y\subset X$,

$u, v\in X$

$\implies(u, v)\in X\times X$ --------------------------------------------- (3)

$u=v\implies u=v\in U_x\cap U_y$, a contradiction as $U_x$ and $U_y$ are disjoint.

So, $u\ne v$.

$\implies(u, v)\notin\Delta$ --------------------------------------------- (4)

From (3) and (4),

$(u, v)\in X\times X-\Delta$ --------------------------------------------- (5)

From (2) and (5),

$U_x\times U_y\subset X\times X-\Delta$ --------------------------------------------- (6)

Combining (1) and (6),

$(x, y)\in U_x\times U_y\subset X\times X-\Delta$

So, $X\times X-\Delta$ is open in $X\times X$.

So, $\Delta$ is closed in $X\times X$.

QED