# Topological Spaces: What Remains of Nearness When the Metric Is Discarded

> Open sets in a metric space satisfy three properties; taking them as axioms we define topological spaces, build the discrete, order and Zariski topologies, and prove the basic laws of closure.
> https://rikai.mugen-giken.com/en/mathematics/topology/topological-spaces

## 0. Key points

- The numerical value of a metric $d$ is used at exactly one place: in deciding which sets deserve the name *open*. Continuity, convergence, closure and the other basic notions of analysis can all be defined without a metric, provided a family of open sets is given.
- The open sets of a metric space enjoy three properties: (O1) the empty set and the whole space belong to the family, (O2) the family is closed under arbitrary unions, (O3) it is closed under finite intersections. Adopting these three, and nothing else, as axioms yields the notion of a topological space.
- The word "finite" in (O3) cannot be dropped. The identity $\bigcap_{n\ge 1}(-1/n,\,1/n)=\{0\}$, together with the fact that $\{0\}$ is not open, is the proof.
- Not every topology comes from a metric. The indiscrete topology, the order topology and the Zariski topology (the cofinite topology) include topologies that no metric can ever produce.
- Neighbourhoods, interiors, closures and boundaries are all definable from the family of open sets alone. The closure $\overline{A}$ has two faces — "the smallest closed set containing $A$" and "the set of points every neighbourhood of which meets $A$" — and moving freely between them is what makes computations in topology work.

## 1. Motivation: when the metric is discarded

When we defined continuity of a function in calculus, we used the $\varepsilon$-$\delta$ argument. The statement "if $x$ is close enough to $a$, then $f(x)$ is close enough to $f(a)$" was written out as the pair of inequalities $|x-a| < \delta$ and $|f(x)-f(a)| < \varepsilon$. The instrument that measures "close" here is the absolute value of a real number, that is, a distance.

Maurice Fréchet transplanted this structure to arbitrary sets: in his 1906 doctoral thesis he introduced an axiom system for a function assigning to two points of a set their "separation". This is what we now call a metric space. With a metric at hand one can discuss convergence, continuity and compactness far away from the real line. So far the generalisation is a natural one.

In the twentieth century, however, kinds of "nearness" appeared one after another that a metric cannot handle. Here are three.

First, pointwise convergence of sequences of functions. On the enormous set of all real-valued functions on the interval $[0,1]$, the nearness expressing uniform convergence is given by the supremum metric $\sup_t |f(t)-g(t)|$ (see [Sequences of functions and uniform convergence](/mathematics/real-analysis/uniform-convergence)). But it is known that the nearness expressing pointwise convergence arises from no metric whatsoever. A notion of convergence exists, yet no metric generates it.

Second, the formation of quotients. Identify two points $x,y$ of the real line $\mathbb{R}$ whenever $x-y$ is rational; the resulting quotient set carries a topology induced naturally from $\mathbb{R}$, and that topology has only two open sets, the empty set and the whole space. In a metric space two distinct points can always be separated by disjoint open sets (<Ref to="prop-metric-separates" />), so this topology comes from no metric at all.

Third, algebraic geometry. Over a field $k$, declare the sets expressible as common zero sets of polynomials to be the closed sets; these too satisfy the axioms for a topology (the Zariski topology). In one variable, the non-empty open sets are exactly the complements of finite sets, and any two non-empty open sets necessarily meet. This is far removed from metric intuition, but in a world where figures can only be cut out by polynomials, this is the correct notion of nearness.

Meanwhile, rereading proofs written for metric spaces, one notices that the actual value of $d(x,y)$ is hardly ever used. What is used is invariably an assertion of the form "a sufficiently small ball centred at $x$ fits entirely inside $U$". In other words, the metric serves only to specify which sets are "sets with room to spare around each of their points". If so, we may as well hand over that family of "sets with room to spare" from the outset. This reversal of viewpoint is the topological space. Felix Hausdorff gave an axiomatisation via neighbourhood systems in his *Grundzüge der Mengenlehre* of 1914, and the equivalent formulation in terms of families of open sets later became standard.

The return on this abstraction has been large. Among the properties definable by a topology alone, compactness and connectedness are especially powerful. That a continuous function on a closed interval attains a maximum, and that it takes intermediate values, follow not from the fine structure of $\mathbb{R}$ but from the compactness and connectedness of $[a,b]$ ([Compactness](/mathematics/topology/compactness), [Connectedness](/mathematics/topology/connectedness)). The former is proved as <Ref to="mathematics/topology/compactness#cor-extreme-value" text="the extreme value theorem" />, the latter as <Ref to="mathematics/topology/connectedness#thm-ivt" text="the intermediate value theorem" />, purely in the language of topology. As the starting point of all this, the present article assembles the definition of a topological space itself.

## 2. Metric spaces: measuring nearness by a number

We begin by defining precisely the metric spaces we start from. Throughout, $X$ denotes a non-empty set.

<Definition id="def-metric" title="Metric space">
A map $d\colon X\times X\to\mathbb{R}$ on a set $X$ is called a **metric** on $X$, and the pair $(X,d)$ a **metric space**, when the following three conditions hold.

- (M1) For all $x,y\in X$, $d(x,y)=0$ if and only if $x=y$.
- (M2) For all $x,y\in X$, $d(x,y)=d(y,x)$.
- (M3) For all $x,y,z\in X$, $d(x,z)\le d(x,y)+d(y,z)$ (the triangle inequality).

For $x\in X$ and a real number $r>0$ we call

$$
B_d(x,r)=\{\,y\in X \;:\; d(x,y) < r\,\}
$$

the **open ball** of radius $r$ centred at $x$. When the metric is clear from the context we write $B(x,r)$.
</Definition>

<Remark id="rem-nonnegativity">
Some books list non-negativity $d(x,y)\ge 0$ as a fourth axiom, but it is a consequence of (M1)–(M3). Putting $z=x$ in (M3) gives $d(x,x)\le d(x,y)+d(y,x)$. The left-hand side is $0$ by (M1) and the right-hand side is $2d(x,y)$ by (M2), so $0\le 2d(x,y)$, that is, $d(x,y)\ge 0$.
</Remark>

<Example id="ex-metrics-rn" title="Euclidean, Manhattan and Chebyshev metrics">
Let $X=\mathbb{R}^n$ and, for $x=(x_1,\dots,x_n)$ and $y=(y_1,\dots,y_n)$, set

$$
d_1(x,y)=\sum_{i=1}^{n}|x_i-y_i|,\qquad
d_2(x,y)=\Bigl(\sum_{i=1}^{n}(x_i-y_i)^2\Bigr)^{1/2},\qquad
d_\infty(x,y)=\max_{1\le i\le n}|x_i-y_i|.
$$

These are called, in order, the **Manhattan metric** (the distance walked along a rectangular grid of streets), the **Euclidean metric** and the **Chebyshev metric**.

Let us verify (M1) for $d_1$. If $d_1(x,y)=0$, then a finite sum of non-negative reals vanishes, so every term vanishes; that is, $x_i=y_i$ for all $i$, i.e. $x=y$. The converse follows by substitution. For $d_2$ and $d_\infty$ the argument likewise reduces to "all coordinates agree". Condition (M2) is immediate from $|x_i-y_i|=|y_i-x_i|$.

Now (M3). For $d_1$, apply the triangle inequality for real numbers, $|x_i-z_i|\le |x_i-y_i|+|y_i-z_i|$, coordinatewise and sum over $i=1,\dots,n$. For $d_\infty$, for each $i$ we have

$$
|x_i-z_i|\le |x_i-y_i|+|y_i-z_i|\le d_\infty(x,y)+d_\infty(y,z),
$$

and since the right-hand side does not depend on $i$, taking the maximum of the left-hand side gives $d_\infty(x,z)\le d_\infty(x,y)+d_\infty(y,z)$. For $d_2$, put $a=x-y$ and $b=y-z$ and write $\|a\|=(\sum a_i^2)^{1/2}$ and $\langle a,b\rangle=\sum a_ib_i$; the Cauchy–Schwarz inequality $\langle a,b\rangle\le\|a\|\,\|b\|$ yields

$$
\|a+b\|^2=\|a\|^2+2\langle a,b\rangle+\|b\|^2\le \|a\|^2+2\|a\|\,\|b\|+\|b\|^2=(\|a\|+\|b\|)^2,
$$

and taking square roots gives $d_2(x,z)=\|a+b\|\le\|a\|+\|b\|=d_2(x,y)+d_2(y,z)$.

These three metrics are related by

$$
d_\infty(x,y)\;\le\; d_2(x,y)\;\le\; d_1(x,y)\;\le\; n\,d_\infty(x,y)
$$

