# Boundary (topology)

In topology and mathematics in general, the boundary of a subset S of a topological space X is the set of points in the closure of S not belonging to the interior of S. An element of the boundary of S is called a boundary point of S. The term boundary operation refers to finding or taking the boundary of a set. Notations used for boundary of a set S include $\operatorname {bd} (S),\operatorname {fr} (S),$ and $\partial S$.
Some authors (for example Willard, in General Topology) use the term frontier instead of boundary in an attempt to avoid confusion with a different definition used in algebraic topology and the theory of manifolds. Despite widespread acceptance of the meaning of the terms boundary and frontier, they have sometimes been used to refer to other sets. For example, Metric Spaces by E. T. Copson uses the term boundary to refer to Hausdorff's border, which is defined as the intersection of a set with its boundary. Hausdorff also introduced the term residue, which is defined as the intersection of a set with the closure of the border of its complement.

## Definitions

There are several equivalent definitions for the boundary of a subset $S\subseteq X$ of a topological space $X,$ which will be denoted by $\partial _{X}S,$ $\operatorname {Bd} _{X}S,$ or simply $\partial S$ if $X$ is understood:
* It is the closure of $S$ minus the interior of $S$ in $X$: $\partial S~:=~{\overline {S}}\setminus \operatorname {int} _{X}S$ where ${\overline {S}}=\operatorname {cl} _{X}S$ denotes the closure of $S$ in $X$ and $\operatorname {int} _{X}S$ denotes the topological interior of $S$ in $X.$
* It is the intersection of the closure of $S$ with the closure of its complement: $\partial S~:=~{\overline {S}}\cap {\overline {(X\setminus S)}}$
* It is the set of points $p\in X$ such that every neighborhood of $p$ contains at least one point of $S$ and at least one point not of $S$: $\partial S~:=~\{p\in X:{\text{ for every neighborhood }}O{\text{ of }}p,\ O\cap S\neq \varnothing \,{\text{ and }}\,O\cap (X\setminus S)\neq \varnothing \}.$
* It is all points in $X$ which are not in either the interior or exterior of $S$: $\partial S~:=~X\setminus \left(\operatorname {int} _{X}S\cup \operatorname {ext} _{X}S\right)$ where $\operatorname {int} _{X}S$ denotes the interior of $S$ in $X$ and $\operatorname {ext} _{X}S$ denotes the exterior of $S$ in $X.$
A boundary point of a set is any element of that set's boundary. The boundary $\partial _{X}S$ defined above is sometimes called the set's topological boundary to distinguish it from other similarly named notions such as the boundary of a manifold with boundary or the boundary of a manifold with corners, to name just a few examples.
A connected component of the boundary of S is called a boundary component of S.

## Properties

The closure of a set $S$ equals the union of the set with its boundary: ${\overline {S}}=S\cup \partial _{X}S$ where ${\overline {S}}=\operatorname {cl} _{X}S$ denotes the closure of $S$ in $X.$ A set is closed if and only if it contains its boundary, and open if and only if it is disjoint from its boundary. The boundary of a set is closed; this follows from the formula $\partial _{X}S~:=~{\overline {S}}\cap {\overline {(X\setminus S)}},$ which expresses $\partial _{X}S$ as the intersection of two closed subsets of $X.$
("Trichotomy") Given any subset $S\subseteq X,$ each point of $X$ lies in exactly one of the three sets $\operatorname {int} _{X}S,\partial _{X}S,$ and $\operatorname {int} _{X}(X\setminus S).$ Said differently, $X~=~\left(\operatorname {int} _{X}S\right)\;\cup \;\left(\partial _{X}S\right)\;\cup \;\left(\operatorname {int} _{X}(X\setminus S)\right)$ and these three sets are pairwise disjoint. Consequently, if these set are not empty then they form a partition of $X.$
A point $p\in X$ is a boundary point of a set if and only if every neighborhood of $p$ contains at least one point in the set and at least one point not in the set. The boundary of the interior of a set as well as the boundary of the closure of a set are both contained in the boundary of the set.
Conceptual Venn diagram showing the relationships among different points of a subset $S$ of $\mathbb {R} ^{n}.$ $A$ = set of accumulation points of $S$ (also called limit points), $B=$ set of boundary points of $S,$ area shaded green = set of interior points of $S,$ area shaded yellow = set of isolated points of $S,$ areas shaded black = empty sets. Every point of $S$ is either an interior point or a boundary point. Also, every point of $S$ is either an accumulation point or an isolated point. Likewise, every boundary point of $S$ is either an accumulation point or an isolated point. Isolated points are always boundary points.

