The Diagonal as a Test for Separation
To say that a space is Hausdorff is to say that any two distinct points have disjoint open neighborhoods. There is a way to encode this pairwise condition in a single subset of a product space. The diagonal records the pairs whose coordinates agree; its complement consists of precisely the pairs that need to be separated. The product topology makes the connection exact.
Let \((X,\mathcal{T})\) be a topological space. We use the product topology on \(X\times X\): its basis consists of all rectangles \(U\times V\), where \(U,V\in\mathcal{T}\). Thus, if \(W\) is open in \(X\times X\) and \((x,y)\in W\), there are open sets \(U,V\subseteq X\) with \((x,y)\in U\times V\subseteq W\).
A subset is closed when its complement is open. Consequently, to test whether \(\Delta_X\) is closed, we ask whether every point \((x,y)\) with \(x\ne y\) has an open neighborhood in \(X\times X\) that avoids the diagonal. The following elementary observation explains what happens for a basis rectangle.
Proof. If \((z,z)\in (U\times V)\cap\Delta_X\), then \(z\in U\) and \(z\in V\), so \(z\in U\cap V\). Conversely, if \(z\in U\cap V\), then \((z,z)\in U\times V\) and \((z,z)\in\Delta_X\), so the rectangle meets the diagonal. \(\square\)
The Closed-Diagonal Characterization
Proof. First suppose \(X\) is Hausdorff. To show that \(\Delta_X\) is closed, we show that its complement is open. Take any \((x,y)\in(X\times X)\setminus\Delta_X\). Then \(x\ne y\). By the Hausdorff property, there are open neighborhoods \(U\) of \(x\) and \(V\) of \(y\) such that \(U\cap V=\varnothing\). The rectangle \(U\times V\) is open in the product topology and contains \((x,y)\). By the lemma, it does not meet \(\Delta_X\); hence \(U\times V\subseteq(X\times X)\setminus\Delta_X\). Every point of the complement therefore has an open neighborhood contained in the complement, which proves that the complement is open and \(\Delta_X\) is closed.
Now suppose \(\Delta_X\) is closed. Take any distinct points \(x,y\in X\). The point \((x,y)\) lies outside \(\Delta_X\), so it lies in the open set \((X\times X)\setminus\Delta_X\). By the basis property of the product topology, there are open sets \(U,V\subseteq X\) such that \((x,y)\in U\times V\subseteq(X\times X)\setminus\Delta_X\). In particular, \(x\in U\) and \(y\in V\). If \(U\cap V\) contained some \(z\), the lemma would give \((z,z)\in(U\times V)\cap\Delta_X\), contradicting \(U\times V\subseteq(X\times X)\setminus\Delta_X\). Therefore \(U\cap V=\varnothing\). We have found disjoint open neighborhoods for every distinct pair, so \(X\) is Hausdorff. If \(X\) has no distinct points, the separation condition is vacuously satisfied, and the same argument still proves the equivalence. \(\square\)
The proof uses only the basic rectangles of the product topology. In one direction, disjoint neighborhoods in \(X\) give a rectangle avoiding the diagonal. In the other, a rectangle around an off-diagonal pair must avoid the diagonal, so its two coordinate sets must be disjoint.
Worked Example: The Real Line
Let \(X=\mathbb{R}\) with its standard topology. We verify directly that \(\Delta_{\mathbb{R}}\) is closed in \(\mathbb{R}\times\mathbb{R}\).
Take an arbitrary point \((x,y)\notin\Delta_{\mathbb{R}}\), so \(x\ne y\). Set \(d=|x-y|\); then \(d>0\). The intervals \(U=(x-d/3,x+d/3)\) and \(V=(y-d/3,y+d/3)\) are open neighborhoods of \(x\) and \(y\). If some \(z\) belonged to both intervals, then \(|x-z|<d/3\) and \(|z-y|<d/3\). The triangle inequality would give \(|x-y|\le |x-z|+|z-y|<2d/3\), contradicting \(|x-y|=d\). Thus \(U\cap V=\varnothing\).
The rectangle \(U\times V\) is an open neighborhood of \((x,y)\) and, by the lemma, misses \(\Delta_{\mathbb{R}}\). This works for every point outside the diagonal, so its complement is open and the diagonal is closed. The calculation also verifies the separation condition directly: the two coordinate intervals are disjoint neighborhoods of any two distinct real numbers.
Worked Example: A Discrete Space
Let \(X\) be any set with the discrete topology \(\mathcal{T}=\mathcal{P}(X)\), so every subset of \(X\) is open. For any distinct \(x,y\in X\), the sets \(U=\{x\}\) and \(V=\{y\}\) are open neighborhoods, and \(U\cap V=\varnothing\). Thus \(X\) is Hausdorff.
We can check the diagonal directly as well. For each \((x,y)\notin\Delta_X\), we have \(x\ne y\), and \(\{x\}\times\{y\}\) is an open rectangle containing \((x,y)\). It does not meet \(\Delta_X\), since a point in its intersection with the diagonal would have to be both \((x,x)\) and \((y,y)\), forcing \(x=y\). Hence the complement of the diagonal is open.
If \(X=\varnothing\), then \(X\times X=\varnothing\) and \(\Delta_X=\varnothing\), which is closed; the Hausdorff condition has no pairs to test. So the conclusion holds for the empty discrete space as well. This checks the degenerate case without assuming that \(X\) has any points.
Worked Example: An Infinite Cofinite Space
Let \(X\) be an infinite set with the cofinite topology: the open sets are \(\varnothing\) and all subsets whose complements in \(X\) are finite. We show that \(X\) is not Hausdorff and that its diagonal is not closed.
Choose distinct \(x,y\in X\). Any open neighborhood \(U\) of \(x\) and any open neighborhood \(V\) of \(y\) are cofinite. The complement of \(U\cap V\) is \((X\setminus U)\cup(X\setminus V)\), a union of two finite sets and therefore finite. Since \(X\) is infinite, \(U\cap V\ne\varnothing\). Thus no such neighborhoods are disjoint, and \(X\) is not Hausdorff.
For the diagonal test, let \(U\times V\) be any basic open neighborhood of \((x,y)\), where \(x\in U\) and \(y\in V\). Both \(U\) and \(V\) are cofinite, so the same finite-complement calculation gives \(U\cap V\ne\varnothing\). Choose \(z\in U\cap V\). Then \((z,z)\in(U\times V)\cap\Delta_X\). Every open neighborhood of \((x,y)\) contains a basic rectangle around \((x,y)\), and that rectangle meets the diagonal. Therefore \((x,y)\) belongs to the closure of \(\Delta_X\). This applies to every distinct pair, while the points of \(\Delta_X\) already belong to its closure; hence \(\overline{\Delta_X}=X\times X\). Since \(X\) has distinct points, \(\Delta_X\ne X\times X\), so \(\Delta_X\) is not closed.
A Common Mistake: Arbitrary Unions of Closed Sets
Closedness of individual points does not by itself prove that the diagonal is closed. For example, in the infinite cofinite space just considered, each singleton \(\{x\}\) is closed, since its complement is open. In \(X\times X\), each singleton \(\{(x,x)\}\) is also closed: its complement is the union of the open rectangles \((X\setminus\{x\})\times X\) and \(X\times(X\setminus\{x\})\).
A tempting but incorrect calculation is to write \(\Delta_X=\bigcup_{x\in X}\{(x,x)\}\) and conclude that \(\Delta_X\) is closed because every set in the union is closed. Arbitrary unions of closed sets need not be closed. Here the error is exposed by the calculation above: for any distinct \(x,y\), every basic rectangle \(U\times V\) around \((x,y)\) meets \(\Delta_X\), so \((x,y)\in\overline{\Delta_X}\). Thus \(\overline{\Delta_X}=X\times X\ne\Delta_X\). The characterization identifies exactly when this issue cannot occur: it is the Hausdorff condition that supplies a rectangle around each off-diagonal point that avoids the diagonal.
The diagonal is useful because a condition about all pairs of points becomes a single closed-set condition in a product. The product basis is essential to this translation: it turns a neighborhood of a pair into coordinate neighborhoods, and the diagonal detects whether those coordinate neighborhoods overlap.
Check Your Understanding
Use the product-neighborhood test in each question.
- For a Hausdorff space \(X\), explain why every point outside \(\Delta_X\) has a basic open rectangle disjoint from \(\Delta_X\).
- Suppose \(\Delta_X\) is closed. Starting with distinct \(x,y\in X\), show how to obtain disjoint open neighborhoods of these points.
- In an infinite cofinite space, why must the intersection of two open neighborhoods be nonempty?
- For the indiscrete topology on a two-point set \(X=\{a,b\}\), determine whether \(\Delta_X\) is closed in \(X\times X\), and whether \(X\) is Hausdorff.
- Why does expressing a set as a union of closed sets not generally prove that it is closed?