for all $x,y$. Indeed, putting $a_i=|x_i-y_i|$, the first inequality follows by taking square roots in $\max_i a_i^2\le\sum_i a_i^2$; the second by taking square roots in $\bigl(\sum_i a_i\bigr)^2=\sum_i a_i^2+\sum_{i\ne j}a_ia_j\ge\sum_i a_i^2$ (the cross terms are non-negative because $a_i\ge 0$); and the third because each term is at most the maximum. This chain of inequalities will be used in the exercises.
</Example>

<Figure caption="The unit balls of the three metrics in R^2, that is, the sets of points at distance less than 1 from the origin. Changing the metric changes the very shape of 'near'.">
<svg viewBox="0 0 660 260" width="100%" role="img" aria-label="Unit balls of the Manhattan, Euclidean and Chebyshev metrics">
  <g stroke="currentColor" stroke-width="1" opacity="0.35">
    <line x1="20" y1="120" x2="200" y2="120" />
    <line x1="110" y1="30" x2="110" y2="210" />
    <line x1="240" y1="120" x2="420" y2="120" />
    <line x1="330" y1="30" x2="330" y2="210" />
    <line x1="460" y1="120" x2="640" y2="120" />
    <line x1="550" y1="30" x2="550" y2="210" />
  </g>
  <g fill="var(--sl-color-accent)" fill-opacity="0.18" stroke="var(--sl-color-accent)" stroke-width="2">
    <polygon points="180,120 110,50 40,120 110,190" />
    <circle cx="330" cy="120" r="70" />
    <rect x="480" y="50" width="140" height="140" />
  </g>
  <g fill="currentColor" font-size="14" text-anchor="middle">
    <text x="110" y="238">d₁ (Manhattan)</text>
    <text x="330" y="238">d₂ (Euclidean)</text>
    <text x="550" y="238">d∞ (Chebyshev)</text>
  </g>
</svg>
</Figure>

<Example id="ex-metrics-others" title="The discrete metric and metrics on function spaces">
**(1) The discrete metric.** On an arbitrary set $X$, set $d(x,y)=0$ if $x=y$ and $d(x,y)=1$ if $x\ne y$. Conditions (M1) and (M2) are the definition itself. For (M3): if $x=z$ the left-hand side is $0$ and the right-hand side is non-negative, so the inequality holds. If $x\ne z$ the left-hand side is $1$. In that case $y$ differs from at least one of $x$ and $z$ (were $y=x$ and $y=z$, we would get $x=z$, a contradiction). Hence at least one of the two terms on the right equals $1$ and the right-hand side is at least $1$. So (M3) holds.

**(2) The uniform metric on a space of continuous functions.** Let $C[0,1]$ be the set of all real-valued continuous functions on $[0,1]$ and set $d_\infty(f,g)=\sup_{t\in[0,1]}|f(t)-g(t)|$. A continuous function on a bounded closed interval is bounded, so this supremum is a finite real number. Condition (M1) holds because "$f(t)=g(t)$ for all $t$" is precisely the definition of $f=g$. For (M3), for each $t$ we have

$$
|f(t)-h(t)|\le |f(t)-g(t)|+|g(t)-h(t)|\le d_\infty(f,g)+d_\infty(g,h),
$$

and since the right-hand side does not depend on $t$, it suffices to take the supremum of the left-hand side. Convergence in this metric is uniform convergence.

**(3) A different metric on the same set.** One may also equip the same $C[0,1]$ with $d_1(f,g)=\int_0^1|f(t)-g(t)|\,dt$. Condition (M3) is obtained by integrating the pointwise inequality, and (M1) follows from the fact that a continuous non-negative $h$ with $\int_0^1 h=0$ satisfies $h\equiv0$ (if $h(t_0)>0$, then by continuity $h>h(t_0)/2$ on an interval of some length $\delta>0$ around $t_0$, so the integral would be at least $\delta h(t_0)/2>0$, a contradiction). These two metrics live on the same set yet give different notions of nearness ([L^p spaces and an introduction to functional analysis](/mathematics/real-analysis/lp-spaces)).
</Example>

## 3. Open sets in a metric space: where the metric really works

We now translate the theory of metric spaces into the language of open sets. This is the bridge to topological spaces.

<Definition id="def-open-metric" title="Open and closed sets in a metric space">
Let $(X,d)$ be a metric space. A subset $U\subseteq X$ is **open with respect to $d$** when

$$
\forall x\in U,\ \exists r>0,\quad B(x,r)\subseteq U
$$

holds; that is, every point of $U$ has room to spare without leaving $U$. A subset $F\subseteq X$ whose complement $X\setminus F$ is open is called **closed**.
</Definition>

The empty set $\emptyset$ is open: the assertion "for every $x\in\emptyset$ …" is vacuously true, since no $x$ satisfying the condition exists (for this way of handling quantifiers see [The grammar of mathematics — sets and logic](/en/mathematics/foundations/sets-and-logic)). Skipping this check leaves the reason for axiom (O1) obscure later on.

<Proposition id="prop-ball-open" title="Open balls are open">
Let $(X,d)$ be a metric space. For every $x\in X$ and every $r>0$, the open ball $B(x,r)$ is open in the sense of <Ref to="def-open-metric" />.
</Proposition>

<Proof of="prop-ball-open">
Let $y\in B(x,r)$ be arbitrary. By definition $d(x,y) < r$, so $\rho := r-d(x,y)$ is a positive real number. We show that this $\rho$ does the job. If $z\in B(y,\rho)$, then the triangle inequality (M3) (<Ref to="def-metric" />) gives

$$
d(x,z)\le d(x,y)+d(y,z) < d(x,y)+\rho = d(x,y) + \bigl(r-d(x,y)\bigr) = r,
$$

so $z\in B(x,r)$. Hence $B(y,\rho)\subseteq B(x,r)$, and since $y$ was arbitrary, $B(x,r)$ is open.
</Proof>

This proposition guarantees that the name "open ball" is justified, and at the same time provides a basic tool used repeatedly in the proofs below. The next result is the main theorem of this section; the axioms for a topological space are extracted from it.

<Theorem id="thm-metric-open-axioms" title="Properties of the family of open sets of a metric space">
Let $(X,d)$ be a metric space and let $\mathcal{O}_d$ be the family of all sets open with respect to $d$. Then the following hold.

- (O1) $\emptyset\in\mathcal{O}_d$ and $X\in\mathcal{O}_d$.
- (O2) If $\Lambda$ is an arbitrary (not necessarily finite) index set and $U_\lambda\in\mathcal{O}_d$ for each $\lambda\in\Lambda$, then $\bigcup_{\lambda\in\Lambda}U_\lambda\in\mathcal{O}_d$.
- (O3) If $n$ is a natural number and $U_1,\dots,U_n\in\mathcal{O}_d$, then $\bigcap_{k=1}^{n}U_k\in\mathcal{O}_d$.
</Theorem>

<Proof of="thm-metric-open-axioms">
(O1): That $\emptyset$ is open was noted above, the condition being vacuously true. As for $X$, every $x\in X$ satisfies $B(x,1)\subseteq X$, so $X$ is open.

(O2): Put $U=\bigcup_{\lambda\in\Lambda}U_\lambda$ and let $x\in U$. By the definition of a union there is $\lambda_0\in\Lambda$ with $x\in U_{\lambda_0}$. Since $U_{\lambda_0}$ is open, there is $r>0$ with $B(x,r)\subseteq U_{\lambda_0}$. As $U_{\lambda_0}\subseteq U$ we get $B(x,r)\subseteq U$. Since $x$ was arbitrary, $U$ is open. Note that the size of $\Lambda$ was never used.

(O3): First the case $n=2$. Let $x\in U_1\cap U_2$. Since $U_1$ and $U_2$ are open there exist $r_1>0$ and $r_2>0$ with $B(x,r_1)\subseteq U_1$ and $B(x,r_2)\subseteq U_2$. Put $r=\min\{r_1,r_2\}$; this is the minimum of **finitely many** positive reals, so $r>0$. Then $B(x,r)\subseteq B(x,r_1)\subseteq U_1$ and likewise $B(x,r)\subseteq U_2$, so $B(x,r)\subseteq U_1\cap U_2$.

The general case follows by induction on $n$ (<Ref to="mathematics/foundations/proof-techniques#thm-induction" text="the principle of mathematical induction" />). The case $n=1$ is trivial. Assuming the statement for $n$ sets, we have $\bigcap_{k=1}^{n+1}U_k=\bigl(\bigcap_{k=1}^{n}U_k\bigr)\cap U_{n+1}$; the set in brackets is open by the induction hypothesis and $U_{n+1}$ is open, so the whole is open by the case $n=2$.

