Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

Lecture Notes (English)

Uploaded by

omar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Lecture Notes (English)

Uploaded by

omar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Mathematics for

Computer Scientists I
Prof. Dr. Anja Randecker
Dr. Tobias Mai
General Comments
These lecture notes were prepared and typed by Dr. Tobias Mai, following the
German manuscripts of Prof. Dr. Anja Randecker and Prof. Dr. Christian Bender.

Both versions rely in particular on a number of excellent textbooks written on


the subjects that are covered in this lecture, such as the following:

• K. Erciyes: Discrete Mathematics and Graph Theory, Springer


• O. Forster: Analysis 1, Springer Spektrum
• P. Hartmann: Mathematik für Informatiker, Springer Vieweg
• J. M. Howie: Real Analysis, Springer
• K. Königsberger: Analysis 1, Springer
• W. Struckmann, D. Wätjen: Mathematik für Informatiker, Springer Vieweg

There is no doubt that the lecture notes – despite all care – are still containing
several typos. Therefore, we are grateful for hints, which we ask you to send by
mail to the following address:

mai@math.uni-sb.de

The layout used for the lecture notes was designed by Friedrich Günther.

2
Contents
1 Basics: Vocabulary and Methods 5
1.1 Propositional Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Proof methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.1 Direct and indirect proof . . . . . . . . . . . . . . . . . . . 9
1.3.2 Proof by contradiction . . . . . . . . . . . . . . . . . . . . . 10
1.3.3 Examples for direct and indirect proofs and proofs by con-
tradiction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.4 Mathematical induction . . . . . . . . . . . . . . . . . . . . 11
1.4 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2 The real numbers 22


2.1 Natural numbers, integers, and rational numbers . . . . . . . . . . 22
2.2 Ordered fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Bounded sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4 Topology on R — Part I . . . . . . . . . . . . . . . . . . . . . . . . 30
2.5 Comparison of cardinalities . . . . . . . . . . . . . . . . . . . . . . 33

3 Sequences and series 38


3.1 Convergent sequences . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2 Convergence criteria . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3 Recursively defined sequences . . . . . . . . . . . . . . . . . . . . . 44
3.4 The Bolzano-Weierstraß theorem . . . . . . . . . . . . . . . . . . . 47
3.5 Limes inferior and limes superior . . . . . . . . . . . . . . . . . . . 50
3.6 Cauchy sequences and Cauchy criterion . . . . . . . . . . . . . . . 54
3.7 Improper convergence and complexity classes . . . . . . . . . . . . 56
3.8 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.9 Exponential function . . . . . . . . . . . . . . . . . . . . . . . . . . 64

4 Functions 67
4.1 Topology on R — Part II . . . . . . . . . . . . . . . . . . . . . . . 67
4.2 Limits of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.3 Continuous functions . . . . . . . . . . . . . . . . . . . . . . . . . . 75

3
1 Basics: Vocabulary and Methods
1.1 Propositional Logic
A statement is a sentence in a human or artificial language to which we can assign
uniquely (now or later) one of the truth values true (T ) or false (F ).

Example 1.1: (i) “2 is an odd number.” is a statement. Its truth value is “true”.
(ii) “Spinach tastes great.” is not a statement.
(iii) “Mensa in Saarbrücken.” is not a statement.
(iv) “There is life outside earth.” is a statement. We do not yet know its truth
value.

Out of given statements, say A and B, we can build further statements by using
logical connectives:

¬A negation (“not A”)


A∧B conjunction (“A and B”)
A∨B disjunction (“A or B”, which is not the same as “Either A or B”)
A⇒B implication (“A implies B”)
A⇔B equivalence (“A is equivalent to B”)

Their truth values are determined by those of A and B according to the following
truth tables:

A B A∧B A∨B A⇒B A⇔B


A ¬A T T T T T T
T F T F F T F F
F T F T F T T F
F F F F T T

Using truth tables, we can give proofs and deduce consequences like the following.

Example 1.2 (Truth values of logical connectives): (i) If the premise A is wrong,
then A ⇒ B is always true, independent of the truth value of B.
(ii) The statement “A ∨ ¬A” is always true, independent of the truth value of A.
(This is also known as the “Law of excluded middle”.)
(iii) Contraposition: The statement

(A ⇒ B) ⇔ (¬B) ⇒ (¬A)

is always true, independent of the truth values of A and B.

5
1 Basics: Vocabulary and Methods

In order to see that, we compile the following truth table:



A B A⇒B ¬A ¬B (¬B) ⇒ (¬A) (A ⇒ B) ⇔ (¬B) ⇒ (¬A)
T T T F F T T
T F F F T F T
F T T T F T T
F F T T T T T
The last column confirms our assertion since the statement under question is
true for all assignments of truth values to A and B.
Later, the concept of contraposition will be used to give indirect proofs
and proofs by contradiction.
Note that the contraposition is not the same as the statement obtained by
reversing the implication arrow.

Now, we turn our attention to the inner structure of statements. A predicate


is a “template statement”, which depends on one or more variables, serving as
placeholders, and produces a statement when concrete values are assigned to the
variables.
Example 1.3 (Predicates): Consider the predicate

Prime(x) : “x is a prime number.”

Then Prime(3) is the following statement: “3 is a prime number.” Likewise,


Prime(4) is the following statement: “4 is a prime number.” Thus, Prime(3) is
true, whereas Prime(4) is false.

Quantifiers turn predicates into statements:


∀ : “for all” (universal quantifier)
∃ : “there exists” (existential quantifier)
For instance, if P (•) is any predicate, then

∀ x : P (x)

is the statement “For all x, P (x) holds true.” and ∃ x : P (x) is the statement
“There exists x, such that P (x) holds true.”.
For the purpose of mathematics, we need to specify the values which the variables
may attain. To this end, we need some basics from set theory.

1.2 Sets
It is surprisingly challenging to define sets in a consistent way. We will follow
the so-called “naive set theory” is based on the following definition due to Georg
Cantor (1845-1918):

6
1.2 Sets

A set X is a gathering together into a whole of definite, distinct objects


x of our perception or our thought — which are called elements of the
set. (Georg Cantor, 1895)

We use the following notation:

(i) If x is an element of X, then we write x ∈ X.


(ii) Finite sets can be described by listing all its elements as X = {x1 , x2 , . . . , xn }.
Note that neither the order of the elements nor possible repetitions play
any role. For example,

{1, 4, 5}, {4, 1, 5}, and {1, 4, 5, 1, 1, 5}

describe the same set.


(iii) By ∅, we denote the empty set, i. e., the set without elements.

If P (•) is a predicate, then we may define the set of all elements for which this
predicate is true; we write {x : P (x)}.

Definition 1.4 (Subsets, equality of sets): Let X and Y be sets.

• Y is called a subset of X if every element of Y is also an element of X, i. e.,

∀ y ∈ Y : y ∈ X.

In this case, we write Y ⊆ X of X ⊇ Y and call X a superset of Y .


• We say that X and Y are equal if X ⊆ Y and Y ⊆ X. We write in this case
X =Y.

If X and Y are sets, then the statement “Y is not a subset of X” can be expressed
as 
¬ ∀y ∈ Y : y ∈ X .
The latter statement is logically equivalent to

∃y ∈ Y : y ∈
/ X.

Here, we used the second of the following general rules: If P (•) is a predicate,
then
 
¬ ∃ x : P (x) ⇔ ∀ x : ¬P (x) and ¬ ∀ x : P (x) ⇔ ∃ x : ¬P (x).

Definition 1.5 (Power set): Let X be a set. The power set P(X) of X is the set of
all subsets of X, i. e.,

∀Y : (Y ∈ P(X)) ⇔ (Y ⊆ X).

7
1 Basics: Vocabulary and Methods

Example 1.6: Elements, subsets, power set Let X = {1, 2, 3}. Then 2 ∈ X and
{2} ⊆ X. The difference is that 2 is an element of X, whereas {2} is a subset of X.
We have
P(X) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, X}.

Definition 1.7 (Cardinality): The cardinality |X| of a set X is the number of its
elements.

Example 1.8 (Cardinality of the power set): If X is a finite set with cardinality n,
then P(X) has cardinality 2n .

Definition 1.9 (Intersection, union, complement): Let X and Y be two sets. We


call1
(i) X ∩ Y := {x : (x ∈ X) ∧ (x ∈ Y )} the intersection of X and Y ,
(ii) X ∪ Y := {x : (x ∈ X) ∨ (x ∈ Y )} the union of X and Y ,
(iii) X \ Y := {x : (x ∈ X) ∧ (x ∈
/ Y )} the relative complement of Y in X,
We call X and Y disjoint if X ∩ Y = ∅.
If only subsets of a given set Ω are considered, we write X ∁ := Ω \ X for every
subset X ⊂ Ω and call it the (absolute) complement of X.

Example 1.10 (Intersection, union, complement): Let X = {1, 2, 3}, Y = {1, 3, 5, 9},
and Z = {1, 3}. Then

X ∪ Y = {1, 2, 3, 5, 9}, X ∩ Y = {1, 3} = Z, and Z \ X = {} = ∅.

If we consider Z as a subset of Y , then Z ∁ = {5, 9}.

Set operations can be visualized by using Venn diagrams:

X Y X Y X Y

X ∩Y X ∪Y X \Y

It is possible to define the union and the intersection for more than two sets.
Definition 1.11 (Union and intersection of families of sets): If I is a non-empty set
(possibly with infinitely many elements) and Xi a set for each i ∈ I, then
[ \
Xi := {x : ( ∃ i ∈ I : x ∈ Xi )} and Xi := {x : ( ∀ i ∈ I : x ∈ Xi )}.
i∈I i∈I
1 The symbol “:=” should be read as “is defined as”.

8
1.3 Proof methods

Definition 1.12 (Cartesian product): Let X1 , . . . , Xn be finitely many sets.


(i) An ordered n-tuple (x1 , . . . , xn ) means a list of elements xi ∈ Xi for i =
1, . . . , n (i. e., the order of elements matters) with the property

(x1 , . . . , xn ) = (x′1 , . . . , x′n ) ⇔ ∀ i ∈ {1, . . . , n} : xi = x′i .

(ii) The set of all ordered n-tuples over X1 , . . . , Xn will be denoted by X1 × · · · ×


Xn , i. e.,

X1 × · · · × Xn = (x1 , . . . , xn ) : ( ∀ i ∈ {1, . . . , n} : xi ∈ Xi ) ,

is called the Cartesian product of X1 , . . . , Xn .


In the particular case X := X1 = · · · = Xn , we write X n instead of X × · · · × X .
| {z }
n-times

Example 1.13 (Cartesian product): Let X = {1, 2} and Y = {a, b, c}. Then
• X × Y = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)},
• Y × X = {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)},
• X 2 = X × X = {(1, 1), (1, 2), (2, 1), (2, 2)}.

1.3 Proof methods


Mathematical theories are built out of theorems. These are of the form A ⇒ B,
where A are the assumptions of the theorem and B its consequences.
To prove a theorem, we have to show that this implication is true. For that
purpose, we use axioms and other statements which are already known to be true;
this deduction is called a proof.
By an axiom, we mean a fundamental theorem in a mathematical theory which
is, within that theory, supposed to be true without further justification.

1.3.1 Direct and indirect proof


For a direct proof of A ⇒ B, we decompose A ⇒ B into a chain of (simpler)
implications

A ⇒ C1 , C1 ⇒ C2 , ..., Cn−1 ⇒ Cn , Cn ⇒ B

for a finite number of “intermediate” statements C1 , . . . , Cn . The validity of this


approach is based on the logical formula

(A ⇒ C1 ) ∧ (C1 ⇒ C2 ) ∧ · · · ∧ (Cn ⇒ B) ⇒ (A ⇒ B),

which is always true.

9
1 Basics: Vocabulary and Methods

For an indirect proof of A ⇒ B, we proceed as follows: Instead of proving


A ⇒ B, we show that ¬B ⇒ ¬A; this is justified by contraposition.
Sometimes, we have to combine different methods.
For example, if we want to prove an equivalence A ⇔ B, then we can show
separately that A ⇒ B and B ⇒ A.
Often statements are formulated using predicates, for example

∀ n ∈ N : A(n) ⇔ B(n).

Then, it can be helpful to distinguish cases; in the example, we could treat for
instance the cases of even and odd n ∈ N separately. It is important that the proof
covers all cases!

1.3.2 Proof by contradiction


We want to prove “A ⇒ B”; to this end,

• we suppose that A ∧ (¬B) is true,


• show that this assumption leads to a contradiction, and
• deduce from

(A ⇒ B) ⇔ ¬ A ∧ (¬B) ,

which can easily be checked with the help of a truth table, that “A ⇒ B”
must be true (see assignments).

1.3.3 Examples for direct and indirect proofs and proofs by


contradiction
We are going to prove the following statement in three different ways:

For each natural number n ∈ N, we have: If n + 1 is even, then n is


odd.

This is a simple but very instructive example because the statement can be used
to illustrate all of the previously mentioned proof methods.
For the proof, we use the fact that a natural number m ∈ N is

• even if and only if there exists k ∈ N such that m = 2k;


• odd if and only if there exists k ∈ N such that m = 2k − 1.

Proof (direct): Let n ∈ N be such that n + 1 is even. Then there exists k ∈ N such
that n + 1 = 2k. It follows that n = 2k − 1, i. e., n is odd. □

10
1.3 Proof methods

Proof (indirect): Let n ∈ N be given. We have to prove that

n + 1 even ⇒ n odd.

By contraposition, this is equivalent to

n even ⇒ n + 1 odd.

To verify the latter, let n ∈ N be such that n is even. Then there exists k ∈ N such
that n = 2k. It follows that

n + 1 = 2k + 1 = 2(k + 1) − 1 = 2k ′ − 1 with k ′ := k + 1 ∈ N,

i. e., n + 1 is odd. □

Proof (by contradiction): Let n ∈ N be given. We assume that n + 1 is even but


n is not odd, hence even. Then there are k, k ′ ∈ N such that

n + 1 = 2k and n = 2k ′ .

It follows that
2k = n + 1 = 2k ′ + 1.
The latter equation, however, has no solutions k, k ′ in N. (In other words, there is
no natural number which is both even and odd.) This is a contradiction. Hence, if
n + 1 is even, then n cannot be even at the same time; thus, it has to be odd, as
we wished to show. □

1.3.4 Mathematical induction


Definition 1.14 (Inductive set): A set M ⊆ R is called inductive if
• 1 ∈ M;
• ∀x ∈ M : x + 1 ∈ M.

T 1.15 (Natural numbers): Consider M := {M : M is an inductive set}.


Definition
We call M ∈M M the set of natural numbers and denote it by N.

According to this definition, the set of natural numbers is the “smallest” inductive
set; see Problem 1, Homework Sheet 2. We have N = {1, 2, 3, . . . } and the
cardinality of N is infinite.
The natural numbers and their definition via inductive sets leads us to the proof
method of mathematical induction. It can be used to prove statements for natural
numbers.
Theorem 1.16 (Mathematical induction): Let P (•) be a predicate such that P (n)
is a statement for each n ∈ N. Moreover, we suppose that

11
1 Basics: Vocabulary and Methods

(i) P (1) (base case)

(ii) ∀ n ∈ N : P (n) ⇒ P (n + 1) (induction step)


are true. Then P (n) is true for every n ∈ N.
Proof: Consider the set
M := {n ∈ N : P (n) is true}.
By (i), we have that 1 ∈ M , and by (ii), we have that
∀ n ∈ N : n ∈ M ⇒ n + 1 ∈ M.
This means that M is a subset of N which is still inductive. By minimality of N,
we have N ⊆ M ; thus M = N. This means that P (n) is true for all n ∈ N. □
Remark: Of course, Theorem 1.16 remains true if we replace N by N0 := N ∪ {0}
and P (1) by P (0) in the initial case.
Notation: For n ∈ N an real numbers a1 , . . . , an , we write
n
X n
Y
ak := a1 + a2 + . . . + an and ak := a1 · a2 · . . . · an ;
k=1 k=1

Moreover, in the case of “empty” sums and products, we put


0
X 0
Y
ak := 0 and ak := 1.
k=1 k=1

In practice (see the proof of Proposition 1.17, for instance), the following recursions
for n ∈ N turn out to be extremely useful:
n
X  n−1
X  n
Y  n−1
Y 
ak = ak + an and ak = ak · an .
k=1 k=1 k=1 k=1

Proposition 1.17 (Example mathematical induction): For n ∈ N, we have


n
X n(n + 1)
k= .
2
k=1

Proof: For n ∈ N, we consider the statement


n
X n(n + 1)
P (n) : k= .
2
k=1

We use the method of mathematical induction to prove that P (n) is true for each
n ∈ N.

12
1.4 Relations

base case n = 1: P (1) is true since

1
X 1 · (1 + 1)
k=1= .
2
k=1

induction step n → n + 1: We suppose that P (n) is true for any fixed n ∈ N


(induction hypothesis); then, we check that

n+1
X n
X
k= k + (n + 1)
k=1 k=1
n(n + 1)
= + (n + 1) (by P (n))
n 2 
= + 1 (n + 1)
2
1
= (n + 2)(n + 1)
2 
(n + 1) (n + 1) + 1
= ,
2

i. e., P (n + 1) is true.

By the principle of mathematical induction (Theorem 1.16), the statement P (n)


is true for all n ∈ N. □

1.4 Relations
Definition 1.18 (Relation): Let X be a set. A (binary) relation on X is a subset
R ⊆ X × X. For (x, y) ∈ R, we say “x is in relation with y” and write xRy.

Example 1.19 (Relations): Let X = {2, 4, 6, 8}. On X, we may consider, for


instance, the following relations:

• R1 = {(2, 2), (2, 4), (2, 6), (2, 8), (4, 4), (4, 6), (4, 8), (6, 6), (6, 8), (8, 8)}, i. e.,
xR1 y means “x is less or equal y”.
• R2 = {(2, 2), (2, 4), (2, 6), (2, 8), (4, 4), (4, 8), (6, 6), (8, 8)}, i. e., xR2 y means
“x divides y”.

There are several ways to visualize relations. For instance, we may visualize R1 as
a graph

13
1 Basics: Vocabulary and Methods

2 4 6 8

and R2 by a diagram of arrows:

2 2

4 4

6 6

8 8

Definition 1.20 (Properties of relations): Let X ̸= ∅. A relation R on X is said to


be

(i) reflexive if ∀ x ∈ X : xRx;


(ii) symmetric if ∀ x, y ∈ X : xRy ⇒ yRx;
(iii) antisymmetric if ∀ x, y ∈ X : (xRy) ∧ (yRx) ⇒ x = y;
(iv) transitive if ∀ x, y, z ∈ X : (xRy) ∧ (yRz) ⇒ (xRz);
(v) total if ∀ x, y ∈ X : (xRy) ∨ (yRx).

