Boundary of a set (source code)

= Boundary of a set
{title2=$\partial A=\overline A\setminus A^\circ$}

= Boundary
{synonym}

The <boundary> of a <subset> $A$ of a <topological space> $X$ consists of the points whose every <neighbourhood> in $X$ meets both $A$ and its <complement> $X\setminus A$. Equivalently,
$$
\partial_X A=\operatorname{cl}_X A\setminus\operatorname{int}_X A
=\operatorname{cl}_X A\cap\operatorname{cl}_X(X\setminus A).
$$
Here the two operations are <closure> and <interior>. The second formula shows that the <boundary> is a <closed set> and that $A$ and its <complement> have the same <boundary>. It locates precisely the points where membership cannot be decided from a small <neighbourhood> alone. https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/mit18_100af20_basic_analysis.pdf[Jiří Lebl, Basic Analysis, Definition 7.2.23 and Propositions 7.2.26–7.2.27]{ref}

For $A=[0,1)$ in the usual <real line>, the <interior> is $(0,1)$, the <closure> is $[0,1]$, and the <boundary> is $\{0,1\}$. In particular, $0$ belongs both to $A$ and to its <boundary>, while $1$ belongs to the <boundary> but not to $A$. A <boundary> point need not be excluded from the original <set>: <open sets> exclude all their <boundary> points, <closed sets> contain all theirs, and this half-open <interval> does one of each.

\Image[/relative-openness-and-boundary.png]
{title=Relative openness in a closed interval and the boundary of a half-open interval}

The upper panel visualizes the relative example from <open set>: for $X=[0,1]$ and $A=[0,1/2)$, an <open ball> about zero in $X$ is $B_X(0,r)=X\cap(-r,r)=[0,r)$ when $0<r<1/2$. This <open ball> stays in $A$; points outside $X$ are not required. The middle panel shows that $X$ is <clopen> in itself, with <interior> and <closure> both $X$ and empty <boundary>, although its <boundary> in the <real line> is $\{0,1\}$. The lower panel returns to ambient space $\mathbb R$ and separates the <interior>, <closure>, and <boundary> of $[0,1)$; both marked <boundary> points are included in the <boundary> itself.