Finiteness entered the proof at exactly one place: in $r=\min\{r_1,\dots,r_n\}>0$ in (O3). The infimum of infinitely many positive numbers may be $0$, so the argument does not survive the passage to infinitely many sets.
</Proof>

<Example id="ex-no-infinite-intersection" title="An infinite intersection need not be open">
Equip $\mathbb{R}$ with the usual metric $d(x,y)=|x-y|$ and put $U_n=(-1/n,\,1/n)=B(0,1/n)$ for $n\ge 1$. Each $U_n$ is open by <Ref to="prop-ball-open" />. Let us compute this infinite intersection.

If $x\in\bigcap_{n\ge1}U_n$, then $|x| < 1/n$ for every $n\ge 1$. Were $|x|>0$, then by <Ref to="mathematics/real-analysis/completeness-and-cauchy#thm-archimedes" text="the Archimedean property" /> there would be a natural number $n$ with $1/n < |x|$, a contradiction. Hence $|x|=0$, i.e. $x=0$. Conversely $0\in U_n$ for every $n$, so $\bigcap_{n\ge 1}U_n=\{0\}$.

But $\{0\}$ is not open. For any $r>0$ the number $r/2$ satisfies $|r/2-0|=r/2 < r$ and therefore lies in $B(0,r)$, while $r/2\ne 0$, so $B(0,r)\not\subseteq\{0\}$. Consequently the word "finite" cannot be removed from (O3) in <Ref to="thm-metric-open-axioms" />.
</Example>

<Proposition id="prop-metric-separates" title="Distinct points of a metric space can be separated">
Let $(X,d)$ be a metric space and let $x,y\in X$ with $x\ne y$. Then there exist open sets $U,V$ with $x\in U$, $y\in V$ and $U\cap V=\emptyset$.
</Proposition>

<Proof of="prop-metric-separates">
From $x\ne y$ and (M1) (<Ref to="def-metric" />) we get $d(x,y)\ne 0$, and by <Ref to="rem-nonnegativity" /> we have $d(x,y)\ge 0$; hence $d(x,y)>0$. Put $r=d(x,y)/2>0$ and set $U=B(x,r)$, $V=B(y,r)$. These are open by <Ref to="prop-ball-open" />, and $d(x,x)=0 < r$ gives $x\in U$, similarly $y\in V$.

If some point $z$ belonged to $U\cap V$, then the triangle inequality (M3) together with symmetry (M2) would give

$$
d(x,y)\le d(x,z)+d(z,y)=d(x,z)+d(y,z) < r+r=d(x,y),
$$

the contradiction $d(x,y) < d(x,y)$. Hence $U\cap V=\emptyset$.
</Proof>

We shall use this proposition later as a device for recognising topologies that come from no metric. In a metric space two points can always be pulled apart by open sets, so a topology lacking this property cannot be metrisable.

Finally, let us see that the $\varepsilon$-$\delta$ argument itself can be translated into the language of open sets. This is the decisive step towards axiomatisation.

<Proposition id="prop-continuity-open" title="Characterisation of continuity by open sets">
Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces and $f\colon X\to Y$ a map. The following two conditions are equivalent.

- (a) For every $a\in X$ and every $\varepsilon>0$ there is $\delta>0$ such that $d_Y(f(x),f(a)) < \varepsilon$ for all $x\in X$ with $d_X(x,a) < \delta$.
- (b) For every open set $V$ of $Y$, the preimage $f^{-1}(V)$ is open in $X$.
</Proposition>

<Proof of="prop-continuity-open">
(a) $\Rightarrow$ (b): Let $V\subseteq Y$ be open and let $a\in f^{-1}(V)$. Since $f(a)\in V$ and $V$ is open, there is $\varepsilon>0$ with $B(f(a),\varepsilon)\subseteq V$. Applying (a) with this $\varepsilon$ gives $\delta>0$ such that $x\in B(a,\delta)$, i.e. $d_X(x,a) < \delta$, implies $d_Y(f(x),f(a)) < \varepsilon$, that is, $f(x)\in B(f(a),\varepsilon)\subseteq V$. Hence $B(a,\delta)\subseteq f^{-1}(V)$, and since $a$ was arbitrary, $f^{-1}(V)$ is open.

(b) $\Rightarrow$ (a): Let $a\in X$ and $\varepsilon>0$ be arbitrary. The set $V=B(f(a),\varepsilon)$ is open in $Y$ by <Ref to="prop-ball-open" />, so $f^{-1}(V)$ is open in $X$ by (b). Since $d_Y(f(a),f(a))=0 < \varepsilon$ we have $a\in f^{-1}(V)$, so by the definition of an open set there is $\delta>0$ with $B(a,\delta)\subseteq f^{-1}(V)$. This says precisely that $d_X(x,a) < \delta$ implies $f(x)\in V$, i.e. $d_Y(f(x),f(a)) < \varepsilon$.
</Proof>

Condition (b) mentions neither $d_X$ nor $d_Y$, neither $\varepsilon$ nor $\delta$. The only word occurring in it is "open set". If continuity, the central notion of analysis, can be written using the family of open sets alone, then we may discard the metric and prescribe the family of open sets from the start. This is the motivation for the definition in the next section. The general theory of continuous maps, obtained by adopting condition (b) as the definition, is treated in [Continuous maps and homeomorphisms](/en/mathematics/topology/continuous-maps) (<Ref to="mathematics/topology/continuous-maps#def-continuous" />).

## 4. The axioms for a topological space

We now adopt the three properties obtained in <Ref to="thm-metric-open-axioms" /> as a starting point rather than as a theorem. Below, $\mathfrak{P}(X)$ denotes the power set of $X$, that is, the set of all subsets of $X$.

<Definition id="def-topology" title="Topological space">
Let $X$ be a set and $\mathcal{O}\subseteq\mathfrak{P}(X)$ a family of subsets of $X$. When $\mathcal{O}$ satisfies the following three conditions, $\mathcal{O}$ is called a **topology** on $X$ and the pair $(X,\mathcal{O})$ a **topological space**.

- (O1) $\emptyset\in\mathcal{O}$ and $X\in\mathcal{O}$.
- (O2) If $\Lambda$ is an arbitrary index set and $U_\lambda\in\mathcal{O}$ for each $\lambda\in\Lambda$, then $\bigcup_{\lambda\in\Lambda}U_\lambda\in\mathcal{O}$.
- (O3) If $U,V\in\mathcal{O}$, then $U\cap V\in\mathcal{O}$.

The members of $\mathcal{O}$ are called **open sets**, and a set whose complement is open is called a **closed set**.
</Definition>

<Remark id="rem-axioms">
Four remarks on the definition.

First, (O3) is stated for the intersection of two sets, but the same induction as in the proof of <Ref to="thm-metric-open-axioms" /> shows that the intersection of finitely many $U_1,\dots,U_n\in\mathcal{O}$ is open. There is no extension to infinitely many (<Ref to="ex-no-infinite-intersection" />).

Second, "being open" is not a property inherent in a set; it depends on which $\mathcal{O}$ has been chosen. One and the same subset may be open or fail to be open once the topology is changed. Whenever we say "$A$ is open", the topology behind the statement should be kept in mind.

Third, open and closed are not mutually exclusive. The sets $\emptyset$ and $X$ are always both open and closed (they are complementary to each other, and both are open by (O1)). On the other hand $[0,1)\subseteq\mathbb{R}$ with its usual topology is neither open nor closed. It is not open because arbitrarily close to $0$ there are points outside $[0,1)$, and its complement $(-\infty,0)\cup[1,\infty)$ is not open for the same reason at the point $1$.

Fourth, for a metric space $(X,d)$ the family $\mathcal{O}_d$ is a topology by <Ref to="thm-metric-open-axioms" />. We call it the topology determined by $d$, and a topology arising in this way from some metric is called **metrisable**. The question of which topologies are metrisable is the subject of [Separation axioms and metrisability](/mathematics/topology/separation-axioms); its most prominent sufficient condition is <Ref to="mathematics/topology/separation-axioms#thm-urysohn-metrization" text="Urysohn's metrisation theorem" />.
</Remark>

Seen from the side of closed sets, the axioms turn upside down. Note how unions and intersections, and "finite" and "arbitrary", exchange places.

<Proposition id="prop-closed-family" title="Properties of the family of closed sets">
Let $(X,\mathcal{O})$ be a topological space and $\mathcal{F}$ the family of all closed sets. Then the following hold.

