Metric Spaces
Metric Spaces
Metric Spaces
LiTH-MAT-EX–2022/20–SE
Credits: 16 hp
Level: G2
Supervisor: Anders Björn,
Department of Mathematics, Linköping University
Examiner: Jana Björn,
Department of Mathematics, Linköping University
Linköping: September 2022
Abstract
In this thesis we start off by ensuring that the reader is up to speed when it
comes to some well known definitions and theorems from real analysis. We
then introduce the reader to metric spaces and provide them with some exam-
ples such as the real numbers with the Euclidean distance, and compact sets
with the Hausdorff distance. Then, we go on to define important concepts such
as inner points, limit points, open sets, boundary and much more. We also
show, whenever we can, how these concepts are connected. With these tools
in place we move on to explain how limits and continuity are defined in metric
spaces as well as providing the reader with several examples. We then intro-
duce the reader to the concepts of compactness and uniform convergence, for
which we show some interesting results such as how uniform convergence and
the supremum norm are related. We finish off by covering curves and connect-
edness (including pathconnectedness) in metric spaces, before we briefly touch
on topological spaces as to give the reader a hint of what further mathematics
studies might hold.
Keywords:
Analysis, compact, convergence, limit, metric space, sequence, set, topol-
ogy
I detta examensarbete börjar vi med att försäkra oss om att läsaren har de
förkunskaper som behövs för att kunna ta del av arbetet. Detta görs genom att
påminna läsaren om viktiga definitioner och satser från reell analys. Därefter
introducerar vi läsaren till metriska rum och ger en mängd olika exempel på
dessa som läsaren förhoppningsvis redan stött på. Detta inkluderar bland an-
nat de reella talen med euklidiskt avstånd och slutna och begränsade mängder
med Hausdorff-avstånd. När vi väl förklarat distanskonceptet introducerar vi
inre punkter, hopningspunkter, öppna mängder, randpunkter och mycket mer.
Vi visar dessutom, närhelst vi kan, hur dessa koncept hänger samman. När alla
dessa grundbegrepp är etablerade kan vi fortsätta med att förklara gränsvärden
och kontinuitet i metriska rum. Vi ger även läsaren flera exempel på detta. I
arbetets andra hälft tar vi upp kompakthet och likformig konvergens, för vil-
ka vi presenterar en del intressanta resultat, såsom hur likformig konvergens
och supremumnormen är relaterade. Vi avslutar examensarbetet genom att gå
igenom kurvor och sammanhängande mängder (inklusive bågvis sammanhäng-
ande mängder) i metriska rum, innan vi kort tar upp topologiska rum för att ge
läsaren en föraning om vad vidare matematikstudier kan innehålla.
Nyckelord:
Analys, följd, gränsvärde, kompakt, konvergens, metriskt rum, mängd,
topologi
We would first and foremost like to extend our thanks to Anders Björn for pro-
viding us with the material needed for this thesis as well as being our supervisor.
We wrote this thesis during the summer holiday when most people are on va-
cation, but Anders took the time to see us even during this inconvenient period
and for this we are immensely grateful. Had it not been for this non-traditional
writing period, this thesis would probably have never been written.
Secondly, we would like to thank Jana Björn for taking on the role of ex-
aminer and allotting her time at the end of the summer to read our work. We
had a hope of presenting the thesis in September and she provided us with clear
guidelines and easy to understand feedback so that we could finish on time.
Beyond these two, we of course want to thank the entire department of math-
ematics at Linköping University for providing us with a first-rate mathematics
educations and for inspiring us to pursue a mathematics degree even though we
are enrolled in an engineering program.
We would also like to thank our families and friends for helping us with
proofreading and commenting on the pedagogy of this thesis.
Symbol Explanation
N The set of all natural numbers, {0, 1, 2, ...}.
Z The set of all integers, {0, ±1, ±2, ...}.
Q The set of all rational numbers.
R The set of all real numbers.
Br (a) The open ball of radius r centered at a.
BrX (a) The open ball of radius r centered at a ∈ X.
Ac The complement of A, X \ A.
f (A) The image of A under f , {f (x) : x ∈ A}.
∂A The boundary of A.
⊂ Subset, not necessarily proper.
X ×Y The set of points (x, y) such that x ∈ X and y ∈ Y .
A The closure of A.
A◦ The interior of A.
The study of metric spaces began in the early 20th century when Maurice
Fréchet1 published his PhD dissertation Sur quelques points du calcul fonction-
nel in 1906. In it, he introduced the idea of a space where not much else but
the notion of distance existed. However, Fréchet did not call it a metric space.
The name is due to Felix Hausdorff2 , one of the founding fathers of modern
topology.
In the beginning of the 20th century, functional analysis was still a novelty
and an axiomatic foundation for mathematics had not yet been properly estab-
lished. In the world of mathematics at that time, many people were studying
spaces of functions and since many of them did not communicate with each
other, they ended up with different notions of convergence in different spaces.
The concept of convergence is strongly linked to the concept of distance, since
we usually tie convergence to the notion of approaching certain points within a
space. To make research simpler and more unified, Fréchet came up with the
idea of axiomatizing the notion of distance so that a single definition of conver-
gence could be used in most of the spaces at the time. Proofs based on these
axioms would also hold in all of these spaces, which led to faster development
as not every space had to be treated individually.
In this thesis, we will introduce you to metric spaces and some of the theory
surrounding them. The purpose of this text is to be used as course material
in TATA34 Real analysis, honours course at Linköping University. You will
learn about how we define different distance functions, open sets, compactness
and much more. At the end of the thesis, we will also quickly introduce you
to topological spaces as to give you a hint of what future mathematics studies
might hold.
1 Background 5
4 Compactness 29
5 Uniform Convergence 35
7 Topological Spaces 45
7.1 Definition of a Topological Space . . . . . . . . . . . . . . . . . . 45
7.2 Unique and Non-unique Limits . . . . . . . . . . . . . . . . . . . 48
7.3 Lp -Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.4 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.5 Further studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A English–Swedish Glossary 55
B Swedish–English Glossary 57
Chapter 1
Background
Before we introduce you to metric spaces, we want to remind you of a few defini-
tions and theorems for R and Rn that are relevant in understanding this topic.
Most of these should be recognizable from prior single variable and multivari-
able analysis courses, but some results from slightly more advanced analysis will
also be presented.
In the theory of metric spaces, the convergence of sequences will play an im-
portant role and thus we remind ourselves of the definition of limits of sequences
as well as the definition of Cauchy1 sequences.
Definition 1.1. A sequence (xn ) in R converges to the limit L as n → ∞,
written
xn → L or lim xn = L,
n→∞
if for every ε > 0, there exists some N ∈ N such that |xn − L| < ε for all n ≥ N .
This can be expressed with quantifiers as
if for every ε > 0, there exists some δ > 0 such that |f (x) − L| < ε whenever
0 < |x − a| < δ. Expressed with quantifiers,
Remark 1.7. All the facts mentioned above also hold in Rn , and Definitions 1.5
and 1.6 also hold for f : Rn → Rm , where n, m ≥ 1 if | · | is taken to be the
Euclidean4 norm (see Example 2.2).
In your multivariable analysis course, you hopefully came across the notion
of compactness of sets. We remind ourselves of the definition in Rn .
From the small number of constraints of the definition, we can tell that metric
spaces are quite general spaces. In fact, most spaces you have encountered are
metric spaces.
Example 2.2. Below, we give some examples of metric spaces you have en-
countered before but perhaps not recognized as metric spaces.
(
x − y, if x ≥ y,
• X = (R, d) with d(x, y) = |x − y| =
y − x, if x < y.
Example 2.3. There are many other metric spaces that you might not have
encountered yet which are important in other fields, both within and outside
pure mathematics. The following are some examples of such metric spaces.
• The set of all binary numbers of length n with the Hamming1 distance
n
X
d(x, y) = |xk − yk |,
k=1
where x = (x1 ... xn ) and y = (y1 ... yn ), with xk , yk ∈ {0, 1}. This is intu-
itively understood as the smallest number of bit-flips required to change
x into y. This distance function is also referred to as the ℓ1 -distance, see
Example 2.4.
• The set of all compact K ⊂ Rn (see Definition 1.8) with the Hausdorff
distance d(K, L) = inf{ε > 0 : K ⊂ Lε and L ⊂ Kε }, where
[
Aε = {y ∈ Rn : |x − y| < ε}.
x∈A
2|z1 − z2 |
d(z1 , z2 ) = p .
(1 + |z1 |2 )(1 + |z2 |2 )
z1 z2
• The set C([a, b]) of all real-valued continuous functions on the interval
[a, b], with the L1 -norm,
Z b
d(f, g) = |f (x) − g(x)| dx.
a
If you have taken a course in Fourier3 analysis you may recognize the L1 -
norm and the supremum norm as these are norms on some of the most commonly
studied spaces, L1 ([a, b]) and L∞ ([a, b]) respectively. We will discuss these fur-
ther in Chapter 7.
Of course there is not only one distance function per set that qualifies it as
a metric space. In fact, for all sets with at least two points, there is an infinite
number of possible distance functions.
Example 2.4. The following are some examples of different distance functions
for Rn . Here x = (x1 , ... , xn ) and y = (y1 , ... , yn ).
P 1/p
n
• ℓp -distance: d(x, y) = k=1 |xk − yk |
p
for any 1 ≤ p < ∞.
Remark 2.5. The ℓ1 -distance function is often called the taxicab distance. It is
intuitive to see why when regarding the case of R2 if you are familiar with how
taxicabs have to drive in New York City for example. Note that the shortest
path is not unique.
The ℓ2 -distance is the Euclidean distance in Example 2.2. It is also the only
ℓ -distance which has a corresponding
p
p inner product, being the standard dot
product. Meaning that dℓ2 (0, x) = ⟨x|x⟩.
The discrete distance is the simplest distance function, and can be defined
on any set X.
4 4
3 3
2 2
1 1
1 2 3 4 1 2 3 4
2
√
Taxicab distance, 6 units. ℓ -distance, 18 ≈ 4.24 units.
Now that we have seen that we can construct open sets by taking a union
of open sets, it is natural to consider intersections of open sets.
TN
Theorem 2.11. If G1 , ... , GN are open, then j=1 Gj is open.
TN
Proof. If x ∈ j=1 Gj , then x ∈ Gj for every j = 1, ... , N . Thus there are
ε1 , ... , εN > 0 such that Bεj (x) ⊂ Gj . If we let ε = min{ε1 , ... , εN } > 0 then
TN
Bε (x) ⊂ j=1 Gj . Therefore the intersection is open.
is an intersection of open sets but is in fact not open. Note that this is because
Theorem 2.11 is only valid for finite intersections.
Since not all sets are open and only consist of inner points, we might want
to be able to single out and refer to the inner points of a set in a handy way.
Definition 2.13. The interior of A is the set of all inner points of A. It is
denoted A◦ .
Theorem 2.14. Let A ⊂ X where X is a metric space. Then
(a) A◦ is open.
(b) A◦ is the largest open subset contained in A.
Proof. (a) If x ∈ A◦ then there exists an rx > 0 such that Brx (x) ⊂ A. Since
Brx (x) is open, it only contains inner points of A, thus Brx (x) ⊂ A◦ . Hence A◦
is open per Definition 2.8.
(b) Fix a set A and let G ⊂ A be an open set. Let a ∈ G be arbitrary. Since
G is open, a is an inner point and there exists some ε > 0 such that Bε (a) ⊂ G.
But since G ⊂ A, then Bε (a) ⊂ A and thus a ∈ A◦ , showing that G ⊂ A◦ .
Since A◦ is always open, A◦ is the largest open subset contained in A.
SN
(b) If F1 , ... , FN are closed, then j=1 Fj is closed.
Remark 2.18. We commonly use F for closed sets and G for open ones. This is
a tradition that most likely came from French where the word for closed, fermé,
begins with an f. G was simply the next letter in the alphabet. This thesis will
use this convention where applicable. When we do not know if a set is open or
closed, or it is not important for the statement, we will use some other letter.
Example 2.19. Let A = [0, 1] ∪ {2}. Its limit points are all the points in [0, 1]
and its isolated point is 2. The set contains all of its limit points and is therefore
closed.
Example 2.20. Let A = [0, 1). Its limit points are all the points in [0, 1] and it
has no isolated points. Since the limit point 1 is not in the set, it is not closed.
Example 2.21. Let A = { n1 : n = 1, 2, ...}. Then A consists only of isolated
points. The only limit point to A is 0, which is not in the set, and therefore A
is not closed. However, A is not open either since none of its points are inner
points. This is fairly common and most sets do not fall into any of these two
categories. Sets that fall into both categories are sometimes called clopen, more
on them later on.
14 Chapter 2. Introduction to Metric Spaces
Note that A ⊂ A. This is clear by the definition. From this point, it is not
all that hard to realize that
A⊂B =⇒ A ⊂ B. (2.1)
The closure of a set A is always closed, and is the smallest closed set con-
taining A. It is also easy to realize that A is closed if and only if it is equal to
its closure, and thus the closure of an arbitrary closure A is equal to itself.
(b) A = A.
Proof. (a) If A = A then A must contain all of its limit points, per definition,
and is therefore closed. Conversely, if we know that A is closed and therefore
contains all of its limit points, it must necessarily be equal to A.
(b) By Definition 2.22, we conclude that A ⊂ A since
A ⊂ A,
i.e. A = A.
2.4. Complement and De Morgan’s Laws 15
Ac = X \ A = {b ∈ X : b ∈
/ A}.
Notice how applying the complement twice on a set will result in the original
set, i.e.
(Ac )c = A. (2.2)
Note also that we can express the interior in terms of the closure of the comple-
ment by
A◦ = X \ Ac .
To be able to prove Theorem 2.17 we need to introduce you to De Morgan’s4
laws. You may have encountered them in a previous discrete mathematics course
or perhaps in a course on logic gate networks.
This means that x is not contained in every set Aλ so there must be at least
one λ0 ∈ Λ for which x is in Acλ0 . Therefore,
[
x ∈ Acλ0 ⊂ Acλ .
λ∈Λ
Conversely, let
[
y∈ Acλ .
λ∈Λ
So \ c
y∈ Aλ ,
λ∈Λ
\ \ c c [ c c [ c
Acλ = Acλ = Acλ = Aλ .
λ∈Λ λ∈Λ λ∈Λ λ∈Λ
2.5. Connection Between Open and Closed Sets 17
Proof. (a) First we prove that F being closed implies that F c is open: Let
x ∈ F c . Since F is closed, x is not a limit point to F . This in turn means there
exists an ε > 0 such that Bε (x) ∩ F = ∅. Therefore Bε (x) ⊂ F c , and hence F c
is open.
Next we prove the converse; that F c being open implies that F is closed:
Let x ∈ F c . Since F c is open, there exists Bε (x) ⊂ F c for some ε > 0. This
means that x is not a limit point to F which in turn means that all limit points
belong to F , i.e. F is closed.
(b) We prove that G is open if and only if Gc is closed by utilizing (a): We
know that Gc is closed if and only if (Gc )c is open. But we also know (Gc )c = G
by (2.2). Thus G is open if and only Gc is closed.
We have now developed all the tools needed to prove Theorem 2.17.
orem 2.10. Therefore ( Tλ∈Λ Fλ )c is also open. By applying Theorem 2.26 (a)
again we conclude that λ∈Λ Fλ is closed.
(b) Using De Morgan’s laws again, we can write
N
[ c N
\
Fj = Fjc .
j=1 j=1
SN
A finite intersection of open sets is open by Theorem 2.11 and therefore ( j=1 Fj )c
SN
is also open. By using Theorem 2.26 (a) we conclude that j=1 Fj is closed.
18 Chapter 2. Introduction to Metric Spaces
E
Y X
−1 0 1 2 3
E
Y X
−1 0 1 2 3
E
Y X
Proof. We only prove the theorem in the open case, but the proof for the closed
case is very similar. First we prove that if there exists an open set A ⊂ X such
that E = A ∩ Y , then E is open in Y :
20 Chapter 2. Introduction to Metric Spaces
As Y ⊂ X it follows that
BεY (a) ⊂ E,
which is open in X, since the union of open balls is also open by Theorem 2.10.
Furthermore, we realize that
[
A∩Y = BrYx (x) ⊂ E,
x∈E
and that since the set BrYx (x) must contain at least all points in E,
S
x∈E
[
E⊂ BrYx (x) = A ∩ Y.
x∈E
Thus E = A ∩ Y .
Chapter 3
3.1 Sequences
We start by looking at sequences in metric spaces. A sequence, much like a set,
is a collection of elements. But unlike a set, the order matters and the same
element can appear more than once. Sequences can be finite or infinite, in which
case we can talk about the limit of the sequence when we go arbitrarily far along
the sequence. Here we will only consider infinite sequences (xn ) where n runs
through 1, 2, 3, ... . Definitions 1.1 and 1.2 easily generalize to metric spaces, as
we only need to replace |x − y| with d(x, y).
Proof. We begin by proving that x being a limit point implies that there exists
a sequence (xn ) ⊂ A \ {x} such that xn → x: For all j, there is an xj such that
xn ∈ Bε (x) ∩ (A \ {x})
and thus
Bε (x) ∩ (A \ {x}) ̸= ∅.
Definition 3.3. (an ) ⊂ X is a Cauchy sequence (or (an ) is Cauchy for short)
if for every ε > 0, there exists some N ∈ N such that d(an , am ) < ε for all
n, m ≥ N . Expressed with quantifiers, (an ) is a Cauchy sequence if
This type of sequence is interesting because the property it has is closely tied
to convergence, and entails other important properties of the sequence. First
we look at the relation between Cauchy sequences and convergent sequences.
Next we want to examine the relation between Cauchy sequences and bounded
sequences. Recall that as a sequence is a set (if we ignore the ordering), Defini-
tion 2.33 of bounded sets applies here as well.
Proof. Since (an ) is Cauchy, for every ε > 0, there exists N ∈ N such that
d(an , am ) < ε for all n, m ≥ N . Now let ε = 1, that is d(an , am ) < 1 if
n, m ≥ N . Then
d(an , aN ) < 1
if n > N . Thus all an , n ≥ N , are contained within the open ball B1 (aN ),
so (an )∞
n=N is bounded. The sequence (an )n=1 is finite and thus is bounded.
N
3.2 Completeness
From Theorem 3.4 we know that all convergent sequences in a metric space
are Cauchy sequences. But what about the converse statement; are all Cauchy
sequences convergent?
In the case of R with the standard distance function the answer is yes,
by Cauchy’s convergence principle (Theorem 1.3). However, using the same
metric on Q we can easily see that the sequence (xn ) = (3, 3.1, 3.14, 3.141, ...)
is a Cauchy sequence, and that it approaches π, which is not in Q. Hence the
sequence is Cauchy but not convergent in Q.
So the converse statement is not generally true. But the property of all
Cauchy sequences being convergent is so important that metric spaces which
have it are given their own category.
f∞ (x) = 12 , if x = 12 ,
1, if 12 < x ≤ 1,
which is not continuous on [0, 1] and therefore not in C([0, 1]). Moreover there
is no continuous function f such that f = f∞ almost everywhere. Hence the
sequence does not converge and (X, d) = (C([0, 1]), L1 ) is not a complete space.
However, using the supremum norm, C([0, 1]) gives rise to a complete metric
space.
1
1
fn (x) 2 f∞ (x)
2
1− 1 1+ 1 1
2 n 2 n 2
Theorem 3.7. C([a, b]) with the supremum norm is a complete metric space.
We do not have the tools necessary to prove this yet so we will return to it
later and prove it in Chapter 5.
Next we present a theorem relating completeness and perfect sets to cardi-
nality.
The proof for Theorem 3.8 is very tricky, even for simple special cases like
X = R, and is outside the scope of this thesis.
functions approaching a value for instance. You are likely familiar with the defi-
nition of limits for real functions (see Definition 1.5), so we start by generalizing
that definition to metric spaces.
Definition 3.9. Let f : X → Y be a mapping, where X and Y are metric spaces
with metrics dX and dY respectively. Assume that a is not isolated in X. Then
f (x) tends to L as x tends to a if for every ε > 0 there exists δ > 0 such that
dY (f (x), L) < ε whenever 0 < dX (x, a) < δ. We write
As with limits of sequences also here the limit L is unique if it exists. That is
provided that a is not isolated. On the other hand, if a is isolated the condition
0 < dX (x, a) < δ is void if δ > 0 is small enough and thus any L satisfies the
definition. Thus we do not define limits as x → a if a is isolated.
Example √ We begin with a familiar example in R. We want to show that
√ 3.10.
limx→a x = a when a > 0. We use the standard distance function in R and
we let ε > 0,
√ √ |x − a| |x − a|
| x − a| = √ √ ≤ √ .
x+ a a
√
If |x − a| < ε a then
|x − a|
√ < ε,
a
√
which is what we want. We set δ = ε a so that the inequality holds.
Next we generalize the definition of continuity to functions on general metric
spaces. This definition, much like the definition of limits we have just seen, will
be very recognizable if you are familiar with the definition in the case of real-
valued functions with the standard metric (see Definition 1.6).
Definition 3.11. f : X → Y is continuous at a ∈ X if for every ε > 0, there ex-
ists some δ > 0 such that dY (f (x), f (a)) < ε whenever dX (x, a) < δ. Expressed
with quantifiers, f is continuous at a ∈ X if
is continuous on (1, 2) ∪ (2, 3] ∪ {4}. We see this since all points between 1 and
3 are limit points and 4 is isolated but f is not defined at 1 and 2.
y
4
3
2
1
x
1 2 3 4
Remark 3.15. Theorem 3.14 gives an alternative to Definition 3.11 for defining
continuous function. This is also the standard way of doing it in more general
topological spaces (see Chapter 7). However a pointwise definition (as in Defi-
nition 3.11) is also essential. Note as well that we can substitute open sets with
closed sets in Theorem 3.14, and the statement remains true.
The following two examples illustrate why one has to use preimages in The-
orem 3.14.
Example 3.16. Let f (x) = x2 . Then f ((−1, 1)) = [0, 1). The set [0, 1) is not
open while (−1, 1) obviously is. However, f −1 ((0, 1)) = (−1, 0) ∪ (0, 1). Here,
both (−1, 0) ∪ (0, 1) and (0, 1) are open.
Example 3.17. Let f (x) = 1/(1 + x2 ). Then the image of the closed set [0, ∞)
under f is (0, 1], which is not closed. However the preimage of the closed set
[ 21 , 1] is [−1, 1], which is also closed.
Chapter 4
Compactness
In real analysis, you have likely noticed the importance of compact sets. For
instance, functions defined on compact sets have more predictable properties
than ones defined on other types of sets. The definition of compact sets in Rn
(Definition 1.8) does not carry over to arbitrary metric spaces, and it is simply
a special case of the “real” definition of compactness. For the general definition
we first need a building block that utilizes open sets.
Definition 4.1. An open cover of A is a family of open sets Gλ such that
[
A⊂ Gλ .
λ
Definition 4.2. A set K is compact if every open cover {Gλ } of K has a finite
subcover Gλ1 ∪ ... ∪ GλN that also covers K.
Although this definition is seemingly very different from Definition 1.8, it
is equivalent in the case of Rn . Moreover, we can see that proving that a set
is not compact is easier than proving that it is compact. All we need when
proving non-compactness is a single example of an open cover that lacks a finite
subcover, while to prove compactness, we need to show that every open cover
has a finite subcover.
Example 4.3. The set A = [1, ∞) has an open cover such that
∞
[
A⊂ Gn , where Gn = (n − 1, n + 1).
n=1
This open cover has no finite subcover that contains A, therefore A is not
compact. Note that A is closed but not bounded.
G1 G3
A
0 1 2 3 4 5 6 7
G2
Example 4.4. The set A = (0, 1] has an open cover such that
∞
[ 1
A⊂ ,2 .
n=1
n
This time, A is bounded but not closed. However, there is still no finite
Smsubcover.
For any m, the points in the interval (0, m
1
] will not be covered by n=1 n1 , 2 .
G3
G2
A G1
Example 4.6. The sequence of the even positive integers and the sequence of
prime numbers are subsequences of the natural numbers N.
The proof for this theorem is very tedious and is outside the scope of this
thesis. The interested reader can find the proof on pp. 149–150 in [3] under
Theorem 9.14.
For the special case of X = Rn in the previous theorem, we get an additional
equivalent property, as previously mentioned. This is formulated in a theorem
that is very important in real analysis.
Theorem 4.9. (The Heine1 –Borel2 –Lebesgue3 theorem)
For a set K ⊂ Rn , the following are equivalent:
• K is compact,
• K is sequentially compact,
• K is closed and bounded.
The proof for this theorem will also be omitted but can be found in the
same place as the proof for the previous theorem, pp. 149–150 in [3] under
Theorem 9.14.
Remark 4.10. In [1], Abbott refers to sequential compactness simply as com-
pactness. Since he is only concerned with R, these are equivalent but it is still
important to note that they are not the same. Both Definition 4.2 and 4.7 apply
in more general spaces than metric spaces, namely topological spaces, in which
they are not equivalent. More on this in Chapter 7.
Although a set being closed and bounded does not imply compactness in
general metric spaces, compactness does imply closedness and boundedness.
Theorem 4.11. Let X be a metric space. If K ⊂ X is compact then K is
closed.
the set E = {e1 , e2 , ...} ⊂ ℓ2 , where e1 = (1, 0, ...), e2 = (0, 1, ...), etc. Note that
∥en ∥2 = 1 for all n, so E is bounded. E has no limit points, neither in E nor
outside of E, hence E is also closed. However, the sequence (en )∞ n=1 ⊂ E has no
convergent subsequence so E is not sequentially compact. So by Theorem 4.8,
E is not compact either. This can also be seen directly, take for instance the
open cover
∞
[
B1 (en ) ⊃ E,
n=1
Proof. Let {Gλ } be an open cover of f (K). Then {f −1 (Gλ )} is an open cover
of K by Theorem 3.14 as f is continuous. Since K is compact, there exists
some finite subcover {f −1 (Gj )}N
j=1 of K which means that {Gj }j=1 is a finite
N
subcover of f (K).
The next theorem will be very familiar from single variable analysis. How-
ever, the formulation of the theorem you have seen previously will most likely
have only regarded functions of a real variable. Here we will give the theorem
in its most general form.
Theorem 4.17. (Extreme value theorem)
If a function f : K → R is continuous and K is compact, then there exist
x1 , x2 ∈ K such that f (x1 ) ≤ f (x) ≤ f (x2 ) for all x ∈ K.
Example 4.18. Let f (x) = 1/x with x ∈ (0, 1). The set (0, 1) is not compact,
and f lacks both maximum and minimum.
Example 4.19. Let (
x, if 0 ≤ x < 1,
f (x) =
0, if x = 1.
f is defined on a compact set but is not continuous, and lacks a maximum.
Theorem 4.20. E is compact in Y ⊂ X if and only if E is compact in X,
where X and Y have the same metric.
Uniform Convergence
Note that the difference between pointwise and uniform convergence is seen
in the positioning of the quantifiers in (5.1) and (5.2).
The function sequence (fn ) converging to f uniformly means that, by (5.2),
for every ε > 0 there exists N such that
Example 5.4. The same function as in Example 5.3 but defined on Aδ = [δ, ∞),
δ > 0. If n ≥ 1/δ, then fn is decreasing on Aδ and thus
but f is not continuous. We see that ∥fn − f ∥∞ = 1 for all n and therefore
fn ̸→ f uniformly.
f1
fn
Since fn → f uniformly, for every ε > 0 there exists some N ∈ N such that
|fn (x) − f (x)| < 3ε for all n ≥ N and all x ∈ A. Thus, the first and the third
terms in (5.3) are bounded from above by 3ε for all n ≥ N .
Since fn is continuous, for every ε > 0 there exists some δ > 0 such that
|fn (x) − fn (a)| < 3ε whenever d(x, a) < δ. Thus, the second term in (5.3) is also
bounded from above by 3ε when d(x, a) < δ.
If we choose n ≥ N and then δ > 0, we see that |f (x) − f (a)| < ε whenever
d(x, a) < δ, and so f is continuous at a.
Remark 5.7. If fn → f pointwise and f and all fn are continuous, then
lim lim fn (x) = lim lim fn (x)
n→∞ x→a x→a n→∞
Since we did not use the fact that fn ∈ C([a, b]) in the proof of Theorem 3.7,
we can make an even stronger statement.
Theorem 5.9. (Cauchy’s criterion)
The sequence (fn ) converges uniformly if and only if (fn ) is Cauchy with respect
to the supremum norm.
Example 5.10. Let fn (x) = sin(2n πx). Then (fn ) is bounded in C([0, 1]). Fix
m > n ≥ 1 and let x = 2m+1
3
. Then
3π
fm (x) = sin(2m πx) = sin = −1.
2
But 0 < 2n πx ≤ 3π
4 so fn (x) = sin(2n πx) > 0. Hence
i.e. (fn ) is not Cauchy and therefore not convergent, by Theorem 3.4. Moreover,
it also follows from (5.5) that (fn ) has no convergent subsequence.
over all partitions a = x0 < x1 < ... < xn = b of [a, b]. We say that γ is
rectifiable if ℓ(γ) < ∞.
A rectifiable curve can be parameterized by arc length, denoted ds, so that
ℓ(γ|[s,t] ) = t − s
for all a ≤ s < t ≤ b. Then for all s < t,
d(γ(t), γ(s)) ≤ ℓ(γ|[s,t] ) = t − s.
y
4
γ(1)
3
2
1
x
−4 −3 −2 −1 1 2 3 4
−1
γ(0)
−2
−3
−4
We can get a lower bound on the length of the curve by drawing and mea-
suring the length of straight lines between some of the points it crosses through.
We will use the ℓ2 -distance for R2 .
y
4
γ(1)
3
2
1
x
−4 −3 −2 −1 1 2 3 4
−1
γ(0)
−2
−3
−4
Definition 6.4. A curve integral, or path integral, with respect to arc length on
the arc length parameterized curve γ : [a, b] → X is defined by,
Z Z b
f ds := f (γ(t)) dt.
γ a
γ(1) = y
γ(0) = x
If you have taken a course in complex analysis you may recognize this type
of connectedness. Pathconnected sets are very important in complex analysis
as curves and curve integrals are essential to the subject.
6.2 Connectedness
We have presented one way of describing connectedness in metric spaces. Now
we present another way to express this notion of connectedness, this time using
open sets as opposed to curves.
Next we regard the case of subsets of R. The result presented in the next
theorem will be very intuitive if we think about connectedness in a geometric
sense.
A B
0 1
A theorem you have most likely seen before in your first year single variable
analysis course is the intermediate value theorem. We can now prove it using
connectedness.
Proof. The set f ([a, b]) is connected by Theorems 6.9 and 6.11, and so it is an
interval I according to Theorem 6.9. As f (a), f (b) ∈ I, we have also m ∈ I and
thus there exists some x ∈ [a, b] such that f (x) = m.
Now that we have defined connectedness and present the necessary theory,
we can return to pathconnectedness to formulate two theorems relating these
two concepts. We look at their relation both in general metric spaces and in
the case of Rn .
Example 6.14. The following is an example of a set that is connected but not
pathconnected. Let E = {(x, sin x1 ) : 0 < x ≤ 1}. Since E is pathconnected
(this is quite clear as it is a curve) it is also connected by Theorem 6.13. Thus
E = E ∪ I is connected by Theorem 6.10, where I = {0} × [−1, 1]. However,
there are no curves between E and I and thus E is not pathconnected.
44 Chapter 6. Curves and Connectedness
Topological Spaces
Example 7.2. Let X = {a, b, c} and τ = {∅, X, {a}, {b}, {b, c}}. Is (X, τ ) a
topological space?
First we conclude that both ∅ and the whole space X, are open. Next, we
can examine different intersections. Both {a} ∩ {b} and {a} ∩ {b, c} are equal
to the empty set, which is open, and {b} ∩ {b, c} = {b} is also open. Lastly, we
examine have the unions. The union {a} ∪ {b} = {a, b} is not open, and hence
(X, τ ) is not a topological space.
Remark 7.3. There are a few topologies that qualify a space as a topological
space but which are not very interesting. The first one of these is the discrete
topology which is the set of all subsets. Another one is the trivial topology which
only contains ∅ and the set itself.
We continue by defining the convergence of sequences in arbitrary topological
spaces. This definition is quite different from the one given for metric spaces in
Definition 3.1 and thus gives rise to new properties which we will examine in
more detail later on. First however, we need a new tool.
Definition 7.4. A neighborhood V ⊂ of a point a ∈ X, where X is a topological
space, is a subset of X that contains an open set G such that,
a ∈ G ⊂ V.
Definition 7.5. Let (X, τ ) be a topological space. If (an ) is a sequence in X and
L ∈ X, then an converges to L, written an → L, if for every open neighborhood
G of L, there exists an N ∈ N such that an ∈ G for all n ≥ N .
Next, we define pointwise continuity of functions in arbitrary topological
spaces.
Definition 7.6. Let (X, τ ) and (X ′ , τ ′ ) be topological spaces. A function
f : X → X ′ is continuous at a ∈ X if for every open neighborhood G′ of
f (a) there exists some open neighborhood G of a such that f (x) ∈ G′ whenever
x ∈ G. Expressed with quantifiers, f is continuous at a ∈ X if
∀ G′ ∈ τ ′ such that f (a) ∈ G′ ∃ G ∈ τ such that a ∈ G,
and
x ∈ G =⇒ f (x) ∈ G′ .
Remark 7.7. This definition is very similar, and completely equivalent, to Re-
mark 3.12 if X is a metric space, as every open neighborhood must contain
an open ball around the point. We can take the set G′ to be the open ball
BεY (f (a)) as in the remark. Continuity implies the existence of the ball BδX (a)
as in Remark 3.12. This ball in turn qualifies as the open neighborhood G.
Similarly, Definition 7.5 is equivalent to Definition 3.1 if X is a metric space.
7.1. Definition of a Topological Space 47
Just like we studied the interior and closure of sets in metric spaces, we can
talk about them in topological spaces. However, instead of using open balls, we
only use open and closed sets together with intersections and unions.
As previously stated, open sets in a topological space are the sets that are
in the topology. Closed sets are defined by Theorem 2.26, i.e. a set is closed if
its complement is open. This means that in all topological spaces, the whole
space and the empty set are both open and closed at the same time, they are
so-called clopen sets.
• The interior of Y , written Y ◦ , is the union of all open sets that are
contained in Y .
We also revisit the definition of the boundary of a set but now in arbitrary
topological spaces.
Intuitively, we can see this as ensuring that all points are sufficiently far
away from each other.
7.3 Lp -Spaces
For 1 ≤ p < ∞, consider
Z 1
L̃p ([0, 1]) = f: |f |p dx < ∞ ,
0
where f is measurable (see p. 127 in [2]) and defined on [0, 1], together with the
distance function Z 1 1/p
d˜p (f, g) = |f − g|p dx , (7.1)
0
where f, g ∈ L̃ ([0, 1]). This does not qualify as a metric space since there are
p
many different functions that have the distance 0 between each other. As an
example, consider the characteristic function at the point 1/2,
(
1, if x = 1/2,
δ1/2 =
0, if x ̸= 1/2.
The distance between δ1/2 and the constant function f (x) = 0 will be zero even
though they are not identical.
Instead we call this type of space a semi-metric space. It is, simply put, a
metric space where the constraint (i) in Definition 2.1 is relaxed as we no longer
require the distance between two distinct points to be non-zero. We still require
that d(x, x) = 0 for every x ∈ X.
This semi-metric space does qualify as a topological space where the topology
is induced by the semi-metric (7.1). A set G ⊂ L̃p ([0, 1]) is open if for every
f ∈ G, there exists some ε > 0 such that g ∈ G whenever d˜p (f, g) < ε.
In order to create a metric space out of this set and distance function, we
have to introduce equivalence classes.
Definition 7.17. A function f is equivalent to another function g, written
˜ g) = 0.
f ∼ g, if d(f,
50 Chapter 7. Topological Spaces
[f ] = {g : g ∼ f }.
˜
Intuitively, we group together all functions that have zero d-distance to f ,
and by transitivity to each other.
Remark 7.20. If d˜p (f, g) = 0 and fn → f then fn → g. Thus we do not have
unique limits in L̃p ([0, 1]).
With this equivalence class we can adjust L̃p ([0, 1]) slightly so that it becomes
a proper metric space. The set
qualifies as a metric space since all functions that previously had zero distance
between them are now one single element; an equivalence class. By Theo-
rems 7.15 and 7.16, limits in Lp ([0, 1]) are unique.
Remark 7.21. Note that in Example 7.13 we cannot create “natural” equiva-
lence classes (so that an → a if and only if [an ] → [a]) to get unique limits.
7.4 Compactness
Since the compactness of a set K ⊂ X is immediately dependent on which sets
are open in X, we take particular interest in compactness when studying topo-
logical spaces. We begin with a definition which is identical to the corresponding
Definition 4.2 for metric spaces.
Definition 7.22. A topological space (X, τ ) is compact if every open cover
{Gλ } of X has a finite subcover Gλ1 ∪ ... ∪ GλN that also covers X.
7.5. Further studies 51
[3] Gerard Buskes and Arnoud van Rooij. Topological Spaces. Springer, New
York, 1st edition, 1997. 31, 51
[4] Lynn Arthur Steen and J. Arthur Seebach. Counterexamples in Topology.
Springer, New York, 2nd edition, 1978. 51
English–Swedish Glossary
English Swedish
Ball Klot
Boundary point Randpunkt
Bounded Begränsad
Closed Sluten
Closure Slutet hölje
Complete Fullständig
Connected Sammanhängande
Dense Tät
Disjoint Disjunkt
Interior Inre
Limit point Hopningspunkt
Open cover Öppen övertäckning
Pathconnected Bågvis sammanhängande
Sequence Följd
Uniform convergence Likformig konvergens
Swedish–English Glossary
Swedish English
Begränsad Bounded
Bågvis sammanhängande Pathconnected
Disjunkt Disjoint
Fullständig Complete
Följd Sequence
Hopningspunkt Limit point
Inre Interior
Klot Ball
Likformig konvergens Uniform convergence
Randpunkt Boundary point
Sammanhängande Connected
Sluten Closed
Slutet hölje Closure
Tät Dense
Öppen övertäckning Open cover
Copyright
The publishers will keep this document online on the Internet – or its possible
replacement – from the date of publication barring exceptional circumstances.
The online availability of the document implies permanent permission for
anyone to read, to download, or to print out single copies for his/her own use
and to use it unchanged for non-commercial research and educational purpose.
Subsequent transfers of copyright cannot revoke this permission. All other uses
of the document are conditional upon the consent of the copyright owner. The
publisher has taken technical and administrative measures to assure authentic-
ity, security and accessibility.
According to intellectual property law the author has the right to be men-
tioned when his/her work is accessed as described above and to be protected
against infringement.
For additional information about the Linköping University Electronic Press
and its procedures for publication and for assurance of document integrity,
please refer to its www home page: http://www.ep.liu.se/.
Upphovsrätt
Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –
från publiceringsdatum under förutsättning att inga extraordinära omständig-
heter uppstår.
Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda
ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för
ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid
en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av
dokumentet kräver upphovsmannens medgivande. För att garantera äktheten,
säkerheten och tillgängligheten finns lösningar av teknisk och administrativ art.
Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman
i den omfattning som god sed kräver vid användning av dokumentet på ovan
beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan
form eller i sådant sammanhang som är kränkande för upphovsmannens litterära
eller konstnärliga anseende eller egenart.
För ytterligare information om Linköping University Electronic Press se för-
lagets hemsida http://www.ep.liu.se/.