Closure Is a Local Question
Closure is defined using all the closed sets that contain a given set. That definition describes the closure globally, but it does not immediately tell us whether one particular point belongs to it. The neighborhood test gives a local answer: check whether every open neighborhood of the point meets the set. We will prove this test and use it for intervals, finite sets, and a dense subset of the real line.
Throughout, \((X,\mathcal{T})\) is a topological space, \(A\subseteq X\), and an open neighborhood of \(x\) means an open set \(U\in\mathcal{T}\) with \(x\in U\). A set is closed if its complement is open. When we work in \(\mathbb{R}\), it has the standard topology, whose open neighborhoods contain open intervals around each of their points.
The collection being intersected is never empty: \(X\) is closed, since its complement \(\varnothing\) is open, and \(A\subseteq X\). An arbitrary intersection of closed sets is closed, because its complement is a union of open sets. Thus \(\overline{A}\) is closed and contains \(A\). Moreover, it is contained in every closed set that contains \(A\). These facts include the case \(A=\varnothing\): since \(\varnothing\) is itself closed, \(\overline{\varnothing}=\varnothing\).
Proof. By definition, \(\overline{A}\) is the intersection of closed sets containing \(A\). It contains \(A\), and it is closed by the arbitrary-intersection property. Since an intersection is contained in each set being intersected, \(\overline{A}\) is contained in every closed set that contains \(A\). This proves the smallest-closed-set assertion. If \(A\) is closed, then \(A\) is one of the closed sets in the intersection, so \(\overline{A}\subseteq A\); together with \(A\subseteq\overline{A}\), this gives equality. Conversely, if \(\overline{A}=A\), then \(A\) is closed because \(\overline{A}\) is closed. \(\square\)
The Neighborhood Test
Proof. Suppose first that \(x\in\overline{A}\). Let \(U\) be any open neighborhood of \(x\). If \(U\cap A=\varnothing\), then \(A\subseteq X\setminus U\). Since \(U\) is open, \(X\setminus U\) is closed. It is therefore a closed set containing \(A\), so the smallest-closed-set property gives \(\overline{A}\subseteq X\setminus U\). But \(x\in U\), so \(x\notin X\setminus U\), contradicting \(x\in\overline{A}\). Thus every such \(U\) intersects \(A\).
Conversely, suppose every open neighborhood of \(x\) intersects \(A\). If \(x\notin\overline{A}\), then \(U=X\setminus\overline{A}\) is an open neighborhood of \(x\), because \(\overline{A}\) is closed. Also \(A\subseteq\overline{A}\), so \(U\cap A=\varnothing\). This contradicts the supposition. Hence \(x\in\overline{A}\). \(\square\)
The test applies in every topological space; it does not require a metric or a special kind of neighborhood. It also handles points already in \(A\): if \(x\in A\), then every neighborhood of \(x\) contains \(x\), so it meets \(A\). For points outside \(A\), the test asks whether the set can be avoided by any open neighborhood of the point.
Applying the Test to Intervals
Worked Example: The Closure of an Open Interval
In \(\mathbb{R}\) with the standard topology, determine \(\overline{A}\) for \(A=(0,1)\).
Every point \(x\in(0,1)\) belongs to \(A\), so every open neighborhood of \(x\) meets \(A\). Thus \((0,1)\subseteq\overline{A}\).
For \(x=0\), let \(U\) be any open neighborhood of \(0\). There is an \(r>0\) such that \((-r,r)\subseteq U\). Set \(t=\min(r/2,1/2)\). Then \(0<t\leq 1/2<1\), so \(t\in(0,1)\), and \(t\leq r/2<r\), so \(t\in(-r,r)\subseteq U\). Therefore every neighborhood of \(0\) meets \(A\), and \(0\in\overline{A}\).
For \(x=1\), take any open neighborhood \(U\) of \(1\), and choose \(r>0\) with \((1-r,1+r)\subseteq U\). Let \(t=\min(r/2,1/2)\). Then \(0<t\leq1/2\), so \(1-t\in(0,1)\). Also \(|(1-t)-1|=t\leq r/2<r\), so \(1-t\in U\). Hence \(1\in\overline{A}\).
If \(x<0\), the open neighborhood \((x-|x|/2,x+|x|/2)\) lies entirely below \(0\), so it misses \(A\). Indeed its right endpoint is \(x+|x|/2=x/2<0\). If \(x>1\), the open neighborhood \((x-(x-1)/2,x+(x-1)/2)\) lies entirely above \(1\), since its left endpoint is \((x+1)/2>1\); it also misses \(A\). The neighborhood test excludes all such \(x\).
Consequently \(\overline{(0,1)}=[0,1]\). As a check, \([0,1]\) is closed because its complement \((-\infty,0)\cup(1,\infty)\) is open. It contains \((0,1)\), and the neighborhood test has shown that both endpoints, as well as every interior point, belong to the closure.
The same reasoning works for other intervals: points already in the interval pass the test because they belong to the set, while an endpoint not included in the interval may still pass because every open neighborhood of it reaches into the interval. The key question is not whether the point itself is in the set, but whether some neighborhood can avoid the set.
Finite Sets and Dense Subsets of \(\mathbb{R}\)
Worked Example: A Finite Subset of the Real Line
Let \(A=\{-1,2\}\subseteq\mathbb{R}\). We show that \(\overline{A}=A\).
Each point of \(A\) belongs to every one of its neighborhoods, so both \(-1\) and \(2\) belong to \(\overline{A}\). Now fix \(x\in\mathbb{R}\setminus A\). Both \(|x+1|\) and \(|x-2|\) are positive. Let \(d=\min(|x+1|,|x-2|)>0\) and choose \(r=d/2\). The open interval \((x-r,x+r)\) contains neither \(-1\) nor \(2\): the distance from \(x\) to each of those points is at least \(d>r\). Thus this neighborhood misses \(A\), and the neighborhood test gives \(x\notin\overline{A}\).
It follows that \(\overline{A}=\{-1,2\}\). This also checks that \(A\) is closed: its complement \((-\infty,-1)\cup(-1,2)\cup(2,\infty)\) is open. The distance argument illustrates why a finite set in the standard real line has no additional points in its closure: a point outside it has positive distance from each of the finitely many points, and the smallest of those distances is still positive.
Worked Example: The Rational Numbers Are Dense
Let \(A=\mathbb{Q}\subseteq\mathbb{R}\). We prove that \(\overline{\mathbb{Q}}=\mathbb{R}\) by checking the neighborhood test at an arbitrary \(x\in\mathbb{R}\).
Let \(U\) be any open neighborhood of \(x\). By the standard topology, there is an \(r>0\) such that \((x-r,x+r)\subseteq U\). Put \(a=x-r\) and \(b=x+r\); then \(b-a=2r>0\). Choose \(n\in\mathbb{N}\) with \(n(b-a)>1\), using the Archimedean property of \(\mathbb{R}\). Let \(m=\lfloor na\rfloor+1\), where \(\lfloor na\rfloor\) is the greatest integer less than or equal to \(na\). Then \(m>na\), and \(m\leq na+1<nb\), because \(n(b-a)>1\) implies \(na+1<nb\). Dividing by \(n>0\) gives \(a<m/n<b\).
The number \(m/n\) is rational and lies in \((a,b)\subseteq U\). Thus every open neighborhood of the arbitrary point \(x\) meets \(\mathbb{Q}\), so \(x\in\overline{\mathbb{Q}}\). Since this holds for every \(x\in\mathbb{R}\), \(\overline{\mathbb{Q}}=\mathbb{R}\), which says precisely that \(\mathbb{Q}\) is dense in \(\mathbb{R}\). As a check on the interval calculation, \(a=x-r\) and \(b=x+r\) give \(b-a=2r\), so choosing \(n\) with \(2nr>1\) supplies the required rational in every such neighborhood.
A Common Pitfall
Common mistake: “The endpoints \(0\) and \(1\) are not in \((0,1)\), so they are not in its closure.” This confuses membership in the set with membership in its closure. For example, a neighborhood \((-r,r)\) of \(0\), with \(r>0\), contains \(t=\min(r/2,1/2)\). The inequalities \(0<t<1\) and \(t<r\) show that \(t\in(0,1)\cap(-r,r)\). The same calculation with \(1-t\) shows that every neighborhood of \(1\) meets \((0,1)\). Therefore both endpoints belong to the closure, even though neither belongs to the original open interval.
Another useful check is to test points outside the proposed closure by constructing a single open neighborhood that misses the set. The theorem says “every neighborhood meets \(A\),” not “some neighborhood meets \(A\).” One neighborhood that misses \(A\) is enough to rule out membership in \(\overline{A}\); conversely, passing the test requires every open neighborhood to meet \(A\).
Check Your Understanding
For each question, begin by stating which open neighborhoods need to be checked.
- In \(\mathbb{R}\) with the standard topology, determine the closure of \((2,5]\).
- Show directly with the neighborhood test that \(\overline{\{0,3\}}=\{0,3\}\).
- What does it mean for a subset \(D\subseteq\mathbb{R}\) to be dense, in terms of open neighborhoods?
- Explain why every open neighborhood of \(x\in\mathbb{R}\) contains a rational number, using an interval contained in the neighborhood.
- Give a neighborhood that misses \((0,1)\) for each point \(x<0\), and for each point \(x>1\).