Boundary as a Local Test
The boundary of a set records the points where every neighborhood encounters both the set and what lies outside it. This local description leads to two useful formulas: one uses closure and interior, and the other uses the closures of the set and its complement. Neither formula requires a metric or a separation assumption.
Let \((X,\mathcal{T})\) be a topological space and \(A\subseteq X\). An open neighborhood of \(x\in X\) is an open set \(U\in\mathcal{T}\) with \(x\in U\). Recall that \(\overline{A}\) is the smallest closed set containing \(A\), and \(\operatorname{int}A\) is the largest open set contained in \(A\).
The closure criterion says that \(x\in\overline{A}\) if and only if every open neighborhood of \(x\) intersects \(A\). To recall why, if a neighborhood \(U\) misses \(A\), then \(X\setminus U\) is a closed set containing \(A\), so \(\overline{A}\subseteq X\setminus U\) and \(x\notin\overline{A}\). Conversely, if \(x\notin\overline{A}\), then \(X\setminus\overline{A}\) is an open neighborhood of \(x\) disjoint from \(A\). Also, \(x\in\operatorname{int}A\) exactly when some open neighborhood \(U\) satisfies \(x\in U\subseteq A\), by the definition of interior.
The Boundary Formulas
Proof. We first compare the boundary with the intersection of closures. By the closure criterion, \(x\in\overline{A}\) means that every open neighborhood of \(x\) intersects \(A\), and \(x\in\overline{X\setminus A}\) means that every open neighborhood of \(x\) intersects \(X\setminus A\). Both statements hold exactly when every open neighborhood intersects both sets. By the definition of boundary, this is exactly the condition \(x\in\partial A\). Therefore \(\partial A=\overline{A}\cap\overline{X\setminus A}\).
Next, \(x\notin\operatorname{int}A\) means that there is no open neighborhood \(U\) with \(x\in U\subseteq A\). Equivalently, every open neighborhood of \(x\) contains a point outside \(A\): if some neighborhood did not, it would be a subset of \(A\); and if no such neighborhood exists, each neighborhood must meet \(X\setminus A\). The closure criterion now gives \(x\notin\operatorname{int}A\) if and only if \(x\in\overline{X\setminus A}\). Consequently, $$ \overline{A}\setminus\operatorname{int}A =\overline{A}\cap\bigl(X\setminus\operatorname{int}A\bigr) =\overline{A}\cap\overline{X\setminus A} =\partial A. $$ This proves both formulas. The argument is pointwise, so it also covers \(A=\varnothing\), \(A=X\), and the empty space. \(\square\)
The two expressions emphasize different tests. The difference \(\overline{A}\setminus\operatorname{int}A\) selects points approached by \(A\) but not lying in its interior. The intersection \(\overline{A}\cap\overline{X\setminus A}\) selects points approached by both sides. The neighborhood definition shows why these tests agree.
Worked Example: An Open Interval in the Real Line
Use the standard topology on \(\mathbb{R}\) and let \(A=(0,1)\). We compute the two formulas separately.
Closure and interior. Every point of \((0,1)\) is in \(A\), so it lies in \(\overline{A}\). Every neighborhood of \(0\) contains positive numbers less than \(1\), and every neighborhood of \(1\) contains numbers less than \(1\) and greater than \(0\). Thus both endpoints lie in \(\overline{A}\). If \(x<0\), a sufficiently small open interval around \(x\) misses \(A\); the same is true if \(x>1\). Hence \(\overline{A}=[0,1]\). Since \(A\) is open, \(\operatorname{int}A=(0,1)\). Therefore $$ \overline{A}\setminus\operatorname{int}A =[0,1]\setminus(0,1)=\{0,1\}. $$
Closures of the two sides. The complement is \(X\setminus A=(-\infty,0]\cup[1,\infty)\), which is closed, so its closure is itself. Intersecting gives $$ \overline{A}\cap\overline{X\setminus A} =[0,1]\cap\bigl((-\infty,0]\cup[1,\infty)\bigr) =\{0,1\}. $$ As a neighborhood check, every open neighborhood of either endpoint meets \((0,1)\) and also meets its complement. A point strictly between \(0\) and \(1\) has a neighborhood contained in \(A\), and a point outside \([0,1]\) has a neighborhood disjoint from \(A\). Thus the boundary is exactly \(\{0,1\}\), as both calculations give.
Worked Example: A Boundary in the Sierpinski Topology
Let \(X=\{a,b\}\) with topology \(\mathcal{T}=\{\varnothing,\{a\},X\}\), and take \(A=\{a\}\). This example shows that the formulas do not depend on a metric or on a Hausdorff topology.
Closure and interior. The closed sets, obtained by taking complements of the open sets, are \(\varnothing,\{b\},X\). The only closed set containing \(a\) is \(X\), so \(\overline{A}=X\). The open subsets contained in \(A\) are \(\varnothing\) and \(\{a\}\), so \(\operatorname{int}A=\{a\}\). It follows that $$ \overline{A}\setminus\operatorname{int}A =X\setminus\{a\}=\{b\}. $$
Closures of the two sides. Here \(X\setminus A=\{b\}\). The closed sets containing \(b\) are \(\{b\}\) and \(X\), whose intersection is \(\{b\}\). Hence \(\overline{X\setminus A}=\{b\}\), and $$ \overline{A}\cap\overline{X\setminus A} =X\cap\{b\}=\{b\}. $$ Directly, the only open neighborhood of \(b\) is \(X\), which meets both \(A\) and its complement. The point \(a\) has the open neighborhood \(\{a\}\), which misses the complement, so \(a\notin\partial A\). This confirms \(\partial A=\{b\}\).
Worked Example: A Nonempty Boundary in an Indiscrete Space
Let \(X=\{p,q\}\) have the indiscrete topology \(\mathcal{T}=\{\varnothing,X\}\), and set \(A=\{p\}\). Its closed sets are also \(\varnothing\) and \(X\). The only closed set containing \(A\) is \(X\), so \(\overline{A}=X\). The only open subset of \(A\) is \(\varnothing\), so \(\operatorname{int}A=\varnothing\). Therefore $$ \overline{A}\setminus\operatorname{int}A=X\setminus\varnothing=X. $$
The complement \(X\setminus A=\{q\}\) is nonempty, and its closure is \(X\), since \(X\) is the only nonempty closed set. Thus $$ \overline{A}\cap\overline{X\setminus A}=X\cap X=X. $$ For either point, the only open neighborhood is \(X\), and \(X\) meets both \(\{p\}\) and \(\{q\}\). Hence both points are boundary points. This verifies the formulas directly and illustrates that a boundary need not consist only of points that appear to separate regions in a picture.
A Common Subtraction Error
Common pitfall. The boundary is not generally \(\overline{A}\setminus A\). For a concrete counterexample, take \(A=[0,1]\) in the standard topology on \(\mathbb{R}\). This set is closed, so \(\overline{A}=[0,1]\). The incorrect calculation gives $$ \overline{A}\setminus A=[0,1]\setminus[0,1]=\varnothing. $$ But \(A\) is not its own interior: \(\operatorname{int}A=(0,1)\), so the correct calculation is $$ \partial A=\overline{A}\setminus\operatorname{int}A =[0,1]\setminus(0,1)=\{0,1\}. $$ Indeed, every open neighborhood of \(0\) or \(1\) meets both \([0,1]\) and its complement. The endpoints belong to the set, but they do not belong to its interior. Subtracting \(A\) would remove them incorrectly.
Using the Formulas
The first formula is often efficient when closure and interior are already known. The second is useful when it is easier to inspect neighborhoods on both sides of a set. In either case, the topological space matters: the same underlying set can have different closures, interiors, and boundaries under different topologies, as the finite examples demonstrate.
The formulas also handle the extreme cases without special conventions. If \(A=\varnothing\), then \(\overline{A}=\varnothing\), \(\operatorname{int}A=\varnothing\), and \(\overline{X\setminus A}=\overline{X}=X\), so both expressions give \(\varnothing\). If \(A=X\), then \(\overline{A}=X\), \(\operatorname{int}A=X\), and \(\overline{X\setminus A}=\overline{\varnothing}=\varnothing\); again both expressions give \(\varnothing\). These checks agree with the neighborhood definition, since no point can have every neighborhood meet both an empty set and its complement.
Check Your Understanding
For each question, use the stated topology and distinguish the interior from the set itself.
- In the standard topology on \(\mathbb{R}\), use both formulas to find the boundary of \(A=[0,1)\).
- In a discrete topology on any set \(X\), explain why every subset \(A\subseteq X\) has empty boundary.
- In the indiscrete topology on a nonempty set \(X\), find the boundary of a nonempty proper subset \(A\).
- Explain why \(x\notin\operatorname{int}A\) is equivalent to \(x\in\overline{X\setminus A}\).
- Give a reason, directly from neighborhoods, that the boundary of \(\varnothing\) is empty in every topological space.