Definition 1.21 (Partial and total orders): A relation is said to be a partial order
if it is reflexive, antisymmetric, and transitive. If it is moreover total, then it is
called a total order.

Example 1.22 (Relations and their properties): (i) In Example 1.19, we have
that R1 is a total order.
(ii) In Example 1.19, we have that R2 is a partial but not a total order.

14
1.4 Relations

(iii) Let X be a set. Then “⊆” defines a partial order on P(X).

Proof: We check the properties of a partial order:


• ∀ A ∈ P(X) : A ⊆ A; (reflexive)
• ∀ A, B ∈ P(X) : (A ⊆ B) ∧ (B ⊆ A) ⇒ A = B. (antisymmetric)
• ∀ A, B, C ∈ P(X) : (A ⊆ B) ∧ (B ⊆ C) ⇒ A ⊆ C; (transitive)
By definition, the relation “⊆” is a partial order on P(X). □

Note: If X contains at least two distinct elements, say x1 and x2 , then “⊆”
is not a total order since neither {x1 } ⊆ {x2 } nor {x2 } ⊆ {x1 }.
(iv) The relation ≤ on the real numbers R is a total order. We do not give a
proof here, but we will come back to this later.

Definition 1.23 (Equivalence relation): A relation is said to be an equivalence re-


lation if it is reflexive, symmetric, and transitive.
In this case, one often writes x ∼ y instead of xRy.

Example 1.24 (Equivalence relations): (i) Let X be the set of all inhabitants of
Germany. Then

x∼y ⇔ x lives in the same municipal area as y

defines an equivalence relation on X.


(ii) For each set X, the relation X × X is an equivalence relation.

Definition 1.25 (Equivalence classes): Let ∼ be an equivalence relation on X and


let x ∈ X. We call
[x] := {y ∈ X : x ∼ y}
the equivalence class of x. Elements of [x] are said to be equivalent to x and are
called representatives of [x]. The set of all equivalence classes

X⧸ := {[x] : x ∈ X}

is called the quotient set of X by ∼.

Definition 1.26 (Partition): Let X be a set. A partition P of X is a set of subsets


