Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture Note 2033 Full Version

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

Lecture notes for Math 2033

Tianling Jin

November 18, 2018

Contents
1 Sets and functions 2
1.1 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Cartesian product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Power set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 Equivalence relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.7 Construction the rational numbers from integers . . . . . . . . . . . . . . . . . . 7

2 Real numbers 8
2.1 Construction of real numbers from rational numbers . . . . . . . . . . . . . . . . 8
2.2 Least upper bound property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Convergence in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 Topology on R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3 Infinite series 22

4 Metric space 25
4.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 Topology on metric spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3 Convergence and completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4 Space of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.5 Continuous functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.6 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.7 The contraction mapping theorem . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.8 Weierstrass Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

1
1 Sets and functions
1.1 Sets
We start with two undefined terms, that is, “set” and “element”. A set is a thing that is a collection
of other things (called the elements of the set). In practice, this sort of “definition by synonym”
suffices for most mathematicians. If A is a set, and x is an element of A, then we denote as x ∈ A.
Some notations:
• The empty set is a set contains nothing. It is denoted as ∅.
• We say two sets A and B are the same (or equal), denoted as A = B, if the have the same
elements. That is, if x ∈ A then x ∈ B, and conversely, if x ∈ B, then x ∈ A.
• We say A is a subset of B, which is denoted as A ⊆ B, if for every x ∈ A, we have x ∈ B.
• We say A is a proper subset of B, which is denoted as A ( B, if for every x ∈ A, we have
x ∈ B, and moreover, there exists b ∈ B such that b 6∈ A.
Algebra of sets. We assume there exists a universal set X, and we want to put subsets of X
together in different ways to create new subset of X. Let A and B be two sets.
• The union of A and B, denoted as A ∪ B, is defined by
A ∪ B = {x ∈ X | x ∈ A or x ∈ B}.

• The intersection of A and B, denoted as A ∩ B, is defined by


A ∩ B = {x ∈ X | x ∈ A and x ∈ B}.
We say A and B are disjoint if A ∩ B = ∅.
• The difference of A from B, denoted as A \ B (reads as A minus B), is defined by
A \ B = {x ∈ A | x 6∈ B}.

• The symmetric difference of A and B, denoted as A4B, is defined by


A4B = (A \ B) ∪ (B \ A).

• The completement of A (in X), denoted as Ac , is defined by


Ac = X \ A.

Some properties of set algebras: Distribution law:


A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
DeMorgan’s law
(A ∪ B)c = Ac ∩ B c
(A ∩ B)c = Ac ∪ B c .

2
1.2 Cartesian product
Let A, B be two sets. The Cartesian product of A and B, which is denoted as A × B, is defined
by
A × B = {(a, b) | a ∈ A and b ∈ B.}
For example, if A = {1, 2, 3} and B = {a, b, c}. Then

A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3, b), (3, c)}.

In general, if A has m elements, and B has n elements, then A × B has mn elements.


We also can defined the Cartesian product of n sets. Suppose A1 , A2 , ..., An are n sets. The
Cartesian product of A1 , A2 , ..., An is defined by

A1 × A2 × · · · × An = {(a1 , a2 , · · · , an ) | ai ∈ Ai , i = 1, 2, ...n}

If Ai has ki elements, then A1 × A2 × · · · × An has k1 k2 · · · kn elements.

1.3 Power set


Let A be a set. The power set of A, which is denoted as P(A) or 2A , is the set of all subsets of
A. For example, if A = {1, 2}, then

P(A) = {∅, {1}, {2}, {1, 2}}.

Theorem 1.1. If A is a set with n elements, then P(A) has 2n elements.


Proof. Let
A = {x1 , x2 , · · · , xn }.
Fix a subset B of A. For each xi , either xi ∈ B or xi 6∈ B. There are 2n possibilities. Therefore,
there are 2n different subsets of A

1.4 Functions
A function from a set A to a set B is a correspondence between elements of A and elements of B
such that each element in A is associated to exactly one element of B.
Example 1: Given any set A, there is a unique function from A to A which assigns each
element of A to itself. This is called the identity function on A.
Example 2: Let A and B be nonempty sets and choose a fixed element b ∈ B. Define a
function from A to B by assigning every element of A correspond to b. This is called a constant
function.
Definition 1.2. Let A and B be nonempty sets. A function from A to B is subset of A × B such
that each element of A occurs exactly once as a first coordinate. We write:

f : A → B.

If a ∈ A, we write f (a) for the corresponding element in B.

3
For example, if A = {1, 2, 3} and B = {a, b, c}, then

{(1, a), (2, b), (3, a)} is a function A → B.

But
{(1, a), (2, b), (1, c)} is NOT a function A → B.
Some terminologies. Let f : A → B is a function.

• A is called the domain of f ; B is called the range of f .

• if A0 ⊆ A, we define
f (A0 ) = {f (a) | a ∈ A0 }.
f (A0 ) is called the image of A0 in B under f . f (A) is called the image of f .

• If B = f (A), we say f is surjective (or a surjection).

• If f satisfies the property that for a, a0 ∈ A if f (a) = f (a0 ) then a = a0 , then we say that f
is injective (or an injection).

• If f is both injective and surjective, then we say f is bijective (or a bijection).

• We say two functions f, g are the same (or equal) if they have the same domain A, and
f (a) = g(a) for every a ∈ A.

Definition 1.3. Let A, B, C are sets, and f : A → B and g : B → C are two functions. Then the
composition of f and g is a function g ◦ f : A → C defined by

(g ◦ f )(a) = g(f (a)).

Definition 1.4. Let f : A → B is a bijection. Then the inverse of f is the function f −1 : B → A


defined as follows. If b ∈ B, then f −1 (b) = a, where a is the unique element in A such that
f (a) = b. The existence and uniqueness of such an a is guaranteed by the fact that f is a
bijection.

Definition 1.5. Let f : A → B is a function. If B 0 ⊆ B, then the preimage of B 0 in A is defined


as
f −1 (B 0 ) = {a ∈ A | f (a) ∈ B 0 }.

Theorem 1.6. Suppose A and B are two sets and f : A → B is a function. Let A1 , A2 ⊆ A and
B1 , B2 ⊆ B. Then

• f (A1 ∪ A2 ) = f (A1 ) ∪ f (A2 );

• f (A1 ∩ A2 ) ⊆ f (A1 ) ∩ f (A2 );

• f −1 (B1 ∪ B2 ) = f −1 (B1 ) ∪ f −1 (B2 );

• f −1 (B1 ∩ B2 ) = f −1 (B1 ) ∩ f −1 (B2 ).

4
1.5 Counting
A set A is finite if either A is empty or there exists n ∈ N such that there exists a bijection
f : A → {1, 2, · · · , n}.
An infinite set is a set that is not finite.
A set is countable if either A is finite or there exists a bijection f : A → N.

• If A1 , A2 , · · · , An are countable sets, then


