Lecture Note 2033 Full Version
Lecture Note 2033 Full Version
Lecture Note 2033 Full Version
Tianling Jin
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}.
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)}.
A1 × A2 × · · · × An = {(a1 , a2 , · · · , an ) | ai ∈ Ai , i = 1, 2, ...n}
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.
3
For example, if A = {1, 2, 3} and B = {a, b, c}, then
But
{(1, a), (2, b), (1, c)} is NOT a function A → B.
Some terminologies. Let f : A → B is a function.
• 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 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).
• 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
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
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.
is countable.
is countable.
• ∀a ∈ X, (a, a) ∈ R; (reflexive)
The “twiddle” notation (∼) is often used. That is, if (a, b) ∈ R, we write a ∼ b.
• ∀a ∈ X, a ∼ a; (reflexive)
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
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.
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.
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!!
C(a) = {b ∈ X | b ∼ a}
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
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.
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
The same for multiplication. if (a, b) ∼ (a0 , b0 ), (c, d) ∼ (c0 , d0 ), then we need to show that
• 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
x<y or x = y or x > y.
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.
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.
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
Denote C the set of all Cauchy sequence of rational numbers. We define addition and multi-
plication of Cauchy sequences term-wise, that is,
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
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.
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
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
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.
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.
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:
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:
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.
L = sup A.
` = inf A.
12
Proof. In the following, when comparing any rational number r with real numbers, we will think
r = [(r, r, r, · · · , r, · · · )].
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
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
14
2.3 Convergence in R
Define the absolute value on R as follows
(
a if a ≥ 0;
|a| =
−a if a < 0.
Exercise 2.34. Prove that for any a, b ∈ R, ||a| − |b|| ≤ |a − b|. (This is another version of the
triangle inequality.)
(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.
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
Since (ak )k∈N , there exists N0 such that for all n, m ≥ N0 , we have
Since N > N0 , we have kN ≥ N > N0 and thus |an − akN | < ε/2. Since N > J, we have
|akN − a| < ε/2. Therefore,
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
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.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 `.}
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= ∅.
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.
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.
19
iii. Show, by example, that an infinite intersection of open sets is not necessarily open.
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.
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.
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
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.
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
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.
3 Infinite series
Infinite series are of the form
∞
X
ai .
i=1
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
22
Definition 3.4. Let x ∈ R. The geometric series defined by x is ∞ n
P
n=0 x .
lim ai = 0.
i→∞
Proof. Using (2). For every ε > 0, there exists N ∈ N such that for all n > N
|an | < ε.
Proposition 3.8. If ∞
P P∞
i=1 ai converges absolutely, then i=1 ai converges.
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).
and v
u n
uX
d2 (x, y) = t |xj − yj |2
j=1
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
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
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
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 .
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.
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
Exercise 4.19. Formula similar statements for closed sets to the above theorem.
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.
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.
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.
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
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 .
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 ,
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
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) = 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,
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.
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?
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 θ:
for fixed θ ∈ R.
3. Reflection over a line through the origin making an angle θ with the x-axis:
for fixed θ ∈ R.
Exercise 4.58. Let Rn have the usual metric. Show that the function Da : Rn → Rn given by
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.
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.
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)!
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
Differentiating it in y, we obtain
n
X n
n(y + z)n−1 = ky k−1 z n−k .
k
k=0
and
n
2
X n
nx + n(n − 1)x = k 2 xk (1 − x)n−k . (6)
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].
43