# Topology/Metric Spaces

 Topology ← Basic Concepts Set Theory Metric Spaces Topological Spaces →

## Before we begin

Before we discuss topological spaces in their full generality, we will first turn our attention to a special type of topological space, a metric space. This abstraction has a huge and useful family of special cases, and it therefore deserves special attention. Also, the abstraction is picturesque and accessible; it will subsequently lead us to the full abstraction of a topological space.

## Metric Space

### Definition

A metric space is a Cartesian pair ${\displaystyle (X,d)}$ where ${\displaystyle X}$ is a non-empty set and ${\displaystyle d:X\times X\to [0,\infty )}$, is a function which is called the metric which satisfies the requirement that for all ${\displaystyle a,b,c\in X}$:

1. ${\displaystyle d(a,b)=0}$ if and only if ${\displaystyle a=b}$
2. ${\displaystyle d(a,b)=d(b,a)}$ (symmetry)
3. ${\displaystyle d(a,c)\leq d(a,b)+d(b,c)}$ (triangle inequality)

Note that some authors do not require metric spaces to be non-empty. We annotate ${\displaystyle (X,d)}$ when we talk of a metric space ${\displaystyle X}$ with the metric ${\displaystyle d}$.

### Examples

• An important example is the discrete metric. It may be defined on any non-empty set X as follows
${\displaystyle d(x,y)={\begin{cases}1&:x\neq y\\0&:x=y\end{cases}}}$
• On the set of real numbers ${\displaystyle \mathbb {R} }$, define ${\displaystyle d(x,y)=|x-y|}$ (The absolute distance between ${\displaystyle x}$ and ${\displaystyle y}$).
To prove that this is indeed a metric space, we must show that ${\displaystyle d}$ is really a metric. To begin with, ${\displaystyle d(x,y)=|x-y|\geq 0}$ for any real numbers ${\displaystyle x}$ and ${\displaystyle y}$.
• ${\displaystyle d(x,y)=|x-y|=0\iff (x-y)=0\lor -(x-y)=0\iff x=y}$
• ${\displaystyle d(x,y)=|x-y|=|y-x|=d(y,x)}$
• ${\displaystyle d(x,z)=|x-z|=|x-y+y-z|={\bigr |}(x-y)+(y-z){\bigr |}\leq |x-y|+|y-z|=d(x,y)+d(y,z)}$
• On the plane ${\displaystyle \mathbb {R} ^{2}}$ as the space, and let ${\displaystyle d{\bigl (}(x_{1},y_{1}),(x_{2},y_{2}){\bigr )}={\sqrt {(x_{1}-x_{2})^{2}+(y_{1}-y_{2})^{2}}}}$.
This is the euclidean distance between ${\displaystyle (x_{1},y_{1})}$ and ${\displaystyle (x_{2},y_{2})}$).
• We can generalize the two preceding examples. Let ${\displaystyle V}$ be a normed vector space (over ${\displaystyle \mathbb {R} }$ or ${\displaystyle \mathbb {C} }$). We can define the metric to be: ${\displaystyle d(x,y)=\|x-y\|}$. Thus every normed vector space is a metric space.
• For the vector space ${\displaystyle \mathbb {C} ^{n}}$ we have an interesting norm. Let ${\displaystyle x=(x_{1},\ldots ,x_{n})}$ and ${\displaystyle y=(y_{1},\ldots ,y_{n})}$ two vectors of ${\displaystyle \mathbb {C} ^{n}}$. We define the p-norm: ${\displaystyle \|x\|_{p}=\left(\sum _{i=1}^{n}|x_{i}|^{p}\right)^{\frac {1}{p}}}$. For each ${\displaystyle p}$-norm there is a metric based on it. Interesting cases of ${\displaystyle p}$ are:
• ${\displaystyle p=1}$. The metric is ${\displaystyle d(x,y)=\|x-y\|_{1}=\sum _{i=1}^{n}|x_{i}-y_{i}|}$
• ${\displaystyle p=2}$. The metric is good-old Euclid metric ${\displaystyle d(x,y)=\|x-y\|_{2}={\sqrt {\sum _{i=1}^{n}|x_{i}-y_{i}|^{2}}}}$
• ${\displaystyle p=\infty }$. This is a bit surprising: ${\displaystyle d(x,y)=\|x-y\|_{\infty }=\max _{i=1\ldots n}{\bigl \{}|x_{i}-y_{i}|{\bigr \}}}$

As an exercise, you can prove that ${\displaystyle \lim _{p\to \infty }\|x\|_{p}=\max _{i=1\ldots n}\{|x_{i}|\}}$ thus justifying the definition of ${\displaystyle \|\cdot \|_{\infty }}$.

• The great-circle distance between two points on a sphere is a metric.
• The Hilbert space is a metric space on the space of infinite sequences ${\displaystyle \{a_{k}\}}$ such that ${\displaystyle \sum _{i=1}^{\infty }a_{k}^{2}}$ converges, with a metric ${\displaystyle d{\bigl (}\{a_{i}\},\{b_{i}\}{\bigr )}={\sqrt {\sum _{i=1}^{\infty }(a_{i}-b_{i})^{2}}}}$.
• The concept of the Erdős number suggests a metric on the set of all mathematicians. Take ${\displaystyle x,y}$ to be two mathematicians, and define ${\displaystyle d(x,y)}$ as 0 if ${\displaystyle x,y}$ are the same person; 1 if ${\displaystyle x,y}$ have co-authored a paper; ${\displaystyle n}$ if the shortest sequence ${\displaystyle (\{x,a_{1}\},\{a_{1},a_{2}\},\ldots ,\{a_{n-1},y\})}$, where each step pairs two people who have co-authored a paper, is of length ${\displaystyle n}$; or ${\displaystyle \infty }$ if ${\displaystyle x\neq y}$ and no such sequence exists.

