I am aware that there is a similar question elsewhere, but I need help with my proof in particular. Can someone please verify it or offer suggestions for improvement?
Show that $X$ is Hausdorff if and only if the diagonal $\Delta = \{(x, x):x \in X\}$ is closed in $X \times X$
The proof is trivial if $|X|=1$. So, assume that $|X|>1$.
Suppose $X$ is Hausdorff. Let $(a, b) \in X \times X - \Delta$. Note that such an element exists, since $|X|>1$. Then, $a \neq b$. Since $X$ is Hausdorff, we can pick open sets $U_a$ and $U_b$ such that $a \in U_a$, $b \in U_b$, and $U_a \cap U_b = \varnothing$. Now, note that $(U_a \times U_b) \cap \Delta = \varnothing$ (Assume $(p, q) \in (U_a \times U_b) \cap \Delta.$ Then, $(p,q) \in \Delta$ implies that $p = q$. But then, $p \in U_a$ and $p \in U_b$, contradicting the fact that $U_a \cap U_b = \varnothing$). This implies that the set $X \times X - \Delta$ is open in $X \times X$. So, $\Delta$ is closed in $X \times X$.
Now, suppose $\Delta$ is closed in $X \times X$. Then, $X \times X - \Delta$ is open in $X \times X$. So, there exists a basis element $U \times V$ of $X \times X$ such that $(a, b) \in U \times V$ and $U \times V \subseteq X \times X - \Delta$. This implies that $(U \times V) \cap \Delta = \varnothing$. Then, $a \in U$ and $b \in V$. Note that $U \cap V = \varnothing$. If such were not the case, then there exists a $y \in U \cap V$. This implies that $(y, y) \in U \times V$, contradicting the fact that $(U \times V) \cap \Delta = \varnothing$. This shows that $X$ is Hausdorff.