---
title: Open and Closed Sets, Interior, Closure
module: Metric Spaces and Topology
moduleNumber: 3
lessonNumber: 2
order: 302
summary: >
  Open sets are those in which every point has room to move; closed sets are
  their complements. From the single ball construction come the topology
  axioms (arbitrary unions, finite intersections), the interior, closure, and
  boundary of a set, and the fact that openness is always relative to the
  ambient space.
topics: [Metric Spaces and Topology]
draft: false
sources:
  - book: Lebl
    ref: "Ch. 7 — Metric Spaces; §7.2 Open and closed sets"
  - book: Rosenlicht
    ref: "Ch. 3 — Metric spaces"
---

The next layer of structure over a
[metric](/real-analysis/metric-spaces/metric-spaces-norms) is the collection of
open sets, the **topology**. It distinguishes points interior to a set, points
on its edge, and points approached from outside. Convergence, compactness, and
connectedness are all stated through open sets, each built from a single
primitive: the ball $B(x, \delta) = \{ y : d(x, y) < \delta \}$.

## Open and closed sets

> **Definition (Open set).** A subset $V \subseteq X$ of a metric space is
> **open** if for every $x \in V$ there exists $\delta > 0$ with
> $B(x, \delta) \subseteq V$.

The radius $\delta$ is allowed to depend on $x$: points deep inside $V$ can use
a large ball, points near the edge need a small one. The requirement is only
that _some_ positive radius works at each point, so that from anywhere in $V$
one can move a little in any direction and stay in $V$.

$$
% caption: An open set $V$: every point $x$ has a ball $B(x,\delta)$ contained
% in $V$, with $\delta$ shrinking for points nearer the edge.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, thick, fill=acc!8] plot[smooth cycle, tension=0.8]
  coordinates {(0,0) (2.6,-0.5) (4.4,0.4) (4.0,2.2) (1.8,2.8) (-0.4,1.6)};