This metric is easily generalized to any reflexive relation (or undirected graph, which is the same thing).

Note that if we instead defined ${\displaystyle d(x,y)}$ as the sum of the Erdős numbers of ${\displaystyle x,y}$, then ${\displaystyle d}$ would not be a metric, as it would not satisfy ${\displaystyle d(x,y)=0\iff x=y}$. For example, if ${\displaystyle x=y}$ = Stanisław Ulam, then ${\displaystyle d(x,y)=2}$.

### Note

Throughout this chapter we will be referring to metric spaces. Every metric space comes with a metric function. Because of this, the metric function might not be mentioned explicitly. There are several reasons:

• We don't want to make the text too blurry.
• We don't have anything special to say about it.
• The space has a "natural" metric. E.g. the "natural" metric for ${\displaystyle \mathbb {R} ^{n},\mathbb {C} ^{n}}$ is the euclidean metric ${\displaystyle d_{2}}$.

As this is a wiki, if for some reason you think the metric is worth mentioning, you can alter the text if it seems unclear (if you are sure you know what you are doing) or report it in the talk page.

## Open Ball

### Motivation

The open ball is the building block of metric space topology. We shall define intuitive topological definitions through it (that will later be converted to the real topological definition), and convert (again, intuitively) calculus definitions of properties (like convergence and continuity) to their topological definition. We shall try to show how many of the definitions of metric spaces can be written also in the "language of open balls". Then we can instantly transform the definitions to topological definitions.

### Definition

Given a metric space ${\displaystyle (X,d)}$ an open ball with radius ${\displaystyle r}$ around ${\displaystyle p}$ is defined as the set

