Show that $X$ is Hausdorff if and only if the diagonal $\Delta =\{ x\times x|x\in X\}$ is closed in $X\times X$.
My attempt: first suppose $X$ is Hausdorff. let $(X\times X)-\Delta=\{ m\times n\in X\times X| m\neq n\}$. Let $x,y\in X$ with $x\neq y$, $\exists U_x, U_y\in \mathcal{T}_{X}$ such that $U_x\cap U_y=\phi$, by Hausdorff property of $X$. $\mathcal{B}=\{ U\times V|U,V\in \mathcal{T}_X\}$ is basis for $\mathcal{T}_p$, product topology. We want to show $(X\times X)-\Delta \in \mathcal{T}_p$. Claim: $(X\times X)-\Delta= \bigcup_{x\times y\in (X\times X)-\Delta} (U_x \times U_y)$. For $x\times y\in (X\times X)-\Delta, \exists U_x \times U_y\in \mathcal{B}$(existence depends on Hausdorff property) such that $x\times y\in U_x \times U_y \subseteq \bigcup_{x\times y\in (X\times X)-\Delta} (U_x \times U_y)$. Thus $(X\times X)-\Delta \subseteq \bigcup_{x\times y\in (X\times X)-\Delta} (U_x \times U_y)$. Now let $p\times q\in \bigcup_{x\times y\in (X\times X)-\Delta} (U_x \times U_y)$. Then $p\times q\in U_x \times U_y$, for some $x\times y\in (X\times X)-\Delta$. Since $U_x \cap U_y=\phi$ i.e. $\nexists z\in X$ such that $z\in U_x \cap U_y$. So $U_x \times U_y=\{ r\times s|r\in U_x, s \in U_y\}\subseteq (X\times X)-\Delta$, since $r\neq s$ (by $U_x \cap U_y=\phi$). Thus $(X\times X)-\Delta \supseteq \bigcup_{x\times y\in (X\times X)-\Delta} (U_x \times U_y)$. Hence $\Delta$ is closed in $X\times X$.
Conversely, suppose $\Delta$ is closed in $X\times X$. So $(X\times X)-\Delta=\{m\times n\in X\times X|m\neq n\} \in \mathcal{T}_p$. $(X\times X)-\Delta=\bigcup_{i\in I}(U_i\times V_i)$, where $(U_i\times V_i) \in \mathcal{B}$. Let $x\times y\in (X\times X)-\Delta$. Then $x\times y\in U_j \times V_j$, for some $j\in I$. Claim: $U_j\cap V_j=\phi$. Assume towards contradiction i.e. $U_j \cap V_j \neq \phi$. That means $\exists p\in U_j \cap V_j$. $p\in U_j$ and $p\in V_j$. So $p\times p\in U_j \times V_j$. Which implies $p\times p\in \bigcup_{i\in I}(U_i\times V_i)$. Thus $p\times p\in (X\times X)-\Delta$. Which contradicts the definition of $(X\times X)-\Delta$. Our initial assumption is wrong. Hence $U_j\cap V_j =\phi$.
lemma: Let $f, g : X \to Y$ be continuous; assume $Y$ is Hausdorff. Show that $\{x \mid f(x) = g(x)\}$ is closed in $X$.
You may have thought(I did) to prove this lemma by somehow showing inverse image of a closed set of continuous map is precisely $\{x|f(x)=g(x)\}$ set, hence closed in $X$. But constructing that map is not obvious/natural, at first glance(at least in my case). So later, I drop this strategy to prove above property of Hausdorff space. In my opinion, this is a candidate approach, one should consider.