\node[black] at (3.8,2.4) {$V$};
% interior point with big ball
\fill[acc] (1.8,1.1) circle (1.5pt);
\node[below] at (1.8,1.05) {$x$};
\draw[acc, thick] (1.8,1.1) circle (0.7);
\node[acc] at (1.8,1.1) {};
\draw[acc] (1.8,1.1) -- ++(35:0.7) node[midway, above, font=\scriptsize]{$r$};
% edge point with small ball
\fill[acc] (3.5,0.6) circle (1.5pt);
\node[below] at (3.55,0.55) {$x'$};
\draw[acc, thick] (3.5,0.6) circle (0.3);
\end{tikzpicture}
$$

> **Definition (Closed set).** A subset $E \subseteq X$ is **closed** if its
> complement $E^c = X \setminus E$ is open.

Openness and closedness are not opposites. Most sets are neither, and two sets
are both.

**Examples on $\mathbb{R}$.**

- **$(0, \infty)$ is open.** Given $x > 0$, take $\delta = x$; then
  $B(x, \delta) = (0, 2x) \subseteq (0, \infty)$.
- **$[0, \infty)$ is closed.** Its complement $(-\infty, 0)$ is open by the
  same argument with $\delta = -x$ for $x < 0$.
- **$[0, 1)$ is neither.** No ball about $0$ avoids negative numbers, so it is
  not open; and $1$ is a point of the complement every ball of which meets
  $[0,1)$, so the complement is not open, hence $[0,1)$ is not closed.
- **$\emptyset$ and $\mathbb{R}$ are both open and closed** (each is the
  other's complement, and both are open).

An open set can always be pictured as a union of balls, one around each of its
points. The two extreme sets, $\emptyset$ and $X$, are open in every metric
space.

## The topology axioms

Open sets are closed under two operations, and the asymmetry between them, all
unions but only finite intersections, is the defining feature of a topology.

> **Theorem (Topology axioms).** In any metric space $(X, d)$:
>
> - **(T1)** $\emptyset$ and $X$ are open.
> - **(T2)** A **finite** intersection $\bigcap_{j=1}^k V_j$ of open sets is
>   open.
> - **(T3)** An **arbitrary** union $\bigcup_{\lambda \in I} V_\lambda$ of open
>   sets is open.

For (T2), a point $x$ in the intersection has a ball $B(x, \delta_j)
\subseteq V_j$ for each of the finitely many $j$; the smallest radius
$\delta = \min_j \delta_j$ is positive and its ball sits in every $V_j$. For
(T3), a point of the union lies in some single $V_\lambda$, whose ball already
witnesses openness. The union argument never needs a minimum, so it works for
infinitely many sets; the intersection argument needs $\min_j \delta_j > 0$,
which can fail once there are infinitely many terms.

$$
% caption: Why intersections must be finite: the sets $(-1/n, 1/n)$ are each
% open, but their nested intersection collapses to the single point $\{0\}$,
% which is not open.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->, black] (-3.2,0) -- (3.2,0) node[right]{$\mathbf{R}$};
\foreach \n/\y/\r in {1/1.5/2.0, 2/1.0/1.0, 3/0.5/0.66} {
  \draw[acc, thick] (-\r,\y) -- (\r,\y);
  \draw[acc] (-\r,\y-0.08) -- (-\r,\y+0.08);
  \draw[acc] (\r,\y-0.08) -- (\r,\y+0.08);
}
\node[acc, right] at (2.05,1.5) {$n=1$};
\node[acc, right] at (1.05,1.0) {$n=2$};
\node[acc, right] at (0.71,0.5) {$n=3$};
\fill[black] (0,0) circle (2pt);
\node[below] at (0,-0.05) {$\{0\}$};
\end{tikzpicture}
$$

Complementation turns each axiom into its dual for closed sets, since
$(\bigcup E_\lambda)^c = \bigcap E_\lambda^c$ and vice versa.

> **Theorem (Closed-set axioms).** $\emptyset$ and $X$ are closed; an
> **arbitrary** intersection of closed sets is closed; a **finite** union of
> closed sets is closed.

The names are justified by the fact that the open ball is open and the closed
ball is closed, which still requires proof.

> **Proposition (Balls have their expected type).** For any $x \in X$ and
> $\delta > 0$, the open ball $B(x, \delta)$ is open and the closed ball
> $C(x, \delta)$ is closed.

Take $y \in B(x, \delta)$ and set $\alpha = \delta - d(x, y) > 0$. For any
$z \in B(y, \alpha)$, the triangle inequality gives $d(x, z) \le d(x, y) +
d(y, z) < d(x, y) + \alpha = \delta$, so $B(y, \alpha) \subseteq B(x, \delta)$.
Every point of the ball thus has room around it, and the ball is open.

$$
% caption: The open ball is open: for $y \in B(x,\delta)$ the smaller ball
% $B(y,\alpha)$ with $\alpha = \delta - d(x,y)$ stays inside $B(x,\delta)$ by
% the triangle inequality.
\begin{tikzpicture}[scale=1.1, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc, thick, fill=acc!7] (0,0) circle (2);
\node[acc] at (-1.3,1.55) {outer ball};
\fill[acc] (0,0) circle (1.5pt);
\node[below] at (0,0) {$x$};
\coordinate (y) at (1.1,0.5);
\fill[black] (y) circle (1.5pt);
\node[above right] at (y) {$y$};
\draw[black, thick] (y) circle (0.78);
\node[black] at (1.05,-0.95) {inner ball};
\draw[black, dashed] (0,0) -- (y);
\draw[black] (y) -- ++(20:0.78) node[midway, above, font=\scriptsize]{$s$};
\end{tikzpicture}
$$

## Interior, closure, and boundary

Three derived sets classify how a point relates to a set $A$: it can sit
strictly inside, be approachable from within, or straddle the two sides.

> **Definition (Interior, closure, boundary).** Let $A \subseteq X$.
>
> - The **interior** $A^\circ = \{ x \in A : B(x, \delta) \subseteq A
>   \text{ for some } \delta > 0 \}$ is the set of points $A$ contains with
>   room to spare.
> - The **closure** $\overline{A} = \bigcap \{ E : E \text{ closed},\ A
>   \subseteq E \}$ is the smallest closed set containing $A$.
> - The **boundary** $\partial A = \overline{A} \setminus A^\circ$.

The interior is open (it is a union of open balls) and is the largest open set
inside $A$; the closure is closed (an intersection of closed sets) and is the
smallest closed set containing $A$; and $A$ is open iff $A = A^\circ$, closed
iff $A = \overline{A}$. The two ball-based characterizations below are what get
used in practice.

> **Proposition (Closure and boundary by balls).** For $A \subseteq X$:
>
> - $x \in \overline{A}$ iff every ball $B(x, \delta)$ meets $A$, that is,
>   $B(x, \delta) \cap A \ne \emptyset$ for all $\delta > 0$.
> - $x \in \partial A$ iff every ball $B(x, \delta)$ meets both $A$ and $A^c$.

The closure is thus everything "approachable" from $A$: every ball about $x$,
however small, contains a point of $A$. The boundary consists of the points
close to $A$ and to its complement at once. Equivalently $\partial A =
\overline{A} \cap \overline{A^c}$.

$$
% caption: Interior, boundary, and an isolated exterior point of a set $A$:
% $p$ has a ball inside $A$, $q$ has every ball meeting both sides, and $r$
% has a ball missing $A$ entirely.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, thick, fill=acc!8] plot[smooth cycle, tension=0.7]
  coordinates {(0,0) (2.8,-0.4) (4.2,1.0) (3.2,2.6) (0.8,2.4) (-0.6,1.2)};
