Show that \(X\) is Hausdorff if and only if the diagonal \(\Delta = \ts{x \times x \mid x \in X}\) is closed in \(X \times X\).
Solution
1. If \(X\) is Hausdorff, then \(\Delta\) is closed in \(X\times X\).
Let \((x,y)\in(X\times X)-\Delta\), so \(x\ne y\). Choose disjoint open sets \(U\ni x\) and \(V\ni y\). Then \(U\times V\) is an open neighborhood of \((x,y)\), and a point \((z,z)\in U\times V\) would give \(z\in U\cap V=\varnothing\). So \(U\times V\subseteq(X\times X)-\Delta\), and the complement of \(\Delta\) is open.
2. If \(\Delta\) is closed in \(X\times X\), then \(X\) is Hausdorff.
Let \(x\ne y\) in \(X\). Then \((x,y)\) lies in the open set \((X\times X)-\Delta\), so by the definition of the product topology there are open \(U,V\subseteq X\) with \((x,y)\in U\times V\subseteq(X\times X)-\Delta\). If \(z\in U\cap V\), then \((z,z)\in(U\times V)\cap\Delta=\varnothing\); hence \(U\) and \(V\) are disjoint open neighborhoods of \(x\) and \(y\).
3. Q.E.D.
Steps 1 and 2 give the two implications.