${\displaystyle B_{r}(p)={\bigl \{}x\in X:d(x,p)

Intuitively it is all the points in the space, that are less than ${\displaystyle r}$ distance from a certain point ${\displaystyle p}$.

### Examples

Why is this called a ball? Let's look at the case of ${\displaystyle \mathbb {R} ^{3}}$:

${\displaystyle d{\bigl (}(x_{1},x_{2},x_{3}),(y_{1},y_{2},y_{3}){\bigr )}={\sqrt {(x_{1}-y_{1})^{2}+(x_{2}-y_{2})^{2}+(x_{3}-y_{3})^{2}}}}$

Therefore ${\displaystyle B_{r}{\bigl (}(0,0,0){\bigr )}}$ is exactly ${\displaystyle x_{1}^{2}+x_{2}^{2}+x_{3}^{2} – The ball with ${\displaystyle (0,0,0)}$ at center, of radius ${\displaystyle r}$. In ${\displaystyle \mathbb {R} ^{3}}$ the ball is called open, because it does not contain the sphere (${\displaystyle x_{1}^{2}+x_{2}^{2}+x_{3}^{2}=r^{2}}$).

The Unit ball is a ball of radius 1. Lets view some examples of the ${\displaystyle B_{1}{\bigl (}(0,0){\bigr )}}$ unit ball of ${\displaystyle \mathbb {R} ^{2}}$ with different ${\displaystyle p}$-norm induced metrics. The unit ball of ${\displaystyle \mathbb {R} ^{2}}$ with the norm ${\displaystyle \|\cdot \|_{p}}$ is:

${\displaystyle B_{1}{\bigl (}(0,0){\bigr )}={\Big \{}(x,y)\in \mathbb {R} ^{2}:d{\bigl (}(x,y),(0,0){\bigr )}<1{\Big \}}={\Big \{}(x,y):{\bigl \|}(x,y)-(0,0){\bigr \|}_{p}<1{\Big \}}={\Big \{}(x,y):\|(x,y)\|_{p}<1{\Big \}}={\Big \{}(x,y):{\sqrt[{p}]{|x|^{p}+|y|^{p}}}<1{\Big \}}}$
• The metric induced by ${\displaystyle \|\cdot \|_{1}}$ in that case, the unit ball is: ${\displaystyle |x|+|y|<1}$

• The metric induced by ${\displaystyle \|\cdot \|_{2}}$ in that case, the unit ball is: ${\displaystyle {\sqrt {x^{2}+y^{2}}}<1}$

• The metric induced by ${\displaystyle \|\cdot \|_{\infty }}$ in that case, the unit ball is: ${\displaystyle \max {\bigl \{}|x|,|y|{\bigr \}}<1}$

As we have just seen, the unit ball does not have to look like a real ball. In fact sometimes the unit ball can be one dot:

• The discrete metric, The unit ball is ${\displaystyle B_{1}{\bigl (}(0,0){\bigr )}={\Big \{}d{\bigl (}(0,0),(x,y){\bigr )}<1{\Big \}}={\Big \{}d{\bigl (}(0,0),(x,y){\bigr )}=0{\Big \}}=\{(0,0)\}}$

## Interior of a Set

### Definitions

Definition: We say that x is an interior point of A iff there is an ${\displaystyle \epsilon >0}$ such that: ${\displaystyle B_{\epsilon }(x)\subseteq A}$. This intuitively means, that x is really 'inside' A - because it is contained in a ball inside A - it is not near the boundary of A.

Illustration:

Interior Point Not Interior Points

Definition: The interior of a set A is the set of all the interior points of A. The interior of a set A is marked ${\displaystyle \operatorname {int} (A)}$. Useful notations: ${\displaystyle \operatorname {int} (S)=\{x\in S|x{\text{ is an interior point of }}S\}}$ and ${\displaystyle \operatorname {int} (S)=\cup \{A\subseteq S|A{\text{ is open }}\!\!\}\!\!{\text{ }}}$.

### Properties

Some basic properties of int (For any sets A,B):

• ${\displaystyle \operatorname {int} (A)\subseteq A}$
• ${\displaystyle \operatorname {int} (\operatorname {int} (A))=\operatorname {int} (A)\,}$
• ${\displaystyle \operatorname {int} (A\cap B)=\operatorname {int} (A)\cap \operatorname {int} (B)}$
• ${\displaystyle A\subseteq B\Rightarrow \operatorname {int} (A)\subseteq \operatorname {int} (B)}$

Proof of the first:
We need to show that: ${\displaystyle x\in \operatorname {int} (A)\implies x\in A}$. But that's easy! by definition, we have that ${\displaystyle x\in B_{\epsilon }(x)\subseteq A}$ and therefore ${\displaystyle x\in A}$

Proof of the second:
In order to show that ${\displaystyle \operatorname {int} (\operatorname {int} (A))=\operatorname {int} (A)\,}$, we need to show that ${\displaystyle \operatorname {int} (\operatorname {int} (A))\subseteq \operatorname {int} (A)}$ and ${\displaystyle \operatorname {int} (\operatorname {int} (A))\supseteq \operatorname {int} (A)}$.
The " ${\displaystyle \subseteq }$" direction is already proved: if for any set A, ${\displaystyle \operatorname {int} (A)\subseteq A}$, then by taking ${\displaystyle \operatorname {int} (A)}$ as the set in question, we get ${\displaystyle \operatorname {int} (\operatorname {int} (A))\subseteq \operatorname {int} (A)}$.
The " ${\displaystyle \supseteq }$" direction:
let ${\displaystyle x\in \operatorname {int} (A)}$. We need to show that ${\displaystyle x\in \operatorname {int} (\operatorname {int} (A))}$.
If ${\displaystyle x\in \operatorname {int} (A)}$ then there is a ball ${\displaystyle B_{\epsilon }(x)\subseteq A}$. Now, every point y, in the ball ${\displaystyle B_{\frac {\epsilon }{2}}(x)}$ an internal point to A (inside ${\displaystyle \operatorname {int} (A)}$), because there is a ball around it, inside A: ${\displaystyle y\in B_{\frac {\epsilon }{2}}(x)\implies B_{\frac {\epsilon }{2}}(y)\subset B_{\epsilon }(x)\subset A}$.
We have that ${\displaystyle x\in B_{\frac {\epsilon }{2}}(x)\subset \operatorname {int} (A)}$ (because every point in it is inside ${\displaystyle \operatorname {int} (A)}$) and by definition ${\displaystyle x\in \operatorname {int} (\operatorname {int} (A))}$.
Hint: To understand better, draw to yourself ${\displaystyle x,B_{\epsilon }(x),B_{\frac {\epsilon }{2}}(x),y,B_{\frac {\epsilon }{2}}(y)}$.

Proof of the rest is left to the reader.

### Reminder

• [a, b] : all the points x, such that ${\displaystyle a\leq x\leq b}$
• (a, b) : all the points x, such that ${\displaystyle a

### Example

For the metric space ${\displaystyle \mathbb {R} }$ (the line), we have:

• ${\displaystyle int([a,b])=(a,b)}$
• ${\displaystyle int((a,b])=(a,b)}$
• ${\displaystyle int([a,b))=(a,b)}$
• ${\displaystyle int((a,b))=(a,b)}$

Let's prove the first example (${\displaystyle int([a,b])=(a,b)}$). Let ${\displaystyle x\in (a,b)}$ (that is: ${\displaystyle a) we'll show that ${\displaystyle x}$ is an internal point.
Let ${\displaystyle \epsilon =\min\{x-a,b-x\}}$. Note that ${\displaystyle x+\epsilon \leq x+b-x=b}$ and ${\displaystyle x-\epsilon \geq x-x+a=a}$. Therefore ${\displaystyle B_{\epsilon }(x)=(x-\epsilon ,x+\epsilon )\subset (a,b)}$.
We have shown now that every point x in ${\displaystyle (a,b)}$ is an internal point. Now what about the points ${\displaystyle a,b}$ ? let's show that they are not internal points. If ${\displaystyle a}$ was an internal point of ${\displaystyle [a,b]}$, there would be a ball ${\displaystyle B_{\epsilon }(a)\subset [a,b]}$. But that would mean, that the point ${\displaystyle a-{\frac {\epsilon }{2}}}$ is inside ${\displaystyle [a,b]}$. but because ${\displaystyle a-{\frac {\epsilon }{2}} that is a contradiction. We show similarly that b is not an internal point.
To conclude, the set ${\displaystyle (a,b)}$ contains all the internal points of ${\displaystyle [a,b]}$. And we can mark ${\displaystyle int([a,b])=(a,b)}$

## An Open Set

### Definition

A set is said to be open in a metric space if it equals its interior (${\displaystyle A=Int(A)}$). When we encounter topological spaces, we will generalize this definition of open. However, this definition of open in metric spaces is the same as that as if we regard our metric space as a topological space.

Properties:

1. The empty-set is an open set (by definition: ${\displaystyle int(\emptyset )=\emptyset }$).
2. An open ball is an open set.
3. For any set B, int(B) is an open set. This is easy to see because: int(int(B))=int(B).
4. If A,B are open, then ${\displaystyle A\cap B}$ is open. Hence finite intersections of open sets are open.
5. If ${\displaystyle {A_{i}:i\in I}}$ (for any set if indexes I) are open, then their union ${\displaystyle \cup _{i\in I}A_{i}}$ is open.

Proof of 2:
Let ${\displaystyle B_{r}(x)}$ be an open ball. Let ${\displaystyle y\in B_{r}(x)}$. Then ${\displaystyle y\in B_{r-d(x,y)}(y)\subseteq B_{r}(x)}$.
In the following drawing, the green line is ${\displaystyle d(x,y)}$ and the brown line is ${\displaystyle r-d(x,y)}$. We have found a ball to contain ${\displaystyle y}$ inside ${\displaystyle B_{r}(x)}$.

Proof of 4:
A, B are open. we need to prove that ${\displaystyle int(A\cap B)=A\cap B}$. Because of the first propriety of int, we only need to show that ${\displaystyle int(A\cap B)\supseteq A\cap B}$, which means ${\displaystyle \forall x\in A\cap B:x\in int(A\cap B)}$. Let ${\displaystyle x\in A\cap B}$. We know also, that ${\displaystyle x\in int(A),x\in int(B)}$ from the premises A, B are open and ${\displaystyle x\in A,x\in B}$ . That means that there are balls: ${\displaystyle B_{{\epsilon }_{1}}(x)\subset A,B_{{\epsilon }_{2}}(x)\subset B}$. Let ${\displaystyle \epsilon =\min\{{\epsilon _{1},\epsilon _{2}}\}}$, we have that ${\displaystyle B_{\epsilon }(x)\subset A,B_{\epsilon }(x)\subset B\Rightarrow B_{\epsilon }(x)\subset A\cap B}$. By the definition of an internal point we have that ${\displaystyle x\in int(A\cap B)}$ (${\displaystyle B_{\epsilon }(x)}$ is the required ball).

Interestingly, this property does not hold necessarily for an infinite intersection of open sets. To see an example on the real line, let ${\displaystyle A_{n}=\{(-1/n,1/n)\}}$. We then see that ${\displaystyle \cap _{i=1}^{\infty }A_{i}=\{0\}}$ which is closed.

Proof of 5:
Proving that the union of open sets is open, is rather trivial: let ${\displaystyle {A_{i}:i\in I}}$ (for any set if indexes I) be a set of open sets. we need to prove that ${\displaystyle int(\cup _{i\in I}A_{i})\supseteq \cup _{i\in I}A_{i}}$: If ${\displaystyle x\in A_{i}}$ then it has a ball ${\displaystyle B_{\epsilon }(x)\subset A_{i}\subseteq \cup _{i\in I}A_{i}}$. The same ball that made a point an internal point in ${\displaystyle A_{i}}$ will make it internal in ${\displaystyle \cup _{i\in I}A_{i}}$.

Proposition: A set is open, if and only if it is a union of open-balls.
Proof: Let A be an open set. by definition, if ${\displaystyle x\in A}$ there there a ball ${\displaystyle B_{\epsilon _{x}}(x)\subseteq A}$. We can then compose A: ${\displaystyle A=\cup _{x\in A}B_{\epsilon _{x}}(x)}$. The equality is true because: ${\displaystyle \cup _{x\in A}B_{\epsilon _{x}}(x)\subseteq A}$ because ${\displaystyle \forall x\in A:B_{\epsilon _{x}}(x)\subseteq A}$. ${\displaystyle \cup _{x\in A}B_{\epsilon _{x}}(x)\supseteq A}$ in each ball we have the element ${\displaystyle x}$ and we unite balls of all the elements of ${\displaystyle A}$.
On the other hand, a union of open balls is an open set, because every union of open sets is open.

### Examples

• As we have seen, every open ball is an open set.
• For every space ${\displaystyle X}$ with the discrete metric, every set is open.

Proof: Let ${\displaystyle U}$ be a set. we need to show, that if ${\displaystyle x\in U}$ then ${\displaystyle x}$ is an internal point. Lets use the ball around ${\displaystyle x}$ with radius ${\displaystyle {\frac {1}{2}}}$. We have ${\displaystyle B_{\frac {1}{2}}(x)=\{y\mid d(x,y)<{\frac {1}{2}}\}=\{x\}\subseteq U}$. Therefore ${\displaystyle x}$ is an internal point.

• The space ${\displaystyle \mathbb {R} }$ with the regular metric. Every open segment ${\displaystyle (a,b)}$ is an open set. The proof of that is similar to the proof that ${\displaystyle int([a,b])=(a,b)}$, that we have already seen.

### Theorem

In any metric space X, the following three statements hold:

1) The union of any number of open sets is open.
Proof: Let ${\displaystyle C}$ be a collection of open sets, and let
${\displaystyle x\in \cup C}$. Then there exists a ${\displaystyle U\in C}$ such that ${\displaystyle x\in U}$.
So there exists an ${\displaystyle \epsilon >0}$ such that ${\displaystyle B_{\epsilon }(x)\subseteq U}$. Therefore
${\displaystyle B_{\epsilon }(x)\subseteq \cup C}$.
2) The intersection of a finite number of open sets is open.
Proof: Let ${\displaystyle x\in \cap C}$, where ${\displaystyle C}$ is a finite collection of open sets.
So ${\displaystyle x\in U}$ for each ${\displaystyle U\in C}$. Let ${\displaystyle C={U_{1},U_{2},...,U_{n}}}$. For each ${\displaystyle i=1,2,3,...,n}$, there exists an ${\displaystyle \epsilon _{i}>0}$ such that ${\displaystyle B_{\epsilon }(x)\subseteq U_{i}}$. Let ${\displaystyle \epsilon =min_{i}}${${\displaystyle \epsilon _{i}}$}. Therefore ${\displaystyle \epsilon >0}$ and ${\displaystyle B_{\epsilon }(x)\subseteq \cap C}$.
3) The empty set and X are both open.

### Theorem

In any metric space X, the following statements hold:

1) The intersection of any number of closed sets is closed.
2) The union of a finite number of closed sets is closed.

