Metric Spaces — Open and Closed Sets, Convergence

⚡ Key Takeaways

A metric space (X,d)(X,d) pairs a set XX with a distance function dd satisfying positivity, symmetry, and the triangle inequality. Open sets are unions of open balls, closed sets are their complements, and a sequence converges to a limit when its terms eventually stay within every ball around that limit. Used everywhere analysis lives — real numbers, function spaces, fractal geometry. Foundational framework crystallized by Maurice Fréchet (1906) and Felix Hausdorff (1914).

💡 The Core Insight

Distance generates topology. Once you can measure d(x,y)d(x,y), you can declare a point "interior" to a set if some ball around it stays inside, declare a set "open" if all its points are interior, and define a limit by "eventually inside every ball." Open and closed sets are not opposites in plain language — they are complement-linked, and a set can be both, neither, or one. Convergence and closedness are two faces of the same coin: closed sets are exactly those that contain all their sequential limits.

Formal Statement

DefinitionMetric Space

A metric space is a pair (X,d)(X,d) where XX is a set and d:X×X→[0,∞)d:X\times X\to[0,\infty) is a function — the metric — satisfying, for all x,y,z∈Xx,y,z\in X:

1
d(x,y)=0  ⟺  x=y\quad d(x,y)=0 \iff x=y

Derivation hint: This is the "identity of indiscernibles" axiom; combined with nonnegativity it says distance vanishes exactly on the diagonal.

2
d(x,y)=d(y,x)\quad d(x,y)=d(y,x)

Derivation hint: Symmetry — distance does not depend on direction of travel.

3
d(x,z)≤d(x,y)+d(y,z)\quad d(x,z)\le d(x,y)+d(y,z)

Derivation hint: The triangle inequality; a detour through yy is never shorter than the direct route. Here x,y,zx,y,z are arbitrary points of XX. Nonnegativity (d≥0d\ge 0) follows from the others: 0=d(x,x)≤d(x,y)+d(y,x)=2d(x,y)0=d(x,x)\le d(x,y)+d(y,x)=2d(x,y).

DefinitionOpen Ball

For x0∈Xx_0\in X and radius r>0r>0, the open ball of radius rr centered at x0x_0 is

4
B(x0,r)={ x∈X:d(x,x0)<r }\quad B(x_0,r)=\{\,x\in X : d(x,x_0)<r\,\}

Derivation hint: The set of all points strictly closer than rr; the boundary sphere is excluded by the strict inequality. The closed ball is Bˉ(x0,r)={x:d(x,x0)≤r}\bar{B}(x_0,r)=\{x:d(x,x_0)\le r\}.

DefinitionOpen and Closed Sets

A set U⊆XU\subseteq X is open if every point is an interior point:

5
U open  ⟺  ∀x∈U, ∃r>0 such that B(x,r)⊆U\quad U \text{ open} \iff \forall x\in U,\ \exists r>0 \text{ such that } B(x,r)\subseteq U

Derivation hint: Openness = "room to wiggle"; around each member there is a whole ball still inside. A set C⊆XC\subseteq X is closed if its complement is open:

6
C closed  ⟺  X∖C is open\quad C \text{ closed} \iff X\setminus C \text{ is open}

Derivation hint: Closedness is defined by complementation, not directly; this is the cleanest topological definition.

DefinitionInterior, Closure, Boundary

For A⊆XA\subseteq X:

7
int⁡(A)={x∈A:∃r>0, B(x,r)⊆A}\quad \operatorname{int}(A)=\{x\in A : \exists r>0,\ B(x,r)\subseteq A\}

Derivation hint: The largest open set contained in AA; collect all interior points.

8
A‾={x∈X:∀r>0, B(x,r)∩A≠∅}\quad \overline{A}=\{x\in X : \forall r>0,\ B(x,r)\cap A\neq\varnothing\}

