Neighborhood Tests in the Real Line
Boundary calculations are sensitive to how a set sits near its points, not just to which points it contains. In the standard topology on \(\mathbb{R}\), open intervals provide the neighborhoods we need to test that local behavior. We will use the same tests for intervals, a singleton, the rationals, and the integers.
Throughout, \(\mathbb{R}\) has its standard topology, and \(A\subseteq\mathbb{R}\). An open neighborhood of \(x\) is an open set containing \(x\); in \(\mathbb{R}\), every such neighborhood contains an interval \((x-\varepsilon,x+\varepsilon)\) for some \(\varepsilon>0\).
These definitions have useful neighborhood tests. A point \(x\) belongs to \(\operatorname{int}A\) exactly when some open neighborhood of \(x\) is contained in \(A\). A point belongs to \(\overline{A}\) exactly when every open neighborhood of it meets \(A\). For the closure test, if a neighborhood \(U\) of \(x\) misses \(A\), then the closed set \(\mathbb{R}\setminus U\) contains \(A\) and excludes \(x\), so \(x\notin\overline{A}\). Conversely, if \(x\notin\overline{A}\), then \(\mathbb{R}\setminus\overline{A}\) is an open neighborhood of \(x\) disjoint from \(A\).
Proof. By the definition of boundary, \(x\in\partial A\) exactly when every open neighborhood of \(x\) meets \(A\) and every open neighborhood of \(x\) meets \(\mathbb{R}\setminus A\). The closure neighborhood test says these two conditions are respectively \(x\in\overline{A}\) and \(x\in\overline{\mathbb{R}\setminus A}\). This proves the intersection formula.
Now suppose \(x\in\partial A\). Every neighborhood of \(x\) meets \(A\), so \(x\in\overline{A}\). Also, no neighborhood of \(x\) can be contained in \(A\), because every neighborhood meets \(\mathbb{R}\setminus A\). Thus \(x\notin\operatorname{int}A\). In the other direction, suppose \(x\in\overline{A}\setminus\operatorname{int}A\). Every neighborhood meets \(A\). Since \(x\notin\operatorname{int}A\), no open neighborhood of \(x\) is contained in \(A\); every neighborhood therefore also meets \(\mathbb{R}\setminus A\). Hence \(x\in\partial A\). Finally, the exterior is \(\operatorname{int}(\mathbb{R}\setminus A)\) by definition. \(\square\)
Open, Closed, and Half-Open Intervals
Worked Example: Four Interval Types
Let \(a,b\in\mathbb{R}\) with \(a<b\). Calculate the closure, interior, exterior, and boundary of \((a,b)\), \([a,b]\), \([a,b)\), and \((a,b]\).
For each of the four sets, every point \(x\in(a,b)\) is an interior point: the number \(r=\min(x-a,b-x)/2\) is positive, and \((x-r,x+r)\subseteq(a,b)\). The endpoints are not interior points of any of the four sets. In each case, every neighborhood of \(a\) extends to points less than \(a\), and every neighborhood of \(b\) extends to points greater than \(b\). Those outside points are not in the interval.
Every neighborhood of \(a\) meets each interval, since it contains points strictly between \(a\) and \(b\) sufficiently close to \(a\). More explicitly, for a neighborhood containing \((a-\varepsilon,a+\varepsilon)\), the point \(a+\min(\varepsilon,b-a)/2\) is in that smaller interval and in each of the four sets. At \(b\), use \(b-\min(\varepsilon,b-a)/2\). Thus both endpoints belong to the closure in all four cases. Every point strictly between them is already in each set. If \(x<a\), the neighborhood of radius \((a-x)/2\) misses the interval; if \(x>b\), the neighborhood of radius \((x-b)/2\) misses it. Consequently, all four closures are \([a,b]\).
The points less than \(a\) and greater than \(b\) have open neighborhoods missing each interval, so they are exterior points. Neither endpoint is exterior, because each of its neighborhoods meets the interval. No point of \((a,b)\) is exterior, because it belongs to the interval. The calculations are therefore:
Check: for each interval, the displayed boundary is \(\overline{A}\setminus\operatorname{int}A=[a,b]\setminus(a,b)=\{a,b\}\). The exterior is disjoint from the closure, as \(\big((-\infty,a)\cup(b,\infty)\big)\cap[a,b]=\varnothing\).
The endpoint inclusions change which endpoints belong to the set, but they do not change which points are approached from the set and from its complement. That is why the four intervals have the same boundary, even though they are different subsets of \(\mathbb{R}\).
A Singleton and the Integers
Worked Example: A Singleton
Fix \(c\in\mathbb{R}\) and let \(A=\{c\}\). The set is closed: for any \(x\ne c\), the interval of radius \(|x-c|/2\) about \(x\) misses \(c\), so \(\mathbb{R}\setminus\{c\}\) is open. Thus \(\overline{A}=\{c\}\).
The interior is empty. Any open neighborhood of \(c\) contains points other than \(c\), so no such neighborhood is contained in \(\{c\}\); points outside \(\{c\}\) cannot be interior points of \(A\). The exterior is \(\mathbb{R}\setminus\{c\}\): this complement is open, as shown by the same radius argument. Therefore \(\partial A=\{c\}\). Indeed, every neighborhood of \(c\) meets \(A\) at \(c\) and meets its complement at other points.
Check: \(\overline{A}\setminus\operatorname{int}A=\{c\}\setminus\varnothing=\{c\}\), in agreement with the boundary calculation. Also \(A\cup\operatorname{ext}(A)=\mathbb{R}\), with the boundary point \(c\) in neither the interior nor the exterior.
Worked Example: The Integers
Let \(A=\mathbb{Z}\subseteq\mathbb{R}\). If \(x\notin\mathbb{Z}\), there is an integer \(n\) with \(n<x<n+1\). Set \(r=\min(x-n,n+1-x)/2\), which is positive. Then \((x-r,x+r)\) contains no integer. Hence every point outside \(\mathbb{Z}\) has a neighborhood disjoint from \(\mathbb{Z}\), so \(\mathbb{Z}\) is closed and \(\overline{\mathbb{Z}}=\mathbb{Z}\).
No integer is an interior point: for each \(n\in\mathbb{Z}\), every open interval about \(n\) contains points other than integers. Points outside \(\mathbb{Z}\) cannot be interior points of \(\mathbb{Z}\), so \(\operatorname{int}\mathbb{Z}=\varnothing\). Since \(\mathbb{R}\setminus\mathbb{Z}\) is open, the exterior is \(\mathbb{R}\setminus\mathbb{Z}\). It follows that \(\partial\mathbb{Z}=\mathbb{Z}\).
Check: the closure-minus-interior formula gives \(\overline{\mathbb{Z}}\setminus\operatorname{int}\mathbb{Z}=\mathbb{Z}\setminus\varnothing=\mathbb{Z}\). Each integer is a boundary point because every neighborhood contains that integer and also noninteger real numbers.
The Rationals and a Common Mistake
To calculate the four sets for \(\mathbb{Q}\), we need the fact that every nonempty open interval contains both a rational and an irrational number. Here is a direct verification. Given \(u<v\), choose \(n\in\mathbb{N}\) with \(n(v-u)>1\), and let \(m=\lfloor nu\rfloor+1\), where \(\lfloor nu\rfloor\) is the greatest integer not exceeding \(nu\). Then \(nu<m\le nu+1<nv\), so \(m/n\in(u,v)\) is rational. For an irrational in \((u,v)\), first choose a rational \(r\in(u,v)\) by this argument. Choose \(n\in\mathbb{N}\) large enough that \(\sqrt{2}/n<v-r\). Then \(r+\sqrt{2}/n\in(u,v)\), and this number is irrational: if it were rational, subtracting \(r\) and multiplying by \(n\) would make \(\sqrt{2}\) rational, a contradiction.
Worked Example: The Rationals
Let \(A=\mathbb{Q}\). Every open neighborhood of every real number contains an open interval, and every nonempty open interval contains a rational. Therefore every neighborhood meets \(\mathbb{Q}\), and the closure test gives \(\overline{\mathbb{Q}}=\mathbb{R}\).
No nonempty open interval is contained in \(\mathbb{Q}\), because each contains an irrational. Thus \(\operatorname{int}\mathbb{Q}=\varnothing\). Every nonempty open interval also contains a rational, so no open neighborhood is contained in \(\mathbb{R}\setminus\mathbb{Q}\); hence the exterior is empty. The boundary is all of \(\mathbb{R}\): every neighborhood meets the rationals and, by the density argument above, also meets the irrationals.
Check: the formula gives \(\partial\mathbb{Q}=\overline{\mathbb{Q}}\setminus\operatorname{int}\mathbb{Q}=\mathbb{R}\setminus\varnothing=\mathbb{R}\). The exterior is empty even though the complement is nonempty: being outside a set is not enough to be in its exterior; a point must have a whole open neighborhood outside the set.
Common mistake. A tempting but incorrect calculation is to say that \(\partial\mathbb{Q}=\mathbb{Q}\), because the rationals are the points of the set. The boundary is not defined as the set itself: it consists of points whose every neighborhood meets both the set and its complement. For example, every interval around \(1\) contains rationals and irrationals, so \(1\in\partial\mathbb{Q}\); but every interval around \(\sqrt{2}\) also contains rationals and irrationals, so \(\sqrt{2}\in\partial\mathbb{Q}\), despite \(\sqrt{2}\notin\mathbb{Q}\). The correct calculation is \(\partial\mathbb{Q}=\mathbb{R}\).
| Set \(A\) | \(\overline{A}\) | \(\operatorname{int}A\) | \(\operatorname{ext}(A)\) | \(\partial A\) |
|---|---|---|---|---|
| \((a,b)\), \([a,b]\), \([a,b)\), or \((a,b]\) | \([a,b]\) | \((a,b)\) | \((-\infty,a)\cup(b,\infty)\) | \(\{a,b\}\) |
| \(\{c\}\) | \(\{c\}\) | \(\varnothing\) | \(\mathbb{R}\setminus\{c\}\) | \(\{c\}\) |
| \(\mathbb{Z}\) | \(\mathbb{Z}\) | \(\varnothing\) | \(\mathbb{R}\setminus\mathbb{Z}\) | \(\mathbb{Z}\) |
| \(\mathbb{Q}\) | \(\mathbb{R}\) | \(\varnothing\) | \(\varnothing\) | \(\mathbb{R}\) |
Check Your Understanding
Use neighborhoods and the closure-minus-interior boundary formula to check your answers.
- For \(a<b\), explain why \(a\) is a boundary point of \((a,b]\) but not an interior point.
- Find the closure, interior, exterior, and boundary of \(\{3\}\) in the standard real line.
- Why does \(\mathbb{Z}\) have empty interior even though it contains infinitely many points?
- Show that no real number is in the exterior of \(\mathbb{Q}\).
- For each of the four intervals in the worked example, identify which endpoints belong to the interval and which belong to its boundary.