of X such that
[
• P = X;
P ∈P

• for all P1 , P2 ∈ P, we have P1 ∩ P2 = ∅ or P1 = P2 .

A partition can very easily be represented graphically; for a partition P =


{X1 , X2 , X3 } of X, for instance, we have:

15
1 Basics: Vocabulary and Methods

X2
X1 X3

Example 1.27: The sets of even and odd natural numbers form a partition of N.

Theorem 1.28 (Equivalence classes and partitions): Let X be a set and let ∼ be
an equivalence relation on X. Then the equivalence classes of ∼ form a partition
of X.
Conversely, each partition of X defines an equivalence relation on X.

Proof: To begin with, we give a direct proof for the first statement: Suppose that
∼ is an equivalence relation on X. We want to show that X⧸∼ is a partition of X.
S
• By reflexivity of ∼, we have for all y ∈ X that y ∈ [y] ⊆ [x]∈X⧸ [x];
S ∼
thus X ⊆ [x]∈X⧸ [x], and as the reversed inclusion holds by definition, we
S ∼
conclude X = x∈X⧸ [x].

• Take [x], [y] ∈ X⧸∼. Assume that [x] ∩ [y] ̸= ∅. Choose z ∈ [x] ∩ [y]. Let
a ∈ [x]. We have
– a ∈ [x] ⇒ x ∼ a and
– z ∈ [x] ⇒ x ∼ z ⇒ z ∼ x (by symmetry of ∼),
and thus, by transitivity of ∼, z ∼ a. Further, we have
– z ∈ [y] ⇒ y ∼ z,
and thus, by transitivity of ∼, y ∼ a, which means a ∈ [y]. This proves
[x] ⊆ [y]; by exchanging x and y, we also get [y] ⊆ [x] and thus [x] = [y].

For the second part, we provide a construction. Let P be a partition of X. We


define a relation ∼ on X by

x∼y ⇔ ∃ P ∈ P : x, y ∈ P.

Then ∼ is an equivalence relation; indeed:


∼ is reflexive: For all x ∈ X, there exists P ∈ P such that x ∈ P ; hence x ∼ x.
∼ is symmetric: Let x, y ∈ X with x ∼ y be given. Then there exists P ∈ P such
that x, y ∈ P . Thus, in particular, y, x ∈ P and hence y ∼ x.
∼ is transitive: Let x, y, z ∈ X with x ∼ y and y ∼ z be given. Then there
are P1 , P2 ∈ P such that x, y ∈ P1 and y, z ∈ P2 . In particular, we have
y ∈ P1 ∩ P2 , which means that P1 ∩ P2 = ̸ ∅; consequently, by definition of
partitions, we have P1 = P2 . Hence, x, z ∈ P1 , so that x ∼ z. □

16
1.5 Functions

Example 1.29 (Congruence classes): Fix m ∈ N. Then

a∼b ⇔ m divides a − b

defines an equivalence relation on the set Z of integers.


Indeed: Reflexivity and symmetry follow immediately from the definition. Tran-
sitivity can be shown as follows: Let a, b, c ∈ Z with a ∼ b and b ∼ c be given.
Then there are k, l ∈ Z such that

m·k =a−b and m · l = b − c.

It follows that
a − c = (a − b) + (b − c) = m · (k + l)
and hence a ∼ c.
The equivalence classes with respect to ∼ are called congruence classes modulo
m; instead of a ∼ b, we write

a ≡ b mod m.

Congruence classes are interesting because on can define for them an addition
and a multiplication which do not have the same properties as addition and
multiplication on the real numbers. For example, we have 4 · 5 ≡ 0 mod 10, but
neither 4 ≡ 0 mod 10 nor 5 ≡ 0 mod 10.

1.5 Functions
Definition 1.30 (Function): A function (or a map) f from a set X to a set Y is a
subset of X × Y with the property that for each x ∈ X there is exactly one element
y ∈ Y such that (x, y) ∈ f .
We write f (x) = y if (x, y) ∈ f . For the function f , we use the notation

f : X → Y, x 7→ f (x).

Definition 1.31 (Domain, codomain, image, preimage): Let f : X → Y be a func-


tion.

(i) We call X the domain of f .


(ii) The set Y is called the codomain of f .
(iii) For a subset A ⊆ X, we call f (A) := {f (x) : x ∈ A} the image of A under f .
In the particular case A = X, we call f (X) the image of f .
(iv) For a subset B ⊆ Y , we call f −1 (B) := {x ∈ X : f (x) ∈ B} the preimage of
B under f .

17
1 Basics: Vocabulary and Methods

Example 1.32 (Functions): (i) f : R → R, x 7→ x2 is a function with domain


and codomain R. The image of R under f is R≥0 := {x ∈ R : x ≥ 0}. The
preimage of {1} is {−1, 1}.
(ii) Let X = {a, b, c, d} and Y = {1, 2, 3, 4}. The function

f : X→Y
a 7→ 1, b 7→ 1, c 7→ 4, d 7→ 2

can be represented by the following diagram:

X Y

a 1

b 2

c 3

d 4

We have
f ({a, b}) = {1}, f ({a, c}) = {1, 4}

and
f −1 ({3}) = ∅, f −1 ({2}) = {d}.

Definition 1.33: (i) Let f : X → Y be a function and A ⊆ X. Then the function

f|A : A → Y, a 7→ f (a)

is called the restriction of f to A.


(ii) The set
{(x, f (x)) : x ∈ X}

is called the graph of f .

Example: The following picture shows (a piece of) the graph of the function
f : R → R, x 7→ x2 .

18
1.5 Functions

−2 −1 1 2

Definition 1.34: A function f : X → Y is called


• injective if
∀ x1 , x2 ∈ X : f (x1 ) = f (x2 ) ⇒ x1 = x2 ;
• surjective if
∀ y ∈ Y ∃ x ∈ X : f (x) = y;
• bijective if f is both injective and surjective.

Example 1.35: (i) The function f : R → R, x 7→ x2 is


• not injective, since f (2) = 4 = f (−2);
• not surjective, since f −1 ({−2}) = ∅.
(ii) The restriction f|R≥0 : R≥0 → R, x 7→ x2 is
• injective;
• not surjective.
(iii) The function g : R → R≥0 , x 7→ x2 is
• not injective (see above);
• surjective (this will be proved later).
(iv) The restriction g|R≥0 : R≥0 → R≥0 , x 7→ x2 is bijective.

Definition 1.36 (Inverse function): Suppose that f : X → Y is a bijective function.


Then
f −1 : Y → X, y 7→ x with f (x) = y
is called the inverse function of f .
(Equivalently, if the function f : X → Y is bijective, then the inverse function
f −1 : Y → X can be defined by f −1 := {(y, x) : (x, y) ∈ f } ⊆ Y × X; recall that
f ⊆ X × Y .)

19
1 Basics: Vocabulary and Methods

Caution: The symbol f −1 is used for the inverse function and the preimage,
even though these are different concepts. The inverse function maps elements to
elements, while the preimage of a set is again a set.
Definition 1.37: Let f : X → Y and g : Y → Z be functions. We call

g ◦ f : X → Z, x 7→ g(f (x))

the composition of f and g; we read g ◦ f as “g after f ” or “g composed with f ”.

Caution: For functions f, g, h : X → X, we have

(f ◦ g) ◦ h = f ◦ (g ◦ h)

but f ◦ g = g ◦ f does not hold in general.


A simple but very important function on a set X is the so-called identity function
which is defined by
idX : X → X, x 7→ x.
Proposition 1.38: Let f : X → Y be a function. Then the following statements
hold true:
(i) The function f is injective if and only if there exists a function g : Y → X
such that g ◦ f = idX .
(ii) The function f is surjective if and only if there exists a function g : Y → X
such that f ◦ g = idY .
(iii) The function f is bijective if and only if there exists a function g : Y → X
such that f ◦ g = idY and g ◦ f = idX ; in this case, g is the inverse function
of f , i. e., g = f −1 .

Proof:

(i) “⇒”: Suppose that f is injective. Choose any x0 ∈ X and define


(
x, if there exists x ∈ X such that f (x) = y
g : Y → X, y 7→ .
x0 , if y ∈
/ f (X)

Due to the injectivity of f , there is for each y ∈ Y at most one x ∈ X


such that f (x) = y; thus, g is well-defined. By definition, g(f (x)) = x
for all x ∈ X, i. e., g ◦ f = idX .
“⇐”: Suppose that g : Y → X satisfies g ◦ f = idX . If x1 , x2 ∈ X are such
that f (x1 ) = f (x2 ), then

x1 = idX (x1 ) = (g ◦ f )(x1 ) = g(f (x1 ))


= g(f (x2 )) = (g ◦ f )(x2 ) = idX (x2 ) = x2 ;

thus, f is injective.

20
1.5 Functions

(ii) “⇒”: Suppose that f is surjective. For every y ∈ Y , we choose2 some


x ∈ f −1 ({y}) and put g(y) := x. Then g : Y → X is a function
satisfying (f ◦ g)(y) = y = idY (y) for each y ∈ Y , i. e., f ◦ g = idY .
“⇐”: Suppose that g : Y → X satisfies f ◦ g = idY . Take any y ∈ Y ; then
y = idY (y) = (f ◦ g)(y) = f (g(y)), i. e., y ∈ f (X). Thus f is surjective.
(iii) “⇒”: If f is bijective, then its inverse function f −1 has the required proper-
ties.
“⇐”: If g has the required properties, then f is injective by (i) and surjective
by (ii), hence bijective. □

2 Here, we are using the so-called axiom of choice of set theory.

21
2 The real numbers
2.1 Natural numbers, integers, and rational numbers
In Section 1.3.4, we have introduced the natural numbers as the intersection of
all inductive sets. This allows us to define1 on natural numbers the operation “+”
(addition). But what actually is meant by an “operation”? The following definition
gives the precise terminology.
Definition 2.1 (Operation): An operation • on a set X is a function • : X ×X → X.

Notation: For a, b ∈ X, we usually write a • b instead of •(a, b).


The concept of operations as introduced in Definition 2.1 is extremely general.
For instance, ∪ and ∩ define operations on the power set P(X) of a fixed set X.
Likewise, composition ◦ defines an operation on the set of all functions f : X → X
for a fixed set X. Later, we will explore this great flexibility much further, but for
the moment, we stick to more familiar operations. Let us return to the introductory
example.
Addition + is an operation on the set N of natural numbers. This particular
operation, however, has a rather poor structure. In practice, it would be desirable
to be able to “undo” this operation. But on the natural numbers, this is not always
possible. For instance: while the equation x + 1 = 4 has a solution x ∈ N, namely
x = 3, the equation x + 4 = 1 has no solution x ∈ N. Therefore, we feel compelled
to introduce integers. For that purpose, we complement N as follows:
• We introduce 0 as the identity element with respect to + (meaning that
n + 0 = n and 0 + n = n for all n ∈ N);
• we impose the condition that each natural number n has an inverse element,
which we denote by −n (that is, we have n + (−n) = 0 and (−n) + n = 0 for
all n ∈ N).
We call
Z := N ∪ {0} ∪ {−n : n ∈ N}
the set of integers.
On both the natural numbers and the integers, we can define the operation
“·” (multiplication). Like for the addition on natural numbers, we observe that
we cannot always undo multiplication. Therefore, we introduce next the rational
numbers. Conceptually, this is done in the same way as for the step from N to Z.
All we have to do is to “extend” Z by the elements that we want to have, namely
fractions n1 for n ∈ N. In order to ensure that rational numbers can be multiplied,
we actually have to work with general fractions nz for z ∈ Z and n ∈ N. But do we
1 Indeed, m + n is defined for all m, n ∈ N and produces again a natural number thanks to the
recursion m + (n + 1) = (m + n) + 1.

22
2.1 Natural numbers, integers, and rational numbers

really know that such fractions can exist and that the operations · and also + are
well-defined for them? Well, in order to these ideas on a solid base, we have to give
a rigorous meaning to nz . This is done as follows. In Problem 4 on Homework Sheet
2, it is shown that we can define on the set X := Z × N an equivalence relation ∼
by
(z1 , n1 ) ∼ (z2 , n2 ) ⇔ z1 n2 = z2 n1
for (z1 , n1 ), (z2 , n2 ) ∈ X. We call Q := X⧸∼ the set of rational numbers and write
z
n
:= [(z, n)] for the equivalence class [(z, n)] of (z, n) ∈ X with respect to the
equivalence relation ∼. Note that the equivalence relation ∼ was designed in such
a way that it reflects our intuition about equality of two fractions. To complete
our construction, it remains to define an addition and a multiplication on Q. This
is done by
z1 z2 z1 n2 + n1 z2
[(z1 , n1 )] + [(z2 , n2 )] := [(z1 n2 + n1 z2 , n1 n2 )], i. e., + =
n1 n2 n1 n2

and
z1 z2 z1 z2
[(z1 , n1 )] · [(z2 , n2 )] := [(z1 z2 , n1 n2 )], i. e., · = ,
n1 n2 n1 n2
respectively. Though this seems rather obvious in the familiar fraction notation,
we actually have to verify that + and · are well-defined, i. e., that the respective
results
[(z1 n2 + n1 z2 , n1 n2 )] and [(z1 z2 , n1 n2 )]
are independent of the particular choice of representatives (z1 , n1 ) and (z2 , n2 ) of
the two equivalence classes [(z1 , n1 )] and [(z2 , n2 )]. In other words, we must show
that if (z1 , n1 ) ∼ (z1′ , n′1 ) and (z2 , n2 ) ∼ (z2′ , n′2 ), then

(z1 n2 + n1 z2 , n1 n2 ) ∼ (z1′ n′2 + n′1 z2′ , n′1 n′2 ) and (z1 z2 , n1 n2 ) ∼ (z1′ z2′ , n′1 n′2 ).

The former is treated in Problem 4 on Homework Sheet 2; for the latter, the proof
is analogous.2
2With this mindset, the reader might object that not only the construction of Q out of Z, but
also the construction of Z out of N requires more care. That is absolutely true! The elements
−n for n ∈ N, even though their meaning is quite intuitive, must be constructed in the same
way. In fact, one can construct Z as X⧸∼ for the set X := N × N and the equivalence relation
∼ on X which is defined by
(m1 , n1 ) ∼ (m2 , n2 ) ⇔ m1 + n2 = m2 + n1 .
The idea behind is that integers z are “represented” as z = m − n for m, n ∈ N, in the same
way as rational numbers are represented by fractions. Addition on Z = X⧸∼ is then defined by
[(m1 , n1 )] + [(m2 , n2 )] := [(m1 + m2 , n1 + n2 )].
Again, one needs to check that this is well-defined, i. e., that [(m1 +m2 , n1 +n2 )] is independent
of the particular choice of representatives (m1 , n1 ) and (m2 , n2 ). We leave the details to the
readers. Note that the identity element 0 ∈ Z is nothing but [(1, 1)].

23
2 The real numbers

Note that Z can be identified with the subset {[(z, 1)] : z ∈ Z} of Q. Hence, we
may view Z ⊆ Q and all previously introduced operations are compatible with this
identification.

2.2 Ordered fields


The well-known rules for the operations + and · on Q inspire the following definition
of fields.
Definition 2.2 (Field): A set F endowed with two operations + (“addition”) and ·
(“multiplication”) is called a field if the following conditions are satisfied:
• ∀ a, b, c ∈ F : a + (b + c) = (a + b) + c (associativity of addition)
• ∃0 ∈ F ∀a ∈ F : a + 0 = a (identity element of addition)
• ∀ a ∈ F ∃ − a ∈ F : a + (−a) = 0 (inverse elements of addition)
• ∀ a, b ∈ F : a + b = b + a (commutativity of addition)
• ∀ a, b, c ∈ F : a · (b · c) = (a · b) · c (associativity of multiplication)
• ∃1 ∈ F ∀a ∈ F : a · 1 = a (identity element of multiplication)
−1 −1
• ∀ a ∈ F \ {0} ∃ a ∈F : a·a =1 (inverse elements of multiplication)
• ∀ a, b ∈ F : a · b = b · a (commutativity of multiplication)
• ∀ a, b, c ∈ F : a · (b + c) = a · b + a · c (distributivity)

Example 2.3 (Fields): (i) Endowed with the usual addition and multiplication,
Q is a field.
(ii) Z fails to be a field since the only elements of Z which admit an inverse
element with respect to multiplication are −1 and 1.

Proposition 2.4 (Properties of fields): Let F be a field. Then the following state-
ments hold true:
(i) There exists exactly one identity element of addition, i. e., for 0′ ∈ F satisfying
a + 0′ = a for all a ∈ F , it follows that 0′ = 0.
(ii) There exists exactly one identity element of multiplication.
(iii) The inverse element of a with respect to addition is unique, i. e., for any
a′ ∈ F satisfying a + a′ = 0, it follows that a′ = −a.
(iv) The inverse element of a ̸= 0 with respect to multiplication is unique.
(v) ∀ a ∈ F : a · 0 = 0.
(vi) ∀ a, b ∈ F : a · b = 0 ⇒ (a = 0) ∨ (b = 0).
(vii) ∀ a, b, c ∈ F : a + b = a + c ⇒ b = c.
(viii) ∀ a, b, c ∈ F, a ̸= 0 : a · b = a · c ⇒ b = c.

24
2.2 Ordered fields

(ix) ∀ a ∈ F : −(−a) = a and (−1) · a = −a.


−1 −1
(x) ∀ a ∈ F, a ̸= 0 : (a ) = a.
(xi) ∀ a, b ∈ F : −(a + b) = (−a) + (−b).
(xii) ∀ a, b ∈ F, a, b ̸= 0 : (a · b)−1 = b−1 · a−1 .

Proof: Exemplary, we prove (i). Some of the remaining statements appear on the
exercise sheets, the rest is left to the readers for private practicing.
By Definition 2.2, there exists an identity element of addition, namely an element
0 ∈ F which satisfies
a+0=a for all a ∈ F . (∗)
To prove uniqueness of 0, we assume that 0′ ∈ F is any other element which satisfies
the same condition like 0, namely

a + 0′ = a for all a ∈ F , (∗∗)

and show that 0′ = 0. We proceed as follows.


• By applying condition (∗) in the particular case a = 0′ , we get 0′ + 0 = 0′ .
• By applying condition (∗∗) to a = 0, we obtain 0 + 0′ = 0.
Due to commutativity of +, we have 0′ + 0 = 0 + 0′ . Hence, in summary, we obtain

0′ = 0′ + 0 = 0 + 0′ = 0,

as we wished to show. □

Definition 2.5 (Ordered field): A field F is said to be ordered if there exists a total
order ≤ on F with the following properties:
(i) ∀ a, b, c ∈ F : a ≤ b ⇒ a + c ≤ b + c.
(ii) ∀ a, b ∈ F : (0 ≤ a) ∧ (0 ≤ b) ⇒ 0 ≤ a · b.

Example 2.6 (Ordered fields): The rational numbers Q are an ordered field.

In an ordered field F with the associated total order ≤, we use the following
notation:

x<y :⇔ (x ≤ y) ∧ (x ̸= y)
x≥y :⇔ y≤x
x>y :⇔ y<x

Proposition 2.7 (Properties of ordered fields): Let F be an ordered field. Then the
following statements hold true:
(i) ∀ a, b, c ∈ F : (a ≤ b) ∧ (c ≥ 0) ⇒ a · c ≤ b · c.

25
2 The real numbers

(ii) ∀ a, b, c ∈ F : (a ≤ b) ∧ (c ≤ 0) ⇒ a · c ≥ b · c.
(iii) ∀ a ∈ F : a ≤ 0 ⇒ −a ≥ 0 and ∀ a ∈ F : a < 0 ⇒ −a > 0.
(iv) ∀ a, b ∈ F : 0 < a ≤ b ⇒ 0 < b−1 ≤ a−1 .
(v) ∀ a ∈ F : a2 ≥ 0 and ∀ a ∈ F \ {0} : a2 > 0 (where a2 := a · a);
in particular, we have that 1 > 0.
(vi) ∀ a, b ∈ F : 0 ≤ a ≤ b ⇒ 0 ≤ a2 ≤ b2 .
Proof: Exemplary, we prove (i). Some of the remaining statements appear on the
exercise sheets, the rest is left to the readers for private practicing.
Let a, b, c ∈ F be given such that a ≤ b and c ≥ 0. From a ≤ b, we infer with
the help of Definition 2.5 (i) that
0 = a + (−a) ≤ b + (−a).
Since 0 ≤ b + (−a) and 0 ≤ c, Definition 2.5 (ii) tells us that
0 ≤ (b + (−a)) · c = b · c + (−a) · c = b · c + (−(a · c)).
Using again Definition 2.5 (i), we infer from the latter that

a · c = 0 + a · c ≤ b · c + (−(a · c)) + a · c

= b · c + (−(a · c)) + a · c = b · c + 0 = b · c,
as we wished to show. □
Recall that the need for extending N to Z and Z to Q came from the observation
that certain natural equations failed to have solutions over the respective smaller
set of numbers. Now that we have Q, which even carries the structure of an ordered
field, as we saw above, we should ask ourselves if this is finally “large enough” or if
there are other interesting equations which still fail to have solutions in Q. Well,
the equation x2 = 2 turns out to be problematic, as the next proposition shows (in
anticipation of rules for divisibility and prime numbers which we discuss later).
Proposition 2.8 (Existence of non-rational numbers): There exists no rational so-
lution to the equation x2 = 2, i. e., there is no q ∈ Q such that q 2 = 2.
Proof: We give a proof by contradiction. Assume to the contrary that there exists
q ∈ Q such that q 2 = 2. We write q = ab with a ∈ Z and b ∈ N. Without loss
of generality, we assume that the fraction is reduced, i. e., that a and b have no
common prime factors; this can be achieved by canceling common prime factors
2
of a and b if necessary. Then, we get 2 = q 2 = ab2 and hence 2b2 = a2 . The latter
2
means that 2 divides a . However, since 2 is prime number, this is possible only if
2 divides a; therefore, there is a k ∈ Z such that a = 2k. Inserting this observation
into 2b2 = a2 , we get 2b2 = (2k)2 = 4k 2 and hence b2 = 2k 2 . The latter means
that 2 divides b2 and so b, by the same reasoning as above. Consequently, 2 divides
both a and b. This, however, contradicts the assumption that a and b have no
common prime factor. □

26
2.3 Bounded sets

This observation tells us that Q is still not sufficient for all our purposes. We
know from
√ school that the real numbers R close that gap, since R contains the
number 2, which solves the equation x2 = 2. But do we really know what R
should be? Like Q, also R is an ordered field. So, what is the additional property
which characterizes R?

2.3 Bounded sets


We will introduce the real numbers R as the unique ordered field having the so-called
“supremum property”. To understand that property, we need some preparation.
Definition 2.9 (Upper and lower bound): Let X be set and let ≤ be a total order
on X. Consider Y ⊆ X.
(i) The subset Y is said to be bounded from above if there exists some x ∈ X
such that
∀ y ∈ Y : y ≤ x.
In this case, we call x an upper bound of Y .
(ii) The subset Y is said to be bounded from below if there exists some x ∈ X
such that
∀ y ∈ Y : x ≤ y.
In this case, we call x an lower bound of Y .
(iii) If Y is bounded from below and from above, we say that Y is bounded.
Definition 2.10 (Infimum, supremum, minimum, maximum): Let X be set and let
≤ be a total order on X. Consider Y ⊆ X.
(i) We say that x′ ∈ X is a supremum (or least upper bound) of Y if x′ is an
upper bound of Y and x′ ≤ x holds true for every upper bound x of Y .
In the case of existence, we write x′ = sup Y .
(ii) A supremum x′ of Y is called maximum of Y if x′ ∈ Y .
In this case, we write x′ = max Y .
(iii) We say that x′ ∈ X is a infimum (or greatest lower bound) of Y if x′ is a
lower bound of Y and x′ ≥ x holds true for every lower bound x of Y .
In the case of existence, we write x′ = inf Y .
(iv) An infimum x′ of Y is called minimum of Y if x′ ∈ Y .
In this case, we write x′ = min Y .
Example 2.11 (Bounds, infimum/supremum, minimum/maximum):
(i) The set of natural numbers N is bounded from below but not from above.
The set of integers Z and the set of rational numbers Q are neither bounded
from above nor from below. (Here, all these sets are seen as subsets of R,
endowed with the natural total order ≤.)

27
2 The real numbers

(ii) For the subset Y = {2, 5, 7} of N, we have


sup Y = max Y = 7 and inf Y = min Y = 2.
(iii) Every non-empty subset of N has a minimum with respect to the total order
≤.
Definition 2.12 (Supremum property): An ordered field F is said to have the supre-
mum property (or least upper bound property) if every non-empty subset of F which
is bounded from above has a supremum.
The ordered field Q of rational numbers does not have the supremum property.
Theorem 2.13 (Real numbers): There exists exactly one ordered field having the
supremum property. We denote it by R.
We will not prove this theorem, but from now on we can take the existence of R
with all its described properties for granted. Later, we will learn about one way to
prove existence.
Proposition 2.14 (Existence of irrational numbers): There exists a real solution to
the equation x2 = 2, i. e., there is r ∈ R such that r2 = 2.
Proof: Consider the set
S := {s ∈ R : (s > 0) ∧ (s2 < 2)}.
We have S ̸= ∅ since 1 ∈ S, for instance. Moreover, 2 is an upper bound of S.
Thus, by the supremum property of R, S has a supremum. We put r := sup S.
Because r is an upper bound of S and 1 ∈ S, it follows that 1 ≤ r; in particular,
we have that r is positive, i. e., r > 0.
We want to show that r2 = 2. For that purpose, we give a proof by contradiction
with two cases:
2
Assume that r 2 < 2: Put ε := 2−r
2r+1 > 0. Then r ≥ 1 implies that ε ≤
2−1
2·1+1 =
1 2
3 < 1 and hence ε < ε. It follows that

(r + ε)2 = r2 + 2rε + ε2 < r2 + 2rε + ε = r2 + (2r + 1)ε = 2;


hence r + ε ∈ S. Since r + ε > r, this means that r cannot be an upper
bound of S. Therefore, the assumption r2 < 2 leads to a contradiction.
2
−2
Assume that r 2 > 2: Put ε := min{ r2r+1 , r} > 0. Then
(r − ε)2 = r2 − 2rε + ε2 > r2 − 2rε − ε = r2 − (2r + 1)ε ≥ 2.
It follows that r − ε > 0 is an upper bound for S; indeed, if there was s ∈ S
with s > r − ε, then we would get s2 > (r − ε)2 ≥ 2 in contradiction to the
condition s2 < 2, which holds by definition of S.
However, since r − ε < r, this contradicts the choice of r as the least upper
bound of S.
Therefore, the assumption r2 > 2 also leads to a contradiction.

28
2.3 Bounded sets

Since r2 > 2 and r2 < 2 have been ruled out, the only remaining option is r2 = 2.
This concludes the proof. □
Note that the particular choice of 2 was not important; the proof works equally
well for each other positive real number.
Example 2.15 (Square roots): From Proposition 2.14, it follows that the function
g : R≥0 → R≥0 , x 7→ x2
is bijective√as asserted in Example 1.35. It inverse function g −1 : R≥0 → R≥0
defines by x := g −1 (x) the (square) root of x.
More generally, one can show that the function
gn : R≥0 → R≥0 , x 7→ xn

is bijective for each n ∈ N; we call n x := gn−1 (x) the n-th root of x.
Proposition 2.16 (Inclusions of number sets): We have N ⊆ Z ⊆ Q ⊆ R. More-
over, we have:
(i) For a ∈ R, there exists exactly one k ∈ Z such that k ≤ a < k + 1.
(ii) For a, b ∈ R with a < b, there exists q ∈ Q such that a < q < b.
Proof: The asserted inclusions hold by definition of the respective sets of numbers.
Thus, it suffices to prove the additional statements.
(i) Fix a ∈ R and put M := {z ∈ Z : z ≤ a}. We observe that M ̸= ∅.
Indeed: If we assume to the contrary that M = ∅, then this would tell
us that z > a for all z ∈ Z; in particular, −n > a for all n ∈ N. The latter
implies n < −a for all n ∈ N, i. e., N is bounded from above (namely by a).
This, however, is not true; see Example 2.11 (i).
Since M is non-empty and bounded from above (namely by a), it has
a supremum. Since M ⊆ Z, it follows that the supremum is actually a
maximum (!); thus, k := max M does the job.
(ii) Let a, b ∈ R with a < b be given. Note b − a > 0. Since N is not bounded
1
from above, there exists n ∈ N such that n > b−a > 0. This implies n1 < b − a
and hence a + n1 < b.
By part (i), there exists exactly one m ∈ Z such that m ≤ na < m + 1.
Dividing the latter by n yields mn ≤a< n .
m+1

We infer that
m+1 m 1 1
a< = + ≤ a + < b.
n n n n
This means that q := m+1 n ∈ Q satisfies a < q < b, as desired. □
Now that we have R, we may ask ourselves whether this is the end of the story.
Not at all! There are still interesting equations which do not possess solutions over
R; for instance, x2 = −1. Appetizer: This leads to the field C of complex numbers,
which contains the field R of real numbers; C is not ordered but nonetheless very
natural.

29
2 The real numbers

2.4 Topology on R — Part I


Definition 2.17 (Absolute value): For a ∈ R, we call
(
a, if a ≥ 0
|a| :=
−a, if a < 0

the absolute value of a.

Proposition 2.18 (Properties of the absolute value): The absolute value has the
following properties:
(i) For all a ∈ R, we have |a| ≥ 0 and

|a| = 0 ⇔ a = 0.

(ii) For all a, b ∈ R, we have |a − b| = |b − a|.


(iii) For all a, b ∈ R, we have |a · b| = |a| · |b|.
(iv) For all a ∈ R, we have |a|2 = a2 .
(v) For all a ∈ R, we have −|a| ≤ a ≤ |a| and −|a| ≤ −a ≤ |a|.
(vi) For all a, b ∈ R, we have the triangle inequality

|a + b| ≤ |a| + |b|. (2.1)

(vii) For all a, b ∈ R, we have

|a − b| ≤ |a| + |b|.

(viii) For all a, b ∈ R, we have the reverse triangle inequality

|a| − |b| ≤ |a − b|. (2.2)

Proof: Exemplary, we prove (i). Some of the remaining statements appear on the
exercise sheets, the rest is left to the readers for private practicing.
Take a ∈ R. We consider the following three cases (other cases cannot occur
since ≤ is a total order so that 0 ≤ a or a ≤ 0 must be satisfied):
Case a > 0: Here, we have |a| = a > 0.
Case a = 0: Here, we have |a| = |0| = 0.
Case a < 0: By Proposition 2.7 (iii), we have −a > 0. Hence, |a| = −a > 0.
Thus, in each case |a| ≥ 0. Moreover, we see that |a| = 0 if and only if a = 0. □

Definition 2.19: Let a, b ∈ R with a < b be given. We write:


• [a, b] := {x ∈ R : (a ≤ x) ∧ (x ≤ b)} closed interval

30
2.4 Topology on R — Part I

• (a, b) := {x ∈ R : (a < x) ∧ (x < b)} open interval


• [a, b) := {x ∈ R : (a ≤ x) ∧ (x < b)} (right-)half-open interval
• (a, b] := {x ∈ R : (a < x) ∧ (x ≤ b)} (left-)half-open interval

Moreover, we define
[a, ∞) := {x ∈ R : a ≤ x}
and analogously (a, ∞), (−∞, b], (−∞, b), as well as (−∞, ∞) = R.

Note that the absolute value can be used to measure the distance between two
real numbers x and y; it is given by |x − y|. By an ε-neighborhood of a real number
x, we mean the set (in fact, the interval) of all real numbers y which have a distance
to x which is smaller than the given ε. This is the content of the next definition.

Definition 2.20 (ε-neighborhood): Let x ∈ R and ε > 0 be given. We call

(x − ε, x + ε) = {y ∈ R : |y − x| < ε}

the ε-neighborhood of x.

We use ε-neighborhood is to extend the notion of “open” and “closed” from


intervals to general subsets of R.

Definition 2.21 (Open set): A subset U ⊆ R is said to be open if the following con-
dition is satisfied: For each x ∈ U , there exists ε > 0 such that the ε-neighborhood
(x − ε, x + ε) of x is contained in U .

Example 2.22 (Open sets):

(i) An open interval (see Definition 2.19) is open in the sense of Definition
2.21. Indeed, for an open interval (a, b) and any point x ∈ (a, b), we have
(x − ε, x + ε) ⊆ (a, b) for ε := min{b − x, x − a} > 0.
In contrast, for intervals the form [a, b] or [a, b), there is no ε-neighborhood
of the endpoint a which belongs to that interval. Thus, half-open or closed
intervals, are not open.
(ii) By definition, the empty set ∅ is open. (Why?)

S Let I ̸= ∅ be an index set and let Ui be an


Proposition 2.23 (Union of open sets):
open set for each i ∈ I. Then U := i∈I Ui is open.

Proof: Take any x ∈ U . By definition of the union, there exists some i ∈ I such that
x ∈ Ui . Since this set Ui is open, there is some ε > 0 such that (x − ε, x + ε) ⊆ Ui .
Since Ui ⊆ U , it follows that (x − ε, x + ε) ⊆ U . This shows that U is open. □

(Intersection of open sets): For n ∈ N, let U1 , . . . , Un be open


Proposition 2.24 T
n
sets. Then U := i=1 Ui is open.

31
2 The real numbers

Proof: Take any x ∈ U . By definition of the intersection, we have x ∈ Ui for all


i = 1, . . . , n. For each i = 1, . . . , n, because the set Ui is open, there exists some
εi > 0 such that (x − εi , x + εi ) ⊆ Ui . We put ε := min{ε1 , . . . , εn }. Then ε > 0
and (x − ε, x + ε) ⊆ Ui for all i = 1, . . . , n. In particular, (x − ε, x + ε) ⊆ U . This
shows that U is open. □

Note that Proposition 2.24 does not remain true for intersection of infinitely
many sets, as the following example shows.

Example 2.25 (Intersection of open sets): For n ∈ N, put Un := (− n1 , n1 ). Each


Un is an open interval and hence open; see Example 2.22. However,
\
Un = {0}
n∈N

is not open since there is no ε-neighborhood of 0 which belongs to {0}.

Definition 2.26 (Closed set): A subset U ⊆ R is said to be closed if its complement


R \ U is open.

Example 2.27 (Closed sets):

(i) Closed intervals are closed in the sense of Definition 2.26. Indeed, for the
closed interval [a, b] with a < b, we have

R \ [a, b] = (−∞, a) ∪ (b, ∞),

so that R\[a, b] is the union of two open intervals (which are open by Example
2.22) and hence open by Proposition 2.23.
(ii) Finite sets are closed.
(iii) R and ∅ are both open and closed.
(iv) Half-open intervals of the form [a, b) and (b, a] are neither open nor closed.
In contrast, intervals of the form [a, ∞) and (−∞, b] are closed since their
complements R \ [a, ∞) = (−∞, a) and R \ (−∞, b] = (b, ∞) are open.

The following statements are “dual” to those in Proposition 2.23 and Proposition
2.24.

Proposition 2.28 (Union and intersection of closed sets):

̸ ∅ be an index set and let Ui be a closed set for each i ∈ I. Then


(i) Let I T
=
U := i∈I Ui is closed.
Sn
(ii) For n ∈ N, let U1 , . . . , Un be closed sets. Then U := i=1 Ui is closed.

Proof: This is an exercise. □

32
2.5 Comparison of cardinalities

Definition 2.29 (Boundary point): Let U ⊆ R. We call x ∈ R a boundary point of


U if each ε-neighborhood of x contains points from both U and R \ U .
The set of all boundary points of U will be denoted by ∂U .

Example 2.30 (Boundary points): (i) We have ∂[0, 1] = {0, 1}. Indeed:
• Points x ∈ (0, 1) cannot be boundary points since the ε-neighborhood
(x − ε, x + ε) for ε := min{x, 1 − x} is a subset of (0, 1) and hence cannot
contain elements from R \ [0, 1].
• Points x ∈ R \ [0, 1] = (−∞, 0) ∪ (1, ∞) cannot be boundary points since
the ε-neighborhood (x − ε, x + ε) for
(
−x, if x < 0
ε :=
x − 1, if x > 1

is a subset of R \ [0, 1] and hence cannot contain points from [0, 1].
• The points 0 and 1 are boundary points: For an arbitrary ε > 0, we
have that (0 − ε, 0 + ε) and (1 − ε, 1 + ε) contain points from both [0, 1]
and R \ [0, 1].
(ii) We have ∂Q = R. To see this, we take x ∈ R and ε > 0 and observe the
following:
• By Proposition 2.16 (ii), there exists q ∈ Q such that x − ε < q < x + ε,
i. e., we have q ∈ (x − ε, x + ε).
• By applying Proposition 2.16 (ii) twice, we conclude that there are
q1 , q2 ∈
√ Q such that x − ε < q1 < q2 < x + ε. We consider r :=
q1 + 12 2(q2 − q1 ).

From Proposition√2.14 and its proof, we learn that 0 ≤ 2 ≤ 2 or,
equivalently, 0 ≤ 12 2 ≤ 1; thus, we see that q1 < r < q2 and hence
r ∈ (x − ε, x + ε). √
Moreover, Proposition 2.8 tells us that √2 ∈ R \ Q. It follows that
r ∈ R \ Q, because otherwise, we would get 2 = 2 qr−q 1
2 −q1
∈ Q and hence
a contradiction.
In summary, we see that the ε-neighborhood (x − ε, x + ε) of x contains with
q and r elements from both Q and R \ Q; thus, by definition, x ∈ ∂Q. Since
x ∈ R was arbitrary, we get that ∂Q = R.

2.5 Comparison of cardinalities


How many natural numbers are there? How many rational or real numbers? Is
one of these sets larger than the others?

Definition 2.31 (Finite and countable sets): Let X be a set.

33
2 The real numbers

(i) X is said to be finite 3 if there exists n ∈ N and a bijective function f : {m ∈


N : m ≤ n} → X. In this case, n is uniquely determined and is called the
cardinality of X; we write |X| = n.

f (2)
{1, 2, 3, . . . , n} f (n)
f (3)
f (1)

If X is neither finite nor empty, we say that X is infinite.


(ii) X is said to be countably infinite if there exists a bijection4 f : N → X.
(iii) X is called countable if X is either empty, finite, or countably infinite.
(iv) X is called uncountable if X is not countable.
Note: If we find a surjective map f : N → X, then X is countable.
Lemma 2.32: Let X and Y be finite sets and let f : X → Y be a function. Then
the following statements hold true:
(i) If f is injective, then |X| ≤ |Y |.
(ii) If f is surjective, then |X| ≥ |Y |.
Proof: Write X = {x1 , . . . , xn } and Y = {y1 , . . . , ym }. Note that in general
m
[
X= f −1 ({yj }).
j=1

The sets f −1 ({yj }) for j = 1, . . . , m (some of which might be empty) are pairwise
disjoint; hence (!), we have
m
X
|X| = |f −1 ({yj })|.
j=1

(i) If f is injective, then |f −1 ({yj })| ≤ 1 for j = 1, . . . , m. Thus, we obtain


m
X m
X
|X| = |f −1 ({yj })| ≤ 1 = m = |Y |.
j=1 j=1
3 Note that according to this definition, the empty set ∅ is not a finite set. However, it is often
convenient to assign to ∅ the cardinality 0, i. e., |∅| := 0.
4 By a bijection we simply mean a bijective function.

34
2.5 Comparison of cardinalities

(ii) If f is surjective, then |f −1 ({yj })| ≥ 1 for j = 1, . . . , m. Thus, we obtain

m
X m
X
|X| = |f −1 ({yj })| ≥ 1 = m = |Y |.
j=1 j=1

This concludes the proof. □

Theorem 2.33 (Pigeonhole principle): Let X and Y be finite sets with |Y | < |X|.
Then there is no injective function f : X → Y .

Proof: The statement is obtained from Theorem 2.33 by contraposition. For the
sake of clarity, we give also a proof by contradiction.
Assume that there exists an injective function f : X → Y . By Lemma 2.32, it
follows that |X| ≤ |Y |, which contradicts the assumption made in the statement of
the theorem. Thus, there cannot exist an injective function f : X → Y . □

Example 2.34 (Pigeonhole principle): If we put n items into m containers, where


m < n, then there is at least one container which contains more than one item.
To see this, we let X be the set of items and Y the set of containers. Each
distribution of the items to the containers induces a map f : X → Y , where f (x)
is the container into which we put the item x. Since |Y | = m < n = |X|, the
pigeonhole principle (Theorem 2.33) tells us that f cannot be injective. Thus, there
are x1 , x2 ∈ X with x1 ̸= x2 such that f (x1 ) = f (x2 ), i. e., the different items x1
and x2 were put into the same container.

Example 2.35 (Countable sets): (i) By definition, N is countably infinite since


idN : N → N is a bijection.
(ii) The function
(
n−1
f : N → Z, n 7→ 2 , if n is odd
− n2 , if n is even

is a bijection; indeed, one can write down the inverse function. Hence, Z is
countably infinite.

Theorem 2.36 (Q is countable): The set Q of rational numbers is countably infi-


nite.

Proof: First, we prove that Q>0 := {q ∈ Q : q > 0} is countably infinite. To this


end, we arrange fractions m
n for m, n ∈ N in the following form:

35
2 The real numbers

1 1 1 1 1 1
1 2 3 4 5 6 ···

2 2 2 2 2 2
1 2 3 4 5 6 ···

3 3 3 3 3 3
1 2 3 4 5 6 ···

4 4 4 4 4 4
1 2 3 4 5 6 ···

5 5 5 5 5 5
1 2 3 4 5 6 ···

6 6 6 6 6 6
1 2 3 4 5 6 ···

.. .. .. .. .. .. ..
. . . . . . .

By going through the list as indicated, we hit eventually all elements in Q>0 and
by removing all repetitions (i. e., those fractions which are not reduced), we obtain
the following enumeration of Q>0 :
1 1 3 2 1 1 5 4 3 2 1
1, 2, , , 3, 4, , , , , 5, 6, , , , , , . . .
2 3 2 3 4 5 2 3 4 5 6
This enumeration induces a bijective function from N to Q>0 ; this shows that Q>0
is countably infinite.
Now, we extend the above enumeration of Q>0 in order to get an enumeration
of Q. We insert 0 in front of 1 and insert after each element in the list the
corresponding negative number:
1 1 1 1 3 3
0, 1, −1, 2, −2, , − , , − , 3, −3, 4, −4, , − , . . .
2 2 3 3 2 2
This is an enumeration of Q, which induces a bijection f : N → Q. □

Theorem 2.37 (R is uncountable): The set R is uncountable.

Proof: We give a proof by contradiction. Let us make the assumption that R is


countably infinite (note that because N ⊆ R, R cannot be empty or finite), i. e.,
there is a bijective function f : N → R.
We express each of the real numbers f (1), f (2), f (3), . . . in decimal notation.
Let r ∈ R be the real number obtained as follows: In front of the decimal dot,
we have 0, and the k-the decimal place of r is defined to be

36
2.5 Comparison of cardinalities

• 0 if the k-th decimal place of f (k) is different from 0;


• 1 if the k-th decimal place of f (k) is 0.
Example:

1 8.⃝6
8 2 3 0...
2 3 4. 8⃝7
2 3 4...
0. 0 4⃝2
0 5...
7 3 2. 2 7 6⃝3
4 ...
4. 1 5 5 9⃝
0 ...
⇝r= 0. 0 0 1 0 1 . . .

By construction of r, we have r ̸= f (k) for all k ∈ N because r and f (k) differ


(at least) at the k-th decimal place. Hence, r ∈
/ f (N) = R, which is a contradiction.
Therefore, there cannot be a bijective function f : N → R; this means that R is
uncountable. □

The arguments in the proofs of Theorem 2.36 and Theorem 2.37 are called
Cantor’s first and second diagonal argument.
Remark: In Example 2.30 (ii), we needed to show that every open interval (x −
ε, x + ε) for x ∈ R and ε > 0 contains an element of R \ Q. The√proof given there
followed the strategy to “scale and shift” the irrational number 2 until it belongs
to (x − ε, x + ε). Now, we can give an abstract argument: From Theorem 2.37, one
can deduce that the set (x − ε, x + ε) is uncountable. The subset (x − ε, x + ε) ∩ Q,
however, is countably infinite since it cannot be finite but must be countable
as a subset of the countable set Q (see Theorem 2.36). Thus, the complement
(x − ε, x + ε) ∩ R \ Q is not only non-empty but must even be uncountable; otherwise,
we could write (x − ε, x + ε) as the union of two countable sets, which would imply
that (x − ε, x + ε) is countable and hence would lead to a contradiction.

37
3 Sequences and series
3.1 Convergent sequences
Definition 3.1 (Sequence): A sequence in a set X means a function a : N → X.

Notation: If a : N → X is a sequence, then we write an instead of a(n) for its n-th


element and (an )n∈N or just (an ) instead of a.

From now on, if nothing else is said, all sequences will be real sequences, i. e.,
sequences in R.
1
Example 3.2 (Sequences): (i) If we define an := n for all n ∈ N, then we get
the sequence a = (1, 12 , 13 , . . .).
(ii) If we define b2n := 0 and b2n−1 := 1 for all n ∈ N, then we get the sequence
b = (1, 0, 1, 0, 1, . . .).

We aim at understanding the behavior of the elements an of sequences (an )n∈N


when the index n grows; more precisely, we would like to know whether an
“approaches” some a ∈ R when n is sufficiently large.
The following definition formalizes this idea.

Definition 3.3 (Convergence of sequences): Let (an )n∈N be a sequence of real num-
bers.

(i) Let a ∈ R. We say that (an )n∈N converges to a (or that (an )n∈N is convergent
to a) if
∀ε > 0 ∃N ∈ N ∀n ≥ N : |an − a| < ε.

In this case, we call a the limit of (an )n∈N and we write

n→∞
lim an = a, an −−−−→ a, or “an → a as n → ∞”.
n→∞

(ii) If there is no a ∈ R such that (an )n∈N is convergent to a, then (an )n∈N is
called divergent.

In other words: The sequence (an )n∈N converges to a if and only if each ε-
neighborhood (a − ε, a + ε) of a, for ε > 0, contains almost all (i. e., all except at
most finitely many) elements of the sequence (an )n∈N .
The concept of convergence can be visualized as follows:

38
3.1 Convergent sequences

an

a = lim an ⇔ ∀ ε > 0 ∃ N ∈ N ∀ n ≥ N : an ∈ (a − ε, a + ε)
a1 n→∞

a+ε
a
a−ε

n
1 N

A sequence (an )n∈N which is convergent to 0 is called a null sequence.


Proposition 3.4 (Uniqueness of limits): If (an )n∈N is a convergent sequence, then
it has exactly one limit.

Proof: Let a, a′ ∈ R be two limits of the convergent sequence (an )n∈N and assume

that a ̸= a′ . Put ε := |a−a
2
|
> 0.
Since (an )n∈N converges to a, there exists N ∈ N such that

|an − a| < ε for all n ∈ N with n ≥ N ;

on the other hand, since (an )n∈N converges to a′ , there exists N ′ ∈ N such that

|an − a′ | < ε for all n ∈ N with n ≥ N ′ .

(a − ε, a + ε) (a′ − ε, a′ + ε)
( )( )
a a′

Thus, for all n ∈ N with n ≥ max{N, N ′ }, we get by the triangle inequality (2.1)
that

|a − a′ | = |(a − an ) + (an − a′ )| ≤ |an − a| + |an − a′ | < ε + ε = 2ε = |a − a′ |.


| {z } | {z }
<ε <ε

This is a contradiction! Thus, our assumption a ̸= a′ was wrong, i. e., we have


a = a′ , as we wished to show. □

Example 3.5: (i) Let a ∈ R and define the constant sequence (an )n∈N by an := a
for all n ∈ N. Then (an )n∈N is convergent and

lim an = a.
n→∞

Indeed: For each ε > 0, we have an = a ∈ (a − ε, a + ε) for all n ∈ N.

39
3 Sequences and series

(ii) The sequence ( n1 )n∈N is a null sequence.


Indeed: Let ε > 0. By Problem 4 (b) on Classroom Sheet 4, there exists
N ∈ N such that N1 < ε; hence, for all n ∈ N with n ≥ N , we see that

1 1 1
−0 = ≤ < ε.
n n N
(iii) The sequence (bn )n∈N from Example 3.2 (ii), which was defined by
(
0, if n is even
bn := ,
1, if n is odd

is divergent.
Indeed: Assume to the contrary that there exists b ∈ R such that lim bn =
n→∞
b. We apply the definition of convergence for ε = 12 . Thus, there is N ∈ N
such that
1
|bn − b| < for all n ∈ N with n ≥ N .
2
Clearly, there are natural numbers n, n′ ≥ N such that n is even and n′ is
odd; hence,
1 1
|b| = |bn − b| < and |1 − b| = |bn′ − b| < .
2 2
The triangle inequality (2.1) implies that
1 1
1 = |1| = |(1 − b) + b| ≤ |1 − b| + |b| < + = 1.
2 2
This is a contradiction! Thus our assumption was wrong, i. e., (bn )n∈N is
divergent.

Proposition 3.6 (Rules for limits): Let (an )n∈N and (bn )n∈N be convergent sequences
with limits a and b, respectively. Then the following statements hold true:

(i) If an ≤ bn for all n ∈ N, then a ≤ b.


(ii) lim (an + bn ) = a + b.
n→∞
(iii) lim (an · bn ) = a · b
n→∞
(iv) If b ̸= 0, then there exists some N ∈ N such that bn ̸= 0 for all n ≥ N and
an a
lim = .
n→∞ bn b

Proof: We prove (i). The proof of (ii) will be discussed in Problem 3 on Classroom
Sheet 5; the other properties are left for private practicing.

40
3.2 Convergence criteria

We give a proof by contradiction. Assume to the contrary that b < a. Put


ε := a−b
2 > 0. Since lim an = a, there exists Na ∈ N such that |an − a| < ε for
n→∞
all n ≥ Na ; since lim bn = b, there exists Nb ∈ N such that |bn − b| < ε for all
n→∞
n ≥ Nb . We put N := max{Na , Nb }. Then, for all n ≥ N , we get

a − ε < an ≤ bn < b + ε = a − ε,

which is a contradiction. Thus, our assumption was wrong, i. e., we have a ≤ b, as


we wished to show. □

Example 3.7: Since we have

1 2

5(n2 − 1)2 5 1− n2
4
= 8 for all n ∈ N,
7n + 8 7+ n4

we infer from Example 3.5 (ii) and Proposition 3.6 that1

5(n2 − 1)2 5
lim 4
= .
n→∞ 7n + 8 7

3.2 Convergence criteria


Theorem 3.8 (Sandwich Theorem): Let (an ), (bn ), and (cn ) be sequences in R
satisfying an ≤ bn ≤ cn for all n ∈ N. If (an ) and (cn ) are convergent with

b := lim an = lim cn ,
n→∞ n→∞

then also (bn ) is convergent with lim bn = b.


n→∞

Proof: Let ε > 0. We choose Na , Nc ∈ N such that

∀ n ≥ Na : an ∈ (b − ε, b + ε) and ∀ n ≥ Nc : cn ∈ (b − ε, b + ε).

For Nb := max{Na , Nc }, we infer that

b − ε < an ≤ bn ≤ cn < b + ε

and hence bn ∈ (b − ε, b + ε) for all n ≥ Nb . Thus, lim bn = b, as asserted. □


n→∞

1 From 1
Example 3.5 (ii), we know that lim = 0. Hence, Proposition 3.6 (iii) implies that
n→∞ n
1
lim = 0 for all exponents k ∈ N. Indeed, this can be proved using mathematical induction
n→∞ nk
1
with respect to k; in the induction step, we write nk+1 = n1k · n
1
.

41
3 Sequences and series

Example 3.9: Let us consider the sequence (bn )n∈N with



n2 + 1
bn := for all n ∈ N.
n

We observe that n2 ≤ n2 + 1 ≤ (n + 1)2 and hence n ≤ n2 + 1 ≤ n + 1, from
which it follows that

n n2 + 1 n+1 1
1= ≤ ≤ =1+
n n n n
for all n ∈ N. Hence, we have

an ≤ bn ≤ cn for all n ∈ N,

where the sequences (an )n∈N and (cn )n∈N are defined by
1
an := 1 and cn := 1 + for all n ∈ N,
n
respectively. In Example 3.5 (i), we have seen that the constant sequence (an )n∈N
is convergent with limit lim an = 1. In Example 3.5 (ii), we have shown that
n→∞
1
lim = 0, so that Proposition 3.6 (ii) guarantees the convergence of the sequence
n→∞ n
(cn )n∈N with limit
1
lim cn = lim 1 + lim = 1 + 0 = 1.
n→∞ n→∞ n→∞ n
Because lim an = 1 = lim cn , we can apply Theorem 3.8; this implies that
n→∞ n→∞
(bn )n∈N is convergent with lim bn = 1.
n→∞

Notation: A sequence (an )n∈N is said to be bounded (from above/below) if the set
{an : n ∈ N} is bounded (from above/below).

Proposition 3.10 (Boundedness of convergent sequences): Let (an )n∈N be a con-


vergent sequence in R. Then (an )n∈N is bounded.

Proof: Let (an )n∈N be convergent sequence, say with limit a ∈ R. By definition of
convergence, applied to ε = 1, there exists some N ∈ N such that |an − a| < 1 for
all n ≥ N . Hence, we get by the triangle inequality (2.1) that

|an | = |a + (an − a)| ≤ |a| + |an − a| < |a| + 1 for all n ≥ N .

Thus, the set {an : n ∈ N} is bounded from above by

C := max{|a1 |, |a2 |, . . . , |aN −1 |, |a| + 1}

and bounded from below by −C, hence bounded. □

42
3.2 Convergence criteria

Example 3.11 (Divergent sequences): The sequence (cn )n∈N defined by cn := n


for all n ∈ N is bounded from below but not from above, hence not bounded. By
contraposition of Proposition 3.10, it follows that (cn )n∈N cannot be convergent;
hence, it is divergent.

Definition 3.12 (Monotonic sequences): A sequence (an )n∈N in R is said to be

• monotonically increasing if we have

an+1 ≥ an for all n ∈ N;

• strictly monotonically increasing if we have

an+1 > an for all n ∈ N;

• monotonically decreasing if we have

an+1 ≤ an for all n ∈ N;

• strictly monotonically decreasing if we have

an+1 < an for all n ∈ N;

• (strictly) monotonic if it is (strictly) monotonically increasing or decreasing.

Theorem 3.13 (Monotone convergence theorem): A monotonic sequence in R is


convergent if and only if it is bounded.

Proof: Let (an )n∈N be a monotonic sequence in R.

“⇒”: If (an )n∈N is convergent, then Proposition 3.10 tells us that (an )n∈N is
bounded.
“⇐”: Let (an )n∈N be bounded. We prove convergence of (an )n∈N in the case that
(an )n∈N is monotonically increasing; the proof for monotonically decreasing
sequences is analogous.
Since (an )n∈N is bounded, the set {an : n ∈ N} is bounded and hence, in
particular, bounded from above. Thus, by the supremum property of R, it
has a supremum; we put

a := sup{an : n ∈ N}.

We claim that (an )n∈N converges to a. To prove this, we proceed as follows.


Let ε > 0 be given. Since a is the least upper bound of {an : n ∈ N}, a − ε
cannot be an upper bound of {an : n ∈ N}; therefore, there exists some N ∈ N
such that
aN > a − ε.

43
3 Sequences and series

Since (an )n∈N is assumed to be monotonically increasing, we have


an ≥ aN > a − ε for all n ∈ N with n ≥ N .

On the other hand, since a is an upper bound of {an : n ∈ N}, we have


an ≤ a < a + ε for all n ∈ N (with n ≥ N ).

In summary, we get
a − ε < an < a + ε for all n ∈ N with n ≥ N ,

or equivalently,
|an − a| < ε for all n ∈ N with n ≥ N .
Thus, we have lim an = a, as we wished to show. □
n→∞

Remark: The proof of Theorem 3.13 shows that the following is true: A monotoni-
cally increasing sequence (an )n∈N is convergent if and only if is it bounded from
above; in this case, we have
lim an = sup{an : n ∈ N}.
n→∞

Likewise, a monotonically decreasing sequence (an )n∈N is convergent if and only if


it is bounded from below; in this case, we have
lim an = inf{an : n ∈ N}.
n→∞

3.3 Recursively defined sequences


Often, one encounters sequences (an )n∈N the elements an of which are not given
(or even cannot be given) by an explicit formula. For instance, (3, 1, 4, 1, 5, 2, . . . )
is a sequence, namely the sequence of all decimal places of π.
There are sequences (an )n∈N , for which explicit formulas are known but which
can be described much easier in terms of recursions. In the most general form, this
means that there are certain functions fn for all n ∈ N such that
an+1 = fn (a1 , . . . , an ) for all n ∈ N,
i. e., the (n+1)-th element an+1 of the sequence can be computed out of all previous
elements a1 , . . . , an using the function fn ; of course, this recursive definition of
(an )n∈N requires that a value for first element a1 is specified. Often, the recursion
takes the much simpler form
an+1 = f (an ) for all n ∈ N, (∗)
i. e., the (n + 1)-th element an+1 of the sequence can be computed out of only the
preceding element an with the help of the fixed function f .

44
3.3 Recursively defined sequences

Example 3.14 (Recursion): Let (an )n∈N be the sequence which is defined the re-
cursion √ √
3
a1 := 6 and an+1 := 3 6 + an for all n ∈ N.
Note
√ that this recursion is if the form (∗) with the function f defined by f (x) :=
3
6 + x. More concretely, this means that
r !
√ √ √
q q
3 3 3
3 3 3
(an )n∈N = 6, 6 + 6, 6 + 6 + 6, . . . .

How can we control the behavior of (an )n∈N as n → ∞. Does (an )n∈N have a
limit? If so, what is its value? The problem is the lack of an explicit formula for
an ; we only know how to compute an element of the sequence if the preceding one
has already been computed. Therefore, the rules collected in Proposition 3.6 are
not of any use to us; even if we would expect the (an )n∈N to be convergent, the
definition of convergence given in Definition 3.3 cannot be applied to verify this
claim without having a candidate for the limit. But we are not lost! Fortunately,
there are criteria for convergence of sequences which do not rely on prior knowledge
of the limit. One instance is Theorem 3.13; this criterion, however, imposes quite
restrictive conditions, namely that the sequence is monotonic and bounded. To see
whether there is any chance to apply this criterion in our situation, we compute the
fist elements of the given sequence (an )n∈N and plot them in a coordinate system:

n an
1 1.81712059283214
2 1.98464242367434
3 1.99871938215685
4 1.99989327615152
5 1.99999110630641
6 1.99999925885859
7 1.99999993823821
8 1.99999999485318
9 1.99999999957110
10 1.99999999996426
.. ..
. .

Thus, it seems possible that the sequence (an )n∈N considered here is monotonically
increasing (even strictly) and bounded (from above). We verify these claims as
follows:
The sequence is strictly monotonically increasing: We show that
∀n ∈ N : an+1 > an .
In fact, we give a proof by mathematical induction:

45
3 Sequences and series

√ √
base case n = 1: We have a2 = 3 6 + a1 > 3 6 = a1 because 6 + a1 > 6.
induction step n → n + 1: Assume that the assertion an+1 > an is true
for some n ∈ N. It follows that 6 + an+1 > 6 + an and hence, by the
recursion,
p √
an+2 = 3 6 + an+1 > 3 6 + an = an+1 .

This shows that the assertion is true for n + 1 as well.


The sequence is bounded from above: We show that

∀n ∈ N : an < 2.

Again, we give a proof by mathematical induction:


√ √
base case n = 1: We have 8 > 6 and hence a1 = 3 6 < 3 8 = 2.
induction step n → n + 1: Assume that the assertion an < 2 is true for
some n ∈ N. It follows that 6 + an < 6 + 2 = 8; using the recursion, we
get that
√ √
3
an+1 = 3 6 + an < 8 = 2.

This shows that the assertion is true for n + 1 as well.

Because we have verified that (an )n∈N is monotonically increasing and bounded
from above, Theorem 3.13 can be applied; this proves convergence of (an )n∈N .
Now that we know that (an )n∈N is convergent, we can compute its limit a :=
lim an . For that purpose, we note the following:
n→∞

• With (an )n∈N , the “shifted” sequence (an+1 )n∈N is also convergent to a.
• Since (an+1 )n∈N converges to a, Proposition 3.6 tells us that (a3n+1 )n∈N
converges to a3 .
• Similarly, since (an )n∈N converges to a, Proposition 3.6 guarantees that
(6 + an )n∈N converges to 6 + a.

Now, the recursion an+1 = 3 6 + an implies a3n+1 = 6 + an for all n ∈ N and hence

a3 = lim a3n+1 = lim (6 + an ) = 6 + a.


n→∞ n→∞

This means that we have derived an equation for the unknown limit a, namely
a3 = 6 + a. It follows that

0 = a3 − a − 6 = (a − 2)(a2 + 2a + 3) = (a − 2) (a + 1)2 + 2

| {z }
̸=0

and hence a = 2.

46
3.4 The Bolzano-Weierstraß theorem

3.4 The Bolzano-Weierstraß theorem


In Example 3.5 (ii), we have shown that the sequence (bn )n∈N from Example 3.2
(ii), which was defined by
(
0, if n is even
bn := for all n ∈ N,
1, if n is odd

is divergent. However, the values 0 and 1 seem to play some special role for the
sequence (bn )n∈N and behave very much like limits. In fact, these are the so-called
accumulation points of (bn )n∈N in the sense of the next definition.
Definition 3.15 (Accumulation point): Let (an )n∈N be a sequence in R and let
a ∈ R. We say that a is accumulation point of (an )n∈N if, for each ε > 0, the
ε-neighborhood (a − ε, a + ε) of a contains infinitely many elements of the sequence
(an )n∈N ; in other words, all sets

{n ∈ N : |an − a| < ε} for ε > 0

are infinite.

Example 3.16 (Accumulation points):


(i) The sequence ((−1)n )n∈N has the accumulation points −1 and 1.
(ii) The sequence (n)n∈N has no accumulation points.
(iii) In Theorem 2.36, we have seen that Q is countable and in fact countably
infinite. Thus, there exists a bijection a : N → Q and hence a sequence
(an )n∈N the elements of which are exactly the rational numbers. Using
Proposition 2.16 (ii), one sees that every open interval (and in particular
each ε-neighborhood of any a ∈ R) contains infinitely many rational numbers;
hence, every a ∈ R is an accumulation point of the sequence (an )n∈N .

We can characterize accumulation points using the concept of subsequences. The


latter is the content of the next definition.
Definition 3.17 (Subsequence): Let (an )n∈N be a sequence in R and let (nk )k∈N be
a strictly monotonically increasing sequence in N. The sequence

(ank )k∈N = (an1 , an2 , an3 , . . . )

is called a subsequence of (an )n∈N .

Example 3.18 (Subsequences): If (an )n∈N is a sequence, then (a2k )k∈N and (ak2 )k∈N
are subsequences of (an )n∈N , for instance, whereas a permutation like

(a1 , a3 , a2 , a4 , a6 , a5 , . . . )

is not.

47
3 Sequences and series

Now, we can formulate the announced characterization of accumulations points.


Theorem 3.19 (Accumulation points and subsequences): Let (an )n∈N be a sequence
in R and let a ∈ R. Then the following statements hold true:
(i) We have that a is an accumulation point of (an )n∈N if and only if there exists
a subsequence (ank )k∈N of (an )n∈N with lim ank = a.
k→∞
(ii) If (an )n∈N is convergent and lim an = a, then each subsequence (ank )k∈N
n→∞
of (an )n∈N is also convergent with lim ank = a.
k→∞
(iii) If (an )n∈N is convergent and lim an = a, then a is the only accumulation
n→∞
point of (an )n∈N .

Proof:
(i) “⇒”: Let a ∈ R be an accumulation point of (an )n∈N . By Definition 3.15,
we know that all sets

{n ∈ N : |an − a| < ε} for ε > 0


1
are infinite; in particular (if we choose ε = k for k ∈ N), the sets

Xk := {n ∈ N : |an − a| < k1 } for k ∈ N

are all infinite. With the help of this observation, we can now construct
a subsequence (ank )k∈N of (an )n∈N with the property
1
|ank − a| < for all k ∈ N.
k
To this end, we proceed as follows:
• Since the set X1 is infinite, we have in particular that X1 ̸= ∅, i. e.,
there exists n1 ∈ N such that |an1 − a| < 1.
• Let n1 < n2 < · · · < nk with |anj − a| < 1j for j = 1, . . . , k be
constructed. Since the set Xk+1 is infinite, we have in particular
that Xk+1 \ {n ∈ N : n ≤ nk } ≠ ∅; thus, there exists nk+1 ∈ N such
1
that nk < nk+1 and |ank+1 − a| < k+1 .
Since the sequence (nk )k∈N of indices is strictly monotonically increasing,
(ank )k∈N is indeed a subsequence of (an )n∈N . Moreover, we notice that
it converges to a; indeed, we have by construction |ank − a| < k1 and
hence
1 1
a − < ank < a + for all k ∈ N;
k k
because lim a − k1 = a = lim a + k1 , Theorem 3.8 implies that
 
k→∞ k→∞
(ank )k∈N is convergent with lim ank = a.
k→∞

48
3.4 The Bolzano-Weierstraß theorem

“⇐”: Let (ank )k∈N be a subsequence of (an )n∈N with lim ank = a. Let
k→∞
ε > 0. By definition of convergence, there exists K ∈ N such that
|ank − a| < ε for all k ≥ K; in other words, we have

{nk : k ∈ N, k ≥ K} ⊆ {n ∈ N : |an − a| < ε}.

Thus, because {nk : k ∈ N, k ≥ K} is infinite, {n ∈ N : |an − a| < ε}


must be infinite as well. According to Definition 3.15, this shows that a
is an accumulation point of the sequence (an )n∈N .
(ii) Let (an )n∈N be convergent with lim an = a and let (ank )k∈N be any subse-
n→∞
quence of (an )n∈N . For ε > 0, we find N ∈ N such that |an − a| < ε for all
n ≥ N . Since (nk )k∈N is strictly monotonically increasing, there is2 K ∈ N
such that nk ≥ N for all k ≥ K; thus, we have |ank − a| < ε for all k ≥ K.
This proves that (ank )k∈N is also convergent with lim ank = a.
k→∞

(iii) Let (an )n∈N be a convergent sequence with lim an = a. Since (an )n∈N is
n→∞
a subsequence of itself, part (i) implies that a is an accumulation point of
(an )n∈N . For any other accumulation point a′ ∈ R of (an )n∈N , we find by
part (i) a convergent subsequence (ank )k∈N of (an )n∈N with lim ank = a′ .
k→∞
However, by part (ii), we have lim ank = a. Thus, a′ = a. This means that
k→∞
a is the only accumulation point of (an )n∈N . □

Example 3.20 (Approximation by rational numbers): Let r ∈ R be given. Accord-


ing to Example 3.16 (iii), we have that r is an accumulation point of the sequence
(an )n∈N induced by an enumeration of Q. Thus, by Theorem 3.19 (i), there exists a
subsequence of (an )n∈N which converges to r. In particular, there exists a sequence
(qn )n∈N of rational numbers with lim qn = r.
n→∞

In Example 3.16, we have seen that there are sequences without accumulation
points. As the following theorem shows, this is only possible for unbounded
sequences.

Theorem 3.21 (Bolzano-Weierstraß): Every bounded sequence in R has a conver-


gent subsequence.

Proof: The proof relies on the following observation:

Every sequence in R has a monotonically increasing or a monotonically


decreasing subsequence.
2 Since
(nk )k∈N is a strictly monotonically increasing sequence in N, we have that nk ≥ k for all
k ∈ N; this can easily be shown using mathematical induction. Thus, K = N does the job.

49
3 Sequences and series

To verify this assertion, we take any sequence (an )n∈N in R. We consider the set

X := {n ∈ N : ( ∀ m ≥ n : an > am )};

elements an with n ∈ X are considered as peaks of the sequence (an )n∈N . We


consider the following two cases:
Case 1: X is infinite. Since X is infinite, it contains a strictly monotonically
increasing sequence (nk )k∈N . The subsequence (ank )k∈N is then monotonically
decreasing.
Case 2: X is finite or empty. We choose n1 = 1 + max X if X is finite or n1 = 1
if X is empty. Since an1 cannot be a peak of the sequence (an )n∈N , there
is some n2 > n1 such that an2 ≥ an1 . Likewise, an2 cannot be a peak of
the sequence (an )n∈N since all peaks have indices n satisfying n < n1 . Thus,
we may inductively continue this construction. This results in a strictly
monotonically increasing sequence (nk )k∈N in N such that ank+1 ≥ ank for
all k ∈ N. The subsequence (ank )k∈N is thus monotonically increasing.
Now, let (an )n∈N be a bounded sequence in R. By the previous result, it has a
monotonic subsequence (ank )k∈N . Note that (ank )k∈N is bounded as a subsequence
of a bounded sequence. Thus, by Theorem 3.13, (ank )k∈N is convergent. □

Thanks to Theorem 3.19 (i), the statement of Theorem 3.21 can be rephrased
as follows: Every bounded sequence in R has an accumulation point. This will be
used in (the proof of) Theorem 3.22.

3.5 Limes inferior and limes superior


Theorem 3.21 guarantees that every bounded sequence has an accumulation point.
Now, we take a closer look at the set of all accumulation points of a given bounded
sequence.
Theorem 3.22 (Least and greatest accumulation points): Let (an )n∈N be a bounded
sequence. The set of all accumulation points of (an )n∈N has a minimum and a
maximum.

Proof: Since (an )n∈N is bounded, there exists C > 0 such that −C ≤ an ≤ C for
all n ∈ N.
Let a ∈ R be any accumulation point of (an )n∈N . By Theorem 3.19 (i), there
exists a subsequence (ank )k∈N of (an )n∈N such that lim ank = a. Since −C ≤
k→∞
ank ≤ C for all k ∈ N, we get from Proposition 3.6 (i) that −C ≤ a ≤ C. This
proves that the set X of all accumulation points of (an )n∈N is bounded.
By the supremum property of R (note that X = ̸ ∅ by Theorem 3.21), the set
X has a supremum; put s := sup X. We claim that s ∈ X, i. e., s = max X. This
claim is verified as follows.

50
3.5 Limes inferior and limes superior

Let ε > 0. Since s is the least upper bound of X, s − 2ε cannot be an upper


bound of X; hence, there exists a ∈ X such that s ≥ a > s − 2ε . By definition of X,
a is an accumulation point of (an )n∈N ; in particular, the set {n ∈ N : |an − a| < 2ε }
is infinite. For any such n, we have
ε ε ε  ε ε
s + ε > s + ≥ a + > an > a − > s − − =s−ε
2 2 2 2 2
and hence |an − s| < ε; thus, we see that {n ∈ N : |an − s| < ε} is infinite. By
Definition 3.15, this means that s is an accumulation point of (an )n∈N , i. e., s ∈ X.
In the same way, one proves that X has a minimum.3 □

Definition 3.23 (Limes inferior and limes superior): Let (an )n∈N be a bounded se-
quence.
(i) The minimum of the set of all accumulation points of (an )n∈N is called the
limes inferior of (an )n∈N and denoted by lim inf an .
n→∞
(ii) The maximum of the set of all accumulation points of (an )n∈N is called the
limes superior of (an )n∈N and denoted by lim sup an .
n→∞

By definition, we have
lim inf an ≤ lim sup an .
n→∞ n→∞

Example 3.24 (Limes inferior and limes superior):


(i) For a convergent sequence (an )n∈N we have

lim inf an = lim an = lim sup an .


n→∞ n→∞ n→∞

n
(ii) For the sequence ((−1) )n∈N we have

lim inf (−1)n = −1 and lim sup(−1)n = 1.


n→∞ n→∞

With arguments similar to those in the proof of Theorem 3.22, we get the
following characterization of the limes inferior and the limes superior:
Proposition 3.25 (Properties of the limes inferior and limes superior): Let (an )n∈N
be a bounded sequence and a ∈ R. Then the following statements hold true:
(i) We have lim inf an = a if and only if the following two conditions are satisfied
n→∞
for each ε > 0:
3 The supremum property of R ensures that every subset of R which is bounded from above has a
supremum. Remarkably, the supremum property of R also ensures that each subset of R which
is bounded from below has an infimum. This is a consequence of Problem 3 on Homework
Sheet 4: If Y ⊆ R is bounded from below, then −Y := {−y : y ∈ Y } is bounded from above.
Hence sup(−Y ) exists and it follows that inf Y exists; in fact, we have inf Y = − sup(−Y ).

51
3 Sequences and series

• We have a − ε < an for almost all n ∈ N;


• we have an < a + ε for infinitely many n ∈ N.
(ii) We have lim sup an = a if and only if the following two conditions are satisfied
n→∞
for each ε > 0:
• We have a − ε < an for infinitely many n ∈ N;
• we have an < a + ε for almost all n ∈ N.

Proof:

(i) Based on Definition 3.23, one can show that

lim inf an = − lim sup(−an ).


n→∞ n→∞

Thus, the assertion in (i) can easily be deduced from (ii); consequently, it
suffices to establish the latter.
(ii) “⇒”: Assume that lim sup an = a. Let ε > 0 be given. We verify the two
n→∞
asserted properties:
• In the proof of Theorem 3.22, we have seen that {n ∈ N : |an − a| <
ε} is an infinite set; in particular, we have a − ε < an for infinitely
many n ∈ N.
• Assume to the contrary that there are infinitely many n ∈ N such
that an ≥ a+ε. Then we can find a strictly monotonically increasing
sequence (nk )k∈N in N such that ank ≥ a + ε for all k ∈ N. Since
(an )n∈N is bounded, its subsequence (ank )k∈N is bounded as well. By
Theorem 3.21, (ank )k∈N has a convergent subsequence; by replacing
(ank )k∈N by this subsequence if necessary, we may assume without
loss of generality (why?) that (ank )k∈N itself is convergent. Since
ank ≥ a + ε for all k ∈ N, it follows from Proposition 3.6 (i) that
lim ank ≥ a + ε. This means that the sequence (an )n∈N has an
k→∞
accumulation point strictly greater than a; this, however, contradicts
the fact that a = lim sup an is the greatest accumulation point of
n→∞
(an )n∈N according to by Definition 3.23.
“⇐”: Assume that (an )n∈N satisfies the two conditions for all ε > 0; we have
to show that lim sup an = a. To this end, we verify for a the defining
n→∞
properties of lim sup an according to Definition 3.23:
n→∞
a is an accumulation point: Combining the two assumed properties of
(an )n∈N , we get that for each ε > 0 there are infinitely many n ∈ N
for which a − ε < an < a + ε and hence |an − a| < ε holds true.
Thus, by Definition 3.15, we get that a is an accumulation point of
(an )n∈N .

52
3.5 Limes inferior and limes superior

a is the greatest accumulation point: Take any real number b > a.


We prove that b cannot be an accumulation point of (an )n∈N . To
this end, we put ε := b−a2 > 0. Then, by the second assumption
on (an )n∈N , we have an < a + ε = b − ε for almost all n ∈ N. This
means that the ε-neighborhood (b − ε, b + ε) of b can contain at most
finitely many elements of the sequence (an )n∈N ; thus, by Definition
3.15, b cannot be an accumulation point of (an )n∈N . □

Our study of the set of accumulation points of bounded sequences leads to the
following characterization of convergence.

Theorem 3.26 (Characterization of convergence): Let (an )n∈N be a bounded se-


quence in R. Then the following statements are equivalent:

(i) The sequence (an )n∈N has exactly one accumulation point.
(ii) We have lim inf an = lim sup an .
n→∞ n→∞

(iii) The sequence (an )n∈N is convergent.

Proof:

“(i) ⇒ (ii)”: This holds true by Definition 3.23.


“(ii) ⇒ (iii)”: Put a := lim inf an = lim sup an . We claim that (an )n∈N converges
n→∞ n→∞
to a. To verify this, we proceed as follows: Let ε > 0. By combining the
characterizations of lim inf an and lim sup an given in Proposition 3.25, we
n→∞ n→∞
get that a − ε < an < a + ε and hence |an − a| < ε for almost all n ∈ N, as
asserted.
“(iii) ⇒ (i)”: This is the statement of Theorem 3.19 (iii). □

Theorem 3.26 says in particular that Theorem 3.19 (iii) is an equivalence: A


bounded sequence (an )n∈N is convergent to a ∈ R if and only if a is the only
accumulation point of (an )n∈N . Combining this insight with Proposition 3.10, we
conclude that a sequence is convergent if and only if it is bounded and has exactly
one accumulation point. Note that the boundedness condition cannot be dropped
here as the following example shows: The (unbounded) sequence (an )n∈N defined
by
(
0, if n is even
an := for all n ∈ N
n, if n is odd

has exactly one accumulation point, namely 0 (why?), but fails to be convergent.
There are rules for the limes superior and limes inferior, but these are more
subtle than the ones for the ordinary limit which we listed in Proposition 3.6. For

53
3 Sequences and series

instance (see Problem 1 on Homework Sheet 7), we have for bounded sequences
(an )n∈N and (bn )n∈N that

lim sup(an + bn ) ≤ lim sup an + lim sup bn and


n→∞ n→∞ n→∞
lim sup(an + bn ) ≥ lim sup an + lim inf bn .
n→∞ n→∞ n→∞

Moreover, we have for every bounded sequence (an )n∈N and each c ∈ R that

c · lim sup an , whenever c ≥ 0
lim sup(c · an ) = n→∞ ;
n→∞ c · lim inf an , whenever c ≤ 0
n→∞

the proof of these identities is left for private practicing. Note that the case c = −1
was used in the proof of Proposition 3.25.

3.6 Cauchy sequences and Cauchy criterion


Like the monotone convergence theorem (see Theorem 3.13), the so-called Cauchy
criterion also allows us to prove convergence without prior knowledge of the limit.
It is mostly used for theoretical purposes.
Definition 3.27 (Cauchy sequence): A sequence (an )n∈N in R is called Cauchy se-
quence if
∀ ε > 0 ∃ N ∈ N ∀ m, n ≥ N : |an − am | < ε.

Example 3.28 (Cauchy sequences): Let (sn )n∈N be the sequence defined by
n
X 1
sn := for all n ∈ N.
k
k=1

For all n ∈ N, we have that


2n n 2n
X 1 X1 X 1 1 1
s2n − sn = − = ≥n· = .
k k k 2n 2
k=1 k=1 k=n+1

This means that for ε = 12 , we cannot find an N ∈ N such that |sn − sm | < ε for
all n, m ≥ N ; thus, (sn )n∈N is not a Cauchy sequence.

Theorem 3.29 (Cauchy criterion): A sequence (an )n∈N in R is convergent if and


only if it is a Cauchy sequence.

Proof: “⇒”: Assume that (an )n∈N is convergent; put a := lim an . Let ε > 0 be
n→∞
given. Then, there exists N ∈ N such that
ε
|an − a| < for all n ≥ N .
2

54
3.6 Cauchy sequences and Cauchy criterion

Thus, by the triangle inequality (2.1), we get for all n, m ≥ N that


ε ε
|an − am | = |(an − a) + (a − am )| ≤ |an − a| + |am − a| < + = ε.
2 2
This proves that (an )n∈N is a Cauchy sequence.
“⇐”: Assume that (an )n∈N is a Cauchy sequence, i. e.,

∀ ε > 0 ∃ N ∈ N ∀ m, n ≥ N : |an − am | < ε. (∗)

The first step is to prove that (an )n∈N is bounded; this is analogous to the
proof of Proposition 3.10. By applying (∗) to ε = 1, we observe that there
exists some N ∈ N such that

|an − am | < 1 for all m, n ≥ N .

In particular, we get with the help of the triangle inequality (2.1) that

|an | = |aN + (an − aN )| ≤ |aN | + |an − aN | < |aN | + 1 for all n ≥ N .

Thus, the set {an : n ∈ N} is bounded from above by

C := max{|a1 |, |a2 |, . . . , |aN −1 |, |aN | + 1}

and bounded from below by −C, hence bounded.


Now, we can use Theorem 3.26; consequently, if we put

a := lim inf an and a := lim sup an ,


n→∞ n→∞

it suffices to show that a = a in order to prove convergence of (an )n∈N .


a−a
By definition, we have a ≤ a; assume that a < a. For ε := 3 > 0, there
exists by (∗) some N ∈ N such that

|an − am | < ε for all n, m ≥ N .

Since both a and a are accumulation points of (an )n∈N , we find n, m ≥ N


such that

am ∈ (a − ε, a + ε) and an ∈ (a − ε, a + ε).

It follows that

|an − am | ≥ an − am > (a − ε) − (a + ε) = (a − a) −2ε = ε,


| {z }
=3ε

which contradicts the choice of N . Thus, our assumption was wrong, i. e., we
have a = a, as we wished to show. □

55
3 Sequences and series

Example 3.30 (Application of the Cauchy criterion): The sequence (sn )n∈N con-
sidered in Example 3.28 is not a Cauchy sequence and hence not convergent.

Example 3.31 (Construction of the real numbers): Using the concept of Cauchy
sequences, we can construct the real numbers R out of the rational numbers Q. Let
C be the set of all Cauchy sequences (an )n∈N in Q. On C, we define an equivalence
relation ∼ by

(an )n∈N ∼ (bn )n∈N :⇔ (an − bn )n∈N is a null sequence;

it is straightforward to verify that ∼ is indeed an equivalence relation on C.


Intuitively, each equivalence class [(an )n∈N ] corresponds to the joint limit (in R) of
all its representatives (an )n∈N .
With a little bit of algebra, one can show that the quotient set C⧸∼ is a field.
Since constant sequences are convergent and hence Cauchy sequences, Q can be
embedded in C⧸∼. Moreover, we can extend the total order ≤ from Q to C⧸∼.
Finally, the supremum property of C⧸∼ is a consequence of the construction.

3.7 Improper convergence and complexity classes


All three sequences (n)n∈N , (−n)n∈N , and ((−1)n )n∈N are divergent, but each of
them actually shows a different behavior as n → ∞. To capture this observation,
we introduce the concept of “improper convergence”, which is a refinement of
divergence.

Definition 3.32 (Improper limits): Let (an )n∈N be a sequence in R. We write


n→∞
• an −−−−→ ∞ if we have: ∀ R > 0 ∃ N ∈ N ∀ n ≥ N : an > R
n→∞
• an −−−−→ −∞ if we have: ∀ R > 0 ∃ N ∈ N ∀ n ≥ N : an < −R

We point out that it is also common to write lim an = ∞ and lim an = −∞


n→∞ n→∞
n→∞ n→∞
if an −−−−→ ∞ and an −−−−→ −∞, respectively, but in order to reduce the risk of
confusion, we will avoid this notation.
Following this philosophy, we define now

• inf X := −∞ for any set X ⊆ R which is not bounded from below;


• sup X := ∞ for any set X ⊆ R which is not bounded from above.

Accordingly, we define

• lim inf an := −∞ for any sequence (an )n∈N which is not bounded from below;
n→∞

• lim sup an := ∞ for any sequence (an )n∈N which is not bounded from above.
n→∞

56
3.7 Improper convergence and complexity classes

In this extended meaning, the limes inferior and the limes superior exist for any
sequence.
Improper convergence to ∞ occurs, for instance, when considering the running
time of algorithms. If (an )n∈N describes in some sense the cost of an algorithm (e. g.,
n→∞
its running time) depending on the input size n ∈ N, then typically an −−−−→ ∞.
The concept of improper convergence, however, does not specify the speed by which
(an )n∈N converges to ∞ as n → ∞. This is the purpose of the next definition.
Definition 3.33 (Landau’s little o and big O notation): Let A = (an )n∈N and B =
(bn )n∈N be sequences in R. We say that
(i) A is in O(B) (and write A ∈ O(B) or sometimes A = O(B)) if the sequence
an
bn n∈N is bounded.
(ii) A is in o(B) (and write A ∈ o(B) or sometimes A = o(B)) if the sequence
an
bn n∈N is a null sequence.

Example 3.34: The following table collects some sequences B = (bn )n∈N which are
often used to describe the speed of convergence to ∞.
order complexity
O(1) constant
O(log(n)) logarithmic
O(n) linear
O(n log(n)) n log n
O(n2 ) quadratic
O(n3 ) cubic
k
O(n ) for some k ∈ N polynomial
O(an ) for some a > 1 exponential
Example 3.35: Suppose that n integers are given in an arbitrary order. The
purpose of a sorting algorithm is to bring these numbers in an increasing order.
The algorithm “Insertion Sort” works as follows: if the sub-list of the first k numbers
is already in increasing order, we insert the (k + 1)-th number in the sorted list
by moving all larger numbers of the sub-list one position to the right. The total
number of moves is
• in the “worst case” (i. e., the original list was in descending order)
n
X n(n − 1) n2 n
an = (k − 1) = = − ;
2 2 2
k=2

• in the “average case” (i. e., on average, if all numbers in the original list are
“randomly” positioned; see MfCS III)
n(n − 1) n2 n
bn = = − .
4 4 4
Then, we have that (an ), (bn ) ∈ O(n2 ), which means that the cost of the worst
case and the average case are of the same order, namely quadratic.

57
3 Sequences and series

3.8 Series
Definition 3.36: Let (an )n∈N be a sequence in R. We associate to (an )n∈N the
sequence (sn )n∈N which is defined by
n
X
sn := ak for all n ∈ N.
k=1


P
(i) We call (sn )n∈N a series and denote it by an .
n=1

P
(ii) We call sn the n-th partial sum of ak .
k=1

P
(iii) If the sequence (sn )n∈N is convergent, we say that the series an converges;
n=1

P
in this case, we denote also its limit by an , i. e.,
n=1


X
an := lim sn
n→∞
n=1

and refer to it as the sum of the series.



P
Often, we consider series an associated to sequences (an )n∈N0 with N0 =
n=0
N ∪ {0}; these start with a 0-th partial sum.

Example 3.37 (Harmonic and geometric series):



1
P
(i) The series n is called the harmonic series. It is divergent, as we have
n=1
seen in Example 3.30.

xn for x ∈ R is called a geometric series. Its partial sums
P
(ii) The series
n=0
n
k
P
sn = x satisfy
k=0

n
X n+1
X
(1 − x)sn = xk − xk = 1 − xn+1 .
k=0 k=1

Thus, we have
(
n + 1, if x = 1
sn = 1−xn+1
1−x , ̸ 1
if x =

58
3.8 Series

for all n ∈ N0 . Using that (xn )n∈N is convergent if and only if x ∈ (−1, 1]
(see Problem 2 on Classroom Sheet 6), we infer that the geometric series is
1
convergent if and only if |x| < 1; in this case, we have lim sn = 1−x , i. e.,
n→∞


X 1
xn = .
n=0
1−x

Since convergence of series is build upon the concept of convergence of sequences,


some of the rules collected in Proposition 3.6 carry over to series. In fact, if

P P∞ ∞
P P∞
an and bn are convergent, then (an + bn ) and can for any c ∈ R are
n=1 n=1 n=1 n=1
convergent as well and we have that

X ∞
X ∞
X ∞
X ∞
X
(an + bn ) = an + bn and can = c an .
n=1 n=1 n=1 n=1 n=1


P
Theorem 3.38 (Necessary condition for convergence): If the series an is con-
n=1
vergent, then (an )n∈N is a null sequence.

P
Proof: Let an be convergent. By definition, this means that the sequence
n=1
n
P
(sn )n∈N of partial sums sn := ak is convergent. It follows that the “shifted
k=1
sequence” (sn+1 )n∈N is also convergent and has the same limit as the original
sequence (sn )n∈N . Since
n+1
X n
X
sn+1 = ak = ak + an+1 = sn + an+1 ,
k=1 k=0

we have an+1 = sn+1 − sn for all n ∈ N. Therefore, the rules for limits Proposi-
tion 3.6 tell us that (an+1 )n∈N is convergent (as the difference of two convergent
sequences) with the limit

lim an+1 = lim (sn+1 − sn ) = lim sn+1 − lim sn = 0;


n→∞ n→∞ n→∞ n→∞

in other words, (an+1 )n∈N is a null sequence. It follows that (an )n∈N is also a null
sequence, as desired. □

Example 3.39 (Divergent series): The sequence ((−1)n )n∈N is not a null sequence

(−1)n
P
(and not even convergent); hence, Theorem 3.38 tells us that the series
n=1
is divergent.

59
3 Sequences and series

More directly, we see this with the help of the sequence (sn )n∈N of partial sums

(−1)n ; note that
P
of the series
n=0

n
(
X
k −1, if n is odd
sn = (−1) = for all n ∈ N.
k=1
0, if n is even

Hence (compare Example 3.5 (iii), where up to the sign the same sequence has
been considered), we observe that (sn )n∈N is divergent.

P
The converse of Theorem 3.38 is not true, meaning that a series an is
n=1
not automatically convergent if (an )n∈N is a null sequence; see Example 3.37 (i).
However, the following theorem shows that this works at least in particular cases.
Theorem 3.40 (Leibniz’s test): If (an )n∈N is a monotonic decreasing null sequence,

(−1)n an is convergent.
P
then the series
n=1

Proof: This is Problem 3 on Homework Sheet 7. □

Furthermore, we can apply the sandwich theorem, the monotone convergence


theorem, and the Cauchy criterion to series. Further criteria allow us to prove even
a stronger form of convergence.

P
Definition 3.41 (Absolute convergence): A series an is said to be absolutely
n=1

P
convergent if the series |an | is convergent.
n=1

Theorem 3.42 (Absolute convergence implies convergence): Every absolutely con-


vergent series is convergent.

P
Proof: Let an be an absolutely convergent series. Take ε > 0. By the Cauchy
n=1

P
criterion (Theorem 3.29), applied to the sequence of partial sums of |an |, there
n=1
exists some N ∈ N such that
m
X m
X n
X
|ak | = |ak | − |ak | < ε for all m ≥ n ≥ N .
k=n+1 k=1 k=1

From the triangle inequality (2.1), we infer that


m
X n
X m
X m
X
ak − ak = ak ≤ |ak | < ε for all m ≥ n ≥ N .
k=1 k=1 k=n+1 k=n+1

60
3.8 Series

Thus, by the Cauchy criterion (Theorem 3.29), applied to the sequence of partial

P ∞
P
sums of an , it follows that an is convergent. □
n=1 n=1

The arguments in the proof of Theorem 3.42 show that



X ∞
X
an ≤ |an |.
n=1 n=1

While an absolutely convergent series is automatically convergent, the converse


is not true as the following example shows:
Example 3.43 (Convergent but not absolutely convergent series): The alternating

(−1)n n1 is convergent by the Leibniz’s test (Theorem 3.40),
P
harmonic series
n=1

1
P
but it is not a absolutely convergent since the harmonic series n is divergent;
n=1
see Example 3.37 (i).

Theorem 3.44 (Convergence tests for series):


(i) Comparison test (convergence): Suppose that |an | ≤ bn for almost all n ∈ N.

P ∞
P
If bn is convergent, then an is absolutely convergent.
n=1 n=1

P ∞
P
We call bn a convergent majorant for an .
n=1 n=1
(ii) Comparison test (divergence): If 0 ≤ bn ≤ an for almost all n ∈ N and if

P ∞
P
bn is divergent, then an is divergent.
n=1 n=1

P ∞
P
We call bn a divergent minorant for an .
n=1 n=1
(iii) Root test:
p ∞
P
• If lim sup n
|an | < 1, then an is absolutely convergent.
n→∞ n=1
p ∞
P
• If lim sup n |an | > 1, then an is divergent.
n→∞ n=1
(iv) Ratio test: Suppose that an ̸= 0 for almost all n ∈ N.

• If lim sup aan+1
P
n
< 1, then an is absolutely convergent.
n→∞ n=1

an+1 P
• If lim inf an > 1, then an is divergent.
n→∞ n=1

Note that the criterion for divergence in the root test Theorem 3.44 (iii) uses the
limes superior, whereas the criterion for divergence in the ration test Theorem 3.44

61
3 Sequences and series

(iv) uses the limes inferior. As we will see in the proof, the reason for that is the
characterization of the limes superior and the limes inferior given in Proposition
3.25.

Proof (Proof of Theorem 3.44):



P ∞
P
(i) Since bn is convergent, the sequence of partial sums of bn is bounded.
n=1 n=1
Since |an | ≤ bn for almost all n ∈ N, it follows that the sequence of partial

P
sums of |an | is bounded. Since this sequence is monotonically increas-
n=1
ing, the monotone convergence theorem (Theorem 3.13) thus ensures its
convergence.

P
(ii) If an was convergent, then the comparison test from part (i) would imply
n=1

P
convergence of bn ; this, however, contradicts the assumption.
n=1
p
(iii) Put a := lim sup n
|an |.
n→∞
• Suppose that a < 1. We choose any 0 < ε < 1 − a; this ensures that
the
p condition a + ε < 1 is satisfied. By Proposition 3.25 (ii), we have
n
|an | < a + ε or, equivalently, |an | < (a + ε)n for almost all n ∈ N.
Since 0 < a + ε < 1 ensures by Example 3.37 (ii) convergence of the

(a + ε)n , the comparison test from part (i) implies
P
geometric series
n=1

P
absolute convergence of an .
n=1
• Suppose that a > 1. We choose any 0 < ε < a p − 1; this ensures
that a − ε > 1. By Proposition 3.25 (ii), we have n |an | > a − ε or,
equivalently, |an | > (a − ε)n for infinitely many n ∈ N. Since a − ε > 1,
it follows that |an | > 1 for infinitely many n ∈ N, which means that
(an )n∈N cannot be a null sequence. By contraposition of Theorem 3.38,
P∞
we conclude that an is divergent.
n=1
an+1 an+1
(iv) Put a := lim sup an and a := lim inf an .
n→∞ n→∞

• Suppose that a < 1. We choose any 0 < ε < 1 − a; this ensures that
the condition a + ε < 1 is satisfied. By Proposition 3.25 (ii), we have
an+1
an < a + ε for almost all n ∈ N; this means that there exists N ∈ N
such that aan+1
n
< a + ε or, equivalently, |an+1 | < (a + ε)|an | for all
n ≥ N . With the help of this, one can easily prove by mathematical
induction that

|an | ≤ (a + ε)n−N |aN | for all n ≥ N .

62
3.8 Series

In particular, we have |an | ≤ (a + ε)n−N |aN | for almost all n ∈ N. Since


0 < a + ε < 1 ensures by Example 3.37 (ii) convergence of the geometric
series

X ∞
X
(a + ε)n−N |aN | = (a + ε)−N |aN | (a + ε)n ,
n=1 n=1

P
the comparison test from part (i) implies absolute convergence of an .
n=1
• Suppose that a > 1. We choose any 0 < ε < a − 1; this ensures
that a − ε > 1. By Proposition 3.25 (i) (here, we see why the limes
superior has to be replaced by the limes inferior), we have aan+1
n
> a−ε
for almost all n ∈ N; this means that there exists N ∈ N such that
an+1
an > a − ε or, equivalently, |an+1 | > (a − ε)|an | for all n ≥ N . It
follows that |an+1 | > |an | for all n ≥ N . With the help of this, one can
easily prove by mathematical induction that
|an | ≥ |aN | for all n ≥ N .
In particular, because |aN | > 0, it follows that (an )n∈N cannot be a null

P
sequence. By contraposition of Theorem 3.38, we conclude that an
n=1
is divergent. □
There are many other convergence tests which we cannot mention and prove
here. A possible “decision tree” for the application of the various convergence tests
can be found here: https://upload.wikimedia.org/wikipedia/commons/8/83/
Decision_tree_convergence_and_divergence.jpg
We conclude this section on series by the following statement, which will be used
in the next section.

P ∞
P
Theorem 3.45 (Cauchy product): Let an and bn be absolutely convergent
n=0 n=0
series. Put
n
X
cn := ak bn−k for all n ∈ N0 .
k=0

P
Then the series cn is absolutely convergent and
n=0

X ∞
X ∞
 X 
cn = an · bn .
n=0 n=0 n=0

We do not provide a proof here but want to convey some intuition. The underlying

P  P ∞ 
idea is that ak · bℓ is the “sum” of all terms of the form ak · bℓ with
k=0 ℓ=0
integers k, ℓ ∈ N0 , and if we arrange ak · bℓ as an infinite array, then cn corresponds
to the sum of all entries of that array which sit on the n-th diagonal.

63
3 Sequences and series

a0 b0 a0 b1 a0 b2 a0 b3 ...

c0 a1 b0 a1 b1 a1 b2 a1 b3 ...

c1 a2 b0 a2 b1 a2 b2 a2 b3 ...

c2 a3 b0 a3 b1 a3 b2 a3 b3 ...

.. .. .. .. ..
c3 . . . . .

3.9 Exponential function


To begin with, we introduce some notation from combinatorics.

Definition 3.46 (Factorial): For n ∈ N0 , we define the factorial n! of n by the


recursion

0! := 1 and (n + 1)! = (n + 1) · n! for n ∈ N0 .

In other words,
n! = 1 · 2 · 3 · . . . · n.

Note that n! is the number of arrangements of a set with n elements. The number
of ways to choose a subset of cardinality k out of a given set of cardinality n is
given by the binomial coefficient nk .


Definition 3.47 (Binomial coefficient): For n ∈ N and k ∈ N0 with k ≤ n, we define


the binomial coefficient  
n n!
:= ;
k k!(n − k)!
this is usually read as “n choose k”.

Proposition 3.48 (Binomial formula): For a, b ∈ R and n ∈ N, we have


n  
n
X n n−k k
(a + b) = a b .
k
k=0

Proof: See Problem 3 on Classroom Sheet 7. □

64
3.9 Exponential function

Proposition 3.49 (Existence exponential function): For each x ∈ R, the series



xn
P
n! is absolutely convergent.
n=0

Proof: For x = 0, the series is obviously convergent; thus, we may restrict ourselves
to the case x ∈ R \ {0}. We define the sequence (an )n∈N by

xn
an := for all n ∈ N0 .
n!
Since an ̸= 0 for all n ∈ N0 , we may compute that

an+1 xn+1 n! |x|


= = for all n ∈ N0 ;
an (n + 1)! xn n+1

therefore, we get

an+1 an+1 |x|


lim sup = lim = lim = 0 < 1,
n→∞ an n→∞ an n→∞ n + 1

∞ ∞
xn
P P
so that the ratio test (Theorem 3.44 (iv)) implies that the series an = n!
n=0 n=0
is absolutely convergent. □

Definition 3.50 (Exponential function): The function



X xn
exp : R → R, x 7→
n=0
n!

is called the exponential function.



1
P
The number e := exp(1) = n! is called Euler’s number; we have that
n=0

e = 2.7182818 + R with |R| < 2 · 10−7 .

With the tools which we have developed so far, we could prove that
 1 n
lim 1 + = e;
n→∞ n
recall that the existence of this limit was established in Problem 2 on Homework
Sheet 6. Later, we can give a much shorter proof of that fact; we will see that more
generally  x n
lim 1 + = exp(x) for all x ∈ R.
n→∞ n
Theorem 3.51 (Properties of the exponential function):

65
3 Sequences and series

(i) For all x, y ∈ R, we have exp(x + y) = exp(x) · exp(y).


(ii) For all x > 0, we have that exp(x) > 1 + x > 1.
1
(iii) For all x ∈ R, we have exp(x) > 0 and exp(x) = exp(−x).
(iv) The function exp : R → R is strictly monotonically increasing (i. e., we have
exp(x) < exp(y) whenever x, y ∈ R satisfy x < y); in particular, exp : R → R
is injective.

Proof:
(i) This uses the Cauchy product from Theorem 3.45 and the binomial formula
from Proposition 3.48. The details will be worked out in Problem 1 on
Classroom Sheet 8.
(ii) This holds by definition; note that x > 0 ensures that the sequence of partial

xn
P
sums of n! is strictly monotonically increasing so that
n=0

∞ 1
X xn X xn
exp(x) = > = 1 + x > 1.
n=0
n! n=0
n!

(iii) Let x ∈ R. By the identity stated in part (i), we have that


x x x x
exp(x) = exp + = exp exp
2 2 2 2
and hence, thanks to Proposition 2.7 (v), exp(x) ≥ 0. On the other hand, we
can derive from the identity in part (i) that

exp(x) exp(−x) = exp(x + (−x)) = exp(0) = 1.

This proves that exp(x) ̸= 0 and hence exp(x) > 0 (because we already know
1
that exp(x) ≥ 0) as well as exp(x) = exp(−x).
(iv) For all x, y ∈ R with x > y, we have that

(i) (iii)
exp(x) = exp((x − y) + y) = exp(x − y) exp(y) > exp(y),

as asserted. □

Using these properties, we will show that exp : R → R>0 is not only injective
but also surjective and hence bijective. Using its inverse function, we can introduce
powers for arbitrary real exponents. With this notation, we have that exp(x) = ex
for all x ∈ R and the identity stated in Theorem 3.51 (i) can be rewritten in the
more familiar way as

ex+y = ex · ey for all x, y ∈ R.

66
4 Functions
4.1 Topology on R — Part II
In this section, we continue our considerations started in Section 2.4 using our new
concepts on convergence.
Definition 4.1 (Accumulation point): Let U ⊆ R and x ∈ R. We call x an ac-
cumulation point of U if there exists a sequence (xn )n∈N in U \ {x} such that
lim xn = x.
n→∞

Note that x is an accumulation point of U if and only if


(x − ε, x + ε) ∩ (U \ {x}) ̸= ∅ for all ε > 0.
Warning: The new notion of accumulation points of sets from Definition 4.1
is closely related with but still different from the notion of accumulation points
of sequences which was introduced in Definition 3.15. Indeed: The accumulation
points of a sequence (an )n∈N are not necessarily accumulation points of the set
{an : n ∈ N} as, for example, every constant sequence shows. However, each
accumulation point of the set {an : n ∈ N} is also an accumulation point of the
sequence (an )n∈N .
Example 4.2 (Accumulation points):
(i) Finite sets have no accumulation points.
In particular, the set {−1, 1} has no accumulation points, whereas the
sequence ((−1)n )n∈N has two accumulation points
(ii) The accumulation points of (0, 1] are the elements of [0, 1].
(iii) The set { n1 : n ∈ N} has exactly one accumulation point, namely 0.
(iv) The accumulation points of Q are the elements of R.
Using this terminology, we can formulate the following topological variant of the
Bolzano-Weierstraß theorem (Theorem 3.21).
Theorem 4.3 (Bolzano-Weierstraß, topological): Every bounded, infinite subset of
R has an accumulation point.
Proof: Let U ⊆ R be bounded and infinite. Since U contains infinitely many
elements, we can choose a sequence (xn )n∈N in U such that all its elements xn are
different (in other words, x : N → U, n 7→ xn is an injective function). Since U is
bounded, the sequence (xn )n∈N is bounded. Therefore, by Theorem 3.21, (xn )n∈N
has an accumulation point, say x ∈ R. This means that each ε-neighborhood
(x − ε, x + ε) contains infinitely many elements of (xn )n∈N and hence of U , i. e.,
(x − ε, x + ε) ∩ U is infinite; in particular, (x − ε, x + ε) ∩ (U \ {x}) ̸= ∅. This means
that x is an accumulation point of U . □

67
4 Functions

We can use the concept of accumulation points of sets in order to characterize


closed sets.

Proposition 4.4 (Closed sets and accumulation points): A subset of R is closed if


and only if it contains all its accumulation points.

Proof: This is Problem 3 on Homework Sheet 8. □

Closely related to this is the following statement.

Theorem 4.5 (Characterization of open and closed sets by boundary points): Let
U ⊆ R. Then the following statements hold true:

(i) The set U is open if and only if ∂U ∩ U = ∅.


(ii) The set U is closed if and only if ∂U ⊆ U .

Proof:

(i) “⇒”: Let U ⊆ R be open. Assume to the contrary that there is x ∈ ∂U ∩ U .


Then there exists ε > 0 such that (x − ε, x + ε) ⊆ U (since x ∈ U and
U is open) but (x − ε, x + ε) must contain an element from R \ U (by
Definition 2.29 since x ∈ ∂U ). This is a contradiction.
“⇐”: Suppose that ∂U ∩ U = ∅. Let x ∈ U . Then x ∈ / ∂U , which means
in this case that there exists ε > 0 such that (x − ε, x + ε) contains no
points from R \ U . Thus, we have (x − ε, x + ε) ⊆ U . This shows that
U is open.
(ii) First of all, we note that
∂U = ∂(R \ U ), (4.1)
since the defining condition of boundary points as given in Definition 2.29 is
the same for U and its complement R \ U .
Using this observation, we get the following chain of equivalences

U is closed
⇔ R \ U is open (by Definition 2.26)
⇔ ∂(R \ U ) ∩ (R \ U ) = ∅ (by part (i))
⇔ ∂U ∩ (R \ U ) = ∅ (by the identity (4.1))
⇔ ∂U ⊆ U (by definition of complements)

and hence the assertion. □

Compact sets are sets which behave “almost like finite sets”.

Definition 4.6 (Compact sets): A set U ⊆ R is called (sequentially) compact if each


sequence in U has a subsequence which is convergent to an element of U .

68
4.2 Limits of functions

Theorem 4.7 (Heine-Borel): A subset of R is compact if and only if it is closed


and bounded.
Proof:
“⇒”: Let U ⊆ R be compact.
U is bounded: Assume to the contrary that U is not bounded, i. e.,
∀C > 0 ∃x ∈ U : |x| > C.
For each n ∈ N, we can apply the latter condition to Cn = n, i. e., we
find xn ∈ U such that |xn | > Cn . Since U is compact, Definition 4.6
tells us that the sequence (xn )n∈N obtained in this way must have a
convergent subsequence, say (xnk )k∈N . From Proposition 3.10, we infer
that (xnk )k∈N is bounded. However, we have |xnk | > Cnk = nk ≥ k for
all k ∈ N, which contradicts the fact that N is not bounded from above.
U is closed: According to Proposition 4.4, it suffices to show that U contains
all its accumulation points. Let x ∈ R be any accumulation point of U
and let (xn )n∈N be a sequence in U \ {x} with lim xn = x. Since U is
n→∞
compact, Definition 4.6 tells us that (xn )n∈N has subsequence (xnk )k∈N
which is convergent to an element of U . However, by Theorem 3.19 (ii),
U ∋ lim xnk = lim xn = x.
k→∞ n→∞

Therefore, we have x ∈ U , as we wished to show.


“⇐”: Let U ⊆ R be closed and bounded. According to Definition 4.6, we have to
show that each sequence in U has a subsequence which is convergent to an
element in U , in order to prove that U is compact.
Let (xn )n∈N be any sequence in U . Since U is bounded, (xn )n∈N is bounded;
thus, by the Bolzano-Weierstraß theorem (Theorem 3.21), (xn )n∈N has a
convergent subsequence, say (xnk )k∈N . Put x := lim xnk . Assume to the
k→∞
contrary that x ∈
/ U . Then x is an accumulation point of U (since (xnk )k∈N
is a sequence in U = U \ {x} which converges to x). Since U is closed,
Proposition 4.4 implies that x ∈ U , which is a contradiction. □

4.2 Limits of functions


We want to define now what is meant by the limit of a function at a point. There
are several natural ways to do that. The purpose of following proposition is to list
some quite intuitive approaches and to show that these are all equivalent.
Proposition 4.8 (Several definitions of limits of functions): Let f : D → R be a
function with domain ∅ ≠ D ⊆ R and let x0 ∈ R be an accumulation point of D.
Then the following statements are equivalent:

69
4 Functions

(i) There exists an a ∈ R such that lim f (xn ) = a for every sequence (xn )n∈N
n→∞
in D \ {x0 } with lim xn = x0 .
n→∞
(ii) For each sequence (xn )n∈N in D \ {x0 } with lim xn = x0 , the sequence
n→∞
(f (xn ))n∈N is convergent.
(iii) There exists an a ∈ R such that

∀ ε > 0 ∃ δ > 0 ∀ x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } : |f (x) − a| < ε.

(iv) Cauchy criterion for functions:

∀ ε > 0 ∃ δ > 0 ∀ x, y ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } : |f (x) − f (y)| < ε.

Proof:
“(i) ⇒ (iii)”: Suppose that the condition in (i) is satisfied for some a ∈ R. We
claim that (iii) is satisfied for the same a ∈ R. To prove this, we proceed as
follows. Let ε > 0 be given. Assume to the contrary that there is no δ > 0
such that |f (x) − a| < ε for all x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }, i. e.,

∀ δ > 0 ∃ x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } : |f (x) − a| ≥ ε.

By applying the latter condition for each n ∈ N to δn := n1 , we obtain a


sequence (xn )n∈N in D ∩ (x0 − δn , x0 + δn ) \ {x0 } ⊆ D \ {x0 } such that

|f (xn ) − a| ≥ ε for all n ∈ N; (4.2)

since xn ∈ (x0 − δn , x0 + δn ) for each n ∈ N, it follows (by Theorem 3.8)


that lim xn = x0 . From (i), it follows that lim f (xn ) = a; however, this
n→∞ n→∞
contradicts (4.2). Therefore, our assumption was wrong, i. e., (iii) is satisfied
for a ∈ R, as we wished to show.
“(iii) ⇒ (iv)”: Suppose that (iii) is satisfied for some a ∈ R. Let ε > 0 be
given. Then there exists some δ > 0 such that |f (x) − a| < 2ε for all
x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }. For all x, y ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }, we
get by the triangle inequality (2.1) that
ε ε
|f (x) − f (y)| = |(f (x) − a) + (a − f (y))| ≤ |f (x) − a| + |f (y) − a| < + = ε.
2 2
This proves that (iv) is satisfied.
“(iv) ⇒ (ii)”: Suppose that (iv) is satisfied. Let (xn )n∈N be any sequence in
D \ {x0 } with lim xn = x0 . In order to prove that (f (xn ))n∈N is convergent,
n→∞
it suffices to check that (f (xn ))n∈N is a Cauchy sequence, thanks to Theorem
3.29. Let ε > 0 be given. By (iv), there exists some δ > 0 such that

|f (x) − f (y)| < ε for all x, y ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }. (4.3)

70
4.2 Limits of functions

Since lim xn = x0 , there exists N ∈ N such that xn ∈ (x0 − δ, x0 + δ) for all


n→∞
n ≥ N ; in particular, since (xn )n∈N is a sequence in D \ {x0 } by assumption,
we have that xn ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } for all n ≥ N . By (4.3), it
follows that |f (xn ) − f (xm )| < ε for all n ≥ N . This shows that (f (xn ))n∈N
is a Cauchy sequence, as desired. Hence, (ii) is satisfied.
“(ii) ⇒ (i)”: Suppose that (ii) is satisfied. In order to prove (i), we have to
show that if (x′n )n∈N and (x′′n )n∈N are any two sequences in D \ {x0 } with
lim x′n = x0 = lim x′′n , then (f (x′n ))n∈N and (f (x′′n ))n∈N , which are con-
n→∞ n→∞
vergent sequences by (ii), have the same limit. Put a′ := lim f (x′n ) and
n→∞
a′′ := lim f (x′′n ); so, we have to show that a′ = a′′ . The trick is to consider
n→∞
the “shuffled” sequence
(xn )n∈N := (x′1 , x′′1 , x′2 , x′′2 , x′3 , x′′3 , . . . ).
By construction, (xn )n∈N is a sequence in D \ {x0 } with lim xn = x0 (why?).
n→∞
Hence, by (ii), (f (xn )) must be convergent; put a := lim f (xn ). Since
n→∞
(f (x′n ))n∈N and (f (x′′n ))n∈N are subsequences of (f (xn ))n∈N by construction,
it follows from Theorem 3.19 (ii) that a′ = a = a′′ , as we wished to show. □

Remark: In the proof of “(ii) ⇒ (i)”, we have shown that the a ∈ R satisfying (i)
is unique.
It is easy to see that the a ∈ R satisfying (iii) is also unique. Indeed: Let
a′ , a′′ ∈ R be given such that
∀ ε > 0 ∃ δ ′ > 0 ∀ x ∈ D ∩ (x0 − δ ′ , x0 + δ ′ ) \ {x0 } : |f (x) − a′ | < ε and
∀ ε > 0 ∃ δ ′′ > 0 ∀ x ∈ D ∩ (x0 − δ ′′ , x0 + δ ′′ ) \ {x0 } : |f (x) − a′′ | < ε
|a′′ −a′ |
We assume to the contrary that a′ ̸= a′′ . Then, for ε := 2 > 0, we find
δ ′ , δ ′′ > 0 such that
|f (x) − a′ | < ε for all x ∈ D ∩ (x0 − δ ′ , x0 + δ ′ ) \ {x0 } and
′′ ′′ ′′
|f (x) − a | < ε for all x ∈ D ∩ (x0 − δ , x0 + δ ) \ {x0 }.
For δ := min{δ ′ , δ ′′ } > 0 and each x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } (such x exist
because x0 is an accumulation point of D), we get by the triangle inequality (2.1)
that
|a′′ −a′ | = |(a′′ −f (x))+(f (x)−a′ )| ≤ |a′′ −f (x)|+|f (x)−a′ | < ε+ε = 2ε = |a′′ −a′ |,
which is a contradiction. Thus, a′ = a′′ , as asserted.
In the proof of “(i) ⇒ (iii)”, we have seen that any a ∈ R for which (i) is satisfied,
condition (iii) is satisfied as well.
Thus, we see that (i) and (iii) uniquely determine the same a ∈ R. We call it
the limit of f at the point x0 ; this is the content of the following definition.

71
4 Functions

Definition 4.9 (Limits of a function at a point): Let f : D → R be a function with


domain ∅ = ̸ D ⊆ R and let x0 ∈ R be an accumulation point of D. We say that
lim f (x) exists if and only if one (and hence all) of the equivalent conditions in
x→x0
Proposition 4.8 is satisfied.
x→x0
In this case, we write lim f (x) = a or f (x) −−−−→ a, where a is taken from and
x→x0
uniquely determined by (i) or, equivalently, (iii) in Proposition 4.8.

Note that even if x0 ∈ D, the value f (x0 ) does not play any role for lim f (x).
x→x0

Example 4.10 (Limits of functions at points):

(i) Consider the function f = idR : R → R, x 7→ x. For any x0 ∈ R, the limit


lim f (x) exists and we have that lim f (x) = x0 .
x→x0 x→x0
Indeed, for each sequence (xn )n∈N in R \ {x0 } with lim xn = x0 , we have
n→∞

lim f (xn ) = lim xn = xn ,


n→∞ n→∞

so that the assertion follows from Proposition 4.8 (i).


(ii) Consider the Dirichlet function
(
1, if x ∈ Q
g : R → R, x 7→ .
0, if x ∈
/Q

The limit lim g(x) exists for no x0 ∈ R.


x→x0
Indeed, for ε = 12 and an arbitrary δ > 0, there are x, y ∈ (x0 − δ, x0 + δ)
such that x ∈ Q and y ∈ R \ Q, and for these, we get |g(x) − g(y)| = 1 > 12 .
This means that the condition in Proposition 4.8 (iv) is violated.
(iii) Consider the function
1
 2
x , for x ∈ (0, 2 )

 1 , for x ∈ 1

h : (0, 1] → R, x 7→ 2 2
1
.
1

 for x ∈ ( 2 , 1)
for x = 1

0,

One can show that lim h(x) = 0 and lim h(x) = 1 ̸= 0 = h(1). In contrast,
x→0 x→1
lim1 h(x) = 0 does not exist.
x→ 2
However, if we consider
• the restriction h− of h to (0, 12 ], then we get lim1 h− (x) = 14 ; we call
x→ 2
1
this the left-sided limit of h at x0 = 2 and denote it by lim
1
h(x);
x→ 2 −

72
4.2 Limits of functions

• the restriction h+ of h to [ 12 , 1], then we get lim1 h+ (x) = 1; we call this


x→ 2
1
the right-sided limit of h at x0 = 2 and denote it by lim
1
h(x).
x→ 2 +

Remark: Without proof, we point out the following fact: If we define the one-sided
limits like in Example 4.10 (iii), then one can show that the limit exists if and only
if both the left-sided and the right-sided limit exist and are equal.
Theorem 4.11: Let ∅ =
̸ D ⊆ R and let x0 ∈ R be an accumulation point of D.
(i) If f, g : D → R are functions for which lim f (x) and lim g(x) exist, then
x→x0 x→x0
lim (f (x) + g(x)) exists and we have that
x→x0

lim (f (x) + g(x)) = lim f (x) + lim g(x).


x→x0 x→x0 x→x0

(ii) If f, g : D → R are functions for which lim f (x) and lim g(x) exist, then
x→x0 x→x0
lim (f (x) · g(x)) exists and we have that
x→x0

lim (f (x) · g(x)) = lim f (x) · lim g(x).


x→x0 x→x0 x→x0

(iii) If f : D → R is a function for which lim f (x) exists, then lim |f (x)| exists
x→x0 x→x0
and we have that
lim |f (x)| = lim f (x) .
x→x0 x→x0

(iv) Let f : D → R be a function for which lim f (x) exists and lim f (x) ̸= 0.
x→x0 x→x0
Then there exists some δ > 0 such that
f (x) ̸= 0 for all x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }.
Moreover, for the function
1 1
: D ∩ (x0 − δ, x0 + δ) \ {x0 } → R, x 7→ ,
f f (x)
1
the limit lim exists and we have that
x→x0 f (x)

1 1
lim = .
x→x0 f (x) lim f (x)
x→x0

(v) Let f, g : D → R be functions for which there exists δ > 0 such that
f (x) ≤ g(x) for all x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }.
If lim f (x) and lim g(x) exist, then
x→x0 x→x0

lim f (x) ≤ lim g(x).


x→x0 x→x0

73
4 Functions

(vi) Let f, g, h : D → R be functions for which there exists δ > 0 such that

f (x) ≤ h(x) ≤ g(x) for all x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 }.