- (C1) $\emptyset\in\mathcal{F}$ and $X\in\mathcal{F}$.
- (C2) If $\Lambda\ne\emptyset$ is an arbitrary index set and $F_\lambda\in\mathcal{F}$ for each $\lambda\in\Lambda$, then $\bigcap_{\lambda\in\Lambda}F_\lambda\in\mathcal{F}$.
- (C3) If $F_1,\dots,F_n\in\mathcal{F}$ (finitely many), then $\bigcup_{k=1}^{n}F_k\in\mathcal{F}$.
</Proposition>

<Proof of="prop-closed-family">
In each case it suffices to translate into the language of open sets by <Ref to="mathematics/foundations/sets-and-logic#cor-demorgan-family" text="De Morgan's laws for families of sets" />.

(C1): $X\setminus\emptyset=X\in\mathcal{O}$, so $\emptyset$ is closed; $X\setminus X=\emptyset\in\mathcal{O}$, so $X$ is closed (both times we used (O1)).

(C2): $X\setminus\bigcap_{\lambda}F_\lambda=\bigcup_{\lambda}(X\setminus F_\lambda)$, and each $X\setminus F_\lambda$ is open by the definition of a closed set, so the right-hand side is open by (O2). Hence $\bigcap_\lambda F_\lambda$ is closed. The assumption $\Lambda\ne\emptyset$ was made because, in conventions that do not declare the intersection of the empty family to be $X$, the expression $\bigcap_{\lambda\in\emptyset}F_\lambda$ is undefined; if one does declare it to be $X$, the case is absorbed into (C1).

(C3): $X\setminus\bigcup_{k=1}^{n}F_k=\bigcap_{k=1}^{n}(X\setminus F_k)$, and the right-hand side is an intersection of finitely many open sets, hence open by (O3) (and induction). Therefore $\bigcup_k F_k$ is closed.
</Proof>

<Aside type="tip">
The asymmetry — (O2) allows infinitely many sets while (O3) allows only finitely many — is hard to remember at first. Recalling $\bigcap_n(-1/n,1/n)=\{0\}$ from <Ref to="ex-no-infinite-intersection" /> settles it for good. One may also read it as follows: allowing infinitely many intersections lets one shave the "room to spare" away bit by bit until a single point is left, whereas no matter how many sets are collected in a union, the room around each point survives intact.
</Aside>

We now line up examples of topologies, beginning with the two extremes.

**The discrete topology.** Take $\mathcal{O}=\mathfrak{P}(X)$, that is, declare every subset open. Unions and intersections of subsets are again subsets, so (O1), (O2) and (O3) all hold. This coincides with the topology determined by the discrete metric of <Ref to="ex-metrics-others" />. Indeed, for the discrete metric $B(x,1)=\{x\}$, so every singleton is open, and any $A\subseteq X$ can be written as $A=\bigcup_{x\in A}\{x\}$ and is therefore open by (O2). Hence the discrete topology is metrisable.

**The indiscrete topology.** Take $\mathcal{O}=\{\emptyset,X\}$. Unions and intersections of these two sets are again $\emptyset$ or $X$, so all the axioms hold. When $X$ has at least two points, this topology is not metrisable. Take distinct points $x\ne y$; by <Ref to="prop-metric-separates" />, a metric topology would require disjoint open sets separating $x$ and $y$, but the only non-empty open set is $X$, and $X\cap X=X\ne\emptyset$. This is our first example outside the world of $\varepsilon$-$\delta$.

**The Sierpiński space and the topologies on a two-point set.** Let us enumerate all topologies on $X=\{a,b\}$ (with $a\ne b$). By (O1) both $\emptyset$ and $X$ must belong, so it remains to examine the four possibilities of including $\{a\}$ or $\{b\}$: each of $\{\emptyset,X\}$ (the indiscrete topology), $\{\emptyset,\{a\},X\}$, $\{\emptyset,\{b\},X\}$ and $\{\emptyset,\{a\},\{b\},X\}$ (the discrete topology) satisfies the axioms. The middle two are the Sierpiński space, an asymmetric space in which $\{a\}$ is open but $\{b\}$ is not. This too fails to be metrisable (again by <Ref to="prop-metric-separates" />).

**Comparing topologies.** If two topologies $\mathcal{O}_1,\mathcal{O}_2$ on the same set $X$ satisfy $\mathcal{O}_1\subseteq\mathcal{O}_2$, we say that $\mathcal{O}_1$ is **coarser** (weaker) than $\mathcal{O}_2$ and that $\mathcal{O}_2$ is **finer** (stronger) than $\mathcal{O}_1$. The indiscrete topology is the coarsest of all topologies and the discrete topology the finest. The more open sets there are, the more finely points can be distinguished.

## 5. Building topologies: bases, the order topology and the Zariski topology

Writing down every open set in order to specify a topology is laborious. In a metric space it sufficed to fix the open balls; the open sets were then recovered as "the sets containing a ball around each of their points". The general form of this mechanism is a base.

<Definition id="def-base" title="Base of a topology">
Let $(X,\mathcal{O})$ be a topological space. A subfamily $\mathcal{B}\subseteq\mathcal{O}$ is a **base** (open base) for $\mathcal{O}$ when for every $U\in\mathcal{O}$ and every $x\in U$ there exists $B\in\mathcal{B}$ with $x\in B\subseteq U$.
</Definition>

This condition is equivalent to saying that every member of $\mathcal{O}$ is a union of members of $\mathcal{B}$. Indeed, choosing for each point $x$ of $U\in\mathcal{O}$ some $B_x\in\mathcal{B}$ with $x\in B_x\subseteq U$ gives $U=\bigcup_{x\in U}B_x$; conversely, if $U=\bigcup_{i\in I}B_i$, then for $x\in U$ there is an $i$ with $x\in B_i\subseteq U$. In a metric space the family of all open balls is a base (precisely because the definition of an open set has this shape).

The following proposition runs in the opposite direction: it manufactures a topology on a set not yet carrying one, starting from a candidate base. All the examples that follow use it.

<Proposition id="prop-base-topology" title="Generating a topology from a base">
Let $X$ be a set and suppose $\mathcal{B}\subseteq\mathfrak{P}(X)$ satisfies the following two conditions.

- (B1) $\bigcup_{B\in\mathcal{B}}B=X$; that is, for every $x\in X$ there is $B\in\mathcal{B}$ with $x\in B$.
- (B2) For all $B_1,B_2\in\mathcal{B}$ and every $x\in B_1\cap B_2$ there exists $B_3\in\mathcal{B}$ with $x\in B_3\subseteq B_1\cap B_2$.

Then

$$
\mathcal{O}_{\mathcal{B}}=\{\,U\subseteq X \;:\; \forall x\in U,\ \exists B\in\mathcal{B},\ x\in B\subseteq U\,\}
$$

is a topology on $X$, and $\mathcal{B}\subseteq\mathcal{O}_{\mathcal{B}}$ with $\mathcal{B}$ a base for $\mathcal{O}_{\mathcal{B}}$.
</Proposition>

<Proof of="prop-base-topology">
(O1): $\emptyset\in\mathcal{O}_{\mathcal{B}}$ because the condition is vacuously true. And $X\in\mathcal{O}_{\mathcal{B}}$ because for $x\in X$ condition (B1) supplies $B\in\mathcal{B}$ with $x\in B$, and $B\subseteq X$.

(O2): Let $U=\bigcup_{\lambda\in\Lambda}U_\lambda$ with each $U_\lambda\in\mathcal{O}_{\mathcal{B}}$, and let $x\in U$. There is $\lambda_0$ with $x\in U_{\lambda_0}$, so by the definition of $\mathcal{O}_{\mathcal{B}}$ there is $B\in\mathcal{B}$ with $x\in B\subseteq U_{\lambda_0}\subseteq U$. Hence $U\in\mathcal{O}_{\mathcal{B}}$.

(O3): Let $U,V\in\mathcal{O}_{\mathcal{B}}$ and $x\in U\cap V$. By definition there are $B_1,B_2\in\mathcal{B}$ with $x\in B_1\subseteq U$ and $x\in B_2\subseteq V$. Then $x\in B_1\cap B_2$, so (B2) supplies $B_3\in\mathcal{B}$ with $x\in B_3\subseteq B_1\cap B_2\subseteq U\cap V$. Hence $U\cap V\in\mathcal{O}_{\mathcal{B}}$. This is where (B2) was used essentially.