## Examples
### Characterizations and general examples

A set and its complement have the same boundary: $\partial _{X}S=\partial _{X}(X\setminus S).$
A set $U$ is a dense open subset of $X$ if and only if $\partial _{X}U=X\setminus U.$
The interior of the boundary of a closed set is empty. Consequently, the interior of the boundary of the closure of a set is empty. The interior of the boundary of an open set is also empty. Consequently, the interior of the boundary of the interior of a set is empty. In particular, if $S\subseteq X$ is a closed or open subset of $X$ then there does not exist any nonempty subset $U\subseteq \partial _{X}S$ such that $U$ is open in $X.$ This fact is important for the definition and use of nowhere dense subsets, meager subsets, and Baire spaces.
A set is the boundary of some open set if and only if it is closed and nowhere dense. The boundary of a set is empty if and only if the set is both closed and open (that is, a clopen set).

### Concrete examples

Consider the real line $\mathbb {R}$ with the usual topology (that is, the topology whose basis sets are open intervals) and $\mathbb {Q} ,$ the subset of rational numbers (whose topological interior in $\mathbb {R}$ is empty). Then
* $\partial (0,5)=\partial [0,5)=\partial (0,5]=\partial [0,5]=\{0,5\}$
* $\partial \varnothing =\varnothing$
* $\partial \mathbb {Q} =\mathbb {R}$
* $\partial (\mathbb {Q} \cap [0,1])=[0,1]$
These last two examples illustrate the fact that the boundary of a dense set with empty interior is its closure. They also show that it is possible for the boundary $\partial S$ of a subset $S$ to contain a non-empty open subset of $X:=\mathbb {R}$; that is, for the interior of $\partial S$ in $X$ to be non-empty. However, a closed subset's boundary always has an empty interior.
In the space of rational numbers with the usual topology (the subspace topology of $\mathbb {R}$), the boundary of $(-\infty ,a),$ where $a$ is irrational, is empty.
The boundary of a set is a topological notion and may change if one changes the topology. For example, given the usual topology on $\mathbb {R} ^{2},$ the boundary of a closed disk $\Omega =\left\{(x,y):x^{2}+y^{2}\leq 1\right\}$ is the disk's surrounding circle: $\partial \Omega =\left\{(x,y):x^{2}+y^{2}=1\right\}.$ If the disk is viewed as a set in $\mathbb {R} ^{3}$ with its own usual topology, that is, $\Omega =\left\{(x,y,0):x^{2}+y^{2}\leq 1\right\},$ then the boundary of the disk is the disk itself: $\partial \Omega =\Omega .$ If the disk is viewed as its own topological space (with the subspace topology of $\mathbb {R} ^{2}$), then the boundary of the disk is empty.

### Boundary of an open ball vs. its surrounding sphere