If we have a := lim f (x) = lim g(x), then


x→x0 x→x0

lim h(x) = a.
x→x0

Proof: The rules (i), (ii), (iv), and (v) are immediate consequences of Definition
4.9 and the corresponding rules for limits of sequences listed in Proposition 3.6.
The assertion (iii) can be shown by similar considerations based on the reverse
triangle inequality (2.2).
The statement in (vi) is a consequence of the sandwich theorem (Theorem 3.8).□
x→x
0
Like in Definition 3.32, we allow the notation f (x) −−−−→ ±∞. It is straight-
forward to check, in analogy to Proposition 4.8, that the following conditions are
equivalent for a function f : D → R with domain ∅ ̸= D ⊆ R and an accumulation
point x0 ∈ R of D:

(i) For each sequence (xn )n∈N in D \ {x0 } with lim xn = x0 , we have that
n→∞
n→∞
f (xn ) −−−−→ ∞.
(ii) ∀ R > 0 ∃ δ > 0 ∀ x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } : f (x) > R
x→x 0
In the case that these two equivalent conditions are satisfied, we write f (x) −−−−→ ∞.
x→x0
The definition of f (x) −−−−→ −∞ is analogous.
Now, we address limits for x → ±∞.

Definition 4.12 (Limits x → ±∞): Let f : D → R be a function with domain