$\mathcal{B}\subseteq\mathcal{O}_{\mathcal{B}}$: for $B\in\mathcal{B}$ and $x\in B$, the set $B$ itself satisfies $x\in B\subseteq B$. Finally, that $\mathcal{B}$ is a base is exactly the defining formula for $\mathcal{O}_{\mathcal{B}}$.
</Proof>

<Example id="ex-order-topology" title="The order topology">
Let $(X,\le)$ be a totally ordered set with at least two elements. For $a,b\in X$ put

$$
(a,b)=\{x\in X: a < x < b\},\qquad (\leftarrow,b)=\{x\in X: x < b\},\qquad (a,\rightarrow)=\{x\in X: a < x\}
$$

and let $\mathcal{B}$ be the family of all of these (open intervals and open half-lines). Let us check (B1). Given $x\in X$, choose an element $y$ different from $x$; by totality either $y < x$ or $x < y$, and in the first case $x\in(y,\rightarrow)$, in the second $x\in(\leftarrow,y)$. Condition (B2) follows from the fact that the intersection of two members of $\mathcal{B}$ is again a member of $\mathcal{B}$ or is empty. For instance $(a,b)\cap(c,d)=(\max\{a,c\},\min\{b,d\})$ (in a totally ordered set the maximum and minimum of two elements exist), and if this is non-empty it may itself serve as $B_3$. The cases of two half-lines, or of a half-line and an interval, are similar. The resulting topology is called the **order topology**.

For $X=\mathbb{R}$ the order topology coincides with the topology determined by the Euclidean metric. Indeed, an open ball is the open interval $B(x,r)=(x-r,x+r)$; conversely an open interval is an open ball, $(a,b)=B\bigl(\frac{a+b}{2},\frac{b-a}{2}\bigr)$, and a half-line is a union of open intervals, $(a,\rightarrow)=\bigcup_{n\ge1}(a,a+n)$ (by the Archimedean property, every real number greater than $a$ is less than some $a+n$). So each base is contained in the other topology and the two topologies agree.

For $X=\mathbb{Z}$ the order topology is the discrete topology, since for every $n\in\mathbb{Z}$ the basic open set $(n-1,\,n+1)$ equals $\{n\}$. Even under one and the same recipe, "the order topology", the space produced depends entirely on the order one starts from.
</Example>

<Example id="ex-zariski" title="The Zariski topology and the cofinite topology">
Let $k$ be a field with infinitely many elements ($\mathbb{R}$ or $\mathbb{C}$ will do) and put $X=k$. For a polynomial $f\in k[T]$ write $V(f)=\{a\in k: f(a)=0\}$ for its zero set. If $f\ne 0$, then $V(f)$ is a finite set with at most $\deg f$ elements; if $f=0$, then $V(0)=k$. Conversely, a finite set $\{a_1,\dots,a_m\}$ is realised as the zero set of $f(T)=\prod_{i=1}^{m}(T-a_i)$. Hence the collection of "zero sets of polynomials" coincides with the collection of "finite sets, together with all of $k$".

We declare these to be the closed sets. That is, $U\subseteq X$ is called open when $U=\emptyset$ or $X\setminus U$ is finite. This is the **Zariski topology** in one variable, also called the **cofinite topology**. The axioms are easier to verify on the side of closed sets ((C1), (C2), (C3) of <Ref to="prop-closed-family" />).

(C1): $\emptyset$ is finite, hence closed; $X$ equals $V(0)$, hence closed. (C2): given a family $\{F_\lambda\}_{\lambda\in\Lambda}$ of closed sets with $\Lambda\ne\emptyset$, if every $F_\lambda$ equals $X$ then the intersection is $X$, which is closed; if even one of them is finite, the intersection is a subset of that finite set, hence finite and therefore closed. (C3): for a union of finitely many closed sets, if all of them are finite then the union is a finite union of finite sets, hence finite; and if even one of them is $X$ then the union is $X$. In either case the union is closed.

The striking feature of this topology is that, when $X$ is infinite, **any two non-empty open sets meet**. Indeed, for non-empty open $U,V$ the set $X\setminus(U\cap V)=(X\setminus U)\cup(X\setminus V)$ is a union of two finite sets, hence finite, and since $X$ is infinite we get $U\cap V\ne\emptyset$. By <Ref to="prop-metric-separates" /> this topology is therefore not metrisable. Nevertheless every singleton is closed (being finite), and in algebraic geometry this is the right tool. In a world where only sets carved out by polynomials are "visible", every open set is enormous.

In general, for $n$ variables one declares the common zero set $V(S)=\{a\in k^n: \forall f\in S,\ f(a)=0\}$ of a family of polynomials $S\subseteq k[T_1,\dots,T_n]$ to be closed. For $n\ge2$ the closed sets are no longer just the finite sets; for instance $V(T_1)$ is a line in $k^2$.
</Example>

## 6. Neighbourhoods, interior, closure and boundary

Once a topology is given, naive phrases such as "around a point", "the inside of a set" and "the rim of a set" can be given exact meanings. Throughout this section $(X,\mathcal{O})$ is a topological space.

<Definition id="def-neighborhood" title="Neighbourhood">
Let $x\in X$. A subset $V\subseteq X$ is a **neighbourhood** of $x$ when there exists an open set $U\in\mathcal{O}$ with $x\in U\subseteq V$. The set of all neighbourhoods of $x$ is denoted $\mathcal{N}(x)$. In particular an open set containing $x$ is a neighbourhood of $x$, called an **open neighbourhood** of $x$.
</Definition>

<Remark id="rem-neighborhood-convention">
Some books define "neighbourhood" so as to mean an open set (their neighbourhoods are what we call open neighbourhoods). The statements below hold under either convention: if $V\in\mathcal{N}(x)$, one can choose an open neighbourhood $U$ with $x\in U\subseteq V$, so every condition phrased in terms of neighbourhoods can be rephrased in terms of open neighbourhoods.

In a metric space, $V$ is a neighbourhood of $x$ if and only if $B(x,r)\subseteq V$ for some $r>0$. Indeed, in the first case there is an open set $U$ with $x\in U\subseteq V$, and by the definition of an open set (<Ref to="def-open-metric" />) there is $r>0$ with $B(x,r)\subseteq U\subseteq V$. In the second case $B(x,r)$ is itself an open neighbourhood by <Ref to="prop-ball-open" />.
</Remark>

<Definition id="def-interior-closure" title="Interior, closure and boundary">
For $A\subseteq X$ put

$$
A^{\circ}=\bigcup\{\,U\in\mathcal{O} : U\subseteq A\,\},\qquad
\overline{A}=\bigcap\{\,F\subseteq X : F \text{ is closed},\ A\subseteq F\,\},\qquad
\partial A=\overline{A}\setminus A^{\circ}
$$

and call these, in order, the **interior**, the **closure** and the **boundary** of $A$. Members of $A^{\circ}$ are **interior points** of $A$, members of $\overline{A}$ are **adherent points**, members of $\partial A$ are **boundary points**, and members of $(X\setminus A)^{\circ}$ are **exterior points**.
</Definition>

The intersection defining the closure is not an intersection over the empty family: $X$ is closed and satisfies $A\subseteq X$, so the family contains at least $X$. Consequently (C2) of <Ref to="prop-closed-family" /> applies.

<Theorem id="thm-closure-basic" title="Basic properties of interior and closure">
Let $(X,\mathcal{O})$ be a topological space and $A\subseteq X$.

1. $A^{\circ}$ is open with $A^{\circ}\subseteq A$, and if $U$ is open with $U\subseteq A$ then $U\subseteq A^{\circ}$. That is, $A^{\circ}$ is the largest open set contained in $A$. In particular $A$ is open if and only if $A=A^{\circ}$.
2. $\overline{A}$ is closed with $A\subseteq\overline{A}$, and if $F$ is closed with $A\subseteq F$ then $\overline{A}\subseteq F$. That is, $\overline{A}$ is the smallest closed set containing $A$. In particular $A$ is closed if and only if $A=\overline{A}$.
3. $x\in A^{\circ}$ if and only if $A$ is a neighbourhood of $x$.
4. $x\in\overline{A}$ if and only if $V\cap A\ne\emptyset$ for every neighbourhood $V$ of $x$.
5. $X\setminus\overline{A}=(X\setminus A)^{\circ}$ and $X\setminus A^{\circ}=\overline{X\setminus A}$.
6. $X$ is partitioned into the three pairwise disjoint parts $A^{\circ}$, $\partial A$ and $(X\setminus A)^{\circ}$.
</Theorem>