Derivation hint: The closure adds all limit points; xx is in A‾\overline A iff every ball around it touches AA. It equals the smallest closed set containing AA.

9
∂A=A‾∖int⁡(A)\quad \partial A=\overline{A}\setminus\operatorname{int}(A)

Derivation hint: Boundary points have every ball meeting both AA and its complement.

DefinitionConvergence of a Sequence

A sequence (xn)n≥1(x_n)_{n\ge1} in XX converges to x∈Xx\in X, written xn→xx_n\to x, if

10
∀ε>0, ∃N∈N, ∀n≥N: d(xn,x)<ε\quad \forall \varepsilon>0,\ \exists N\in\mathbb{N},\ \forall n\ge N:\ d(x_n,x)<\varepsilon

Derivation hint: Replace ∣xn−x∣|x_n-x| in the real-line definition by d(xn,x)d(x_n,x); "eventually within every ball." Equivalently d(xn,x)→0d(x_n,x)\to 0 as a real sequence.

TheoremTopology Axioms from a Metric

Let (X,d)(X,d) be a metric space and T\mathcal{T} the collection of open sets. Then: 1. ∅\varnothing and XX are open. 2. Any union (arbitrary) of open sets is open. 3. Any finite intersection of open sets is open. Thus every metric space is a topological space.

ProofOpen sets form a topology

Step 1 (trivial sets). ∅\varnothing is open vacuously (no points to check). XX is open since any ball lies in XX.

Step 2 (arbitrary unions). Let U=⋃i∈IUiU=\bigcup_{i\in I}U_i with each UiU_i open. Take x∈Ux\in U; then x∈Ui0x\in U_{i_0} for some i0i_0. By openness of Ui0U_{i_0} there is r>0r>0 with B(x,r)⊆Ui0⊆UB(x,r)\subseteq U_{i_0}\subseteq U. Hence xx is interior to UU, so UU is open.

Step 3 (finite intersections). Let U=⋂k=1nUkU=\bigcap_{k=1}^{n}U_k, each open. Take x∈Ux\in U. For each kk there is rk>0r_k>0 with B(x,rk)⊆UkB(x,r_k)\subseteq U_k. Set r=min⁡{r1,…,rn}>0r=\min\{r_1,\dots,r_n\}>0 (finiteness is essential here). Then B(x,r)⊆B(x,rk)⊆UkB(x,r)\subseteq B(x,r_k)\subseteq U_k for all kk, so B(x,r)⊆UB(x,r)\subseteq U. Thus UU is open. ■\blacksquare

∎
TheoremSequential Characterization of Closed Sets

A set C⊆XC\subseteq X is closed if and only if it is sequentially closed: whenever (xn)⊆C(x_n)\subseteq C and xn→xx_n\to x in XX, then x∈Cx\in C.

ProofClosed = contains its limits

(⇒\Rightarrow) Suppose CC is closed and (xn)⊆C(x_n)\subseteq C with xn→xx_n\to x. If x∉Cx\notin C then x∈X∖Cx\in X\setminus C, which is open, so some B(x,r)⊆X∖CB(x,r)\subseteq X\setminus C. But xn→xx_n\to x forces xn∈B(x,r)x_n\in B(x,r) for large nn, contradicting xn∈Cx_n\in C. Hence x∈Cx\in C.

(⇐\Leftarrow) Suppose CC is sequentially closed; we show X∖CX\setminus C is open. If not, some x∈X∖Cx\in X\setminus C has no ball inside X∖CX\setminus C: for every nn, B(x,1/n)∩C≠∅B(x,1/n)\cap C\neq\varnothing. Pick xn∈B(x,1/n)∩Cx_n\in B(x,1/n)\cap C. Then d(xn,x)<1/n→0d(x_n,x)<1/n\to0, so xn→xx_n\to x with (xn)⊆C(x_n)\subseteq C. By hypothesis x∈Cx\in C, contradicting x∈X∖Cx\in X\setminus C. Hence X∖CX\setminus C is open and CC is closed. ■\blacksquare