This example demonstrates that the topological boundary of an open ball of radius $r>0$ is not necessarily equal to the corresponding sphere of radius $r$ (centered at the same point); it also shows that the closure of an open ball of radius $r>0$ is not necessarily equal to the closed ball of radius $r$ (again centered at the same point). Denote the usual Euclidean metric on $\mathbb {R} ^{2}$ by $d((a,b),(x,y)):={\sqrt {(x-a)^{2}+(y-b)^{2}}}$ which induces on $\mathbb {R} ^{2}$ the usual Euclidean topology. Let $X\subseteq \mathbb {R} ^{2}$ denote the union of the $y$-axis $Y:=\{0\}\times \mathbb {R}$ with the unit circle $S^{1}:=\left\{p\in \mathbb {R} ^{2}:d(p,\mathbf {0} )=1\right\}=\left\{(x,y)\in \mathbb {R} ^{2}:x^{2}+y^{2}=1\right\}$ centered at the origin $\mathbf {0} :=(0,0)\in \mathbb {R} ^{2}$; that is, $X:=Y\cup S^{1},$ which is a topological subspace of $\mathbb {R} ^{2}$ whose topology is equal to that induced by the (restriction of) the metric $d.$ In particular, the sets $Y,S^{1},Y\cap S^{1}=\{(0,\pm 1)\},$ and $\{0\}\times [-1,1]$ are all closed subsets of $\mathbb {R} ^{2}$ and thus also closed subsets of its subspace $X.$ Henceforth, unless it clearly indicated otherwise, every open ball, closed ball, and sphere should be assumed to be centered at the origin $\mathbf {0} =(0,0)$ and moreover, only the metric space $(X,d)$ will be considered (and not its superspace $(\mathbb {R} ^{2},d)$); this being a path-connected and locally path-connected complete metric space.
Denote the open ball of radius $r>0$ in $(X,d)$ by $B_{r}:=\left\{p\in X:d(p,\mathbf {0} )<r\right\}$ so that when $r=1$ then $B_{1}=\{0\}\times (-1,1)$ is the open sub-interval of the $y$-axis strictly between $y=-1$ and $y=1.$ The unit sphere in $(X,d)$ ("unit" meaning that its radius is $r=1$) is $\left\{p\in X:d(p,\mathbf {0} )=1\right\}=S^{1}$ while the closed unit ball in $(X,d)$ is the union of the open unit ball and the unit sphere centered at this same point: $\left\{p\in X:d(p,\mathbf {0} )\leq 1\right\}=S^{1}\cup \left(\{0\}\times [-1,1]\right).$
However, the topological boundary $\partial _{X}B_{1}$ and topological closure $\operatorname {cl} _{X}B_{1}$ in $X$ of the open unit ball $B_{1}$ are: $\partial _{X}B_{1}=\{(0,1),(0,-1)\}\quad {\text{ and }}\quad \operatorname {cl} _{X}B_{1}~=~B_{1}\cup \partial _{X}B_{1}~=~B_{1}\cup \{(0,1),(0,-1)\}~=~\{0\}\times [-1,1].$ In particular, the open unit ball's topological boundary $\partial _{X}B_{1}=\{(0,1),(0,-1)\}$ is a proper subset of the unit sphere $\left\{p\in X:d(p,\mathbf {0} )=1\right\}=S^{1}$ in $(X,d).$ And the open unit ball's topological closure $\operatorname {cl} _{X}B_{1}=B_{1}\cup \{(0,1),(0,-1)\}$ is a proper subset of the closed unit ball $\left\{p\in X:d(p,\mathbf {0} )\leq 1\right\}=S^{1}\cup \left(\{0\}\times [-1,1]\right)$ in $(X,d).$ The point $(1,0)\in X,$ for instance, cannot belong to $\operatorname {cl} _{X}B_{1}$ because there does not exist a sequence in $B_{1}=\{0\}\times (-1,1)$ that converges to it; the same reasoning generalizes to also explain why no point in $X$ outside of the closed sub-interval $\{0\}\times [-1,1]$ belongs to $\operatorname {cl} _{X}B_{1}.$ Because the topological boundary of the set $B_{1}$ is always a subset of $B_{1}$'s closure, it follows that $\partial _{X}B_{1}$ must also be a subset of $\{0\}\times [-1,1].$
In any metric space $(M,\rho ),$ the topological boundary in $M$ of an open ball of radius $r>0$ centered at a point $c\in M$ is always a subset of the sphere of radius $r$ centered at that same point $c$; that is, $\partial _{M}\left(\left\{m\in M:\rho (m,c)<r\right\}\right)~\subseteq ~\left\{m\in M:\rho (m,c)=r\right\}$ always holds.
Moreover, the unit sphere in $(X,d)$ contains $X\setminus Y=S^{1}\setminus \{(0,\pm 1)\},$ which is an open subset of $X.$ This shows, in particular, that the unit sphere $\left\{p\in X:d(p,\mathbf {0} )=1\right\}$ in $(X,d)$ contains a non-empty open subset of $X.$

## Boundary of a boundary

For any set $S,\partial S\supseteq \partial \partial S,$ where $\,\supseteq \,$ denotes the superset with equality holding if and only if the boundary of $S$ has no interior points, which will be the case for example if $S$ is either closed or open. Since the boundary of a set is closed, $\partial \partial S=\partial \partial \partial S$ for any set $S.$ The boundary operator thus satisfies a weakened kind of idempotence.
In discussing boundaries of manifolds or simplexes and their simplicial complexes, one often meets the assertion that the boundary of the boundary is always empty. Indeed, the construction of the singular homology rests critically on this fact. The explanation for the apparent incongruity is that the topological boundary (the subject of this article) is a slightly different concept from the boundary of a manifold or of a simplicial complex. For example, the boundary of an open disk viewed as a manifold is empty, as is its topological boundary viewed as a subset of itself, while its topological boundary viewed as a subset of the real plane is the circle surrounding the disk. Conversely, the boundary of a closed disk viewed as a manifold is the bounding circle, as is its topological boundary viewed as a subset of the real plane, while its topological boundary viewed as a subset of itself is empty. In particular, the topological boundary depends on the ambient space, while the boundary of a manifold is invariant.