<Proof of="thm-closure-basic">
(1) $A^{\circ}$ is a union of a family of open sets, hence open by (O2) (<Ref to="def-topology" />). Each $U$ occurring in the union satisfies $U\subseteq A$, so $A^{\circ}\subseteq A$. And if $U$ is open with $U\subseteq A$, then $U$ is one of the terms of the union, so $U\subseteq A^{\circ}$. If $A$ is open we may take $U=A$, giving $A\subseteq A^{\circ}\subseteq A$, i.e. $A=A^{\circ}$. Conversely, if $A=A^{\circ}$ then $A$ is open.

(2) $\overline{A}$ is an intersection of a (non-empty) family of closed sets, hence closed by (C2) of <Ref to="prop-closed-family" />. Each $F$ occurring in the intersection satisfies $A\subseteq F$, so $A\subseteq\overline{A}$. If $F$ is closed with $A\subseteq F$, then $F$ is one of the terms of the intersection, so $\overline{A}\subseteq F$. If $A$ is closed we may take $F=A$, giving $\overline{A}\subseteq A\subseteq\overline{A}$, i.e. $A=\overline{A}$. Conversely, if $A=\overline{A}$ then $A$ is closed.

(3) If $A$ is a neighbourhood of $x$, there is an open $U$ with $x\in U\subseteq A$, and by (1) $U\subseteq A^{\circ}$, so $x\in A^{\circ}$. Conversely, if $x\in A^{\circ}$, then $A^{\circ}$ is open by (1) and satisfies $x\in A^{\circ}\subseteq A$, so $A$ is a neighbourhood of $x$ by <Ref to="def-neighborhood" />.

(4) It suffices to prove that $x\notin\overline{A}$ if and only if there is a neighbourhood $V$ of $x$ with $V\cap A=\emptyset$; the assertion then follows by contraposition.

If $x\notin\overline{A}$, then by the definition of the intersection there is a closed set $F$ with $A\subseteq F$ and $x\notin F$. Put $U=X\setminus F$; then $U$ is open with $x\in U$, and $A\subseteq F$ gives $U\cap A\subseteq U\cap F=\emptyset$. This $U$ is a neighbourhood of $x$.

Conversely, suppose $V\in\mathcal{N}(x)$ satisfies $V\cap A=\emptyset$. Choose an open $U$ with $x\in U\subseteq V$; then $U\cap A\subseteq V\cap A=\emptyset$. The set $F=X\setminus U$ is closed, and $U\cap A=\emptyset$ gives $A\subseteq F$, so by the minimality in (2) we get $\overline{A}\subseteq F$. Since $x\in U$, i.e. $x\notin F$, we conclude $x\notin\overline{A}$.

(5) Closed sets $F$ and open sets $U=X\setminus F$ correspond bijectively, and $A\subseteq F$ is equivalent to $U\subseteq X\setminus A$ (just take complements on both sides). Hence by De Morgan's laws

$$
X\setminus\overline{A}=X\setminus\bigcap\{F : F \text{ closed},\ A\subseteq F\}=\bigcup\{X\setminus F : F \text{ closed},\ A\subseteq F\}=\bigcup\{U\in\mathcal{O} : U\subseteq X\setminus A\}=(X\setminus A)^{\circ},
$$

which proves the first identity. For the second, replace $A$ by $X\setminus A$ in the first identity to get $X\setminus\overline{X\setminus A}=(X\setminus(X\setminus A))^{\circ}=A^{\circ}$, and take complements on both sides.

(6) By the first identity in (5) we have $X\setminus\overline{A}=(X\setminus A)^{\circ}$, so $X$ is the disjoint union of $\overline{A}$ and $(X\setminus A)^{\circ}$. Moreover $A^{\circ}\subseteq A\subseteq\overline{A}$ (by (1) and (2)), so by the definition $\partial A=\overline{A}\setminus A^{\circ}$ the set $\overline{A}$ is the disjoint union of $A^{\circ}$ and $\partial A$. Combining the two, $X$ is the disjoint union of the three sets $A^{\circ}$, $\partial A$ and $(X\setminus A)^{\circ}$.
</Proof>

Statement (4) may be read as: the closure is the set of points at which $A$ is visible no matter how small a neighbourhood one peers through. The definition (the smallest closed set) is convenient for computation and (4) for verification, and the ability to pass back and forth between the two is the source of computational power in topology. In a metric space one may replace neighbourhoods by open balls and translate further into the language of sequences.

<Corollary id="cor-closure-sequence" title="Closure and sequences in a metric space">
Let $(X,d)$ be a metric space, $A\subseteq X$ and $x\in X$. The following three conditions are equivalent.

- (a) $x\in\overline{A}$.
- (b) $B(x,r)\cap A\ne\emptyset$ for every $r>0$.
- (c) There exists a sequence $(a_n)_{n\ge1}$ in $A$ with $d(a_n,x)\to 0$.
</Corollary>

<Proof of="cor-closure-sequence">
(a) $\Leftrightarrow$ (b): This follows from (4) of <Ref to="thm-closure-basic" /> together with the equivalence, valid in metric spaces, of "$V$ is a neighbourhood of $x$" and "$B(x,r)\subseteq V$ for some $r>0$" (<Ref to="rem-neighborhood-convention" />). Indeed, assuming (a), each $B(x,r)$ is a neighbourhood of $x$ and therefore meets $A$; assuming (b), every neighbourhood $V$ contains some $B(x,r)$, so $V\cap A\supseteq B(x,r)\cap A\ne\emptyset$.

(b) $\Rightarrow$ (c): For each $n\ge1$ we have $B(x,1/n)\cap A\ne\emptyset$, so choose a point $a_n$ from it (this uses the axiom of countable choice). Since $d(a_n,x) < 1/n$, we get $d(a_n,x)\to0$.

(c) $\Rightarrow$ (b): Given $r>0$, from $d(a_n,x)\to0$ there is an $n$ with $d(a_n,x) < r$. This $a_n$ belongs to $B(x,r)\cap A$.
</Proof>

In particular, $A$ is closed if and only if the limit of every convergent sequence in $A$ lies in $A$ (by (2) of <Ref to="thm-closure-basic" /> together with the equivalence above). The habit in analysis of testing closedness by limits of sequences rests on this corollary ([Completeness of the real numbers and Cauchy sequences](/en/mathematics/real-analysis/completeness-and-cauchy)). This sequential criterion, however, is available because we are in a metric space; it fails in a general topological space.

<Example id="ex-closure-computations" title="Computing closures, interiors and boundaries">
**(1) $\mathbb{Q}$ inside $\mathbb{R}$ (usual topology).** For every $x\in\mathbb{R}$ and every $r>0$ the interval $(x-r,x+r)$ contains a rational number (<Ref to="mathematics/real-analysis/completeness-and-cauchy#thm-density-rational" text="density of the rationals" />). Hence $x\in\overline{\mathbb{Q}}$ by (b) of <Ref to="cor-closure-sequence" />, and $\overline{\mathbb{Q}}=\mathbb{R}$. On the other hand, every non-empty open set contains an open interval, and every open interval contains an irrational number, so no non-empty open set is contained in $\mathbb{Q}$. Hence $\mathbb{Q}^{\circ}=\emptyset$. Therefore $\partial\mathbb{Q}=\overline{\mathbb{Q}}\setminus\mathbb{Q}^{\circ}=\mathbb{R}$, and $\mathbb{Q}$ is a set all of whose points are boundary points.

**(2) The same set, different topologies.** We examine $A=\{0\}\subseteq\mathbb{R}$ under four topologies.

| Topology | $\overline{A}$ | $A^{\circ}$ | $\partial A$ |
|---|---|---|---|
| usual (Euclidean) | $\{0\}$ | $\emptyset$ | $\{0\}$ |
| discrete | $\{0\}$ | $\{0\}$ | $\emptyset$ |
| indiscrete | $\mathbb{R}$ | $\emptyset$ | $\mathbb{R}$ |
| cofinite | $\{0\}$ | $\emptyset$ | $\{0\}$ |

Here are the reasons, in order. In the usual topology $\mathbb{R}\setminus\{0\}=(-\infty,0)\cup(0,\infty)$ is open, so $\{0\}$ is closed and $\overline{A}=A$; and no non-empty open set is contained in $\{0\}$, so $A^{\circ}=\emptyset$. In the discrete topology every set is both open and closed. In the indiscrete topology the only closed sets are $\emptyset$ and $\mathbb{R}$, so $\overline{A}=\mathbb{R}$, and the only open set contained in $A$ is $\emptyset$. In the cofinite topology finite sets are closed, so $\overline{A}=A$, and non-empty open sets are infinite, hence not contained in $\{0\}$, so $A^{\circ}=\emptyset$. Neither closure nor interior is determined by the set alone; both depend on the topology.