∎
TheoremOpen Balls Are Open; Uniqueness of Limits

(a) Every open ball B(x0,r)B(x_0,r) is an open set. (b) In any metric space, sequential limits are unique: if xn→xx_n\to x and xn→yx_n\to y then x=yx=y.

ProofBalls open, limits unique

(a) Let y∈B(x0,r)y\in B(x_0,r), so d(y,x0)<rd(y,x_0)<r. Put s=r−d(y,x0)>0s=r-d(y,x_0)>0. For z∈B(y,s)z\in B(y,s), the triangle inequality [3] gives d(z,x0)≤d(z,y)+d(y,x0)<s+d(y,x0)=rd(z,x_0)\le d(z,y)+d(y,x_0)<s+d(y,x_0)=r, so z∈B(x0,r)z\in B(x_0,r). Thus B(y,s)⊆B(x0,r)B(y,s)\subseteq B(x_0,r) and the ball is open.

(b) Suppose xn→xx_n\to x and xn→yx_n\to y with x≠yx\neq y, so d(x,y)=δ>0d(x,y)=\delta>0. Choose NN so that n≥Nn\ge N gives d(xn,x)<δ/2d(x_n,x)<\delta/2 and d(xn,y)<δ/2d(x_n,y)<\delta/2. Then by [3], δ=d(x,y)≤d(x,xn)+d(xn,y)<δ/2+δ/2=δ\delta=d(x,y)\le d(x,x_n)+d(x_n,y)<\delta/2+\delta/2=\delta, a contradiction. So x=yx=y. ■\blacksquare

∎
mathematician · Maurice Fréchet | 1878–1973

In his 1906 doctoral thesis Sur quelques points du calcul fonctionnel, Fréchet introduced abstract spaces with a distance function — what he called classes (E) — generalizing convergence away from Rn\mathbb{R}^n to spaces of curves and functions. He recognized that limit and continuity needed only a notion of "écart" (gap), launching general topology and functional analysis. The very word metric space (espace métrique) and the axioms [1]–[3] descend directly from his work. Felix Hausdorff later (1914) refined and popularized these ideas in Grundzüge der Mengenlehre, embedding them in the broader axiomatic study of point-set topology.

Building Intuition

🧠 Intuition

Think of dd as a ruler you carry everywhere. An open set is a country with no walls: standing anywhere inside, you can take a small step in any direction and remain in the country. A closed set may include its border fence — points on the edge belong to it. The number line illustrates the spectrum: (0,1)(0,1) is open (every point has wiggle room), [0,1][0,1] is closed (it owns its endpoints), [0,1)[0,1) is neither, and ∅\varnothing and R\mathbb{R} are simultaneously both open and closed. Convergence is a "settling down" idea: no matter how tiny a target ball you draw around the limit, the sequence eventually crawls inside and never leaves. Crucially, which sets are open depends on the metric, but two different metrics can declare the same open sets (then they are topologically equivalent), in which case they agree on every convergence, continuity, and closedness question.

Figure
Open vs. closed: a point interior to an open set has a full ball inside, while a boundary point of a closed set sits on the rim
Open set U x interior: B(x,r) ⊆ U Closed set C y ∈ ∂C: every ball meets C and Cᶜ

Worked Examples

ExampleConvergence in the Euclidean plane

Given: X=R2X=\mathbb{R}^2 with Euclidean metric d(p,q)=(p1−q1)2+(p2−q2)2d(p,q)=\sqrt{(p_1-q_1)^2+(p_2-q_2)^2}. Consider xn=(1n, 2−1n2)x_n=\left(\dfrac{1}{n},\, 2-\dfrac{1}{n^2}\right). Does it converge, and to what?