D ⊆ R.

(i) If D is not bounded from above, then we write


x→∞
lim f (x) = a or f (x) −−−−→ a
x→∞

n→∞ n→∞
if we have f (xn ) −−−−→ a for each sequence (xn )n∈N in D with xn −−−−→ ∞.
(ii) If D is not bounded from below, then we write
x→−∞
lim f (x) = a or f (x) −−−−−→ a
x→−∞

n→∞ n→∞
if we have f (xn ) −−−−→ a for each sequence (xn )n∈N in D with xn −−−−→ −∞.

We emphasize that these definitions include the cases a = ±∞; for the sake of
x→±∞
clarity, however, we use in such cases the notation f (x) −−−−−→ a, exclusively.

74
4.3 Continuous functions

Example 4.13 (Limits x → ±∞):

(i) For fixed n ∈ N, consider the function f : R → R, x 7→ xn . Then


(
x→∞ x→−∞ −∞, if n is odd
f (x) −−−−→ ∞ and f (x) −−−−−→ .
∞, if n is even

1 x→∞ 1 x→−∞
(ii) We have x −
−−−→ 0 and x −
−−−−→ 0.
1 x→0+ 1 x→0−
(iii) We have x −−−−→ ∞ and x −−−−→ −∞.

Example 4.14 (Limits of the exponential function): We have


x→∞
• exp(x) −−−−→ ∞ since exp(x) > 1 + x for all x > 0 by Theorem 3.51 (ii);
x→−∞ 1
• exp(x) −−−−−→ 0 since exp(−x) = exp(x) by Theorem 3.51 (iii).

4.3 Continuous functions


From a computational point of view, the evaluation of a function f is manageable
only if (sufficiently) small variations of the input x result in (arbitrarily) small
variations of the value f (x); think of rounding errors, for instance. Thus, loosely
speaking, we want that f (x) comes arbitrarily close to f (x0 ) if x is taken close
enough to x0 . This is formalized by the notion of continuity in the following
definition.

Definition 4.15 (Continuity): Let f : D → R be a function with domain D ⊆ R


and let x0 ∈ D (!) be an accumulation point of D.

(i) We say that f is continuous at x0 if lim f (x) exists and is equal to f (x0 ).
x→x0

(ii) We say that f is continuous on D if f is continuous at every1 x0 ∈ D.

Notation: For ∅ =
̸ D ⊆ R, we denote the set of all continuous functions f : D → R
by C(D).

Example 4.16 (Continuity):

(i) The identity idR : R → R, x 7→ x is continuous on R; this follows from the


discussion in Example 4.10 (i).
Likewise, every constant function is continuous.
1 Inpart (i) of Definition 4.15, we have defined continuity at accumulation points x0 ∈ D of D.
But what what about points x0 ∈ D which fail to be accumulation points of D? In this case,
there exists some ε > 0 such that (x0 − ε, x0 + ε) ∩ D = {x0 }; accordingly, such points are
called isolated points of D. We stipulate that functions are continuous at isolated points of
their domain. In fact, this is compatible with our definition of lim f (x) (why?).
x→x0

75
4 Functions

(ii) The absolute value function | · | : R → R, x 7→ |x| is continuous on R. Indeed:


Let x0 ∈ R and ε > 0. With δ := ε, we have by the reverse triangle inequality
(2.2) for all x ∈ (x0 − δ, x0 + δ) that

||x| − |x0 || ≤ |x − x0 | < δ = ε.

Hence, by using the characterization of limits in Proposition 4.8 (iii), we get


that lim |x| = |x0 |; note that this follows also from Theorem 4.11 (iii) since
x→x0
idR is continuous at x0 by part (i).
(iii) The Dirichlet function discussed in Example 4.10 (ii) is nowhere continuous.
(iv) The function h discussed in Example 4.10 (iii) is continuous on (0, 1) \ { 21 }.

Theorem 4.17 (Alternative definition of continuity): Let f : D → R be a function


with domain D ⊆ R and let x0 ∈ D be an accumulation point of D. Then f is
continuous at x0 if and only if

∀ ε > 0 ∃ δ > 0 ∀ x ∈ D ∩ (x0 − δ, x0 + δ) : |f (x) − f (x0 )| < ε. (4.4)

Proof: According to the characterization of limits given in Proposition 4.8 (iii),


we have that lim f (x) = f (x0 ), which means by Definition 4.15 (i) that f is
x→x0
continuous at x0 , if and only if

∀ ε > 0 ∃ δ > 0 ∀ x ∈ D ∩ (x0 − δ, x0 + δ) \ {x0 } : |f (x) − f (x0 )| < ε.

Since the case x = x0 is trivial, the latter condition is equivalent to (4.4). Hence,
the assertion follows. □

Often, the condition (4.4) in Theorem 4.17 is taken as definition of continuity.


This approach can be visualized as follows:

f (x)

f (x0 ) + ε
f (x0 )
f (x0 ) − ε

x
x0 − δ x0 x0 + δ

∀ ε > 0 ∃ δ > 0 ∀ x ∈ D ∩ (x0 − δ, x0 + δ) : f (x) ∈ (f (x0 ) − ε, f (x0 ) + ε)

76
4.3 Continuous functions

In the same way as Proposition 4.8 (iii) leads to the condition for continuity
stated (4.4), Proposition 4.8 (i) tells us that a function f : D → R with domain D
is continuous at an accumulation point x0 ∈ D of D if and only lim f (xn ) = f (x0 )
n→∞
for each sequence (xn )n∈N in D with lim xn = x0 . In other words, the restriction
n→∞
to sequences in D \ {x0 } can be relaxed to arbitrary sequences in D.
For functions f, g : D → R, we define

f + g : D → R, x 7→ f (x) + g(x) and


f · g : D → R, x 7→ f (x) · g(x).

Moreover, for a function f : D → R, we define

|f | : D → R, x 7→ |f (x)|,

e := {x ∈ D : f (x) ̸= 0},
and, with D
1 e 1
: D → R, x 7→ .
f f (x)

Theorem 4.18 (Rules for continuous functions): Let D ⊆ R and x0 ∈ D be an


accumulation point of D.
(i) If f, g : D → R are continuous at x0 , then both f + g and f · g are continuous
at x0 .
(ii) If f : D → R is continuous at x0 , then |f | is continuous at x0 .
1
(iii) If f : D → R is continuous at x0 and f (x0 ) ̸= 0, then f is continuous at x0 .

Proof: This is an immediate consequence of Theorem 4.11. □

Example 4.19 (Other continuous functions): A function P : R → R is called poly-


nomial if there exist n ∈ N0 and a0 , a1 , . . . , an ∈ R such that
n
X
P (x) = ak xk for all x ∈ R.
k=0

Since the identity idR and constant functions are continuous on R (see Example
4.16 (i)), Theorem 4.18 tells us that polynomials are continuous on R.

Proposition 4.20 (Composition of continuous functions is continuous): Let f : D →


R and g : E → R be functions with domains D, E ⊆ R satisfying f (D) ⊆ E. Let
x0 ∈ D be an accumulation point for which f (x0 ) ∈ E is an accumulation point of
E.
If f is continuous at x0 and g continuous at f (x0 ), then g ◦ f : D → R is
continuous at x0 .

77
4 Functions

Proof: Let (xn )n∈N be a sequence in D with lim xn = x0 . We define (yn )n∈N by
n→∞
yn := f (xn ) for all n ∈ N; moreover, we put y0 := f (x0 ). By continuity of f , we
have
lim yn = lim f (xn ) = f (x0 ) = y0 .
n→∞ n→∞

Thus, the continuity of g implies that

lim (g ◦ f )(xn ) = lim g(yn ) = g(y0 ) = (g ◦ f )(x0 ),


n→∞ n→∞

as we wished to show. □

The following example shows that the statement of the previous proposition does
not remain true if we drop the assumption of continuity.
Example 4.21 (Composition of functions): Consider the functions
(
1, if x ̸= 0
f : R → R, x 7→ 0 and g : R → R, x 7→ .
2, if x = 0

Then, we have lim f (x) = 0 and lim g(x) = 1, but lim (g ◦ f )(x) = 2.
x→0 x→0 x→0

78

You might also like