\node[black] at (1.4,2.0) {$A$};
% interior
\fill[acc] (1.5,0.9) circle (1.5pt);
\node[below] at (1.5,0.85) {$p$};
\draw[acc] (1.5,0.9) circle (0.45);
% boundary
\fill[black] (3.55,1.55) circle (1.5pt);
\node[right] at (3.6,1.6) {$q$};
\draw[black] (3.55,1.55) circle (0.45);
% exterior isolated
\fill[black] (5.4,0.6) circle (1.5pt);
\node[below] at (5.4,0.55) {$r$};
\draw[black] (5.4,0.6) circle (0.45);
\node[acc, font=\scriptsize] at (1.5,0.2) {interior};
\node[black, font=\scriptsize] at (3.55,0.9) {boundary};
\node[black, font=\scriptsize] at (5.4,-0.05) {exterior};
\end{tikzpicture}
$$

> **Worked example (Interior, closure, boundary of $(0,1]$).** Take
> $A = (0, 1]$ in $X = \mathbb{R}$. A point $x \in (0, 1)$ has the ball
> $(x - \delta, x + \delta) \subseteq A$ for small $\delta$, while $1$ has no
> such ball, so $A^\circ = (0, 1)$. Every ball about $0$ meets $A$, so
> $0 \in \overline{A}$; no point below $0$ or above $1$ is approached by $A$;
> hence $\overline{A} = [0, 1]$. The boundary is the difference,
> $$
> A^\circ = (0, 1), \qquad \overline{A} = [0, 1], \qquad
> \partial A = \overline{A} \setminus A^\circ = \{0, 1\}.
> $$

The point $1 \in A$ is on the boundary (every ball about it meets both $A$ and
its complement) yet belongs to $A$; the point $0 \notin A$ is on the boundary
and does not. Boundary points may or may not lie in the set, and that is
what makes $A$ neither open nor closed here.

Two more computations show the range of behavior.

- **The rationals $\mathbb{Q}$ in $\mathbb{R}$.** Every ball $(x - \delta,
  x + \delta)$ contains both a rational and an irrational, so $\mathbb{Q}^\circ
  = \emptyset$, $\overline{\mathbb{Q}} = \mathbb{R}$, and $\partial \mathbb{Q} =
  \mathbb{R}$. A set can have empty interior and yet closure equal to the whole
  space; such a set is **dense**.
- **An open disk in $\mathbb{R}^2$.** For $A = B(0, 1)$, the interior is $A$
  itself (it is open), the closure is the closed disk $C(0, 1)$, and the
  boundary is the unit circle. Here the boundary is a genuine "edge," disjoint
  from the open set it bounds.

| Set (in $\mathbb{R}$) | Interior | Closure | Boundary | Open? | Closed? |
| --- | --- | --- | --- | --- | --- |
| $(0, 1)$ | $(0,1)$ | $[0,1]$ | $\{0,1\}$ | yes | no |
| $[0, 1]$ | $(0,1)$ | $[0,1]$ | $\{0,1\}$ | no | yes |
| $[0, 1)$ | $(0,1)$ | $[0,1]$ | $\{0,1\}$ | no | no |
| $\mathbb{Q}$ | $\emptyset$ | $\mathbb{R}$ | $\mathbb{R}$ | no | no |
| $\{1/n : n \in \mathbb{N}\}$ | $\emptyset$ | $\{1/n\} \cup \{0\}$ | closure | no | no |

The last row shows a set whose closure adds a single limit point.

## Limit points and isolated points

The closure adds to $A$ precisely the points approachable from it. Two terms
distinguish points approached by _other_ points of $A$ from points that are
not.

> **Definition (Limit point, isolated point).** A point $x \in X$ is a **limit
> point** (or accumulation point) of $A$ if every ball $B(x, \delta)$ contains
> a point of $A$ other than $x$. A point $x \in A$ that is not a limit point of
> $A$ is an **isolated point**: some ball about it meets $A$ only at $x$.