Step 1 — guess the limit. As n→∞n\to\infty, 1/n→01/n\to0 and 2−1/n2→22-1/n^2\to2. Candidate limit x=(0,2)x=(0,2).

Step 2 — compute the distance.

d(xn,x)=(1n)2+(1n2)2=1n2+1n4.d(x_n,x)=\sqrt{\left(\tfrac1n\right)^2+\left(\tfrac1{n^2}\right)^2}=\sqrt{\tfrac1{n^2}+\tfrac1{n^4}}.

Step 3 — bound it. Since 1/n4≤1/n21/n^4\le 1/n^2, we get d(xn,x)≤2/n2=2/nd(x_n,x)\le\sqrt{2/n^2}=\sqrt2/n.

Step 4 — apply the definition [10]. Given ε>0\varepsilon>0, choose N>2/εN>\sqrt2/\varepsilon. Then n≥N⇒d(xn,x)≤2/n≤2/N<εn\ge N\Rightarrow d(x_n,x)\le\sqrt2/n\le\sqrt2/N<\varepsilon.

Answer:

xn→(0,2)in (R2,dEuclidean)\boxed{x_n\to(0,2)\quad\text{in }(\mathbb{R}^2,d_{\text{Euclidean}})}
ExampleClosure and interior of a rational interval

Given: X=RX=\mathbb{R} with d(x,y)=∣x−y∣d(x,y)=|x-y|. Let A=(1,3]∩QA=(1,3]\cap\mathbb{Q} (rationals in the interval).

Step 1 — interior. Any open ball B(x,r)=(x−r,x+r)B(x,r)=(x-r,x+r) contains irrationals, which are not in AA. So no point of AA has a ball inside AA:

int⁡(A)=∅.\operatorname{int}(A)=\varnothing.

Step 2 — closure. Every ball around any x∈[1,3]x\in[1,3] meets the rationals of (1,3](1,3] (rationals are dense). Points outside [1,3][1,3] have balls disjoint from AA.

A‾=[1,3].\overline{A}=[1,3].

Step 3 — boundary. By [9], ∂A=A‾∖int⁡(A)=[1,3]∖∅=[1,3]\partial A=\overline A\setminus\operatorname{int}(A)=[1,3]\setminus\varnothing=[1,3].

Answer:

int⁡(A)=∅,A‾=[1,3],∂A=[1,3]\boxed{\operatorname{int}(A)=\varnothing,\quad \overline{A}=[1,3],\quad \partial A=[1,3]}

A set can have empty interior yet a "fat" closure — density makes the difference.

Common Misconceptions

⚠️ Common mistake

"Closed means not open." False. Open and closed are not complementary properties. In any metric space ∅\varnothing and XX are both open and closed (clopen). The half-open interval [0,1)[0,1) is neither. The correct relationship is via complements [6]: CC is closed iff X∖CX\setminus C is open.

"Infinite intersections of open sets are open." False. In R\mathbb{R}, ⋂n≥1(−1/n, 1/n)={0}\bigcap_{n\ge1}(-1/n,\,1/n)=\{0\}, a closed set, not open. Only finite intersections are guaranteed open (see [Step 3] of the topology proof).

"The closed ball equals the closure of the open ball." Not always! In a general metric space B(x,r)‾⊆Bˉ(x,r)\overline{B(x,r)}\subseteq \bar B(x,r), but equality can fail.

CounterexampleClosed ball strictly larger than closure of open ball

Take XX to be any set with two or more points equipped with the discrete metric

