# General Topology/Metric spaces

Definition (metric):

Let ${\displaystyle M}$ be a set. A metric on ${\displaystyle M}$ is a function ${\displaystyle d:M\times M\to \mathbb {R} }$ such that

1. ${\displaystyle \forall x,y\in M:d(x,y)\geq 0}$
2. ${\displaystyle d(x,y)=0\Leftrightarrow x=y}$
3. ${\displaystyle \forall x,y\in M:d(x,y)=d(y,x)}$ ("symmetry")
4. ${\displaystyle \forall x,y,z\in M:d(x,z)\leq d(x,y)+d(y,z)}$ ("triangle inequality")

Definition (metric space):

Let ${\displaystyle M}$ be a set, together with a metric ${\displaystyle d}$ on it. Then ${\displaystyle M}$, together with ${\displaystyle d}$, is called a metric space.

Definition (open ball):

Let ${\displaystyle (M,d)}$ be a metric space, ${\displaystyle x\in M0}$. The open ball of size ${\displaystyle \epsilon }$ centered at ${\displaystyle x}$ is defined to be the set

${\displaystyle B_{\epsilon }(x):=\{y\in M|d(x,y)<\epsilon }$.

Definition (topology of a metric space):

Let ${\displaystyle (M,d)}$ be a metric space. The topology of ${\displaystyle (M,d)}$, which is a topology on the set ${\displaystyle M}$, is defined to be

$\displaystyle \left\{ U \subseteq M \middle| \forall x \in U: \exists \epsilon > 0: B_\epsilon(x) \subseteq U \right\}$ .

This definition is justified:

Proposition (metric induces topology):

Let ${\displaystyle (M,d)}$ be a metric space. Define ${\displaystyle \tau \subseteq {\mathcal {P}}(M)}$ as follows:

$\displaystyle \tau := \left\{ U \subseteq M \middle| \forall x \in U: \exists \epsilon > 0: B_\epsilon(x) \subseteq U \right\}$

Then ${\displaystyle \tau }$ is a topology on ${\displaystyle M}$.

Remark (open ball is open):

Note that each open ball is an open subset of the underlying metric space with the topology indicated above, since whenever ${\displaystyle y\in B_{\epsilon }(x)}$, we may choose ${\displaystyle \delta :=\epsilon -d(x,y)>0}$ and obtain ${\displaystyle B_{\delta }(y)\subseteq B_{\epsilon }(x)}$ due to ${\displaystyle d(z,x)\leq d(z,y)+d(y,x)<\delta +d(x,y)=\epsilon }$ for ${\displaystyle z\in B_{\delta }(y)}$.

Proof: This topology is precisely the topology that arises in the characterisation of topologies by their neighbourhoods when we choose the neighbourhoods ${\displaystyle N(x)}$ of a point to be those sets that for a sufficiently small ${\displaystyle \epsilon >0}$ contain ${\displaystyle B_{\epsilon }(x)}$. It is clear that the neighbourhoods thus defined satisfy 1.-3. of the definition, and by the above remark, they also satisfy 4., since an open ball is a neighbourhood of each of its points. ${\displaystyle \Box }$

Now subsets of metric spaces are again metric spaces (as can be easily verified), and the topology induced by the restriction of the metric of the larger space is the subspace topology:

Proposition (metric subspace has subspace topology):

Let ${\displaystyle (M,d)}$ be a metric space and ${\displaystyle S\subseteq M}$ be a subset. Then the topology on ${\displaystyle S}$ induced by the metric on ${\displaystyle S}$, namely ${\displaystyle d|_{S\times S}}$, is the subspace topology.

Proof: We only need to prove that they have the same open sets. ${\displaystyle V\subseteq S}$ being open in the subspace topology means that there exists ${\displaystyle U\subseteq M}$ open such that ${\displaystyle U\cap S=V}$. If that is the case, pick ${\displaystyle x\in V}$ arbitrary. By openness of ${\displaystyle U}$, choose ${\displaystyle \epsilon =\epsilon (x)}$ sufficiently small so that ${\displaystyle B_{\epsilon }(x)\subseteq U}$, where the ball is taken with respect to the metric on ${\displaystyle M}$. Then note that whenever ${\displaystyle y\in S}$ is such that ${\displaystyle d|_{S\times S}(x,y)<\epsilon }$, then ${\displaystyle d(x,y)<\epsilon }$ because by definition of restrictions, ${\displaystyle d|_{S\times S}(x,y)=d(x,y)}$. Therefore, whenever ${\displaystyle d(x,y)<\epsilon }$ for ${\displaystyle y\in S}$, we have ${\displaystyle y\in S\cap B_{\epsilon }(x)\subseteq S\cap U=V}$. For the other direction, suppose that ${\displaystyle V\subseteq S}$ is open in the metric topology induced by ${\displaystyle d|_{S\times S}}$ on ${\displaystyle S}$. ${\displaystyle \Box }$

Proposition (metric spaces are normal):

Let ${\displaystyle (M,d)}$ be a metric space. Then ${\displaystyle M}$ together with the topology induced by the metric ${\displaystyle d}$ is normal.

Proof: Let ${\displaystyle A,B}$ be two disjoint and closed subsets of ${\displaystyle (M,d)}$. For each ${\displaystyle x\in A}$, define ${\displaystyle \delta _{x}>0}$ sufficiently small so that ${\displaystyle B_{\delta _{x}}(x)\cap B=\emptyset }$, and similarly for ${\displaystyle y\in B}$. Then define

${\displaystyle U:=\bigcup _{x\in A}B_{\delta _{x}/2}(x)}$, ${\displaystyle V:=\bigcup _{y\in B}B_{\delta _{y}/2}(y)}$.

Note that ${\displaystyle A\subseteq U}$, ${\displaystyle B\subseteq V}$. Suppose ${\displaystyle z\in U\cap V}$, and choose ${\displaystyle x\in A}$ and ${\displaystyle y\in B}$ so that ${\displaystyle d(x,z)\leq \delta _{x}/2}$ resp. ${\displaystyle d(y,z)\leq \delta _{y}/2}$. Both cases ${\displaystyle \delta _{x}\leq \delta _{y}}$ and ${\displaystyle \delta _{y}\leq \delta _{x}}$ lead to a contradiction by the triangle inequality. ${\displaystyle \Box }$

As usual, by choosing ${\displaystyle \delta _{x}}$, ${\displaystyle \delta _{y}}$ maximal by choosing the union of all the open balls satisfying the condition, one may avoid the axiom of choice.

Proposition (metric spaces are completely normal):

Let ${\displaystyle (M,d)}$ be a metric space. Then ${\displaystyle (M,d)}$, together with its subspace topology, is completely normal.

Proof: Let ${\displaystyle S\subseteq M}$ be any subset of ${\displaystyle M}$. As noted above, ${\displaystyle S}$ has the structure of a metric space, and General Topology/Metric spaces#metric spaces are normal. Further, its subspace topology equals the topology induced by its metric, so that it is normal in the subspace topology. Thus, ${\displaystyle M}$ is hereditary normal, that is, completely normal. ${\displaystyle \Box }$

Definition (proper space):

A metric space ${\displaystyle (M,d)}$ is called proper if and only if all of its closed balls are compact.

Proposition (closed point projection exists in proper spaces):

Let ${\displaystyle (M,d)}$ be a proper metric space, let ${\displaystyle A\subset M}$ be closed and let ${\displaystyle x\in M\setminus A}$. Then there exists a point ${\displaystyle y\in A}$ which has shortest distance to ${\displaystyle x}$ among all points in ${\displaystyle A}$.

Proof: Note that by the existence of infima over reals, the value

${\displaystyle \eta :=\inf _{z\in A}d(x,z)}$

exists. Now define for ${\displaystyle n\in \mathbb {N} }$

$\displaystyle K_n := \left\{z \in A \middle| d(x, z) \le \eta + \frac{1}{n} \right\}$ ;

note that ${\displaystyle K_{n}\neq \emptyset }$ for all ${\displaystyle n\in \mathbb {N} }$ (since otherwise the infimal distance of ${\displaystyle x}$ to ${\displaystyle A}$ would be larger than ${\displaystyle \eta }$) and further ${\displaystyle K_{1}\supseteq K_{2}\supseteq \cdots }$. Further, each ${\displaystyle K_{n}}$ is compact as the closed subset of a Hausdorff space. Thus, we may apply Cantor's intersection theorem in order to obtain that

${\displaystyle \bigcap _{n\in \mathbb {N} }K_{n}\neq \emptyset }$. Thus, let ${\displaystyle y\in \bigcap _{n\in \mathbb {N} }K_{n}}$.

Note that for each ${\displaystyle z\in A}$, ${\displaystyle d(z,x)\geq \eta }$ by the definition of infimums. Further, for each ${\displaystyle n\in \mathbb {N} }$, ${\displaystyle d(x,y)\leq \eta +{\frac {1}{n}}}$ by definition of ${\displaystyle K_{n}}$, so that ${\displaystyle d(x,y)=\eta }$. ${\displaystyle \Box }$

Proposition (metric spaces are uniform spaces):

Let ${\displaystyle (M,d)}$ be a metric space, and define

$\displaystyle U_n :=\left\{ (x, y) \in M \times M \middle| d(x, y) < \frac{1}{n} \right\}$ , and then $\displaystyle \mathcal U := \left\{ U_n \middle| n \in \mathbb N \right\}$ .

Then ${\displaystyle {\mathcal {U}}}$ is the basis for an entourage filter on ${\displaystyle M\times M}$.

Proof: Clearly, each subset of ${\displaystyle {\mathcal {U}}}$ contains the diagonal. Further, the intersection of any two elements of the basis equals a third due to the computation

${\displaystyle U_{n}\cap U_{m}=U_{\max\{m,n\}}}$;

this implies that we really have a filter basis. Finally, let ${\displaystyle V}$ be an entourage. Pick ${\displaystyle n\in \mathbb {N} }$ such that ${\displaystyle U_{n}\subseteq V}$. Note first that ${\displaystyle U_{n}}$ is symmetric, since ${\displaystyle d}$ is symmetric. Then, choose then ${\displaystyle m:=2n}$. Suppose that ${\displaystyle (x,z)\in U_{m}}$ and ${\displaystyle (z,y)\in U_{m}}$, then ${\displaystyle d(x,y)\leq d(x,z)+d(z,y)<{\frac {2}{2n}}={\frac {1}{n}}}$. ${\displaystyle \Box }$

Proposition (metrics may be chosen bounded):

Let ${\displaystyle (M,d)}$ be a metric space, and let ${\displaystyle \tau }$ be the topology on ${\displaystyle M}$ induced by ${\displaystyle d}$. Then upon defining

${\displaystyle d'(x,y):={\frac {d(x,y)}{d(x,y)+1}}}$,

we obtain that ${\displaystyle d'}$ is a bounded metric that induces the same topology on ${\displaystyle M}$ as ${\displaystyle d}$.

Proof: It is obvious that ${\displaystyle d'(x,y)\leq 1}$ for all ${\displaystyle x,y\in M}$. Suppose now that ${\displaystyle x,y,z\in M}$. Then

${\displaystyle d'(x,y)+d'(y,z)={\frac {d(x,y)}{1+d(x,y)}}+{\frac {d(y,z)}{1+d(y,z)}}={\frac {d(x,y)(1+d(y,z))+d(y,z)(1+d(x,y))}{(1+d(x,y))(1+d(y,z))}}={\frac {2d(x,y)d(y,z)+d(y,z)+d(x,y)}{d(x,y)+d(y,z)+d(x,y)d(y,z)+1}}}$,

so that ${\displaystyle d'(x,y)+d'(y,z)\geq d'(x,z)}$ becomes equivalent to

{\displaystyle {\begin{aligned}(1+d(x,z))[2d(x,y)d(y,z)+d(y,z)+d(x,y)]&\geq d(x,z)[d(x,y)+d(y,z)+d(x,y)d(y,z)+1]\\\Leftrightarrow 2d(x,y)d(y,z)+d(y,z)+d(x,y)+d(x,y)d(y,z)d(x,z)&\geq d(x,z)\\\end{aligned}}}

proving the triangle inequality, which is the only non-trivial thing that one has to show in showing that ${\displaystyle d'}$ is a metric. ${\displaystyle \Box }$

Proposition (countable product of metric spaces is metric):

Let ${\displaystyle (M_{n},d_{n})_{n\in \mathbb {N} }}$ be a sequence of metric spaces, and consider the (a priori only topological) space ${\displaystyle M:=\prod _{n\in \mathbb {N} }M_{n}}$ with product topology. Then ${\displaystyle M}$ is metrizable, and a possible metric is

${\displaystyle d((x_{n})_{n\in \mathbb {N} },(y_{n})_{n\in \mathbb {N} }):=\sum _{n=1}^{\infty }2^{-n}{\frac {d(x,y)}{1+d(x,y)}}}$.

Example (infinite-dimensional real space):

Consider the space ${\displaystyle \mathbb {R} ^{\mathbb {N} }}$, the product of countably many copies of ${\displaystyle \mathbb {R} }$ together with the product topology induced by the Euclidean topology on ${\displaystyle \mathbb {R} }$.

Definition (proper space):

A proper space is a metric space ${\displaystyle X}$ so that all its closed balls are compact.

Proposition (existence of closest element in closed subspace for proper spaces):

Let ${\displaystyle X}$ be a metric space with metric ${\displaystyle d}$, let ${\displaystyle A\subseteq X}$ be closed and a proper space, and let ${\displaystyle x\in A}$. Then there exists ${\displaystyle y\in A}$ such that

${\displaystyle d(x,y)=\inf _{z\in A}d(x,z)}$.

Proof: Set

${\displaystyle r:=\inf\{s>0|B_{s}(x)\cap A\neq \emptyset \}}$.

Then the sets

${\displaystyle K_{n}:=B_{r+1/n}(x)\cap A}$ (${\displaystyle n\in \mathbb {N} }$)

form a descending family of nonempty compact and closed sets, since closed subsets of compact sets are compact and compact subsets of Hausdorff spaces are closed. Hence, Cantor's intersection theorem proves that there exists

${\displaystyle y\in \bigcap _{n\in \mathbb {N} }K_{n}}$.

But then for each ${\displaystyle n\in \mathbb {N} }$, ${\displaystyle d(x,y)\leq s+1/n}$, so that in fact

${\displaystyle d(x,y)=s=\inf _{z\in A}d(x,z)}$. ${\displaystyle \Box }$

## Exercises

1. Let ${\displaystyle M}$ be a compact topological space, whose topology is induced by two metrics ${\displaystyle d}$ and ${\displaystyle d'}$. Prove that for every ${\displaystyle \epsilon >0}$, there exists ${\displaystyle \delta >0}$ such that ${\displaystyle d(x,y)<\delta }$ implies ${\displaystyle d'(x,y)<\epsilon }$ (and then by symmetry also the other way round).