Writing $A'$ for the set of limit points, the closure decomposes as
$\overline{A} = A \cup A'$. A set is closed exactly when it contains all its
limit points. Isolated points are the opposite extreme: under the discrete
metric _every_ point is isolated, since $B(x, \tfrac12) = \{x\}$, so $A' =
\emptyset$ and $\overline{A} = A$ for every $A$; every set is closed.

> **Worked example (Closure of $\{1/n\}$).** Let $A = \{1/n : n \in \mathbb{N}\}
> \subseteq \mathbb{R}$. Each $1/n$ is isolated: the gap to its nearest
> neighbours is positive, so the ball
> $B\!\left(\tfrac1n, \tfrac12\bigl(\tfrac1n - \tfrac1{n+1}\bigr)\right)$
> meets $A$ only at $1/n$. Thus no $1/n$ is a limit
> point. The point $0$ is a limit point: every $B(0, \delta)$ contains $1/n$ for
> all $n > 1/\delta$. No other point is approached, since any $x \notin A \cup
> \{0\}$ sits a positive distance from $A$. Hence $A' = \{0\}$ and
> $$
> \overline{A} = A \cup \{0\} = \{1/n : n \in \mathbb{N}\} \cup \{0\},
> $$
> so the closure adjoins exactly the single limit point.

## The subspace topology

Whether a set is open depends on the ambient space, because balls are computed
there. Openness in a subspace reduces to openness in the whole space as
follows.

> **Proposition (Subspace topology).** Let $Y \subseteq X$. A set $U \subseteq
> Y$ is open in the subspace $Y$ if and only if $U = V \cap Y$ for some set $V$
> open in $X$.

The subspace balls are the ambient balls cut down to $Y$, $B_Y(x, \delta) =
B_X(x, \delta) \cap Y$, and intersecting an open $V \subseteq X$ with $Y$
carries this through.

> **Worked example ($[0, \tfrac12)$ open in $[0,1]$).** In $Y = [0, 1]$ the ball
> about $0$ is
> $$
> B_Y(0, \tfrac12) = \{ y \in [0, 1] : |0 - y| < \tfrac12 \} = [0, \tfrac12),
> $$
> an open ball, hence open in $Y$. The same set equals $(-\tfrac12, \tfrac12)
> \cap [0, 1]$, exhibiting the open ambient set $V = (-\tfrac12, \tfrac12)$ of
> the subspace characterization. Yet $[0, \tfrac12)$ is neither open nor closed
> in $\mathbb{R}$: no ball about $0$ avoids negative numbers, and $\tfrac12$ is
> a complement point every ball of which meets the set. Openness is a statement
> about a set _inside_ a chosen space, not an intrinsic property.

$$
% caption: The subspace topology on $[0,1]$: intersecting the open interval
% $(-\frac12,\frac12)$ of $\mathbb{R}$ with $[0,1]$ leaves the half-open
% $[0,\frac12)$, which is open in the subspace.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
% ambient line with open V
\draw[black, thick] (-2.4,1.0) -- (4.0,1.0);
\node[black, left] at (-2.5,1.0) {$\mathbb{R}$};
\draw[acc, thick] (-1.6,1.0) -- (1.6,1.0);
\draw[acc, thick, fill=white] (-1.6,1.0) circle (2.2pt);
\draw[acc, thick, fill=white] (1.6,1.0) circle (2.2pt);
\node[acc, above, font=\scriptsize] at (0,1.15) {open set $V$};
% subspace [0,1]
\draw[black, very thick] (0,-0.3) -- (3.2,-0.3);
\node[black, left] at (-0.2,-0.3) {[0,1]};
\fill[black] (0,-0.3) circle (2.2pt);
\fill[black] (3.2,-0.3) circle (2.2pt);
\node[below] at (0,-0.4) {$0$};
\node[below] at (3.2,-0.4) {$1$};
% intersection [0,1/2)
\draw[acc, very thick] (0,-0.3) -- (1.6,-0.3);
\draw[acc, thick, fill=white] (1.6,-0.3) circle (2.2pt);
\node[acc, above, font=\scriptsize] at (0.8,-0.15) {$V$ cut down: open in [0,1]};
\end{tikzpicture}
$$

One special case: if $V \subseteq X$ is itself open, then a subset
$U \subseteq V$ is open in $V$ iff it is open in $X$.[^lebl-72]

[^lebl-72]: **Lebl**, _Basic Analysis I_, §7.2 — Open and closed sets: the topology axioms, the open ball is open, closure/interior/boundary, and the subspace topology characterization.