**(3) The closed disc in the plane.** Equip $\mathbb{R}^2$ with the Euclidean metric and put $A=\{p\in\mathbb{R}^2:\|p\|\le1\}$. If $\|p\| < 1$, then for $r=1-\|p\|>0$ and $q\in B(p,r)$ we have $\|q\|\le\|p\|+\|q-p\| < \|p\|+r=1$, so $B(p,r)\subseteq A$ and $p$ is an interior point. If $\|p\|=1$, then for every $r>0$ we have $p\in B(p,r)\cap A$, while $q=(1+r/2)p$ satisfies $\|q-p\|=r/2 < r$ and $\|q\|=1+r/2>1$, so $B(p,r)$ also contains points outside $A$. Hence $p$ is a boundary point. If $\|p\|>1$, the same computation with $r=\|p\|-1$ gives $B(p,r)\cap A=\emptyset$, so $p$ is an exterior point. In summary, $A^{\circ}=\{\|p\| < 1\}$, $\overline{A}=A$ and $\partial A=\{\|p\|=1\}$.
</Example>

<Figure caption="An interior point x1, a boundary point x2 and an exterior point x3 for the closed disc A. The dashed circles are sufficiently small open balls around each point. A ball around an interior point is contained in A, a ball around an exterior point misses A, and a ball around a boundary point meets both A and its complement no matter how small it is.">
<svg viewBox="0 0 480 330" width="100%" role="img" aria-label="Relative positions of interior, boundary and exterior points">
  <circle cx="170" cy="165" r="100" fill="var(--sl-color-accent)" fill-opacity="0.15" stroke="var(--sl-color-accent)" stroke-width="2" />
  <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-dasharray="5 4">
    <circle cx="140" cy="200" r="28" />
    <circle cx="247" cy="101" r="30" />
    <circle cx="360" cy="240" r="28" />
  </g>
  <g fill="currentColor">
    <circle cx="140" cy="200" r="3.5" />
    <circle cx="247" cy="101" r="3.5" />
    <circle cx="360" cy="240" r="3.5" />
  </g>
  <g fill="currentColor" font-size="14">
    <text x="140" y="254" text-anchor="middle">x₁ (interior)</text>
    <text x="286" y="68" text-anchor="start">x₂ (boundary)</text>
    <text x="360" y="292" text-anchor="middle">x₃ (exterior)</text>
    <text x="104" y="118" font-size="20">A</text>
  </g>
</svg>
</Figure>

## 7. Exercises

<Exercise id="exr-compute-interior-closure" difficulty="Easy">
Equip $\mathbb{R}$ with the usual topology and put $A=(0,1)\cup\{2\}\cup\bigl([3,4]\cap\mathbb{Q}\bigr)$. Determine $A^{\circ}$, $\overline{A}$ and $\partial A$.

<Solution>
**Interior.** The set $(0,1)$ is open and contained in $A$, so $(0,1)\subseteq A^{\circ}$ by (1) of <Ref to="thm-closure-basic" />. Conversely we show $A^{\circ}\subseteq(0,1)$. The point $2$ is not an interior point: for every $r>0$ the number $2+\min\{r,1\}/2$ lies in $B(2,r)$, but it is greater than $2$ and less than $3$, hence not in $A$. No point $x$ of $[3,4]\cap\mathbb{Q}$ is an interior point either: for every $r>0$ the ball $B(x,r)=(x-r,x+r)$ contains an irrational number, and no irrational number lies in $A$ here (the only irrationals in $A$ are those in $(0,1)$, but $x\ge3$, so taking $r\le 1$ gives $B(x,r)\cap(0,1)=\emptyset$). Hence $A^{\circ}=(0,1)$.

**Closure.** Using the result of <Ref to="exr-closure-union" /> (the closure of a finite union is the union of the closures), $\overline{A}=\overline{(0,1)}\cup\overline{\{2\}}\cup\overline{[3,4]\cap\mathbb{Q}}$. First, $\overline{(0,1)}=[0,1]$: the set $[0,1]$ is closed and contains $(0,1)$, so $\overline{(0,1)}\subseteq[0,1]$, and conversely every neighbourhood of $0$ or of $1$ meets $(0,1)$, so both are adherent points. Next, $\{2\}$ is closed, so $\overline{\{2\}}=\{2\}$. Finally $\overline{[3,4]\cap\mathbb{Q}}=[3,4]$: the set $[3,4]$ is closed and contains $[3,4]\cap\mathbb{Q}$, and conversely every neighbourhood of a point $x\in[3,4]$ contains an interval around $x$, which contains a rational number lying in $[3,4]$ (density of the rationals; even for $x=3$ or $x=4$ a rational can be taken on the $[3,4]$ side). Hence $\overline{A}=[0,1]\cup\{2\}\cup[3,4]$.

**Boundary.** $\partial A=\overline{A}\setminus A^{\circ}=\bigl([0,1]\cup\{2\}\cup[3,4]\bigr)\setminus(0,1)=\{0,1,2\}\cup[3,4]$.
</Solution>
</Exercise>

<Exercise id="exr-equivalent-metrics" difficulty="Standard">
Show that the three metrics $d_1$, $d_2$ and $d_\infty$ on $\mathbb{R}^n$ (<Ref to="ex-metrics-rn" />) determine one and the same family of open sets.

<Solution>
We first record a lemma. Let $d$ and $d'$ be metrics on $X$ and suppose there is a constant $C>0$ with $d(x,y)\le C\,d'(x,y)$ for all $x,y$. Then every $d$-open set is $d'$-open. Indeed, let $U$ be $d$-open and $x\in U$; there is $r>0$ with $B_d(x,r)\subseteq U$. If $d'(x,y) < r/C$, then $d(x,y)\le C\,d'(x,y) < r$, so $B_{d'}(x,r/C)\subseteq B_d(x,r)\subseteq U$ and $U$ is $d'$-open.

Apply the lemma to the chain $d_\infty\le d_2\le d_1\le n\,d_\infty$ established in <Ref to="ex-metrics-rn" />. From $d_\infty\le 1\cdot d_2$ every $d_\infty$-open set is $d_2$-open; from $d_2\le 1\cdot d_1$ every $d_2$-open set is $d_1$-open; from $d_1\le n\,d_\infty$ every $d_1$-open set is $d_\infty$-open. That is,

$$
\mathcal{O}_{d_\infty}\subseteq\mathcal{O}_{d_2}\subseteq\mathcal{O}_{d_1}\subseteq\mathcal{O}_{d_\infty},
$$

a cycle of inclusions, so all three coincide. The unit balls of the three metrics have different shapes, yet the topologies they determine are the same. That "which metric one uses" can be invisible at the level of topology is an important phenomenon.
</Solution>
</Exercise>

<Exercise id="exr-closure-union" difficulty="Standard">
Let $(X,\mathcal{O})$ be a topological space and $A,B\subseteq X$.

1. Show that $\overline{A\cup B}=\overline{A}\cup\overline{B}$.
2. Show that $\overline{A\cap B}\subseteq\overline{A}\cap\overline{B}$, and give an example in which equality fails.

<Solution>
As a preparation we prove monotonicity. If $A\subseteq B$, then $A\subseteq B\subseteq\overline{B}$ and $\overline{B}$ is closed, so the minimality in (2) of <Ref to="thm-closure-basic" /> gives $\overline{A}\subseteq\overline{B}$.

**1.** ($\supseteq$) From $A\subseteq A\cup B$ and monotonicity, $\overline{A}\subseteq\overline{A\cup B}$, and likewise $\overline{B}\subseteq\overline{A\cup B}$, so the union is contained as well. ($\subseteq$) The set $\overline{A}\cup\overline{B}$ is a union of two closed sets, hence closed by (C3) of <Ref to="prop-closed-family" />, and it contains $A\cup B$. So the minimality in (2) gives $\overline{A\cup B}\subseteq\overline{A}\cup\overline{B}$. This proves equality. The same argument extends by induction to finitely many sets, but it fails for infinitely many: in $\mathbb{Q}=\bigcup_{q\in\mathbb{Q}}\{q\}$ each term has closure $\{q\}$ and the union of these closures is $\mathbb{Q}$, whereas the closure on the left is $\mathbb{R}$.