## Convergence

### Definition

First, Lets translate the calculus definition of convergence, to the "language" of metric spaces: We say that a sequence ${\displaystyle x_{n}}$ converges to ${\displaystyle x}$ if for every ${\displaystyle \epsilon >0}$ exists ${\displaystyle N}$ that for each ${\displaystyle n^{*}>N}$ the following holds: ${\displaystyle d(x_{n^{*}},x)<\epsilon }$.
Equivalently, we can define converges using Open-balls: A sequence ${\displaystyle x_{n}}$ converges to ${\displaystyle x}$ If for every ${\displaystyle \epsilon >0}$ exists ${\displaystyle N}$ that for each ${\displaystyle n^{*}>N}$ the following holds: ${\displaystyle x_{n^{*}}\in B_{\epsilon }(x)}$.

The latter definition uses the "language" of open-balls, But we can do better - We can remove the ${\displaystyle \epsilon }$ from the definition of convergence, thus making the definition more topological. Let's define that ${\displaystyle x_{n}}$ converges to ${\displaystyle x}$ (and mark ${\displaystyle x_{n}\rightarrow x}$) , if for every ball ${\displaystyle B}$ around ${\displaystyle x}$ , exists ${\displaystyle N_{B}}$ that for each ${\displaystyle n^{*}>N_{B}}$ the following holds: ${\displaystyle x_{n^{*}}\in B(x)}$. ${\displaystyle x}$ is called the limit of the sequence.