n
[
Ai
i=1

is countable.

• If A1 , A2 , · · · , An , · · · are countable sets, then



[
Ai
i=1

is countable.

The set of all infinite decimals are NOT countable.

1.6 Equivalence relation


Definition 1.7. A relation on a set X is a subset of X × X.

Definition 1.8. An equvalence relation on a set X is a relation R on X such that

• ∀a ∈ X, (a, a) ∈ R; (reflexive)

• ∀a, b ∈ X, if (a, b) ∈ R, then (b, a) ∈ R; (symmetric)

• ∀a, b, c ∈ X, if (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R. (transitive)

The “twiddle” notation (∼) is often used. That is, if (a, b) ∈ R, we write a ∼ b.

Definition 1.9. Let R be a relation on X. If (a, b) ∈ R, we write a ∼ b. Then we call R is an


equivalence relation if

• ∀a ∈ X, a ∼ a; (reflexive)

• ∀a, b ∈ X, if a ∼ b, then b ∼ a; (symmetric)

• ∀a, b, c ∈ X, if a ∼ b and b ∼ c, then a ∼ c. (transitive)

5
Example 1: Suppose X = {1, 2, 3}. Then R = {(1, 2), (2, 1)} is a relation on X, but is NOT
an equivalence relation since it violates the first condition in Definition 1.8.
Example 2: Suppose X = {1, 2, 3}. Then R = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3)} is an
equivalence relation on X.
Example 3: Suppose X is the set of all triangles in the plane. Let

R = {(a, b) ∈ X × X | a is similar to b}.

Then R is an equivalence relation on X. You prove it. Alternatively, you can write in the following
form. Suppose X is the set of all triangles in the plane. For all a, b ∈ X, we define

a ∼ b if a is similar to b.

Then ∼ is an equivalence relation on X.


Example 4: Suppose X = N is the set of all natural numbers. Let

R = {(a, b) ∈ X × X | a = b}.

Then R is an equivalence relation on X. You prove it. Alternatively, you can write in the following
form. Suppose X = N is the set of all natural numbers. For all a, b ∈ X, define

a ∼ b if a = b.

Then ∼ is an equivalence relation on X.

Exercise 1.10. For two integers a, b, we say a divides b, denoted as a|b, if there exists an integer
c such that b = ac. a is called a divisor of b. Use this notation, we will define an equivalence
relation as follows. For an integer n ≥ 2, if a, b are two integers, we define a ∼ b if n|(a − b).
Then ∼ is an equivalence relation on Z. Prove this!!

Definition 1.11. Let ∼ be an equivalence relation on X. For ever a ∈ X, the set

C(a) = {b ∈ X | b ∼ a}

is called the equivalence class of a (or the equivalence containing a).

Theorem 1.12 (Properties of equivalence classes). Let ∼ be an equivalence relation on X.

• For every a ∈ X, we have a ∈ C(a);

• If a ∼ b, then C(a) = C(b);

• If a 6∼ b, then C(a) ∩ C(b) = ∅;


S
• a∈X C(a) = X.

6
1.7 Construction the rational numbers from integers
Let
F = {(a, b) | a, b ∈ Z, b 6= 0.}
For (a, b), (c, d) ∈ F , we define

(a, b) ∼ (c, d) if ad = bc.

Exercise 1.13. Prove that ∼ is an equivalence relation on F .

Definition 1.14. The set of equivalence classes determined by this equivalence relation is call the
rational numbers and is denoted as Q.

Denote the equivalence class of (a, b) as {(a, b)}. Define the addition and multiplication +, ·
as follows.

Definition 1.15. For {(a, b)}, {(c, d)} ∈ Q, define

{(a, b)} + {(c, d)} = {(ad + bc, bd)}


{(a, b)} · {(c, d)} = {(ac, bd)}

Theorem 1.16. The addition and multiplication defined above are well-defined.

What we need to show is the following. The addition and multiplication must be independent
of the choice of the representative of the equivalence classes. We can thing as follows: if (a, b) ∼
(a0 , b0 ), (c, d) ∼ (c0 , d0 ), then {(a, b)} = {(a0 , b0 )}, {(c, d)} = {(c0 , d0 )}, and therefore, {(a, b)} +
{(c, d)} should be the same as {(a0 , b0 )} + {(c0 , d0 )}, that is, we must have {(ad + bc, bd)} =
{(a0 d0 + b0 c0 , b0 d0 )} according to the definition of +. Therefore, we need to show that if (a, b) ∼
(a0 , b0 ), (c, d) ∼ (c0 , d0 ), then

(ad + bc, bd) ∼ (a0 d0 + b0 c0 , b0 d0 ).

The same for multiplication. if (a, b) ∼ (a0 , b0 ), (c, d) ∼ (c0 , d0 ), then we need to show that

(ac, bd) ∼ (a0 c0 , b0 d0 ).

Exercise 1.17. Then, we need to

• Prove the associative law for addition and multiplication.

• Prove the commutative law for addition and multiplication.

• Prove the distribution law.

• Prove that {(0, 1)} is the additive identity.

• Prove that {(1, 1)} is the multiplicative identity.

• Prove that {(−a, b)} is the additive inverse for {(a, b)}.

7
• Prove that if {(a, b)} =
6 {(0, 1)} then {(b, a)} in the multiplicative inverse of {(a, b)}.

So Q satisfies all the above, and is a field. From now on, we write
a
{(a, b)} as .
b
a a c a c
Definition 1.18. We say that b > 0 if ab > 0. We say that b > d if b − d >0

Exercise 1.19. The order defined as above is well-defined.

Exercise 1.20. We have

• If x, y ∈ Q the one and only one of the following holds:

x<y or x = y or x > y.

• If x, y, z ∈ Q with x < y and y < z, then x < z.

• If x, y, z ∈ Q with x < y. Then x + z < y + z.

• If x, y, z ∈ Q with x < y and z > 0. Then xz < yz.

Therefore, Q is an ordered field.


One more example:

Exercise 1.21. Let ∼ be the equivalence relation defined in Exercise 1.10. That is, for an integer
n ≥ 2, if a, b are two integers, we define a ∼ b if n|(a − b). We write the equivalence class C(a)
as ā. Denote the set of equivalence classes 0̄, 1̄, 2̄, · · · , n − 1 by Zn . For ā, b̄ ∈ Zn , we define

ā + b̄ = a + b; ā · b̄ = ab.

Then the above addition and multiplication are well-defined.

2 Real numbers
2.1 Construction of real numbers from rational numbers
We will construct real numbers from rational numbers by an equivalence relation on Q.
Define the absolute value on Q as follows
(
a if a ≥ 0;
|a| =
−a if a < 0.

The absolute value on Q satisfies the following three properties

1. For any a ∈ Q, |a| ≥ 0, and |a| = 0 if and only if a = 0.

2. For any a, b ∈ Q, |ab| = |a||b|.

3. For any a, b ∈ Q, |a + b| ≤ |a| + |b| (triangle inequality).

8
Exercise 2.1. Prove that for any a, b ∈ Q, ||a| − |b|| ≤ |a − b|. (This is another version of the
triangle inequality.)
Exercise 2.2. Solve the inequality |x − 9| < 4.
Definition 2.3. A sequence of rational numbers is a function f : N → Q.
We often denote such a sequence by (f (1), f (2), · · · , f (k), · · · ), or (a1 , a2 , · · · , ak , · · · ), where
ak = f (k) for each k ∈ N. Usually, we write

(ak )k∈N .

Definition 2.4. A sequence (ak )k∈N of rational numbers is Cauchy sequence in Q if given any
rational number r > 0, there exists an integer N such that if n, m ≥ N , then |an − am | < r.
Definition 2.5. A sequence (ak )k∈N converges in Q to a ∈ Q if given any rational number r > 0,
there exists an integer N such that if n ≥ N , then |an − a| < r. This rational number a is called
the limit of the sequence (ak )k∈N .
Theorem 2.6. If a sequence (ak )k∈N converges in Q, show that it is a Cauchy sequence in Q.
Exercise 2.7. If a sequence (ak )k∈N converges in Q, show that its limit is unique.
Definition 2.8. Let (ak )k∈N be a sequence of rational numbers. We say that (ak )k∈N is a bounded
sequence in Q if the set {ak | k ∈ N} is a bounded set in Q, that is, there exist a rational number
M such that |ak | ≤ M for all k ∈ N.
Lemma 2.9. Let (ak )k∈N be a Cauchy sequence of rational numbers. Then (ak )k∈N is a bounded
sequence.
Proof. By the definition of Cauchy sequence, there exists N such that for all m, n ≥ N , we have

|am − am | < 1.

In particular,
|am − aN | < 1.
Hence, by the triangle inequality, we have

|am | ≤ |aN | + 1 for all m ≥ N.

Hence, if we choose M = max{|a1 |, |a2 |, · · · , |aN −1 |, |aN | + 1}, then

|ak | ≤ M for all k ≥ 1.

This show that (ak )k∈N is a bounded sequence.

Denote C the set of all Cauchy sequence of rational numbers. We define addition and multi-
plication of Cauchy sequences term-wise, that is,

(ak )k∈N + (bk )k∈N = (ak + bk )k∈N ,


(ak )k∈N · (bk )k∈N = (ak bk )k∈N .

9
Theorem 2.10. The sum and product of two Cauchy sequences in Q are also Cauchy sequences
in Q.

Proof. Let (ak )k∈N and (bk )k∈N be two Cauchy sequences in Q. By the lemma above, we know
that they are bounded sequences. So there exist A, B such that

|ak | ≤ A for all k ≥ 1 and |bk | ≤ B for all k ≥ 1.

Let r > 0. Since (ak )k∈N is a Cauchy sequence, there exists N1 such that for all m, n >≥ N1 , we
r
have |am − an | < 2B . Similarly, since (bk )k∈N is a Cauchy sequence, there exists N2 such that
r
for all m, n >≥ N2 , we have |bm − bn | < 2A . Let N = max{N1 , N2 }. Then for all m, n ≥ N ,
we have

|an bn − am bm | = |an bn − am bn + am bn − am bm |
≤ |an bn − am bn | + |am bn − am bm |
= |an − am ||bn | + |am ||bn − bm |
r r
<B +A
2B 2A
= r.

This proves that the produce of two Cauchy sequences is also a Cauchy sequence. The case of the
sum is left for you.

Denote I as the set of sequences in Q that converges to 0. So I ⊂ C.

Lemma 2.11. Suppose (ak )k∈N ∈ C \ I, then there exists a positive rational number r and an
positive integer N such that |an | > r for all n ≥ N .

Proof. Since (ak )k∈N 6∈ I, from the negation of the definition of convergence, we know that there
exists r > 0 and {kj : j = 1, 2, 3, · · · } ⊂ N such that

|akj | > 2r.

Since (ak )k∈N is a Cauchy sequence, there exists N such that |am − an | < r for all m, n ≥ N . It
follows from the triangle inequality that for all m, n ≥ N , we have

|an | > |am | − r.

Fix an k̄j > N such that |ak̄j | > 2r, and let m = k̄j . Then we have for all n ≥ N that
|an | > r.

This lemma says that for a Cauchy sequence (ak )k∈N that is not in I, then the tail of the
sequence will always stay away from 0 by a fixed positive distance.

Exercise 2.12. Prove that if a Cauchy sequence (ak )k∈N does not converge to 0, then there exists
N such that all the rational numbers {ak | k ≥ N } have the same sign, that is, either every
number in {ak | k ≥ N } is positive, or every number in {ak | k ≥ N } is negative.

10
Definition 2.13. Let (ak )k∈N and (bk )k∈N be two Cauchy sequences in Q. We define
ak )k∈N ∼ (bk )k∈N if (ak − bk )k∈N ∈ I.
Exercise 2.14. Prove that ∼ is an equivalence relation on C.
Denote R as the set of equivalence classes in C. For a Cauchy sequence (ak )k∈N , we denote
[ak ] as the equivalence class of (ak )k∈N . Define
[ak ] + [bk ] = [ak ] + [bk ] and [ak ][bk ] = [ak bk ].
We will show that the addition and multiplication are well-defined and will show that R is a field.
I is the additive identity. We will also define order on R so that R is an ordered field. In the
end, we will show that R satisfies a special property that Q does not have: the least upper bound
property. After this, we call R the real numbers.
Exercise 2.15. The addition and multiplication are well-defined on R.
Theorem 2.16. R is a field.
Proof. Here, we only show the existence of multiplicative inverse for non-zero elements. The
others are left for exercise.
Let [ak ] 6= I. By Lemma 2.11, there exists a positive rational number r and an positive integer
N such that |an | > r for all n ≥ N . Define a sequence (bk )k∈N as follows:
(
1 if k ≤ N ;
bk = 1
ak if k > N.
Observe that for n, m > N

− 1 = |an − am | ≤ 1 |an − am |.
1
an am |an am | r2
Hence (bk )k∈N is also a Cauchy sequence, and it is the multiplicative inverse of (ak )k∈N .
Definition 2.17. Let a = [ak ], b = [bk ] be two distinct elements in R. We define a < b if there
exists a positive rational number r and a positive integer N such that bk − ak > r for all k ≥ N .
Theorem 2.18. The order above is well-defined, and R is an ordered field. That is,
• If x, y ∈ R the one and only one of the following holds:
x<y or x = y or x > y.

• If x, y, z ∈ R with x < y and y < z, then x < z.


• If x, y, z ∈ R with x < y. Then x + z < y + z.
• If x, y, z ∈ R with x < y and z > 0. Then xz < yz.
Define the map i : Q → R by sending r ∈ Q to the equivalence class of the constant sequence
(r, r, · · · ). It is evident that this map is injective and preserve the order, so we may consider Q ⊂ R
as ordered fields.
Theorem 2.19. R is an Archimedean ordered field. That is, for every x ∈ R there exists N ∈ Z
such that x < N .

11
2.2 Least upper bound property
Definition 2.20. Let F be an ordered field. Let A be a nonempty subset of F . We say that A is
bounded above if there is an element M ∈ F such that x ≤ M for all x ∈ A. We call M an upper
bound for A. Similarly, we say that A is bounded below if there is an element m ∈ F such that
x ≥ m for all x ∈ A. We call m a lower bound for A. We say that A is bounded if A is bounded
above and A is bounded below.

Exercise 2.21. The set {x ∈ Q | |x|2 < 4} is bounded.

Definition 2.22. Let F be an ordered field, and let A be a nonempty subset of F which is bounded
above. We say that L ∈ F is a least upper bound for A if the following two conditions hold:

a. L is an upper bound for A;

b. if M is any upper bound for A, then L ≤ M .

Exercise 2.23. F = Q. A = {x ∈ Q | |x|2 < 4} has a least upper bound in Q. A = {x ∈


Q | |x|2 < 2} does not have a least upper bound in Q.

The definition of a greatest lower bound is similar with all of the inequalities reversed.

Definition 2.24. Let F be an ordered field, and let A be a nonempty subset of F which is bounded
below. We say that ` ∈ F is a greatest lower bound for A if the following two conditions hold:

a. ` is an lower bound for A;

b. if m is any lower bound for A, then ` ≥ m.

Exercise 2.25. Show the least upper bound (or the greatest lower bound) of a set is unique if it
exists.

Definition 2.26. An ordered field F has the least upper bound property if every nonempty subset
A of F that is bounded above has a least upper bound. An ordered field F has the greatest lower
bound property if every nonempty subset A of F that is bounded below has a greatest lower bound.

Exercise 2.27. Prove that an ordered field has the least upper bound property if and only if it has
the greatest lower bound property.

If L is the least upper bound of a set A, we write

L = sup A.

If ` is the greatest lower bound of a set A, we write

` = inf A.

Theorem 2.28. R satisfies the least upper bound property.

12
Proof. In the following, when comparing any rational number r with real numbers, we will think

r = [(r, r, r, · · · , r, · · · )].

Let A be a non-empty subset of R which is bounded from above by m. By the Archimedean


property, there exists an integer M such that m ≤ M .
Let a = [ak ] ∈ A. Choose an integer n such that n < a (Archimedean property). For p ∈ N,
set
Sp = {k2−p | k ∈ Z, n ≤ k2−p ≤ M } ∪ {m}.
Sp is finite and non-empty. Let

bp = min{x | x ∈ Sp , x is an upper bound of A.}

Then we have
bq ≤ bp if q > p,
because bq is the minimum of a larger set. Also, since bp − 2−p is not an upper bound of A while
bq is, we have
bp − 2−p < bq .
In summary, we have
|bq − bp | < 2−p for all q > p.
This implies that (bk )k∈N is a Cauchy sequence. Let

L = [bk ].

We will show that L is the least upper bound of A. To prove this, we will first show that L is an
upper bound of A, and secondly, we will show L is the least one.
First of all, we have the following observation: for every p fixed, define

(ck )k∈N = (bp −2−p , bp −2−p , bp −2−p , · · · , bp −2−p , · · · ), (dk )k∈N = (bp , bp , bp , · · · , bp , · · · ),

then we have
[ck ] ≤ L ≤ [dk ]. (why?) (1)
We argue by contradiction that assuming L is not an upper bound. Hence there exists x =
[xk ] ∈ A such that x > L. By the Archimedean property, there exists a positive integer N such
that
N > (x − L)−1 , i.e. N (x − L) > 1.
Then we have
2N (x − L) > N (x − L) > 1.
Hence
x − L > 2−N = [(2−N , 2−N , 2−N , · · · , 2−N , · · · )].
By choose p as N in the definition of ck and dk above, and adding (1) on both sides, we have

x > [(bN , bN , bN , · · · , bN , · · · )].

13
This is a contradiction because bN is an upper bound of A.
Let H be another upper bound of A, and we suppose H < L. Then there exists another
positive integer Ñ such that
2−Ñ < L − H.
Since bÑ − 2−Ñ is not an upper bound but H is, we have

bÑ − 2−Ñ < H.


Adding these two, we have
bÑ < L
which is a contradiction to (1).
Exercise 2.29. Suppose A and B are bounded sets in R. Prove or disprove the following
i. sup(A ∪ B) = max{sup A, sup B}.
ii. If A + B = {a + b | a ∈ A, b ∈ B}, then sup(A + B) = sup A + sup B.
iii. If the elements of A and B are positive and A·B = {ab | a ∈ A, b ∈ B}, then sup(A·B) =
sup A · sup B.
iv. Formulate the analogous problems for the greatest lower bound.
Theorem 2.30 (Omit the proof). Any two ordered fields with the least upper bound property are
order isomorphic, which means as follows. Let (R1 , +, ·, <) and (R2 , +, ·, <) are two ordered
fields with the least upper bound property. Then there exists a bijection ϕ from R1 to R2 such that
• ϕ(x + y) = ϕ(x) + ϕ(y) for all x, y ∈ R1 .
• ϕ(x · y) = ϕ(x) · ϕ(y) for all x, y ∈ R1 .
• if x < y then ϕ(x) < ϕ(y).
Note that the addition “+” in R1 is usually different from the addition “+” in R2 , although we
use the same notations for them. Same for the multiplications and the orders.
Axiom 2.31 (Well-ordering principle for integers). If A is a nonempty subset of the integers, and
A is bounded from below, then A has a least element. That is, there exists an element a0 ∈ A, such
that for all a ∈ A, we have a ≥ a0 .
Theorem 2.32. If a is a real number, then there exists an integer N such that N − 1 ≤ a < N .
Proof. Let S = {n ∈ Z : n > a}. By the Archimedean property, S is not empty and is lower
bounded by some integer. So by the well ordering principle S has a least element N . Hence
N − 1 6∈ S. So we have N − 1 ≤ a < N .
Theorem 2.33 (Rational numbers are dense in real numbers). If a and b are two real numbers
such that a < b. Then there exists a rational number r such that a < r < b.
Proof. By the Archimedean property, there exists an integer q such that (b − a)−1 < q, that is
1
q < b − a. Consider the number qa. By Theorem 2.32, there exists an integer p such that
p − 1 ≤ qa < p.
p
That is q − 1
q ≤ a < pq . So a < p
q ≤a+ 1
q < b.

14
2.3 Convergence in R
Define the absolute value on R as follows
(
a if a ≥ 0;
|a| =
−a if a < 0.

The absolute value on R satisfies the following three properties

1. For any a ∈ R, |a| ≥ 0, and |a| = 0 if and only if a = 0.

2. For any a, b ∈ R, |ab| = |a||b|.

3. For any a, b ∈ R, |a + b| ≤ |a| + |b| (triangle inequality).

Exercise 2.34. Prove that for any a, b ∈ R, ||a| − |b|| ≤ |a − b|. (This is another version of the
triangle inequality.)

Exercise 2.35. Solve the inequality |x − 9| < 4.

Definition 2.36. A sequence of real numbers is a function f : N → R.

We often denote such a sequence by (f (1), f (2), · · · , f (k), · · · ), or (a1 , a2 , · · · , ak , · · · ), where


ak = f (k) for each k ∈ N. Usually, we write

(ak )k∈N .

Definition 2.37. A sequence (ak )k∈N of real numbers is Cauchy sequence if given any real number
ε > 0, there exists an integer N such that for all n, m ≥ N , there holds |an − am | < ε.

Definition 2.38. A sequence (ak )k∈N of real numbers is a convergent sequence if there exists
a ∈ R such that given any real number ε > 0, there exists an integer N such that for all n ≥ N ,
there holds |an − a| < ε. This real number a is called the limit of the sequence (ak )k∈N . We also
say that the sequence (ak )k∈N converges to a. We write

lim ak = a.
k→∞

We have seen the following statements for rational numbers. They also hold for real numbers
and the proofs are left as exercises.

Exercise 2.39. If a sequence (ak )k∈N converges in R, show that it is a Cauchy sequence in R.

Exercise 2.40. If a sequence (ak )k∈N converges in R, show that its limit is unique.

Exercise 2.41. Let (ak )k∈N be a Cauchy sequence of real numbers. Then (ak )k∈N is a bounded
sequence.

Exercise 2.42. Let (ak )k∈N be a convergent sequence of real numbers. Then (ak )k∈N is a bounded
sequence.

Exercise 2.43. Find a bounded sequence of real numbers that is not convergent.

15
Exercise 2.44. The sum and product of two Cauchy sequences in R are also Cauchy sequences in
R.

Definition 2.45. A sequence (ak )k∈N of real numbers is monotonic increasing if ak ≤ ak+1 for
all k ∈ N. A sequence (ak )k∈N of real numbers is strictly monotonic increasing if ak < ak+1
for all k ∈ N. Similar definitions hold for monotonic decreasing and strictly monotonic decreas-
ing sequences with the inequalities reversed. A sequence is called monotonic if it is monotonic
increasing or monotonic decreasing.

Definition 2.46. Given a sequence (ak )k∈N , a subsequence is a sequence of the form (akj )j∈N ,
where (kj )j∈N is a strictly monotonic increasing sequence of natural numbers. Notice that we
have the following relation for the indices

kj ≥ j for all j ∈ N.

In other words, a subsequence of a sequence contains some, but not necessarily all, terms of
the original sequence in their original order.

Exercise 2.47. Let (ak )k∈N be a convergent sequence. Show that any subsequence converges to
the same limit.

Exercise 2.48. Let (ak )k∈N be a Cauchy sequence. Show that any subsequence is also a Cauchy
sequence.

Lemma 2.49. Let (ak )k∈N be a sequence in R. Then (ak )k∈N has a monotonic subsequence.

Proof. The idea is that if (ak )k∈N does not have a monotonic increasing subsequence then it must
have a monotonic decreasing subsequence.
Suppose (ak )k∈N does not have a monotonic increasing subsequence. Then, there exists n1 ∈
N such that an1 > ak for all k > n1 . Again, since (ak )k>n1 does not have a monotonic increasing
subsequence, there exists n2 > n1 such that an2 > ak for all k > n2 . Moreover an1 > an2 .
Continuing in this way, we obtain a strictly monotonic decreasing subsequence (an1 , an2 , ...).

Lemma 2.50. Suppose (ak )k∈N is a monotonic increasing sequence in R and bounded from above,
then it is a convergent sequence in R. Similarly, if (ak )k∈N is a monotonic decreasing sequence in
R and bounded from below, then it is a convergent sequence in R.

Proof. Suppose (ak )k∈N is monotonic increasing and bounded from above. Let a be the least
upper bound of the set {a1 , a2 , ...}. For all ε > 0, there exists an N such that a − ε < aN ≤ a.
Since (ak )k∈N is increasing, if k > N , we have a ≥ ak ≥ aN > a − ε, that is |ak − a| < ε. So
limk→∞ ak = a.

Corollary 2.51. Every bounded sequence in R has a convergent subsequence.

Proof. It follows from Lemma 2.49 and Lemma 2.50.

Theorem 2.52 (Cauchy Criterion). A sequence (ak )k∈N of real numbers is convergent if and only
if it is a Cauchy sequence.

16
Proof. We have seen the proof for rational numbers that if (ak )k∈N is convergent then it must be
a Cauchy sequence. The same proof works here, and is left as an exercise.
We are going to prove the other direction. Suppose (ak )k∈N is a Cauchy sequence, then we
know it is a bounded sequence. From Corollary 2.51, we know that it has a convergent subse-
quence, say, (akj )j∈N that converges to a real number a ∈ R. Since the original sequence (ak )k∈N
is a Cauchy sequence, then (ak )k∈N must converge to a as well, which can be argued as follows.
For every ε > 0, there exists J ∈ N such that for all j ≥ J, we have

|akj − a| < ε/2.

Since (ak )k∈N , there exists N0 such that for all n, m ≥ N0 , we have

|an − am | < ε/2.

Take N = max{J, N0 }. Then for all n ≥ N , we have

|an − a| ≤ |an − akN | + |akN − a|.

Since N > N0 , we have kN ≥ N > N0 and thus |an − akN | < ε/2. Since N > J, we have
|akN − a| < ε/2. Therefore,

|an − a| ≤ |an − akN | + |akN − a| < ε/2 + ε/2 = ε.

This shows that (ak )k∈N must converge to a.

Even if a bounded sequence of real numbers is not itself convergent, we can still say something
about its long-term behavior.

Definition 2.53. Let (ak )k∈N be a bounded sequence of real numbers. For each n ∈ N, define
bn = sup{ak | k ≥ n}, and cn = inf{ak | k ≥ n}. Then we know that (bn )n∈N is a bounded
monotonic decreasing sequence and (cn )n∈N is a bounded monotonic increasing sequence. Hence,
(bn )n∈N and (cn )n∈N are convergent sequence. We define the limit supremum of the sequence
(ak )k∈N to be limn→∞ bn , and we denote this by

lim sup ak = lim bn .


k→∞ n→∞

We define the limit infimum of (ak )k∈N similarly:

lim inf ak = lim cn .


k→∞ n→∞

Since bn ≥ cn for all n ∈ N, it is clear that

lim sup ak ≥ lim inf ak .


k→∞ k→∞

Exercise 2.54. Show that if (ak )k∈N is convergent, then

lim sup ak = lim inf ak = lim ak .


k→∞ k→∞ k→∞

17
Exercise 2.55. For the following sequences, find lim sup and lim inf.

i. ak = 1 + (−1)k ;

ii. bk = (−1)k + k1 ;

iii. ck = cos k.

Exercise 2.56. Let (ak )k∈N be a bounded sequence of real numbers. If

lim sup ak = lim inf ak .


k→∞ k→∞

then (ak )k∈N is convergent, and

lim ak = lim sup ak = lim inf ak .


k→∞ k→∞ k→∞

Exercise 2.57. Let (ak )k∈N be a bounded sequence of real numbers. Let

E = {` ∈ R | there exists a subsequence (akj )j∈N such that (akj )j∈N converges to `.}

Prove that E is a bounded set, and

sup E = lim sup ak and inf E = lim inf ak .


k→∞ k→∞

Exercise 2.58. Let (ak )k∈N be a bounded sequence of real numbers. Let a∗ = lim supk→∞ ak .
Notice that a∗ is a real number. Prove that there exists a subsequence of (ak )k∈N that converge to
the real number a∗ .

Exercise 2.59. Let (ak )k∈N be a bounded sequence of real numbers. Let a∗ = lim supk→∞ ak .
Notice that a∗ is a real number. Let b be a real number such that b > a. Prove that there exists
N ∈ N such that
ak < b for all k > N.

Theorem 2.60 (Nested Intervals Theorem). Let ([an , bn ]n∈N ) be a nested sequence of closed
bounded intervals in R. That is, for every n, we have [an+1 , bn+1 ] ⊆ [an , bn ] or equivalently,
an ≤ an+1 ≤ bn+1 ≤ bn for all n. Then

∩n∈N [an , bn ] 6= ∅.

Proof. Let A = {an | n ∈ N}. Then A is bounded above by b1 . Hence sup A exists, and one can
verify that
sup A ∈ ∩n∈N [an , bn ].

18
2.4 Topology on R
Definition 2.61. Let S be a subset ofR. Then x ∈ R is an accumulation point of S if, for all
ε > 0, we have (x − ε, x + ε) \ {x} ∩ S 6= ∅.

Thus, x is an accumulation point of S if every interval around x contains points of S other


than x. Of course, x does not have to be an element of S in order to be an accumulation point of
S.

Example 2.62. Find the accumulation points of the following sets in R.

i. S = (0, 1);
1
ii. S = {(−1)n + n | n ∈ N};

iii. S = Q;

iv. S = R;

Let x ∈ R. A neighborhood of x is an open interval (of the form (a, b)) that contains x.

Lemma 2.63. Let S be a subset of R. Then every neighborhood of an accumulation point of S


contains infinitely many distinct points of S.

Proof. Let x be an accumulation point of S. Given ε > 0, there is a point x1 ∈ (x − ε, x + ε) ∩ S


such that x1 6= x. Let ε1 = |x − x1 |. Then, there is a point x2 ∈ (x − ε1 , x + ε1 ) ∩ S such that
x2 6= x. Notice that x2 6= x2 . Iterating this procedure, we get an infinite set of elements in S that
is contained in (x − ε, x + ε).

Exercise 2.64. Let S be a subset of R and x ∈ R. If every neighborhood of x contains infinitely


many distinct points of S, then x is an accumulation point of S.

Theorem 2.65. Let S be a bounded, infinite subset of R. Then S has an accumulation point in R.

Proof. Pick an infinite sequence (ak )k∈N of distinct elements of S. Then, by Corollary 2.51,
(ak )k∈N has a convergent subsequence (akj )j∈N . If limj→∞ akj = b, then b is an accumulation
point of S.

Exercise 2.66. i. Find an infinite subset of R which does not have an accumulation point.
ii. Find a bounded subset of R which does not have an accumulation point.

Definition 2.67. Let S be a subset of R. We say that S is an open set in R if for each point x ∈ S,
there is an ε > 0 (depending on x) such that (x − ε, x + ε) ⊂ S. We say S is a closed set in R if
the complement S c is open in R.

Note that the empty set, as well as R, are both open and closed.

Exercise 2.68. i. Show that an arbitrary union of open sets in R is open in R.

ii. Show that a finite intersection of open sets in R is open in R.

19
iii. Show, by example, that an infinite intersection of open sets is not necessarily open.

iv. Show that an arbitrary intersection of closed sets in R is a closed set in R.

v. Show that a finite union of closed sets in R is a closed set in R.

vi. Show, by example, that an infinite union of closed sets in R is not necessarily a closed set in
R.

vii. Show that ∅ and R are the only two subsets of R that are both open and closed in R.

viii. Show that a subset of R is closed if and only if it contains all its accumulation points.

ix. Suppose S is a bounded and closed nonempty subset of R. Prove that sup S ∈ S.

Definition 2.69. Let A be a subset of R. An open covering of A is a collection of open sets {Ui }i∈I
such that A ⊂ ∪i∈I Ui .

Definition 2.70. Let A be a subset of R. We say that A is compact if every open covering of A
has a finite sub-covering, that is, if {Ui }i∈I is an open covering of A, then there exists a finite sub
collection U1 , U2 , · · · , UN of {Ui }i∈I such that A ⊂ U1 ∪ U2 ∪ · · · UN .

This notion of compactness is more subtle than it appears. It does not say that in order for a
set to be compact, it must have a finite open covering. Note that this is true of any subset of R,
since we can take the single set U1 = R to be a covering. The stress in the definition is that every
open covering must have a finite subcovering. This is a big idea in analysis. It allows us to reduce
certain arguments about infinite sets to arguments about finite sets.

Exercise 2.71. i. Let S = (a, b). Give an example of an open covering of S that does not have a
finite sub covering.
ii. Let S = Z. Give an example of an open covering of S that does not have a finite sub
covering.

Theorem 2.72 (Heine-Borel). Let S be a subset of R. S is compact if and only if S is bounded


and closed.

Proof. We first prove the “if” part. Suppose S is bounded and closed. We will prove it is compact.
Let {Ui }i∈I be an open covering of S. We need to prove it has a finite sub-covering. Let

a = inf S, b = sup S.

By Exercise 2.68 (viii), we know that

a ∈ S and b ∈ S, thus S ⊆ [a, b].

Since S is closed, we know S c is open. We would like to add S c to the open covering {Ui }i∈I
(suppose S c is one of the Ui s). Hence we have

[a, b] ⊂ ∪i∈I Ui ( actually R = ∪i∈I Ui ).

20
Now let
B = {x ∈ [a, b] | [a, x] is covered by finitely many Ui , i ∈ I.}
We know a ∈ B, hence B is not empty. B ⊆ [a, b], so it is bounded from above by b. Hence,
sup B exists, and we denote c = sup B.
Claim: B is closed.
The claim can be proved as follows, using Exercise 2.68 (viii). Let y is an accumulation point
of B. Then y ∈ Uk for some k. Since Uk is open, there exists ε > 0 such that (y − ε, y + ε) ⊆ Uk .
Since y is an accumulation point of B, there exists z ∈ (y − ε, y + ε) \ {y} ∩ B. Since z ∈ B,
[a, z] can be covered by finitely many Ui , i ∈ I. By adding Uk into this finite sub-covering, we
know [a, y] covered by finitely many Ui , i ∈ I. Hence y ∈ B, and thus, B is closed. This prove
the claim.
Moreover, by Exercise 2.68 (ix), we know that

c ∈ B.

Next, we are going to prove c = b. We prove by contradiction. Suppose c < b. We know


[a, c] can be covered by finitely many of the Ui . Suppose c ∈ Uj for some j, and thus, there exists
ε > 0 such that (c − ε, c + ε) ⊆ Uk . Hence, we can find c̃ ∈ (c, b) such that [a, c̃] can be covered
by finitely many of the Ui . Hence c̃ ∈ B, which contradicts with c = sup B.
Hence, [a, b] can be covered by finitely many of the Ui . Since S ⊆ [a, b], we have S can
be covered by finitely many of the Ui . Recall that at the beginning, we added S c into the open
covering. But since S ∩ S c = ∅, we can drop S c from the finite sub-covering, and we have that S
can be covered by finitely many open sets from the original covering.
Now let us prove the “only if” part. We assume S is compact, and we need to show that S is
bounded and closed.
Let Uj = (−j, j), where j ∈ N. Then ∪∞ j=1 Uj = R. Hence {Uj }j∈N is an open covering of
S. Since S is compact, it has a finite covering, denoted as {U1 , · · · , UN }. Then S ⊂ UN , and
hence S is bounded above by N and below by −N .
We are going to show S is closed by showing S c is open. Let y ∈ S c . For every x ∈ S, let
1
rx = |x − y| > 0, Ux = (x − rx , x + rx ).
4
Then
S ⊆ ∪x∈S Ux .
That is, {Ux }x∈S is an open covering of S. Since S is compact, there exists Ux1 , · · · , UxN such
that
S ⊆ ∪Ni=1 Uxi .

Let
r = min(rx1 , · · · , rxN ).
Then we claim that S ∩(y −r, y +r) = ∅, that is, (y −r, y +r) ⊆ S c . If there z ∈ S ∩(y −r, y +r).
Then z ∈ (y − r, y + r) and z ∈ Uj for some j. Hence

|z − xj | < rxj , |z − y| < r ≤ rxj .

21
By triangle inequality, we have
1
|y − xj | ≤ |z − xj | + |z − y| < 2rxj = |xj − y|.
2
This is a contradiction. Therefore, (y − r, y + r) ⊆ S c , and thus S c is open.

Definition 2.73. A subset A of R is sequentially compact if every infinite sequence in A has a


subsequence that converges to an element in A.

Exercise 2.74. A subset of R is compact if and only if it is sequentially compact.

3 Infinite series
Infinite series are of the form

X
ai .
i=1

The main subject we study is the convergence of infinity series.


The N -th partial sum of the series is
N
X
SN = ai .
i=1

Exercise 3.1. (i) Let an = 1 for all n. What is SN ?


(ii) Let an = n1 . What is SN ?
(iii) Let an = 2−n . What is SN ?
(iv) Let an = (−1)n+1 . What is SN ?

Definition 3.2. Let ∞


P
PN i=1 ai be an infinite series of real numbers. For every N ∈ N, we let
SN = i=1 ai be the N -th partial sum. The sequence (SN )N ∈N is called the sequence of partial
sums.
We say that the series ∞
P
i=1 ai converges if the sequence of partial sums
P∞ (SN )N ∈N converges,
and we call the the limit of (SN )N ∈N as the sum of the convergent seriesP i=1 ai .
If the sequence (SN )N ∈N does not converges, then we say the series ∞ i=1 ai diverges.

We know from the Cauchy criterion that (SN )N ∈N converges if and only if (SN )N ∈N is a
Cauchy sequence. That is, for every ε > 0, there exists Nε ∈ N such that for every m, n > Nε
(assuming n > m), then
|Sn − Sm | < ε,
which is the same as
n
X
ai < ε. (2)



i=m+1

Exercise 3.3. Are the series in Exercise 3.1 convergent?

22
Definition 3.4. Let x ∈ R. The geometric series defined by x is ∞ n
P
n=0 x .

Exercise 3.5. What kind of x will make the geometric series ∞ n


P
n=0 x converges?

Theorem 3.6. Suppose a series ∞


P
i=1 ai converges, then

lim ai = 0.
i→∞

The converse is false.

Proof. Using (2). For every ε > 0, there exists N ∈ N such that for all n > N

|an | < ε.

This proved the theorem.

The converse is false. an = 1/n. So an → 0 as n → ∞, but ∞ 1


P
n=1 n diverges.

Definition 3.7. A series of real numbers ∞


P P∞
i=1 ai converges absolutely if i=1 |ai | converges.

Proposition 3.8. If ∞
P P∞
i=1 ai converges absolutely, then i=1 ai converges.

Proof. It follows from the fact that


n n
X X
ai ≤ |ai |.



i=m+1 i=m+1

Suppose ai ≥ 0 for every i ∈ N and ∞


P
Theorem 3.9 (Comparison Ptest). i=1 ai converges. If
|bi | ≤ ai for every i, then ∞ b
i=1 i converges absolutely.
P∞
Proof. Since i=1 ai converges, for every ε > 0, there exists N ∈ N such that for every n >
m > N , we have
X n
ai < ε.
i=m+1

Since
n
X n
X
|bi | ≤ ai ,
i=m+1 i=m+1

we have
n
X
|bi | < ε.
i=m+1
P∞
Hence i=1 |bi | converges.

the series ∞ 1
P
Example 3.10. (i) if 0 < p ≤ 1, then P n=1 np diverges.
(ii) if 1 < p < ∞, then the series ∞ 1
n=1 np converges.

23
The above series ∞ 1
P
n=1 np is very useful for comparison test. Another useful series for com-
parison is the geometric series defined by a real number r, r ∈ (0, 1).
Theorem 3.11 (Ratio test). Let ∞
P
i=1 ai be a series of nonzero real numbers. If
|ai+1 |
lim sup <1
i→∞ |ai |
P∞
then i=1 ai converges absolutely. If
|ai+1 |
lim inf >1
i→∞ |ai |
P∞
then i=1 |ai | diverges.
|ai+1 | 1−r
Proof. Let r = lim supi→∞ |ai | . Then r < 1. Let ε = 2 > 0, then there exists N such that
|ai+1 |
sup − r < ε.
j≥N |ai |
That is
|ai+1 | 1+r
sup < <1
j≥N |ai | 2
Therefore, for every j ≥ N
 j−N
1+r
|aj | < |aN | .
2
1+r j−N
Since ∞ converges, we have j=N |aj | converges, which implies ∞
P  P∞ P
j=N |aN | 2 j=1 |aj |
converges.
Let r̃ = lim inf i→∞ |a|ai+1
i|
|
. Then r̃ > 1. Let ε̃ = r̃−1
2 > 0, then there exists N such that

|ai+1 |
inf − r̃ > −ε̃.
j≥N |ai |
That is
|ai+1 | 1 + r̃
inf > > 1.
j≥N |ai | 2
Therefore, for every j ≥ N
1 + r̃ j−N
 
|aj | > |aN | .
2
1+r̃ j−N
Since ∞ diverges, we have ∞
P  P
j=N |aN | 2 j=N |aj | diverges.
P∞
Theorem 3.12 (Root test). Let i=1 ai be a series of nonzero real numbers. If
1
lim sup |an | n < 1
n→∞
P∞
then i=1 ai converges absolutely. If
1
lim inf |an | n > 1
i→∞
P∞
then i=1 |ai | diverges.

24
1
1−r
Proof. Let r = lim supn→∞ |an | n . Then r < 1. Let ε = 2 > 0, then there exists N such that
1
sup |an | n − r < ε.
n≥N

That is
1 1+r
sup |an | n < <1
n≥N 2
Therefore, for every j ≥ N  n
1+r
|an | < .
2
1+r n
Since ∞ converges, we have ∞
P  P P∞
n=N 2 n=N |an | converges, which implies that n=1 |an |
converges.
1
Let r̃ = lim inf n→∞ |an | n . Then r̃ > 1. Let ε̃ = r̃−1
2 > 0, then there exists N such that
1
inf |an | n − r̃ > −ε̃.
n≥N

That is
1 1 + r̃
inf |an | n > > 1.
n≥N 2
Therefore, for every n ≥ N  n
1 + r̃
|an | > .
2
P∞ 1+r̃ n P∞ P∞

Since j=N 2 diverges, we have n=N |an | diverges, and thus, n=1 |an | diverges.

Example 3.13. Find all possible values of x so that the following series converge.
(i)

X xn
,
n!
n=1
(ii)

X xn
,
ln n
n=2
(iii)

X nn
xn .
n!
n=2

4 Metric space
4.1 Definition
For two different points (x1 , y1 ) and (x2 , y2 ) in R2 , there are at least two obvious way to measure
the “distance” between (x1 , y1 ) and (x2 , y2 ) by you walking from (x1 , y1 ) to (x2 , y2 ).

25
The first one is you walk through the straight line from (x1 , y1 ) to (x2 , y2 ). Then the distance
measured by this way is p
(x1 − x2 )2 + (y1 − y2 )2 .
The other way is you walk horizontally from (x1 , y1 ) to (x2 , y1 ) and then vertically from (x2 , y1 )
to (x2 , y2 ). Then the distance measured by this way is

|x1 − x2 | + |y1 − y2 |.

Both are valid distance, and the difference is you measure it in a different way, or we say the
metric we used are different.
So what is a metric?

Definition 4.1. A metric space is a pair (X, d) where X is a set and d : X × X → R is a function
satisfying the following properties:
(i) positive definite: for x, y ∈ X, d(x, y) ≥ 0. Moreover, d(x, y) = 0 if and only if x = y.
(ii) symmetric: for any x, y ∈ X, we have d(x, y) = d(y, x).
(iii) triangle inequality: for any x, y, z ∈ X, we have d(x, z) ≤ d(x, y) + d(y, z).

We say d is a metric on X if (X, d) is a metric space.

Example 4.2. For x = (x1 , x2 , · · · , xn ), y = (y1 , y2 , · · · , yn ) ∈ Rn . Define


n
X
d1 (x, y) = |xj − yj |
j=1

and v
u n
uX
d2 (x, y) = t |xj − yj |2
j=1

Prove that both (Rn , d1 ) and (Rn , d2 ) are metric spaces.

Example 4.3. Let X be any nonempty set, and for any x, y ∈ X, define
(
0 of x = y;
d(x, y) =
1 of x 6= y.

Prove that (X, d) is a metric space. This d is called the discrete metric, and (X, d) is called
the discrete metric space. The discrete metric is very handy for producing counterexamples (keep
this in mind).

Exercise 4.4. Let (X, d) be a metric space, and let Y be a proper subset of X. Show that (Y, d0 )
is a metric space, where we define d0 (y1 , y2 ) = d(y1 , y2 ) for every y1 , y2 ∈ Y . We call d0 the
inherited metric on Y .

26
More examples on Rn . Let p ∈ [1, ∞). For every x = (x1 , x2 , · · · , xn ) ∈ Rn , define
 1
n p
X
p
kxkp =  |xj | .
j=1

For every x, y ∈ Rn , define


dp (x, y) = kx − ykp .
We are going to show that (Rn , dp ) is a metric space for every p ∈ [1, ∞). To prove this, we need
some preparation first.

Theorem 4.5 (Young inequality). If a and b are nonnegative real numbers, and p > 1 and q > 1
such that 1/p + 1/q = 1, then
ap bq
ab ≤ + .
p q
Moreover, the equality holds if and only if bq = ap .
1
Proof. Consider the function y = xp−1 for x ≥ 0, and its inverse function x = y p−1 = y q−1 , y ≥
0. We have Z a Z b
p−1 ap bq
x dx + y q−1 dy = + .
0 0 p q
A look at the graph of the functions reveals immediately that this sum is greater than or equal to
ab, where equality holds if and only if b = ap−1 , which is equivalent to saying bq = ap .

Theorem 4.6 (Hölder’s inequality). Suppose p > 1 and q > 1 are two real numbers such that
1/p + 1/q = 1. Suppose x = (x1 , x2 , · · · , xn ) ∈ Rn and y = (y1 , y2 , · · · , yn ) ∈ Rn , then

n n
!1 n
!1
X X p X q

|xk yk | ≤ |xk |p |yk |q .


k=1 k=1 k=1

Proof.
n n 
1 |xk |p 1 |yk |1

X |xk | |yk | X 1 1
≤ p + q = + = 1.
kxkp kykp p kxkp q kxkq p q
k=1 k=1

Theorem 4.7 (Minkowski inequality). Suppose p ≥ 1, and x, y ∈ Rn . Then

kx + ykp ≤ kxkp + kykp .

27
Proof. The case of p = 1 follows from the triangle inequality for absolute values. Now let us
assume p > 1. Then
n
X n
X
kx + ykpp ≤ |xk + yk | p−1
|xk | + |xk + yk |p−1 |yk |
k=1 k=1
n
! p−1 n
!1
p p
X p X
≤ (|xk + yk |p−1 ) p−1 |xk |p
k=1 k=1
n
! p−1 n
!1
p p
X p X
+ (|xk + yk |p−1 ) p−1 |yk |p
k=1 k=1
= kx + ykp−1
p (kxkp + kykp ).

Cancelling kx + ykp−1
p , we obtain that kx + ykp ≤ kxkp + kykp .

Now one can show that


Theorem 4.8. (Rn , dp ) is a metric space for every p ≥ 1.
Proof. Left as an exercise.

We also define a metric for p = ∞. For every x = (x1 , x2 , · · · , xn ) ∈ Rn , define

kxk∞ = max |xk |.


1≤k≤n

For every x, y ∈ Rn , define


d∞ (x, y) = kx − yk∞ .
Exercise 4.9. Prove that (Rn , d∞ ) is a metric space.
Definition 4.10. For 1 ≤ p ≤ ∞, the metric space (Rn , dp ) is denoted as `p (Rn ).

4.2 Topology on metric spaces


A fundamental notion in the study of metric spaces is that of an open ball.
Definition 4.11. Suppose that (X, d) is a metric space and x0 ∈ X. If r ∈ R with r > 0, the open
ball of radius r around x0 is the subset of X defined by Br (x0 ) = {x ∈ X | d(x, x0 ) < r}. The
closed ball of radius r around x0 is the subset of X defined by B r (x0 ) = {x ∈ X | d(x, x0 ) ≤ r}.
Exercise 4.12. Draw the region of the unit ball B1 (0) in R2 under the metric d1 , d2 and d∞ ,
respectively.
Exercise 4.13. If 1 ≤ p < q, show that the unit ball in `p (Rn ) is contained in the unit ball in
`q (Rn ).
Exercise 4.14. Consider a point x ∈ R2 that lies outside the unit ball in `1 (R2 ) and inside the
unit ball in `∞ (R2 ). Is there a p between 1 and ∞ such that kxkp = 1? Do the same problem in
Rn

28
Definition 4.15. Let (X, d) be a metric space and suppose that A ⊂ X. The set A is an open set
in X if, for each a ∈ A, there is an r > 0 such that Br (a) ⊆ A. We say A is closed if Ac is open.

Exercise 4.16. Let (X, d) be a metric space. Prove that every open ball of X is an open set.

Exercise 4.17. Prove that the following are open sets.


(i) The first quadrant {(x, y) ∈ R2 | x > 0, y > 0} in the usual metric;
(ii) Any subset of a discrete metric space.

Theorem 4.18. (i) If {Aj }j∈J is a family of open sets in a metric space (X, d), then
[
Aj is an open set in X.
j∈J

(i) If A1 , A2 , · · · , An are open sets in a metric space (X, d), then


n
\
Aj is an open set in X.
j=1

Proof. Left as exercises

Exercise 4.19. Formula similar statements for closed sets to the above theorem.

Definition 4.20. Suppose that A is a subset of a metric space X.


A point x0 ∈ X is an accumulation point of A if, for every r > 0, we have (Br (x0 ) \ {x0 }) ∩
A 6= ∅.
A point x0 ∈ X is an isolated point of A if, there exists r > 0 such that (Br (x0 ) ∩ A = {x0 }.
A point x0 ∈ X is a boundary point of A if, for every r > 0, we have such that (Br (x0 )∩A 6= ∅
and (Br (x0 ) ∩ Ac 6= ∅. The boundary of A is the set of its boundary points, and is denoted by ∂A.
A point x0 ∈ X is an interior point of A if, there exists r > 0 such that Br (x0 ) ⊂ A. The
interior of A is the set of its interior points, and is denoted by A◦ .
A point x0 ∈ X is an exterior point of A if x0 is an interior point of Ac .

Exercise 4.21. Find the accumulation points, isolated points, boundary, interior and exterior of
the following set A in X:
(1) A = {(x, y, z) ∈ R3 | x2 + y 2 + z 2 < 1}, X = R3 with the usual metric.
(2) A = {(x1 , x2 , · · · , xn ) ∈ Rn | x21 + x22 + · · · + x2n < 1}, X = Rn with the usual metric.
(3) A = Q, X = R with the usual metric.
(4) A is any subset of a discrete metric space X.
(5) A = { n1 | n ∈ N}, X = R with the usual metric.

Theorem 4.22. Suppose A is a subset of a metric space X. Then A is closed if and only if A
contains all of its accumulation points.

Proof. We have seen this for R. The proof for general metric space is identical.

Definition 4.23. Suppose that A is a nonempty subset of a metric space X. The closure of A is
the intersection of all the closed sets which contain A.

29
The closure of any set A exists, since there are always closed sets that contain A, for example
X. The closure of A is a closed set since it is the intersection of closed sets. So the closure of A
is the “smallest” closed set that contains A. We denote the closure of a set A by A. Obviously,
A ⊆ A and A = A if and only if A is closed.

Exercise 4.24. (i) Let A = {(x, y, z) ∈ R3 | x > 0, y > 0, z > 0} be a subset of R3 (with the
usual metric). What is A?
(ii) Let Qn = {(x1 , · · · , xn ) ∈ Rn | xj ∈ Q, j = 1, 2, · · · , n} be a subset of Rn (with the
n
usual metric). What is Q ?
(iii) Let X be a discrete metric space and let A be any subset of X. Then A = A.

Exercise 4.25. Suppose that A is a subset of a metric space X. Prove that


(i) A = A ∪ {all accumulations of A}.
(ii) A = A ∪ ∂A.
(iii) ∂A = A ∩ Ac .

4.3 Convergence and completeness


Definition 4.26. Suppose (an )n∈N is a sequence of points in a metric space X. We say that a
point L ∈ X is the limit of the sequence (an )n∈N as n → ∞ if, for any ε > 0, there exists N ∈ N
such that d(an , L) < ε for every n ≥ N . When the limit exists, we say that (an )n∈N converges to
L, and we write
lim an = L.
n→∞

Sometimes, we simply say that (an )n∈N converges in X without mentioning the limit L explicitly.

Definition 4.27. Suppose (an )n∈N is a sequence of points in a metric space X. We say that
(an )n∈N is a Cauchy sequence if, for every ε > 0, there exists N ∈ N such that d(an , am ) < ε for
every n, m ≥ N .

It may be that a sequence in a metric space is a Cauchy sequence even though it does not
converge. For example, as we observed earlier, Cauchy sequences in Q with the usual metric do
not necessarily converge in Q. This leads us to the following exercise.

Exercise 4.28. Suppose (an )n∈N is a convergent sequence in a metric space X. Prove that
(an )n∈N is a Cauchy sequence.

Definition 4.29. Let X be a metric space. We say that X is a complete metric space if every
Cauchy sequence converges.

Exercise 4.30. Determine whether the following metric spaces are complete or not.
(i) R with the usual metric;
(ii) any discrete metric space;
(iii) Q with the usual metric;
(iv) any proper nonempty open subset of R with the inherited metric.

Exercise 4.31. Prove that a subset Y of a complete metric space X is also complete metric space
with the inherited metric if and only if Y is closed as a subset of X.

30
Exercise 4.32. Show that for every 1 ≤ p ≤ ∞, the space `p (Rn ) is complete.
Definition 4.33. A subset A of a metric space X is bounded if X = or there exists x ∈ X and
r > 0 such that A ⊆ Br (x).
Lemma 4.34. Every bounded sequence Rn with the usual metric has convergent subsequence.
Theorem 4.35 (Bolzano-Weierstrass). If A is a bounded infinite subset of Rn , then A has an
accumulation point.

4.4 Space of functions


One of the most important contexts in which to discuss the convergence of sequences is when we
consider sequences of functions. There is more than one notion of what it means for a sequence
of functions to converge. Below, we discuss two of the most important of these notions, namely
pointwise convergence and uniform convergence. We do this in the case of sequences of bounded
functions from a set X to R.
The most naive notion of convergence for a sequence of functions is pointwise convergence.
Definition 4.36. Let X be a set, and consider a sequence of functions (fn )n∈N , where fn : X → R
is a bounded function for each n ∈ N. We say that a function f : X → R is the pointwise limit of
the sequence (fn )n∈N if for every x ∈ X, limn→∞ fn (x) = f (x).
Example 4.37. Let fn : [0, 1] → R be given by
(
0 if 0 ≤ x < 1 − n1 ,
fn (x) =
nx − (n − 1) if x = 1.

The pointwise limit of the sequence (fn )n∈N is the function f : [0, 1] → R given by
(
0 if 0 ≤ x < 1,
f (x) =
1 if x = 1.

Example 4.38. Let fn : (0, 1) → R be given by


(
0 if 0 ≤ x < n1 ,
fn (x) = 1
x if n1 ≤ x < 1.

The pointwise limit of the sequence (fn )n∈N is the function f : (0, 1) → R given by
1
f (x) = .
x
Exercise 4.39. For the following sequence (fn )n∈N of functions, where fn : [0, 2π] → R for all
n ∈ N, find all values of x ∈ [0, 2π] such that the sequence (fn )n∈N converges, and find the
pointwise limit function f : [0, 2π] → R if it exists.
(i) fn (x) = sin( nx );
(ii) fn (x) = sin(nx);
(iii) fn (x) = sinn (x).

31
Denote by B(X, R) the set of all bounded functions from X to R. Thus, f ∈ B(X, R) if and
only if there is a real number M such that |f (x)| ≤ M for all x ∈ X. For f ∈ B(X, R), we define
kf k := supx∈X |f (x)| (the “sup norm”). For f, g ∈ B(X, R), we define d(f, g) = kf − gk (the
“sup metric”).

Exercise 4.40. Show that B(X, R), with d as defined above, is a metric space.

Definition 4.41. Let (fn )n∈N be a sequence of functions in B(X, R). We say the sequence (fn )n∈N
converges uniformly to a function f ∈ B(X, R) if for every ε > 0, there exists Nε ∈ N such that

sup |fn (x) − f (x)| < ε for all n ≥ Nε .


x∈X

Remark 4.42. Note that uniform convergence is convergence in the metric space B(X, R). How-
ever, pointwise convergence is NOT in general given by convergence in a metric space.

Exercise 4.43. Show that if a sequence (fn )n∈N converges uniformly to a function f , then it
converges pointwise to the function f .

Exercise 4.44. Let fn (x) = xn for n ∈ N.


(i) Show that the sequence (fn )n∈N converges pointwise to the function f (x) = 0 on the
interval (−1, 1).
(ii) Show that if we restrict to the domain [− 21 , 12 ], the sequence (fn )n∈N converges uniformly
to the function f (x) = 0.
(iii) Show that the sequence (fn )n∈N does NOT converge uniformly on the interval (−1, 1).

Theorem 4.45. The space B(X, R) is a complete metric space.

Proof. Suppose that (fn )n∈N is Cauchy sequence in B(X, R). Then for every x ∈ X, the sequence
(fn (x))n∈N is a Cauchy sequence, and hence is convergent in R. Define for every x ∈ X, f (x) =
limn→∞ fn (x). We want to show that (fn )n∈N converges uniformly to f .
To this end, let ε > 0. Choose N ∈ N such that for all n, m ≥ N ,

sup |fn (x) − fm (x)| < ε/2.


x∈X

For every x ∈ X, we can choose an integer Nx > N such that

|fNx (x) − f (x)| < ε/2.

Then
|fn (x) − f (x)| ≤ |fn (x) − fNx (x)| + |fNx (x) − f (x)| < ε.
This proves that (fn )n∈N converges uniformly to f . To finish the proof, we need to show f ∈
B(X, R). This actually follows from the above inequality that

|f (x)| ≤ ε + |fN (x)|.

together with the fact that fN is a bounded function.

32
4.5 Continuous functions
Definition 4.46. Let (X, d) and (X 0 , d0 ) be metric spaces. A function f : X → X 0 is continuous
at the point x0 ∈ X if for every ε > 0 there exists δ > 0 such d0 (f (x), f (x0 )) < ε whenever
x ∈ X and d(x, x0 ) < δ. If f is continuous at every point in X, we simply say that f is continuous
on X.
The above is ε − δ definition. It is simply the statement that

lim f (x) = f (x0 ).


x→x0

More generally, the limit of a function f (x) at x0 is L ∈ X 0 , and we write

lim f (x) = L,
x→x0

if for every ε > 0, there exists a δ > 0 such that d0 (f (x), L) < ε whenever x ∈ X and 0 <
d(x, x0 ) < δ.
Exercise 4.47. Suppose that X and X 0 are metric spaces as above and that x0 ∈ X. Show that
f is continuous at x0 if and only if for every sequence (xn )n∈N in X which converges to x0 in X,
we have
lim f (x) = f (x0 ).
x→x0

In discussing continuity, one must be careful about the domain of the function. For example,
define f : R → R by (
0, x 6∈ Q;
f (x) =
1, x ∈ Q.
Then, f is not continuous at any point of R. However, if we restrict f to be a function from Q to
Q, then it means that f (x) = 1 on Q and is continuous at every point of Q.
Theorem 4.48. Suppose that (X, d) and (X 0 , d0 ) are metric spaces. Then a function f : X → X 0
is continuous if and only if for any open set V ⊂ X 0 , the set f −1 (V ) is an open set in X.
Proof. Suppose f is continuous. Let V be an open set in X 0 . Suppose x0 ∈ f −1 (V ). Take ε > 0
such that Bε (f (x0 )) ⊂ V . Then there exists δ > 0 such that f (Bδ (x0 )) ⊆ Bε (f (x0 )), and thus,

Bδ (x0 ) ⊂ f −1 (Bε (f (x0 ))) ⊂ f −1 (V ).

So, f −1 (V ) is open.
The other direction is left as an exercise.

Corollary 4.49. Suppose (X, d), (X 0 , d0 ) and (X 00 , d00 ) are metric spaces, and f : X → X 0 and
g :0 → X 00 are continuous. Then g ◦ f : X → X 00 is continuous.
Exercise 4.50. (i) Let X and X 0 be metric spaces and assume that X has the discrete metric.
Show that any function f : X → X 0 is continuous.
(ii) Let X = R with the usual metric, and X 0 be a discrete metric space. Describe all contin-
uous functions from X to X 0 .

33
Exercise 4.51. Suppose that (X, d) and (X 0 , d0 ) are metric spaces and that f : X → X 0 is
continuous. For each of the following statements, determine whether or not it is true. If the
assertion is true, prove it. If it is not true, give a counterexample.

i. If A is an open subset of X, then f (A) is an open subset of X 0 ;

ii. if A is a closed subset of X, then f (A) is a closed subset of X 0 ;

iii. if B is a closed subset of X 0 , then f −1 (B) is a closed subset of X;

iv. if A is a bounded subset of X, then f (A) is a bounded subset of X 0 ;

v. if B is a bounded subset of X 0 , then f −1 (B) is a bounded subset of X;

vi. if A ⊂ X and x0 is an isolated point of A, then f (x0 ) is an isolated point of f (A);

vii. if A ⊂ X, x0 ∈ A, and f (x0 ) is an isolated point of f (A), then x0 is an isolated point of


A;

viii. if A ⊂ X and x0 is an accumulation point of A, then f (x0 ) is an accumulation point of


f (A);

ix. if A ⊂ X, x0 ∈ X, and f (x0 ) is an accumulation point of f (A), then x0 is an accumulation


point of A.

Definition 4.52. Let (X, d) and (X 0 , d0 ) be metric spaces. A function f : X → X 0 is a homeo-


morphism if
a. f is a bijection,
b. f is continuous, and
c. f −1 is also continuous.

Example 4.53. 1. The function tan : (−π, π) → R is a homeomorphism, with inverse tan−1 :
R → (−π, π).
2. If (X, d) is a metric space, then the function I(x) = x is a homeomorphism from X to
itself.

Exercise 4.54. Let X = R with the discrete metric, and let X 0 = R with the usual metric. Show
that the function I : X → X 0 , I(x) = x is a continuous bijection but is not a homeomorphism.
d(x,y)
Exercise 4.55. Let (X, d) be a metric space, and for any x, y ∈ X, let d0 (x, y) = 1+d(x,y) .
0
i. Show that d defines a metric on X.
ii. Show that the identity map I : (X, d) → (X, d0 ), I(x) = x, is a homeomorphism.
iii. If (X, d0 ) is complete, is (X, d) necessarily complete?

Definition 4.56. Let (X, d) and (X 0 , d0 ) be metric spaces. A homeomorphism f : X → X 0 is an


isometry if
d0 (f (x1 ), f (x2 )) = d(x1 , x2 )
for all x1 , x2 ∈ X.

34
Exercise 4.57. Let X = R2 with the usual metric. Show that the following functions are isometries
from X to itself
1. Translation by the vector (a, b) in R2 :

T(a,b) (x, y) = (x + a, y + b)

for fixed a, b ∈ R.
2. Counter clockwise rotation about the origin by an angle θ:

Rθ (x, y) = (x cos θ − y sin θ, x sin θ + y cos θ)

for fixed θ ∈ R.
3. Reflection over a line through the origin making an angle θ with the x-axis:

Sθ (x, y) = (x cos(2θ) + y sin(2θ), x sin(2θ) − y cos(2θ))

for fixed θ ∈ R.
Exercise 4.58. Let Rn have the usual metric. Show that the function Da : Rn → Rn given by

Da (x1 , x2 , ..., xn ) = (ax1 , ax2 , ..., axn )

for fixed a ∈ R is an isometry if and only if a = ±1.


Exercise 4.59. In this exercise, we consider isometries from R to itself in the usual metric.
i. Is f (x) = x3 a bijection? A homeomorphism? An isometry?
ii. Is f (x) = x + sin x a bijection? A homeomorphism? An isometry?
iii. Find all isometries from R to itself.
Definition 4.60. Suppose that (X, d) is a metric space. Define BC(X, R) to be the subset of
B(X, R) consisting of continuous functions from X to R. We take the metric on BC(X, R) to be
the induced metric from B(X, R). If X is compact, then all continuous functions from X to R are
bounded; so, when X is compact, we will sometimes write C(X, R) in place of BC(X, R).
Theorem 4.61. The space BC(X, R) is a complete metric space.
Proof. Suppose that (fn )n∈N is a Cauchy sequence in BC(X, R). Then by Theorem 4.45, (fn )n∈N
converges to a function f ∈ B(X, R). All we need to show is that f is continuous. Give ε > 0,
there exists N such that supx∈X |fn (x) − f (x)| < ε/3 whenever n ≥ N . Fox x0 ∈ X. Then, for
any x ∈ X and n ≥ N ,

|f (x) − f (x0 )| = |f (x) − fn (x) + fn (x) − fn (x0 ) + fn (x0 ) − f (x0 )|


≤ |f (x) − fn (x)| + |fn (x) − fn (x0 )| + |fn (x0 ) − f (x0 )|
≤ ε/3 + |fn (x) − fn (x0 )| + ε/3.

Since fn is continuous, we can choose δ > 0 such that |fn (x) − fn (x0 )| < ε/3 whenever
d(x, x0 ) < δ. Then, it follows that |f (x) − f (x0 )| < ε whenever d(x, x0 ) < δ. So f is con-
tinuous.

35
Exercise 4.62. Define a sequence of functions fn : (0, 1) → R by
(
1
n if x = pq reduced to lowest terms, x 6= 0,
fn (x) = q
0 otherwise,

for n ∈ N. Find the pointwise limit f of the sequence (fn )n∈N and show that (fn )n∈N converges
to f uniformly.
Definition 4.63. Let (X, d) and (X 0 , d0 ) be metric spaces, and let f be a continuous function from
X to X 0 . We say that f is uniformly continuous if, given ε > 0, there exists δ > 0 such that, for
any pair x, y ∈ X, we have d0 (f (x), f (y)) < ε whenever d(x, y) < δ.
So, f is uniformly continuous if it is continuous at every point and, for a given ε > 0, we can
find a corresponding δ that is independent of the point.
Exercise 4.64. i. Show that a polynomial function p(x) on R is uniformly continuous if and only
if deg(p(x)) < 2.
ii. Show that f (x) = sin(x) is uniformly continuous on R.
Exercise 4.65. Let X = (0, ∞) and determine whether the following functions are uniformly
continuous on X:
i. f (x) = x1 ;

ii. f (x) = x;
iii. f (x) = ln(x);
iv. f (x) = x ln(x).

4.6 Compactness
Definition 4.66. Let A be a subset of a metric space (X, d). A family {Uj }j∈J of open set of X is
called an open covering of A if [
A⊆ Uj .
j∈J

If {Uj }j∈J is an open covering of A, we say that this cover has a finite subcovering if there is a
finite subcollection Uj1 , Uj2 , . . . , Ujn satisfying
n
[
A⊆ Ujk .
k=1

Example 4.67. 1. Let A = (0, 1) ⊆ R with the usual metric. For j ∈ N, j ≥ 2, define Uj =
( 1j , 1). Then A ⊆ ∪j∈N Uj , there is no finite subcovering.
2. Let B = [0, ∞) ⊂ R with the usual metric. For j ∈ N, define Uj = (−1, j). Then
B ⊆ ∪j∈N Uj , but there is no finite subcovering.
3. Let X be a discrete metric space. For any point j ∈ X, set Uj = {j}. Then {U j}j∈X is an
open cover of X which has a finite subcovering if and only if X is a finite set.
Definition 4.68. Let A be a subset of a metric space X. We say that A is compact if every open
covering of A has a finite subcovering.

36
Recall that the Heine-Borel Theorem in R states that a subset of R with the usual metric is
compact if and only if it is closed and bounded. The statement of the Heine-Borel theorem is
certainly not true in a general metric space. For example, take R with the discrete metric. Then,
R is closed and bounded in this metric but it is not compact.
In a general metric space, the closed bounded sets are not necessarily compact. However, we
do have one half of the statement of the Heine-Borel theorem in general metric spaces.

Theorem 4.69. If a subset A of a metric space X is compact, then A is closed and bounded

Proof. 1. If A is empty, there is trival. If A is not empty, choose a ∈ A, and take the open covering
of A: {Bn (a) | n ∈ N}. Since A is compact, this open covering has a finite open covering. Choose
the largest radius r in the finite subcovering, and thus, A ⊆ Br (a). So A is bounded.
2. To prove A is closed, we assume that x0 is an accumulation point of A, and we will prove
that x0 ∈ A. Suppose not, for each a ∈ A, let ra = d(x20 ,a) . Then the collection {Bra (a) | a ∈ A}
is an open covering of A, and hence it has a finite subcovering {Br1 (a1 ), · · · , Brn (an )}. Let
r = min(r1 , · · · , rn ). Then Br (x0 ) ∩ Brj (aj ) = ∅ for all j. Hence, Br (x0 ) ∩ A = ∅. This
contradicts with the definition of accumulation points.

Corollary 4.70. If A is a compact set in a metric space X, then every infinite subset of A has an
accumulation point in A.

Proof. Suppose that A is a compact set and that C is an infinite subset of A with no accumulation
point in A. Then, for each a ∈ A, there is an open ball B(a) centered at a such that (B(a) \
{a}) ∩ C = ∅. The collection {B(a) | a ∈ A} covers A. So, by compactness of A, it has a
finite cover {B(a1 ), · · · , B(an )}. Thus C ⊂ A ⊂ B(a1 ) ∪ · · · ∪ B(an ) and each B(aj ) contains
at most one element of C (at its center). This implies that C has at most n elements, which is a
contradiction.

Corollary 4.71. Let A be a compact set in a metric space. Then, every infinite sequence in A has
a subsequence that converges to a point in A.

Proof. If the infinite sequence has infinitely many different elements, then it follows from from
the above corollary. If the sequence has only finitely many different elements, then we can choose
a subsequence with the same element.

Theorem 4.72. The Heine-Borel theorem holds in Rn with the usual metrics. That is, Let A be a
subset of Rn with the usual metric. Then A is compact if and only if A is closed and bounded.

Exercise 4.73. (i) Show that a finite union of compact sets is compact.
(ii). Give an example of a countable union of compact sets that is not compact.
(iii). Show that a closed subset of a compact set is compact.

Exercise 4.74. (i) Let f : X → X 0 be a continuous map of metric spaces. Show that if A ⊆ X is
compact, then f (A) ⊂ X 0 is compact.
(ii). Suppose that X is a compact metric space. Show that a continuous function f : X → R
(R with the usual metric) is bounded.
(iii). Suppose that X is a compact metric space. Show that a continuous function f : X → R
attains a maximum and minimum value on X.

37
Exercise 4.75. Suppose X and X 0 are metric spaces with X compact. If f : X → X 0 is continu-
ous on X, show that f is uniformly continuous on X.
Definition 4.76. A subset A of a metric space X is sequentially compact if every sequence in A
has a subsequence that converges to an element of A.
Theorem 4.77. In any metric space, a subset A is compact if and only if it is sequentially compact.
Proof. “Only if” part: it follows from Corollary 4.71. “If” part: not required.

Definition 4.78. Let (X, d) be a metric space. A subset A ⊆ X is said to be dense in X if A = X.


Example 4.79. (i) In the usual metric, Q is dense in R.
(ii) In any metric space, X is dense in X.
(iii) Show that in any discrete metric space X, the only dense subset of X is X itself.
(iv) Show that if the only dense subset of a metric space X is X itself, then X is discrete.

4.7 The contraction mapping theorem


Definition 4.80. Let X be a metric space and f a map from X to X. We say that f is a contraction
mapping of X if there exists a real number α, with 0 < α < 1, such that d(f (x), f (y)) ≤ αd(x, y)
for every pair x, y ∈ X.
Exercise 4.81. Show that a contraction mapping is continuous.
Exercise 4.82. Let f : R → R be a polynomial function. Give conditions on f such that f is
contraction mapping.
Definition 4.83. Let X be a metric space and f a map from X to X. A point x0 ∈ X is a fixed
point of f if f (x0 ) = x0 .
Exercise 4.84. (i) Find a continuous function f : R → R that does not have a fixed point.
(ii) Find a continuous function f : (0, 1) → (0, 1) that does not have a fixed point.
(iii) Let f : [0, 1] → [0, 1] be continuous. Show that f has a fixed point.
Theorem 4.85 (Contraction mapping theorem). Let X be a nonempty complete metric space and
let f : X → X be a contraction mapping with constant α. Then f has a unique fixed point
x0 ∈ X.
Proof. Let x1 be any element of X. Define x2 = f (x1 ), x3 = f (x2 ), · · · xn = f (xn−1 ). Then if
n > m, we have
d(xm , xn ) = d(f (xm−1 ), f (xn−1 ))
≤ αd(xm−1 , · · · xn−1 )
≤ ···
≤ αm−1 d(x1 , xn−m+1 )
≤ αm−1 [d(x1 , x2 ) + d(x2 , x3 ) + · · · , +d(xn−m , xn−m+1 )]
≤ αm−1 [d(x1 , x2 ) + αd(x1 , x2 ) + · · · + αn−m−1 d(x1 , x2 )]
αm−1
= d(x1 , x2 )
1−α

38
It follows that (xn )n∈N is a Cauchy sequence in X, and it converges since X is complete. Let
x0 = limn→∞ xn . Then we can verify that f (x0 ) = x0 since f is continuous.
Suppose there are two fixed points x, y. Then d(x, y) = d(f (x) − f (y)) ≤ αd(x, y). Since
α < 1, d(x, y) = 0 and thus, x = y.

Exercise 4.86. We say that a function f : Rn → RN satisfies a Lipschitz condition if there exists
a constant C such that kf (x) − f (y)k ≤ Ckx − yk for all x, y ∈ Rn .
i. Show that f satisfies a Lipschitz condition with constant C for 0 < C < 1 if and only if f is
a contraction mapping.
ii. Show that if f satisfies a Lipschitz condition with any constant, then f is continuous.
iii. For each C ∈ (0, ∞), find an example of a function f : Rn → Rn that satisfies the
Lipschitz condition with constant C.
iv. Let B = B1 (0) be the unit ball in Rn . For each C > 1, find an example of a function
f : B → B that satisfies the Lipschitz condition with constant C.
v. Find an example of a continuous function f : Rn → Rn that does not satisfy any Lipschitz
condition.
Theorem 4.87 (Picard’s Theorem). Let B be a ball of radius r in R2 with center at (x0 , y0 ).
Suppose that f : B → R is a continuous function that satisfies a Lipschitz condition in the
second variable, that is, there is a constant C such that |f (x, y) − f (x, y 0 )| ≤ C|y − y 0 | for all
(x, y), (x, y 0 ) ∈ B. Then, there exists a δ > 0 such that the differential equation dy/dx = f (x, y)
has a unique solution y = φ(x), satisfying φ(x0 ) = y0 , in the interval |x − x0 | < δ.
Proof. Without loss of generality, we can assume that f is bounded on B, that is, there exists a
constant M such that |f (x, y)| ≤ M for all (x, y) ∈ B. Take a δ > 0 such that Cδ < 1 and
{(x, y) | |x − x0 | ≤ δ, |y − y0 | ≤ M δ} ⊂ B.
We now work inside the space X = {φ ∈ C([x0 − δ, x0 + δ]) | |φ(x) − y0 | ≤ M δ}. If we
give X the sup metric, then X is a complete metric space. (This is because X is a closed subset
of the complete metric space C([x0 − δ, x0 + δ]).) Rx
Now, take the mapping T : X → X defined by T φ(x) = y0 + x0 f (t, φ(t))dt. It is obvious
that T φ ∈ X and that d(T φ, T φ0 ) ≤ Cδd(φ, φ0 ). Thus, T is a contraction mapping on X, and
there is a unique function φ ∈ X such that T φ = φ. It is easy to check that the solutions to the
differential equation are precisely the fixed points of T , so the proof is complete.

4.8 Weierstrass Theorem


Theorem 4.88 (Weierstrass Theorem). Let f : [0, 1] → R be a continuous function. Then there
exists a sequence of polynomials uniformly converging to f on [0, 1].
If we denote C([0, 1]) be the set of continuous functions on [0, 1], and define the d∞ metric on
C([0, 1]):
d∞ (f, g) = sup |f (x) − g(x)|.
x∈[0,1]

Then we showed in class that (C([0, 1]), d∞ ) is a metric space. Weierstrass’ theorem states that
the set of polynomials on [0, 1] is dense in (C([0, 1]), d∞ ).

39
Proof of Weierstrass Theorem. The proof given in the below is a constructive proof, which is due
to Sergei Natanovich Bernstein (Russian, 1880-1968).
Let f : [0, 1] → R be a continuous function. From now on , this f is fixed. For every n ∈ N,
we define
n   
X k n k
Bn (f ; x) = f x (1 − x)n−k ,
n k
k=0
n

where k are the binomial coefficients
 
n n!
= .
k k!(n − k)!

Note that Bn (f ; x) is a polynomial of degree n, and it is called the Bernstein’s polynomial of f .


We are going to show that

Bn (f ; x) uniformly converges to f as n → ∞ on [0, 1].

We begin with estimating the error


n   
X k n k
Bn (f ; x) − f (x) = f x (1 − x)n−k − f (x).
n k
k=0

Observation: Using the identity


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

we have
n  
X n k
f (x) = f (x) x (1 − x)n−k .
k
i=0
Therefore
n     
X k n k
Bn (f ; x) − f (x) = f − f (x) x (1 − x)n−k ,
n k
k=0
and thus by triangle inequality,
n    
X k n k n−k
|Bn (f ; x) − f (x)| ≤ n − f (x) k x (1 − x)
f .
k=0

Since f is continuous on [0, 1], and [0, 1] is compact, it follows that f is uniformly continuous
on [0, 1]. (We proved in class that a continuous function on a compact is uniformly continuous.)
Therefore, for every  > 0, there exists δ > 0 such that if x1 , x2 ∈ [0, 1] satisfying |x1 − x2 | < δ
then |f (x1 ) − f (x2 )| < /2.
Arbitrarily fix x ∈ [0, 1] and define

k
E1 = {k : − x ≥ δ}

n

40
and
k
E2 = {k : − x < δ}.

n
We split the sum into two parts:
|Bn (f ; x) − f (x)|
n    
X k n k n−k
≤ f n − f (x) k x (1 − x)

k=0
   
X k n k X k n k
n−k n−k
= f n − f (x) k x (1 − x) + f n − f (x) k x (1 − x)

k∈E1 k∈E2
= I1 + I2 .
We estimate I2 first: making use of the uniform continuity of f and the choice of δ,we have
X  k   
n k n−k
I2 = f n − f (x) k x (1 − x)

k∈E2
 
 X n k
≤ x (1 − x)n−k
2 k
k∈E2
n  
X n k
≤ x (1 − x)n−k
2 k
k=0

= .
2
Then we estimate I1 . Since f is continuous on [0, 1], and [0, 1] is compact, we know f is bounded
(we proved in class that continuous functions preserve compact sets, so the image of [0, 1] under
f is compact, and thus, bounded), i.e., there exists M > 0 s.t. |f (y)| ≤ M for all y ∈ [0, 1].
X  k   
n k n−k
I1 = f n − f (x) k x (1 − x)

k∈E1
X 2M δ 2 n
≤ xk (1 − x)n−k (triangle inequality)
δ2 k
k∈E1
X 2M k 2  
− x n xk (1 − x)n−k (the definition of E1 )


δ2 n k
k∈E1
n  2  
2M X k n k
≤ 2 −x x (1 − x)n−k .
δ n k
k=0
Now we estimate this summation, which will have cancelations.
n  2  
X k n k
−x x (1 − x)n−k
n k
k=0
n n n
k2 n k
     
X
n−k
X 2kx n k n−k
X
2 n
= x (1 − x) − x (1 − x) + x xk (1 − x)n−k
n2 k n k k
k=0 k=0 k=0
= J1 + J2 + J3 .

41
We know that
n  
X n
J3 = x2 xk (1 − x)n−k = x2 .
k
k=0

Here is how to estimate J1 , J2 . We know that


n  
n
X n k n−k
(y + z) = y z
k
k=0

Differentiating it in y, we obtain
n  
X n
n(y + z)n−1 = ky k−1 z n−k .
k
k=0

Multiplying y on both sides:


n  
n−1
X n
ny(y + z) = ky k z n−k . (3)
k
k=0

Differentiating it in y once again, we obtain


n  
n−1 n−2
X n 2 k−1 n−k
n(y + z) + n(n − 1)y(y + z) = k y z .
k
k=0

Multiplying y on both sides again: we have


n  
n−1 2 n−2
X n
ny(y + z) + n(n − 1)y (y + z) = k 2 y k z n−k . (4)
k
k=0

Let y = x and z = 1 − x in (3) and (4), we have


n  
X n
nx = kxk (1 − x)n−k . (5)
k
k=0

and
n  
2
X n
nx + n(n − 1)x = k 2 xk (1 − x)n−k . (6)
k
k=0

Therefore, using (6)


n
nx + n(n − 1)x2 x + (n − 1)x2
 
1 X 2 n k n−k
J1 = k x (1 − x) = = .
n2 k n2 n
k=0

and using (5)


n  
2x X n k
J2 = − k x (1 − x)n−k = −2x2 .
n k
k=0

42
Therefore
x + (n − 1)x2 x − x2 1
J1 + J2 + J3 = − 2x2 + x2 = ≤ .
n n 4n
Consequently, we have
X  k   
n k n−k
I2 = f n − f (x) k x (1 − x)

k∈E1
n  2  
2M X k n k
≤ 2 −x x (1 − x)n−k
δ n k
k=0
2M M
≤ 2
= .
4nδ 2nδ 2
Choose N such that
M 
2
< .
2N δ 2
Note that this choice of N is independent of x. It follows that for every  > 0, there exists N
independent of x such that when n > N , we have
 
|Bn (f ; x) − f (x)| ≤ I1 + I2 ≤ + =
2 2
This proves that this sequence of polynomial Bn (f ; x) converges uniformly to f on [0, 1].

Corollary 4.89. Let f : [a, b] → R be a continuous function. Then there exists a sequence of
polynomials uniformly converging to f on [a, b].

Proof. : The idea is to scale [a, b] to [0, 1].


Define
g(x) = f (x(b − a) + a).
Then g is a continuous function on [0, 1]. Therefore, there exists a sequence of polynomial Pn
uniformly converging to g on [0, 1].
Let  
x−a
Qn (x) = Pn
b−a
Then Qn is also a polynomial. Now it is left for you to check that Qn converges uniformly to f
on [a, b]

43

You might also like