**2.** From $A\cap B\subseteq A$ and monotonicity, $\overline{A\cap B}\subseteq\overline{A}$, and likewise $\overline{A\cap B}\subseteq\overline{B}$, so $\overline{A\cap B}\subseteq\overline{A}\cap\overline{B}$. For an example where equality fails, take $A=(0,1)$ and $B=(1,2)$ in $\mathbb{R}$ with its usual topology. Since $A\cap B=\emptyset$, the left-hand side is $\overline{\emptyset}=\emptyset$, while the right-hand side is $[0,1]\cap[1,2]=\{1\}$. A more extreme example is $A=\mathbb{Q}$, $B=\mathbb{R}\setminus\mathbb{Q}$, where the left-hand side is $\emptyset$ and the right-hand side is $\mathbb{R}\cap\mathbb{R}=\mathbb{R}$.
</Solution>
</Exercise>

<Exercise id="exr-cofinite" difficulty="Hard">
Let $X$ be an infinite set with the cofinite topology (<Ref to="ex-zariski" />).

1. Show that for every $A\subseteq X$ one has $\overline{A}=A$ if $A$ is finite and $\overline{A}=X$ if $A$ is infinite.
2. Show that every non-empty open set $U$ is dense, that is, $\overline{U}=X$.
3. Show that although every singleton is closed, two distinct points cannot be separated by disjoint open sets.

<Solution>
**1.** If $A$ is finite, it is closed by the definition of the cofinite topology, so $\overline{A}=A$ by (2) of <Ref to="thm-closure-basic" />. Now suppose $A$ is infinite. Let $F$ be a closed set with $A\subseteq F$; then $F$ is either finite or equal to $X$. If $F$ were finite, its subset $A$ would be finite too, contrary to hypothesis. Hence $F=X$ is the only possibility, and as an intersection of closed sets $\overline{A}=X$.

**2.** Let $U$ be a non-empty open set, so that $X\setminus U$ is finite. If $U$ were finite, then $X=U\cup(X\setminus U)$ would be a union of two finite sets, contradicting the infinitude of $X$. Hence $U$ is infinite, and by part 1, $\overline{U}=X$.

**3.** A singleton $\{x\}$ is finite, hence closed (this property is called the $T_1$ axiom). On the other hand, for distinct points $x\ne y$, take open sets with $x\in U$ and $y\in V$; both are non-empty, so $U\cap V\ne\emptyset$ as shown in <Ref to="ex-zariski" />. Hence separation is impossible. Combined with <Ref to="prop-metric-separates" />, this confirms once more that the topology is not metrisable. In other words, "points are closed" is only a weak fragment of what holds in a metric space. The framework that measures the strength of separation in stages is treated in [Separation axioms and metrisability](/mathematics/topology/separation-axioms).
</Solution>
</Exercise>

## References

- Matsuzaka Kazuo, *Shūgō・Isō Nyūmon* (Introduction to Sets and Topology), Iwanami Shoten, 1968 (in Japanese) — a standard Japanese text building carefully from the preliminaries on set theory up through metric and topological spaces. The material of this article corresponds to its chapter on topological spaces.
- Uchida Fuichi, *Shūgō to Isō* (Sets and Topology), Shokabo, 1986 (in Japanese) — explains the passage from open sets in a metric space to the axioms for a topology, with many examples.
- J. R. Munkres, *Topology*, 2nd ed., Prentice Hall, 2000 — Chapter 2 (Topological Spaces and Continuous Functions). Its treatment of bases, the order topology, closures and limit points is close to the organisation of this article, and it is rich in exercises.
- J. L. Kelley, *General Topology*, Van Nostrand, 1955 — Chapter 1. Collects the characterisations of a topology by closure operators and by neighbourhood systems.
- M. Fréchet, "Sur quelques points du calcul fonctionnel", *Rendiconti del Circolo Matematico di Palermo* 22 (1906), 1–74 — the original paper introducing the notion of a metric space.
- C. Kuratowski, "Sur l'opération $\overline{A}$ de l'Analysis Situs", *Fundamenta Mathematicae* 3 (1922) — the original paper on the closure axioms treated in the Appendix.

## Appendix: Building a topology from the closure operator

**There is more than one way to specify a topology.** In the main text we specified a topology by giving a family of open sets, but giving a family of closed sets amounts to the same thing. Every step in the proof of <Ref to="prop-closed-family" /> is an equivalence obtained from De Morgan's laws, so the argument can be run backwards: given a family $\mathcal{F}$ satisfying (C1), (C2) and (C3), the family $\mathcal{O}=\{X\setminus F : F\in\mathcal{F}\}$ is a topology whose closed sets are exactly $\mathcal{F}$. Hausdorff's 1914 definition by neighbourhood systems is likewise equivalent. Here we present the approach that axiomatises the operation of taking closures itself, due to Kuratowski in 1922.

<Theorem id="thm-kuratowski" title="Kuratowski's closure axioms">
Let $X$ be a set and suppose $c\colon\mathfrak{P}(X)\to\mathfrak{P}(X)$ satisfies the following four conditions.

- (K1) $c(\emptyset)=\emptyset$.
- (K2) $A\subseteq c(A)$ for every $A\subseteq X$.
- (K3) $c(c(A))=c(A)$ for every $A\subseteq X$.
- (K4) $c(A\cup B)=c(A)\cup c(B)$ for all $A,B\subseteq X$.

Then there is exactly one topology on $X$ whose family of closed sets is $\mathcal{F}=\{A\subseteq X : c(A)=A\}$, and the closure $\overline{A}$ with respect to that topology coincides with $c(A)$ for every $A\subseteq X$.
</Theorem>

<Proof of="thm-kuratowski">
We begin by deriving monotonicity. If $A\subseteq B$, then $B=A\cup B$, so (K4) gives $c(B)=c(A\cup B)=c(A)\cup c(B)\supseteq c(A)$.

Next we show that $\mathcal{F}$ satisfies (C1), (C2) and (C3) of <Ref to="prop-closed-family" />.

(C1): By (K1) we have $c(\emptyset)=\emptyset$, so $\emptyset\in\mathcal{F}$. Also $c(X)\subseteq X$ because the values of $c$ lie in $\mathfrak{P}(X)$, and $X\subseteq c(X)$ by (K2); hence $c(X)=X$, that is, $X\in\mathcal{F}$.

(C3): If $F_1,F_2\in\mathcal{F}$, then (K4) gives $c(F_1\cup F_2)=c(F_1)\cup c(F_2)=F_1\cup F_2$, so $F_1\cup F_2\in\mathcal{F}$. The case of finitely many sets follows by induction.

(C2): Let $\{F_\lambda\}_{\lambda\in\Lambda}\subseteq\mathcal{F}$ with $\Lambda\ne\emptyset$ and put $F=\bigcap_\lambda F_\lambda$. For each $\lambda$ we have $F\subseteq F_\lambda$, so monotonicity gives $c(F)\subseteq c(F_\lambda)=F_\lambda$. As this holds for every $\lambda$, we get $c(F)\subseteq\bigcap_\lambda F_\lambda=F$. Together with $F\subseteq c(F)$ from (K2) this gives $c(F)=F$, that is, $F\in\mathcal{F}$.

Hence $\mathcal{O}=\{X\setminus F : F\in\mathcal{F}\}$ is a topology, and its family of closed sets is $\mathcal{F}$.

The closures agree. Take $A\subseteq X$ and write $\overline{A}$ for its closure in this topology. By (K3) we have $c(c(A))=c(A)$, so $c(A)\in\mathcal{F}$; that is, $c(A)$ is closed, and $A\subseteq c(A)$ by (K2). Hence the minimality in (2) of <Ref to="thm-closure-basic" /> gives $\overline{A}\subseteq c(A)$. Conversely, $\overline{A}$ is closed, i.e. $\overline{A}\in\mathcal{F}$, and $A\subseteq\overline{A}$, so monotonicity gives $c(A)\subseteq c(\overline{A})=\overline{A}$. Combining the two, $c(A)=\overline{A}$.

Uniqueness. A topology is determined by its family of closed sets. If the closure operator of a topology $\mathcal{O}'$ agrees with $c$, then by (2) of <Ref to="thm-closure-basic" /> the closed sets of $\mathcal{O}'$ are exactly the sets equal to their own closure, that is, the members of $\mathcal{F}$; hence $\mathcal{O}'=\mathcal{O}$.
</Proof>

**Four entrances lead into the same building.** Whether one starts from a metric, a family of open sets, a neighbourhood system or a closure operator, one arrives at the same structure, the topological space. Which of them to adopt as the definition is a matter of convenience; open sets are adopted because continuity can then be written most concisely, in the form of <Ref to="prop-continuity-open" />. In the next article we define such continuous maps between arbitrary topological spaces and go on to homeomorphisms, which supply the notion of "sameness" for topological spaces ([Continuous maps and homeomorphisms](/en/mathematics/topology/continuous-maps)).