The definitions are all the same, but the latter uses topological terms, and can be easily converted to a topological definition later.

### Properties

• If a sequence has a limit, it has only one limit.
Proof Let a sequence ${\displaystyle x_{n}}$ have two limits, ${\displaystyle x\,}$ and ${\displaystyle x^{\prime }}$. If they are not the same, we must have ${\displaystyle 0. Let ${\displaystyle \epsilon }$ be smaller than this distance. Now for some ${\displaystyle N}$, for all ${\displaystyle n>N}$, it must be the case that both ${\displaystyle x_{n}\in B_{\epsilon /2}(x)}$ and ${\displaystyle x_{n}\in B_{\epsilon /2}(x^{\prime })}$ by virtue of the fact ${\displaystyle x\,}$ and ${\displaystyle x^{\prime }}$ are limits. But this is impossible; the two balls are separate. Therefore the limits are coincident, that is, the sequence has only one limit.
• If ${\displaystyle x_{n}\rightarrow x}$, then almost by definition we get that ${\displaystyle d(x_{n},x)\rightarrow 0}$. (${\displaystyle d(x_{n},x)}$ Is the sequence of distances).

### Examples

• In ${\displaystyle \mathbb {R} }$ with the natural metric, The series ${\displaystyle x_{n}={\frac {1}{n}}}$ converges to ${\displaystyle 0}$. And we note it as follows: ${\displaystyle {\frac {1}{n}}\rightarrow 0}$
• Any space, with the discrete metric. A series ${\displaystyle x_{n}}$ converges, only if it is eventually constant. In other words: ${\displaystyle x_{n}\rightarrow x}$ If and only if, We can find ${\displaystyle N}$ that for each ${\displaystyle n^{*}>N}$, ${\displaystyle x_{n^{*}}=x}$
• An example you might already know:

The space ${\displaystyle \mathbb {R} ^{k}}$ For any p-norm induced metric, when ${\displaystyle p\geq 1}$. Let ${\displaystyle {\vec {x_{n}}}=(x_{n,1},x_{n,2},\cdots ,x_{n,k})}$. and let ${\displaystyle {\vec {x}}=(x_{1},x_{2},\cdots ,x_{k})}$.
Then, ${\displaystyle {\vec {x_{n}}}\rightarrow {\vec {x}}}$ If and only if ${\displaystyle \forall i,1\leq i\leq k:x_{n,i}\rightarrow x_{i}}$.

### Uniform Convergence

A sequence of functions ${\displaystyle \{f_{n}\}}$ is said to be uniformly convergent on a set ${\displaystyle S}$ if for any ${\displaystyle \epsilon >0}$, there exists an ${\displaystyle N}$ such that when ${\displaystyle a}$ and ${\displaystyle b}$ are both greater than ${\displaystyle N}$, then ${\displaystyle d(f_{a}(x),f_{b}(x))<\epsilon }$ for any ${\displaystyle x\in S}$.

## Closed Sets

### Closure

Definition: The point ${\displaystyle p}$ is called a point of closure of a set ${\displaystyle A}$ if there exists a sequence ${\displaystyle a_{n},\forall n,a_{n}\in A}$, such that ${\displaystyle a_{n}\rightarrow p}$.

In other words, the point ${\displaystyle p}$ is a point of closure of a set ${\displaystyle A}$ if there exists a sequence in ${\displaystyle A}$ that converges on ${\displaystyle p}$. Note that ${\displaystyle p}$ is not necessarily an element of the set ${\displaystyle A}$.

An equivalent definition using balls: The point ${\displaystyle p}$ is called a point of closure of a set ${\displaystyle A}$ if for every open ball ${\displaystyle B}$ containing ${\displaystyle p}$, we have ${\displaystyle B\cap A\neq \emptyset }$. In other words, every open ball containing ${\displaystyle p}$ contains at least one point in ${\displaystyle A}$ that is distinct from ${\displaystyle p}$.
The proof is left as an exercise.

Intuitively, a point of closure is arbitrarily "close" to the set ${\displaystyle A}$. It is so close, that we can find a sequence in the set that converges to any point of closure of the set.

Example: Let A be the segment ${\displaystyle [0,1)\in \mathbb {R} }$, The point ${\displaystyle p=1}$ is not in ${\displaystyle A}$, but it is a point of closure: Let ${\displaystyle a_{n}=1-{\frac {1}{n}}}$. ${\displaystyle a_{n}\in A}$ (${\displaystyle n>0}$, and therefore ${\displaystyle a_{n}=1-{\frac {1}{n}}<1}$) and ${\displaystyle a_{n}\rightarrow 1}$ (that's because ${\displaystyle {\frac {1}{n}}\rightarrow 0}$).

Definition: The closure of a set ${\displaystyle A\subseteq X}$ ${\displaystyle ({X},d)}$, is the set of all points of closure. The closure of a set A is marked ${\displaystyle {\bar {A}}}$ or ${\displaystyle Cl(A)}$.

Note that ${\displaystyle A\subseteq {\bar {A}}}$. a quick proof: For every ${\displaystyle x\in A}$, Let ${\displaystyle (a_{n}=x)\forall n}$.

#### Examples

For the metric space ${\displaystyle \mathbb {R} }$ (the line), and let ${\displaystyle a,b\in \mathbb {R} }$ we have:

• ${\displaystyle Cl([a,b])=[a,b]}$
• ${\displaystyle Cl((a,b])=[a,b]}$
• ${\displaystyle Cl([a,b))=[a,b]}$
• ${\displaystyle Cl((a,b))=[a,b]}$

### Closed set

Definition: A set ${\displaystyle A\subseteq X}$ is closed in ${\displaystyle {X}\,}$ if ${\displaystyle A=Cl(A)}$.
Meaning: A set is closed, if it contains all its point of closure.

An equivalent definition is: A set ${\displaystyle A\subseteq X}$ is closed in ${\displaystyle {X}\,}$ If for every point ${\displaystyle p\in A}$, and for every Ball ${\displaystyle B,p\in B}$, then ${\displaystyle B\cap A\neq \emptyset }$.
The proof of this definition comes directly from the former definition and the definition of convergence.

### Properties

Some basic properties of Cl (For any sets ${\displaystyle A,B}$):

• ${\displaystyle A\subseteq Cl(A)}$
• ${\displaystyle Cl(Cl(A))=Cl(A)}$
• ${\displaystyle Cl(A\cup B)=Cl(A)\cup Cl(B)}$
• ${\displaystyle A}$ is closed iff ${\displaystyle A=Cl(A)}$
• While the above implies that the union of finitely many closed sets is also a closed set, the same does not necessarily hold true for the union of infinitely many closed sets. To see an example on the real line, let ${\displaystyle A_{n}=\{[-1+{\frac {1}{n}},1-{\frac {1}{n}}]\}}$. We see that ${\displaystyle \cup _{i=1}^{\infty }A_{i}=(-1,1)}$ fails to contain its points of closure, ${\displaystyle \pm 1.}$

This union can therefore not be a closed subset of the real numbers.

The proofs are left to the reader as exercises. Hint for number 5: recall that ${\displaystyle Cl(A)=\cap \{A\subseteq S|S{\text{ is closed }}\!\!\}\!\!{\text{ }}}$.

### Open vs Closed

That is, an open set approaches its boundary but does not include it; whereas a closed set includes every point it approaches. These two properties may seem mutually exclusive, but they are not:

• In any metric space ${\displaystyle (X,d)}$, the set ${\displaystyle X}$ is both open and closed.
• In any space with a discrete metric, every set is both open and closed.
• In ${\displaystyle \mathbb {R} }$, under the regular metric, the only sets that are both open and closed are ${\displaystyle \mathbb {R} }$ and ${\displaystyle \emptyset }$. However, some sets are neither open nor closed. For example, a half-open range like ${\displaystyle [0,1)}$ is neither open nor closed. As another example, the set of rationals is not open because an open ball around a rational number contains irrationals; and it is not closed because there are sequences of rational numbers that converge to irrational numbers (such as the various infinite series that converge to ${\displaystyle \pi }$).

#### Complementary set

A Reminder/Definition: Let ${\displaystyle A}$ be a set in the space ${\displaystyle X}$. We define the complement of ${\displaystyle A}$, ${\displaystyle A^{c}}$ to be ${\displaystyle X\setminus A}$.

A Quick example: let ${\displaystyle X=[0,1];A=[0,{\frac {1}{2}}]}$. Then ${\displaystyle A^{c}=({\frac {1}{2}},1]}$.

#### The plot continues...

A very important Proposition: Let ${\displaystyle A}$ be a set in the space ${\displaystyle (X,d)}$. Then, A is open iff ${\displaystyle A^{c}}$ is closed.
Proof: (${\displaystyle \Rightarrow }$) For the first part, we assume that A is an open set. We shall show that ${\displaystyle A^{c}=Cl(A^{c})}$. It is enough to show that ${\displaystyle Cl(A^{c})\subseteq A^{c}}$ because of the properties of closure. Let ${\displaystyle p\in Cl(A^{c})}$ (we will show that ${\displaystyle p\in A^{c}}$).
for every ball ${\displaystyle B,p\in B}$ we have, by definition that (*)${\displaystyle B\cap A^{c}\neq \emptyset }$. If the point is not in ${\displaystyle A^{c}}$ then ${\displaystyle p\in A}$. ${\displaystyle A}$ is open and therefore, there is a ball ${\displaystyle B}$, such that: ${\displaystyle p\in B\subseteq A}$, that means that ${\displaystyle B\cap A^{c}=\emptyset }$, contradicting (*).
(${\displaystyle \Leftarrow }$) On the other hand, Lets a assume that ${\displaystyle A^{c}}$ is closed, and show that ${\displaystyle A}$ is open. Let ${\displaystyle p}$ be a point in ${\displaystyle A}$ (we will show that ${\displaystyle p\in int(A)}$). If ${\displaystyle p}$ is not in ${\displaystyle int(A)}$ then for every ball ${\displaystyle B,p\in B}$ we have that ${\displaystyle B\nsubseteq A}$. That means that ${\displaystyle B\cap A^{c}\neq \emptyset }$. And by definition of closure point ${\displaystyle p}$ is a closure point of ${\displaystyle A^{c}}$ so we can say that ${\displaystyle p\in Cl(A^{c})}$. ${\displaystyle A^{c}}$ is closed, and therefore ${\displaystyle p\in A^{c}=Cl(A^{c})}$ That contradicts the assumption that ${\displaystyle p\in A}$

Note that, as mentioned earlier, a set can still be both open and closed!

### On ${\displaystyle \mathbb {R} }$

The following is an important theorem characterizing open and closed sets on ${\displaystyle \mathbb {R} }$.
Theorem: An open set ${\displaystyle O}$ in ${\displaystyle \mathbb {R} }$ is the union of countably many disjoint open intervals.
Proof: Let ${\displaystyle x\in O}$. Let ${\displaystyle a=\sup\{t|t\notin O,t and let ${\displaystyle b=\inf\{t|t\notin O,t>x\}}$. There exists an open ball ${\displaystyle (x-\epsilon ,x+\epsilon )}$ such that ${\displaystyle (x-\epsilon ,x+\epsilon )\subseteq O}$ because ${\displaystyle O}$ is open. Thus, a≤x-ε and b≥x+ε. Thus, x ∈(a,b). The set O contains all elements of (a,b) since if a number is greater than a, and less than x but is not within O, then a would not be the supremum of {t|t∉O, t<x}. Similarly, if there is a number is less than b and greater than x, but is not within O, then b would not be the infimum of {t|t∉O, t>x}. Thus, O also contains (a,x) and (x,b) and so O contains (a,b). If y≠x and y∈(a,b), then the interval constructed from this element as above would be the same. If y<a, then inf{t|t∉O, t>y} would also be less than a because there is a number between y and a which is not within O. Similarly if y>b, then sup{t|t∉O, t<y} would also be greater than b because there is a number between y and b which is not within O. Thus, all possible open intervals constructed from the above process are disjoint. The union of all such open intervals constructed from an element x is thus O, and so O is a union of disjoint open intervals. Because the rational numbers is dense in R, there is a rational number within each open interval, and since the rational numbers is countable, the open intervals themselves are also countable.

### Examples of closed sets

1. In any metric space, a singleton ${\displaystyle \{x\}}$ is closed. To see why, consider the open set, ${\displaystyle \{x\}^{c}}$. Let ${\displaystyle y\in \{x\}^{c}}$. Then ${\displaystyle y\neq x}$, so ${\displaystyle d(y,x)>0}$. Let ${\displaystyle \epsilon ={\frac {1}{2}}d(y,x)}$. Then ${\displaystyle B_{\epsilon }(y)\subseteq \{x\}^{c}}$. So ${\displaystyle \{x\}^{c}}$ is open, and hence ${\displaystyle \{x\}}$ is closed.
2. In any metric space, every finite set ${\displaystyle T=\{x_{1},x_{2},...,x_{n}\}}$ is closed. To see why, observe that ${\displaystyle T^{c}={\Big [}\bigcup \{x_{i}\}{\Big ]}^{c}=\bigcap \{x_{i}\}^{c}}$ is open, so ${\displaystyle T}$ is closed.
3. Closed intervals [a,b] are closed.
4. Cantor Set Consider the interval [0,1] and call it C0. Let A1 be equal {0, ${\displaystyle {\tfrac {2}{3}}}$} and let dn = ${\displaystyle ({\tfrac {1}{3}})^{n}}$. Let An+1 be equal to the set An∪{x|x=a+2dn, a∈An}. Let Cn be ${\displaystyle \textstyle \bigcup _{a\in A_{n}}}${[a,a+dn]}, which is the finite union of closed sets, and is thus closed. Then the intersection ${\displaystyle \textstyle \bigcap _{i=1}^{\infty }{C_{i}}}$ is called the Cantor set and is closed.

### Exercises

1. Prove that a point x has a sequence of points within X converging to x if and only if all balls containing x contain at least one element within X.
2. In ${\displaystyle \mathbb {R} }$ the only sets that are both open and closed are the empty set, and the entire set. This is not the case when you look at ${\displaystyle \mathbb {Q} \subseteq \mathbb {R} }$. Give an example of a set which is both open and closed in ${\displaystyle \mathbb {Q} }$.
3. Let ${\displaystyle A}$ be a set in the space ${\displaystyle x}$. Prove the following:
1. ${\displaystyle Cl(A)=Int(A^{c})^{c}}$
2. ${\displaystyle Int(A)=Cl(A^{c})^{c}}$

## Continuity

### Definition

Let's recall the idea of continuity of functions. Continuity means, intuitively, that you can draw a function on a paper, without lifting your pen from it. Continuity is important in topology. But let's start in the beginning:

The classic delta-epsilon definition: Let ${\displaystyle (X,d),(Y,e)}$ be spaces. A function ${\displaystyle f:X\rightarrow Y}$ is continuous at a point ${\displaystyle x}$ if for all ${\displaystyle \epsilon _{x}>0}$ there exists a ${\displaystyle \delta _{\epsilon _{x}}>0}$ such that: for all ${\displaystyle x_{1}}$ such that ${\displaystyle d(x,x_{1})<\delta _{\epsilon _{x}}}$, we have that ${\displaystyle e(f(x),f(x_{1}))<\epsilon _{x}}$.

Let's rephrase the definition to use balls: A function ${\displaystyle f:X\rightarrow Y}$ is continuous at a point ${\displaystyle x}$ if for all ${\displaystyle \epsilon _{x}>0}$ there exists ${\displaystyle \delta _{\epsilon _{x}}>0}$ such that the following holds: for every ${\displaystyle x_{1}}$ such that ${\displaystyle x_{1}\in B_{\delta _{\epsilon _{x}}}(x)}$ we have that ${\displaystyle f(x_{1})\in B_{\epsilon _{x}}(f(x))}$. Or more simply: ${\displaystyle f(B_{\delta _{\epsilon _{x}}}(x))\subseteq B_{\epsilon _{x}}(f(x))}$

Looks better already! But we can do more.

Definitions:

• A function is continuous in a set S if it is continuous at every point in S.
• A function is continuous if it is continuous in its entire domain.

Proposition: A function ${\displaystyle f:X\rightarrow Y}$ is continuous, by the definition above ${\displaystyle \Leftrightarrow }$ for every open set ${\displaystyle U}$ in ${\displaystyle Y}$, The inverse image of ${\displaystyle U}$, ${\displaystyle f^{-1}(U)}$, is open in ${\displaystyle X}$. That is, the inverse image of every open set in ${\displaystyle Y}$ is open in ${\displaystyle X}$.
Note that ${\displaystyle f}$ does not have to be surjective or bijective for ${\displaystyle f^{-1}}$ to be well defined. The notation ${\displaystyle f^{-1}}$ simply means ${\displaystyle f^{-1}(U)=\{x\in X:f(x)\in U\}}$.

Proof: First, let's assume that a function ${\displaystyle f}$ is continuous by definition (The ${\displaystyle \Rightarrow }$ direction). We need to show that for every open set ${\displaystyle U}$, ${\displaystyle f^{-1}(U)}$ is open.

Let ${\displaystyle U\subseteq Y}$ be an open set. Let ${\displaystyle x\in f^{-1}(U)}$. ${\displaystyle f(x)}$ is in ${\displaystyle U}$ and because ${\displaystyle U}$ is open, we can find and ${\displaystyle \epsilon _{x}}$, such that ${\displaystyle B_{\epsilon _{x}}(f(x))\subseteq U}$. Because f is continuous, for that ${\displaystyle \epsilon _{x}}$, we can find a ${\displaystyle \delta _{\epsilon _{x}}>0}$ such that ${\displaystyle f(B_{\delta _{\epsilon _{x}}}(x))\subseteq B_{\epsilon _{x}}(f(x))\subseteq U}$. that means that ${\displaystyle B_{\delta _{\epsilon _{x}}}(x)\subseteq f^{-1}(U)}$, and therefore, ${\displaystyle x}$ is an internal point. This is true for every ${\displaystyle x}$ - meaning that all the points in ${\displaystyle f^{-1}(U)}$ are internal points, and by definition, ${\displaystyle f^{-1}(U)}$ is open.

(${\displaystyle \Leftarrow }$)On the other hand, let's assume that for a function ${\displaystyle f}$ for every open set ${\displaystyle U\in Y}$, ${\displaystyle f^{-1}(U)}$ is open in ${\displaystyle X}$. We need to show that ${\displaystyle f}$ is continuous.

For every ${\displaystyle x\in X}$ and for every ${\displaystyle \epsilon _{x}>0}$, The set ${\displaystyle B_{\epsilon _{x}}(f(x))}$ is open in ${\displaystyle Y}$. Therefore the set ${\displaystyle V=f^{-1}(B_{\epsilon _{x}}(f(x)))}$ is open in ${\displaystyle X}$. Note that ${\displaystyle x\in V}$. Because ${\displaystyle V}$ is open, that means that we can find a ${\displaystyle \delta _{\epsilon _{x}}}$ such that ${\displaystyle B_{\delta _{\epsilon _{x}}}(x)\subseteq V}$, and we have that ${\displaystyle f(B_{\delta _{\epsilon _{x}}}(x))\subseteq B_{\epsilon _{x}}(f(x))}$.

The last proof gave us an additional definition we will use for continuity for the rest of this book. The beauty of this new definition is that it only uses open-sets, and there for can be applied to spaces without a metric, so we now have two equivalent definitions which we can use for continuity.

### Examples

• Let ${\displaystyle f}$ be any function from any space ${\displaystyle (X,d)}$, to any space ${\displaystyle (Y,e)}$, were ${\displaystyle d}$ is the discrete metric. Then ${\displaystyle f}$ is continuous. Why? For every open set ${\displaystyle U}$, the set ${\displaystyle f^{-1}(U)}$ is open, because every set is open in a space with the discrete metric.
• Let ${\displaystyle f:\mathbb {R} \rightarrow \mathbb {R} ;f(x)=x}$ The identity function. ${\displaystyle f}$ is continuous: The source of every open set is itself, and therefore open.

### Exercise

1. Prove that a function ${\displaystyle f:X\rightarrow Y}$ is continuous ${\displaystyle \Leftrightarrow }$ for every closed set ${\displaystyle U}$ in ${\displaystyle Y}$, The inverse image of ${\displaystyle U}$, ${\displaystyle f^{-1}(U)}$, is closed in ${\displaystyle X}$.

### Uniform Continuity

In a metric space X, function from X to a metric space Y is uniformly continuous if for all ${\displaystyle \epsilon }$, there exists a ${\displaystyle \delta }$ such that for all ${\displaystyle x_{1},x_{2}\in X}$, ${\displaystyle d(x_{1},x_{2})<\delta }$ implies that ${\displaystyle d(f(x_{1}),f(x_{2}))<\epsilon }$.

## Isometry

An isometry is a surjective mapping ${\displaystyle f:X\rightarrow Y}$, where ${\displaystyle (X,\delta )}$ and ${\displaystyle (Y,\rho )}$ are metric spaces and for all ${\displaystyle a,b\in X}$, ${\displaystyle \delta (a,b)=\rho (f(a),f(b))}$.

In this case, ${\displaystyle (X,\delta )}$ and ${\displaystyle (Y,\rho )}$ are said to be isometric.

Note that the injectivity of ${\displaystyle f}$ follows from the property of preserving distance:

${\displaystyle f(a)=f(b)}$
${\displaystyle \implies \rho (f(a),f(b))=0}$
${\displaystyle \implies \delta (a,b)=0}$
${\displaystyle \implies a=b}$

So an isometry is necessarily bijective.

## Exercises

1. Show that a set is a metric open set iff it is a (possibly infinite) union of open balls.
2. Show that the discrete metric is in fact a metric.

 Topology ← Basic Concepts Set Theory Metric Spaces Topological Spaces →