d(x,y)={0,x=y1,x≠y.d(x,y)=\begin{cases}0,& x=y\\ 1,& x\neq y.\end{cases}

Fix a point pp and radius r=1r=1.

  • Open ball: B(p,1)={x:d(x,p)<1}={p}B(p,1)=\{x:d(x,p)<1\}=\{p\}. Its closure is {p}‾={p}\overline{\{p\}}=\{p\} (singletons are closed here).
  • Closed ball: Bˉ(p,1)={x:d(x,p)≤1}=X\bar B(p,1)=\{x:d(x,p)\le1\}=X (everything is within distance 11).

So B(p,1)‾={p}⊊X=Bˉ(p,1)\overline{B(p,1)}=\{p\}\subsetneq X=\bar B(p,1). The naive intuition from Rn\mathbb{R}^n breaks. (In the discrete metric every subset is both open and closed, and a sequence converges iff it is eventually constant.)

Connections

connection

The open/closed/convergence machinery is the gateway to the rest of analysis. Continuity is characterized cleanly here: ff is continuous iff preimages of open sets are open, iff xn→x⇒f(xn)→f(x)x_n\to x \Rightarrow f(x_n)\to f(x) — see Continuous Functions on Metric Spaces. Completeness asks whether Cauchy sequences converge, refining the convergence notion of [10] into Complete Metric Spaces and powering the Banach Fixed-Point Theorem. Compactness (Compact Metric Spaces) combines closedness with a boundedness-like finiteness via sequential or open-cover formulations. The whole framework abstracts to Topological Spaces, where open sets are taken as primitive and the metric is forgotten. Finally, different metrics yielding the same open sets connect to Equivalent Metrics and Norms.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1817 — Bolzano gives an early rigorous notion of continuity and limit, foreshadowing the ε\varepsilon-language.
- 1872 — Weierstrass and Heine codify the ε\varepsilon–δ\delta / ε\varepsilon–NN definitions of continuity and convergence on R\mathbb{R}.
- 1872 — Cantor and Dedekind construct the reals; Cantor introduces accumulation (limit) points and derived sets, the seed of "closure."
- 1906 — Maurice Fréchet's thesis introduces abstract metric spaces (classes (E)) and the axioms of distance, generalizing convergence to function spaces.
- 1910 — Fréchet and F. Riesz develop early functional-analytic spaces; the notion of completeness in abstract settings emerges.
- 1914 — Felix Hausdorff's Grundzüge der Mengenlehre axiomatizes neighborhoods and topological spaces, placing metric spaces inside a wider theory; the Hausdorff separation axiom is born.
- 1922 — Stefan Banach's thesis founds normed/complete spaces (Banach spaces) and proves the contraction mapping theorem.
- 1906–1930 — The Moscow and Polish (Lwów–Warsaw) schools (Urysohn, Alexandroff, Kuratowski, Sierpiński) systematize open/closed sets, closure operators (Kuratowski axioms), and metrization theorems.
- 1933 — Urysohn's and later metrization theorems characterize exactly which topological spaces arise from a metric, closing the abstraction loop.

Subtleties & Limits

open-problem

While metric spaces are well-understood, their boundaries spark ongoing research. Metrizability: precisely which topological spaces admit a compatible metric is governed by the Nagata–Smirnov and Bing metrization theorems, but generalizations to non-Hausdorff or quasi-metric settings remain subtle. Coarse geometry & large-scale structure: Gromov's program studies metric spaces "up to bounded distortion," central to geometric group theory and still generating open questions about embeddings of groups into Hilbert space (the Novikov and coarse Baum–Connes conjectures). Metric embedding theory (active in theoretical computer science) asks how faithfully arbitrary finite metrics embed into ℓp\ell^p spaces with low distortion — Bourgain's theorem gives O(log⁡n)O(\log n), and optimal distortions for specific families stay open. Wasserstein / optimal-transport metrics on probability measures are an explosively active area with deep open questions in geometry and PDE. Even the innocent fact that closed balls can differ from closures of open balls signals how much geometric information a bare metric retains — and how much it discards.

See Also

Topological Spaces · Complete Metric Spaces · Compact Metric Spaces · Continuous Functions on Metric Spaces · Equivalent Metrics and Norms · Normed Vector Spaces · Banach Fixed-Point Theorem · Hausdorff Metric and Fractals