Advanced calculus I-1

140
Advanced calculus I-1 Metric spaces, topological spaces and sequences Author: Teh, Jyh-Haur Version: 2021 One of the secrets to mathematical problem solving is that one needs to place a high value on partial progress, as being a crucial stepping stone to fully solving the problem. ——- Terry Tao

Transcript of Advanced calculus I-1

Page 1: Advanced calculus I-1

Advanced calculus I-1Metric spaces, topological spaces and sequences

Author: Teh, Jyh-Haur

Version: 2021

One of the secrets to mathematical problem solving is that one needs toplace a high value on partial progress, as being a crucial stepping stone

to fully solving the problem. ——- Terry Tao

Page 2: Advanced calculus I-1

Contents of Advanced Calculus I-1

1 Cardinality 11.1 Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.1 Number systems and logic . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.2 Set theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Countable and uncountable sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Exercise 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2 Metric spaces and topological spaces 212.1 Metric spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Exercise 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.2 Topological spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Exercise 2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392.3 Closed sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Exercise 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.4 Limit points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Exercise 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512.5 Metric subspaces and equivalent metrics . . . . . . . . . . . . . . . . . . . . . . . . 52Exercise 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Advanced Calculus I Practice Midterm I . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Advanced Calculus I Midterm I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

3 Cauchy sequences 623.1 Continuous functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Page 3: Advanced calculus I-1

Exercise 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703.2 Sequences and continuous functions in Rn . . . . . . . . . . . . . . . . . . . . . . . 72Exercise 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753.3 Cauchy sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Exercise 3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793.4 A construction of the real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Exercise 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Appendix 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

4 Compactness 944.1 Basic properties of compactness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Exercise 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004.2 The Heine-Borel theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

4.2.1 A technique to show openness, closedness and compactness . . . . . . . . . 104Exercise 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094.3 Continuous functions and compactness . . . . . . . . . . . . . . . . . . . . . . . . . 110Exercise 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1164.4 The Bolzano-Weierstrass theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Exercise 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Appendix 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Advanced Calculus I Practice Midterm II . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Advanced Calculus I Midterm II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Reference 131

Index 133

ii

Page 4: Advanced calculus I-1

Contents of Advanced Calculus I-2

5 Some topological properties 15.1 Connectedness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Exercise 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.2 Total disconnectedness and boundary . . . . . . . . . . . . . . . . . . . . . . . . . 14Exercise 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.3 Cantor set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.3.1 Nested sequences of sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.3.2 Construction of the Cantor set . . . . . . . . . . . . . . . . . . . . . . . . . 205.3.3 A space-filling curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3.4 Null sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Exercise 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6 Contraction mapping principle 296.1 Contraction mapping principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Exercise 6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.2 Fractal geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.2.1 Some open problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Exercise 6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Appendix 6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Advanced Calculus I Practice Midterm III . . . . . . . . . . . . . . . . . . . . . . . . . . 55Advanced Calculus I Midterm III . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Page 5: Advanced calculus I-1

7 Convergence of functions 607.1 Pointwise convergence and uniform convergence . . . . . . . . . . . . . . . . . . . 61Exercise 7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667.2 Uniform convergence and bounded functions . . . . . . . . . . . . . . . . . . . . . 67Exercise 7.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747.3 Weierstrass M-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Exercise 7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Appendix 7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817.4 Abel’s test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Exercise 7.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917.5 Dirichlet’s test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Exercise 7.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957.6 Arzela-Ascoli theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Exercise 7.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Appendix 7.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Advanced Calculus I Practice Final Exam . . . . . . . . . . . . . . . . . . . . . . . . . . 108Advanced Calculus I Final Exam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Reference 114

Index 114

ii

Page 6: Advanced calculus I-1

Preface

Advanced calculus, or called mathematical analysis in some universities, is fundamental inmathematical training. It is a two-semester four-credit course in the mathematics department ofNational Tsing Hua University. This book stems from lecture notes for the classes of advancedcalculus I that I taught several times. The goal of this book is to provide rigorous but easy to followmathematical proofs and a book that is convenient to read on portable digital devices. I try to makethis book friendly and, hopefully, readers may find those colorful paragraphs and beautiful pictures ofthe book attractive. Many students find this course difficult as many abstract concepts are introducedat a rather rapid pace. But being able to think abstractly is probably one of the most importantabilities in modern sciences and technologies. Learning mathematics is similar to learning language,we need to have enough vocabulary to express our mathematical ideas and we need to spend enoughtime on it to get connection of different concepts. I try to cut proofs into small pieces so that readersmay verify them easier. Based on some knowledge of basic calculus, this book is self-contained andsuitable for self-study. Exercises are provided at the end of each section.

Due to the length and size, materials for advanced calculus I is separated into two books:Advanced Calculus I-1 and Advanced Calculus I-2. We had 3 midterm exams and 1 final exam inthe course of advanced calculus I. The book Advanced Calculus I-1 contains materials for midtermexam 1 and 2, and the book Advanced Calculus I-2 contains materials for midterm exam 3 and finalexam. Practice exams and exam questions are attached to the books.

Main references of Advanced Calculus I-1 are1. Real mathematical analysis by Pugh ([2]);2. Elementary classical analysis by Marsden and Hoffman ([1]);3. Principles of mathematical analysis by Rudin ([3]);4. Wikipedia.

Page 7: Advanced calculus I-1

Those beautiful pictures at the end of each chapter are free pictures from pixabay.com.The latex documentclass “elegantbook"(https://github.com/ElegantLaTeX/ElegantBook) is used

to edit this book.

Jyh-Haur TehDepartment of MathematicsNational Tsing Hua UniversityHsinchu, Taiwan.Website: http://www.math.nthu.edu.tw/∼jyhhaur

vi

Page 8: Advanced calculus I-1

Chapter 1 Cardinality

Page 9: Advanced calculus I-1

1.1 Review

1.1.1 Number systems and logic

The set of natural numbers isN := {1, 2, 3, 4, ...}

The set of integers isZ := {...,−2,−1, 0, 1, 2, ....}

The set of rational numbers isQ := {p

q: p, q ∈ Z, q 6= 0}

The set of real numbers is R. These real numbers {π, e,√2,−2

√3} are not rational numbers. The

set of complex numbers isC := {a+ bi : a, b ∈ R}

Let P,Q,R be some statements. There are two equivalent forms which are frequently used inproofs.

2

Page 10: Advanced calculus I-1

1.(P ⇒ Q) ≡ (¬Q⇒¬ P ) ≡ (¬P ∨Q)

2.(P ⇒ Q ∨R) ≡ (P ∧¬ Q⇒ R)

Definition 1.1

A predicate p(x) assigns x a statement.1. The symbol

(∀x ∈ A)p(x)

is defined to bex ∈ A⇒ p(x)

2. The symbol(∃x ∈ A)q(x)

is defined to be(x ∈ A) ∧ q(x)

Proposition 1.1

1.¬((∀x ∈ A)P (x)) ≡ (∃x ∈ A)(¬P (x))

2.¬((∃x ∈ A)P (x)) ≡ (∀x ∈ A)(¬P (x))

Proof1.

¬((∀x ∈ A)P (x)) ≡¬ (x ∈ A⇒ P (x)) ≡ (x ∈ A) ∧¬ P (x) ≡ (∃x ∈ A)¬P (x)

3

Page 11: Advanced calculus I-1

2.¬((∃x ∈ A)P (x)) ≡¬ ((x ∈ A) ∧ P (x)) ≡¬ (x ∈ A) ∨¬ P (x)

≡ (x ∈ A) ⇒¬ P (x) ≡ (∀x ∈ A)(¬P (x))

1.1.2 Set theory

Given sets A1, A2, A3, ..... The union of these sets is∞⋃i=1

Ai := {x : x ∈ Ai for some i ∈ N}

and the intersection of these sets is∞⋂i=1

Ai := {x : x ∈ Ai for each i ∈ N}

More generally, if B is a set and a set Ai is given for each i in B, define the union of sets indexed byB to be ⋃

i∈B

Ai := {x : x ∈ Ai for some i ∈ B}

and the intersection of sets indexed by B to be⋂i∈B

Ai := {x : x ∈ Ai for each i ∈ B}

In the following, we recall the definition of Cartesian product.

Definition 1.2. Cartesian product

Let X,Y be sets. The Cartesian product of X × Y is the set

X × Y := {(x, y)|x ∈ X, y ∈ Y }

of ordered pairs. Then n-th Cartesian product of X is the set

Xn := {(x1, x2, ..., xn)|xi ∈ X, i = 1, 2, ..., n}

of n-tuples.

4

Page 12: Advanced calculus I-1

Definition 1.3

A function f : S → T from a set S to a set T is a subset gr(f) ⊆ S × T such that for anys ∈ S, there is a unique t ∈ T such that (s, t) ∈ gr(f). Usually we write f(s) = t. The set Sis called the domain of f and the set T is called the codomain of f .

Example 1.1 Let f : R → R be defined by

f(x) = x2

and g : R → [0,∞) be defined byg(x) = x2

These two function are two distinct functions since they have different codomains.

Definition 1.4If f : S → T is a function and A ⊆ S, we write

f(A) := {f(a)|a ∈ A} ⊆ T

and call f(A) the image of A under f .

5

Page 13: Advanced calculus I-1

If B ⊆ T , we writef−1(B) := {s ∈ S|f(s) ∈ B}

and call f−1(B) the preimage of B under f .

Definition 1.5Let f : S → T be a function. We say that

1. f is injective if whenever x1 6= x2, f(x1) 6= f(x2);2. f is surjective if for every t ∈ T , there is s ∈ S such that f(s) = t;3. f is bijective if f is both injective and surjective and call such f a bijection.

6

Page 14: Advanced calculus I-1

If f : S → T is a bijective function, the function g : T → S defined by

g(t) := f−1({t})

is called the inverse function of f .

7

Page 15: Advanced calculus I-1

1.2 Countable and uncountable sets

Definition 1.6. Same cardinality

♣We say that two sets A,B have the same cardinality if there is a bijection from A to B.

Definition 1.7

A set S is said to be finite if there exist a positive integer N and a bijective function

f : {1, 2, ..., N} → S

Empty set is defined to be a finite set. A set which is not finite is called infinite. An infinite setS is said to be denumerable if there is a bijective function

f : N → S

A set which is either finite or denumerable is said to be countable. A set which is not countableis said to be uncountable.

We show the classifications by the following diagrams:

sets

countable sets

{finite setsdenumerable sets

uncountable sets

sets

finite sets

infinite sets

{denumerable setsuncountable sets

Example 1.2 Show that Z is denumerable.Proof List elements of Z as Z = {0, 1,−1, 2,−2, 3,−3, ...}. Define f : N → Z by

f(n) =

{n2

, if n is even−n−1

2, if n is odd

8

Page 16: Advanced calculus I-1

Then f is bijective and hence Z is denumerable.

Proposition 1.2

♠Show that N2 = N× N is denumerable.

Solution We write elements of N2 in the following array and list elements of N2 along the 45◦ linefrom the bottom rows to the left columns:

(1, n+m− 1)...

...... · · ·

(1, 4) · · · ...

ffMMMMMMMMMMMMMMMM ...... · · ·

(1, 3) (2, 3) · · ·

ggNNNNNNNNNNNN

(n,m)

ee ggNNNNNNNNNNNNNNNNNNN · · ·

hhQQQQQQQQQQQQQQQQQQQQ

(1, 2) (2, 2)

ggPPPPPPPPPPPPP(3, 2) · · ·

ffLLLLLLLLLL

(n+m− 2, 2)

gg

· · ·

hhRRRRRRRRRRRRRRRRRRRR

(1, 1) (2, 1)

ggPPPPPPPPPPPPP(3, 1)

ffLLLLLLLLLL

(4, 1) · · ·

ggPPPPPPPPPPPP

(n+m− 1, 1)

hhRRRRRRRRRRRRR

· · ·The number of elements contained in the triangle below the line through (n,m) is

1 + 2 + · · ·+ (n+m− 2) =(n+m− 2)(n+m− 1)

2

Formally, we define a function f : N2 → N by

f(n,m) =(n+m− 2)(n+m− 1)

2+m

Now we claim that f is bijective. Let (n1,m1), (n2,m2) ∈ N2. Suppose that (n1,m1) and (n2,m2)

are not the same. We need to show that

f(n1,m1) 6= f(n2,m2)

We consider 3 cases:

9

Page 17: Advanced calculus I-1

Case 1: n2 +m2 > n1 +m1

Letn2 +m2 = n1 +m1 + k, where k ≥ 1

Then

f(n2,m2) =(n1 +m1 + k − 2)(n1 +m1 + k − 1)

2+m2

=(n1 +m1)

2 − 3(n1 +m1) + 2k(n1 +m1) + (k − 1)(k − 2)

2+m2

=(n1 +m1)

2 − 3(n1 +m1) + 2

2+ k(n1 +m1) +

(k − 1)(k − 2)

2+m2 − 1

>(n1 +m1 − 2)(n1 +m1 − 1)

2+m1

= f(n1,m1)

Case 2: n2 +m2 = n1 +m1

If f(n1,m1) = f(n2,m2), then m1 = m2 and hence n1 = n2. This contradicts to theassumption that (n1,m1) and (n2,m2) are different. Therefore f(n1,m1) 6= f(n2,m2).

Case 3: n2 +m2 < n1 +m1

Interchange the roles of (n1,m1), (n2,m2) in Case 1, we have

f(n2,m2) < f(n1,m1)

This shows that f is injective. To show that f is surjective. Let M ∈ N. Take N ∈ N such that(N − 2)(N − 1)

2< M ≤ (N − 1)N

2

Letm :=M − (N − 2)(N − 1)

2and n := N −m

10

Page 18: Advanced calculus I-1

Then n+m = N and

f(n,m) =(n+m− 2)(n+m− 1)

2+m

=(N − 2)(N − 1)

2+M − (N − 2)(N − 1)

2

=M

This shows that f is surjective. Therefore f : N2 → N is bijective. Let g : N → N2 be the inversefunction of f . Since g is bijective, N2 is denumerable.

Let us recall the well-ordering principle of the natural numbers.

Theorem 1.1. Well-ordering principle

♥Every nonempty subset of the natural numbers has a least element.

Theorem 1.2. Subsets of a countable set are countable

♥If f : A→ S is an injective function and S is countable, then A is countable.

Proof Assume that A is not finite. We need to show that A is denumerable. Since f is injective,the function f : A → f(A) is bijective, hence f(A) is an infinite set. But f(A) ⊂ S, S has to beinfinite, and since S is countable, we know that S is denumerable. List elements of S as

{s1, s2, s3, ...}

By the well-ordering principle Theorem 1.1, there is a smallest positive integer n1 such that sn1 ∈f(A).

Suppose that we have chosen n1 < n2 < · · · < nk such that sn1 , sn2 , ..., snkare in f(A). Since

f(A) is infinite, f(A) − {sn1 , ..., snk} is not empty. By the well-ordering principle, there exists a

smallest positive integer nk+1 > nk such that snk+1∈ f(A).

For an arbitrary st ∈ f(A), by the construction, there is k such that nk = t. So all elements inf(A) are listed as

{sn1 , sn2 , sn3 , ....}

11

Page 19: Advanced calculus I-1

Define a function g : N → f(A) by mapping k to snk. Then by the construction, g is bijective and

hence f(A) is denumerable. Since f : A→ f(A) is bijective, A is also denumerable.

Corollary 1.1

♥Every infinite subset of a denumerable set is denumerable.

Proof Let S be a denumerable set and A ⊂ S be an infinite subset. Let f : A→ S be the inclusionmap, that is, for a ∈ A, f(a) = a. Then f is injective. By the result above, A is countable and by theassumption, A is an infinite set, so A is denumerable.

Remark A very useful method in proving mathematical results is the so-called “proof by contradic-tion". The strategy is that we assume something that is just opposite to what we want to prove andthen deduce by some mathematical arguments to get a conclusion that contradicts to some knownfact. This implies that the assumption we made is not true and thus proves what we want. Thismethod will be used throughout this class.

We exemplify the “proof by contradiction" method by proving the following result.

Corollary 1.2

♥Every subset of a countable set is countable.

12

Page 20: Advanced calculus I-1

Proof Let S be a countable set. Assume that there exists a subset A ⊂ S which is uncountable. Bythe definition of an uncountable set, A is an infinite set. Since A ⊆ S, S is also infinite. Then S isdenumerable. By the theorem above, A is countable. This contradicts to our assumption. So theredoes not exist an uncountable subset of S.

Theorem 1.3. A countable union of countable sets is countable

Let {En}∞n=1 be a sequence of countable sets and

S =∞⋃n=1

En

Then S is countable.

Proof We list elements of En asxn1, xn2, xn3, ....

If En is a finite set, we list the last element of En repeatedly infinitely many times, that is, we let

xni = xnk

for all i ≥ k wherek = |En| := the number of elements of En

So we have an array

x14...

...... · · ·

x13 x23

``BBBBBBBBBx33

``BBBBBBBBBBx43

``BBBBBBBBBB· · ·

``AAAAAAAAAA

x12 x22

bbEEEEEEEEx32

bbEEEEEEEEx42

bbEEEEEEEE· · ·

bbEEEEEEEE

x11 x21

bbEEEEEEEEx31

bbEEEEEEEEx41

bbEEEEEEEE· · ·

bbEEEEEEEE

13

Page 21: Advanced calculus I-1

By Proposition 1.2, N2 is denumerable, so there exists a bijection f : N → N2. Define g : N → S by

g(n) := xf(n)

Then g is surjective but g may not be injective. For s ∈ S, let

h(s) := the smallest number of g−1(s)

whereg−1(s) = {n ∈ N|g(n) = s}

is the pre-image of s under g. Then h : S → N is injective. Since h(S) is a subset of N and N iscountable, h(S) is countable. The injectivity of h implies that S is also countable.

Corollary 1.3

Let X be a countable set. If for each x ∈ X , Ex is a countable set, then⋃x∈X

Ex

is countable.

Proof Since X is countable, we may list elements of X as

{x1, x2, x3, ....}

with the convention that if X is finite, we write xk = xn for k > |X|. Then⋃x∈X

Ex =∞⋃i=1

Exi

The result follows from the above theorem.

Theorem 1.4

If X and Y are countable sets, thenX × Y

is countable.

14

Page 22: Advanced calculus I-1

Proof For x ∈ X , letYx := {(x, y)|y ∈ Y }

Define a function f : Y → Yx byf(y) = (x, y)

Then f is a bijection and hence Yx is countable since Y is countable. We observe that

X × Y =⋃x∈X

Yx

and by Corollary 1.3, a countable union of countable sets is countable, we get the result.

Theorem 1.5

♥Let A be a countable set. Then An is countable for any n ∈ N.

Proof We prove by induction. When n = 1, A1 = A is countable. Suppose that An is countable.Define f : An+1 → An × A by

f(a1, ..., an, an+1) = ((a1, ..., an), an+1)

Then f is a bijection. This implies that An+1 and An × A have the same cardinality. Since An andA are countable, by the theorem above, An × A is countable, therefore, An+1 is countable. By theprinciple of induction, An is countable for any n ∈ N.

We recall that for two integers p, q, not both zero, if their greatest common divisor(gcd) is 1,then we say that they are relatively prime. Note that

gcd(0, 3) = 3, gcd(−2,−6) = 2

Corollary 1.4

♥Q is denumerable.

15

Page 23: Advanced calculus I-1

Proof Note that a rational number can be uniquely expressed in the form pq

where p ∈ Z, q ∈ N arerelatively prime. So we can define a function

f : Q → Z× N

byf(r) = (p, q)

where pq

is the unique form of r. Hence f is injective. Since Z×N is denumerable and Q is infinite,by Theorem 1.2, Q is also denumerable.

The proof of the following famous result is an application of the Cantor’s diagonal method.

Theorem 1.6. Cantor’s theorem

♥The open interval (0, 1) is uncountable.

Proof Each real number x ∈ (0, 1) has a unique decimal expansion x = 0.x1x2x2... where theexpansion is not terminated with an infinite string of 9’s. For example, under such requirement, theexpansion for 0.5 is 0.500... not 0.4999.... Assume that (0, 1) is countable. Since (0, 1) is infinite,it is denumerable. Hence there is a bijection f : N → (0, 1). We write each f(i) by its decimalexpansion

f(1) = 0.x11x12x13x14...

f(2) = 0.x21x22x23x24...

f(3) = 0.x31x32x33x34...... =

...

For each i, choose a digit yi such that yi 6= xii and yi ∈ {1, 2, ..., 8}. Let

y = 0.y1y2y3...

Since f(k) and y are different in the k-th digit of their decimal expansions,

f(k) 6= y for all k ∈ N16

Page 24: Advanced calculus I-1

But y ∈ (0, 1), this implies that f is not surjective which contradicts to the bijectivity of f . Therefore(0, 1) is uncountable.

Corollary 1.5

♥R is uncountable.

ProofMethod 1: If R is countable, by theorem, every subset of R is countable, so (0, 1) is countable

which is a contradiction.Method 2: Define f : (0, 1) → R by

f(x) = tan(πx− π

2)

Then f is bijective and hence (0, 1) and R have the same cardinality.The following is another application of Cantor’s diagonal method. We remark that {0, 1} is the

set of two elements consisting of 0 and 1.

Theorem 1.7

♥Let S be the collection of all functions from N to {0, 1}. Then S is uncountable.

Proof Assume that S is countable. Then we may list

S = {f1, f2, f3, ...}

where each fn : N → {0, 1} is a function. Let g : N → {0, 1} be defined by

g(n) =

{0, if fn(n) = 1

1, if fn(n) = 0

Then g ∈ S. But g 6= fn for any n since the value of g at n is different from the value of fn at n.This is a contradiction and hence S is uncountable.Remark We have proved that the Cartesian product of finitely many countable sets is countable. Thisis not true in general for an infinite product. The set S in the above theorem can be identified with

17

Page 25: Advanced calculus I-1

the set

{0, 1}∞ :=∞∏i=1

{0, 1} := {(a1, a2, a3, ...)|ai ∈ {0, 1} for i ∈ N}

and it is uncountable.

Definition 1.8

Given two sets A and B. If there exists an injective function f : A→ B, we write

|A| ≤ |B|

We state the following theorem without proof.

Theorem 1.8. Schroeder-Bernstein theorem

Suppose that f : A → B and g : B → A are two injective functions. Then A and B have thesame cardinality.

The Schroeder-Bernstein theorem says that if |A| ≤ |B| and |B| ≤ |A| then

|A| = |B|

18

Page 26: Advanced calculus I-1

K Exercise 1.2 k

1. Show that if f : X → Y is a surjective function and X is countable, then Y is countable.2. Suppose that A and B, C and D have the same cardinality respectively. Show that A×C andB ×D have the same cardinality.

3. Show that [0, 1] ∩Q and Q have the same cardinality.4. (a). Show that (0, 1)× (0, 1) and (0, 1) have the same cardinality. (Hint: shuffling two digit

strings (a1a2a3..., b1b2b3.....) 7→ a1b1a2b2a3b3.....)(b). Show that R2 and R have the same cardinality.(c). Show that Rn and R have the same cardinality for any n ∈ N.

5. Show that S1 = {(x, y) ∈ R2|x2 + y2 = 1} and D2 = {(x, y) ∈ R2|x2 + y2 ≤ 1} have thesame cardinality.

6. (a). Show that the open interval (0, 1) and the closed interval [0, 1] have the same cardinality.(b). Show that (0, 1) and (0, 1) ∪ Z have the same cardinality.(c). Show that (0, 1) and (0, 1) ∪ (2, 3) have the same cardinality.

7. Let GL(n,R) be the collection of all n× n invertible real matrices. Is GL(n,R) countable oruncountable? Do GL(n,R) and R have the same cardinality?

8. A real number is algebraic if it is a root of a polynomial with integer coefficients. Show that theset of algebraic numbers is denumerable. (Hint: divide the set of algebraic numbers accordingto degree of polynomials)

19

Page 27: Advanced calculus I-1

20

Page 28: Advanced calculus I-1

Chapter 2 Metric spaces and topological spaces

Page 29: Advanced calculus I-1

2.1 Metric spaces

Definition 2.1. Metric space

Let X be a set and d : X ×X → R be a function which satisfies the following properties: forall x, y, z ∈ X ,

1. d(x, y) ≥ 0;2. d(x, y) = 0 if and only if x = y;3. (symmetry) d(x, y) = d(y, x);4. (triangle inequality) d(x, y) + d(y, z) ≥ d(x, z).

The function d is called a metric on X and the pair (X, d) is called a metric space.

Example 2.1 Show thatd(x, y) := |x− y|

is a metric on R.Solution By the definition of absolute value

|x| =

{x, if x ≥ 0

−x, if x < 0

the function d clearly satisfies the first 3 properties. In the following, we prove the triangle inequality.Let x, y, z ∈ R. We have

d(x, z)2 = |x− z|2 = (x− z)2 = ((x− y) + (y − z))2

= (x− y)2 + 2(x− y)(y − z) + (y − z)2

≤ |x− y|2 + 2|x− y||y − z|+ |y − z|2 = (|x− y|+ |y − z|)2

= (d(x, y) + d(y, z))2

22

Page 30: Advanced calculus I-1

Since d(x, z) and d(x, y) + d(y, z) are nonnegative, we have

d(x, z) ≤ d(x, y) + d(y, z)

Example 2.2 For p = (x1, y1), q = (x2, y2) ∈ R2, define

d(p, q) := |x1 − x2|+ |y1 − y2|

Show that d is a metric on R2.

Solution A probably nontrivial part is the triangle inequality. Let s = (x3, y3) ∈ R2. By the triangleinequality of the absolute value function proved above, we have

d(p, q) + d(q, s) = (|x1 − x2|+ |y1 − y2|) + (|x2 − x3|+ |y2 − y3|)

= (|x1 − x2|+ |x2 − x3|) + (|y1 − y2|+ |y2 − y3|)

≥ |x1 − x3|+ |y1 − y3|

= d(p, s)

Definition 2.2. Circle

Let (X, d) be a metric space and p ∈ X . A circle of radius r > 0 centered at p is the set

Cr(p) := {q ∈ X|d(p, q) = r}

23

Page 31: Advanced calculus I-1

Note that consider R2 with the metric defined above, the circle

C1((0, 0)) = {(x, y) ∈ R2 : |x|+ |y| = 1}

which is a diamond.

Let <,> be the standard inner product of Rn, i.e., for u = (u1, ..., un), v = (v1, ..., vn) ∈ Rn,

< u, v >:= u1v1 + u2v2 + · · ·+ unvn

The norm of u is defined to be

||u|| :=√< u, u > =

√√√√ n∑i=1

u2i

We have the following result from linear algebra.

Theorem 2.1. The Cauchy-Schwarz inequality

For u, v ∈ Rn,| < u, v > | ≤ ||u||||v||

We will use the Cauchy-Schwarz inequality to prove that the standard way to measure thedistance between two points in Rn is a metric.

24

Page 32: Advanced calculus I-1

Corollary 2.1

For u, v ∈ Rn, define

dE(u, v) := ||u− v|| =√< u− v, u− v >

Then dE is a metric on Rn.

Proof From the definition of inner product, we know immediately that dE satisfies all the conditionsto be a metric except the triangle inequality. Let u, v, w ∈ Rn.

d(u, v)2 =< u− v, u− v >=< (u− w) + (w − v), (u− w) + (w − v) >

=< u− w, u− w > +2 < u− w,w − v > + < w − v, w − v >

≤ d(u,w)2 + 2| < u− w,w − v > |+ d(w, v)2

≤ d(u,w)2 + 2||u− w||||w − v||+ d(w, v)2

= d(u,w)2 + 2d(u,w)d(w, v) + d(w, v)2

= (d(u,w) + d(w, v))2

The second inequality follows from the Cauchy-Schwarz inequality. Since d(u, v), d(u,w) andd(w, v) are nonnegative, this implies that

d(u, v) ≤ d(u,w) + d(w, v)

Definition 2.3. Euclidean metric

♣The metric dE on Rn is called the Euclidean metric.

Remark When we consider the Euclidean space Rn or subsets of Rn, if we do not indicate explicitly,the metric we consider is the Euclidean metric.

25

Page 33: Advanced calculus I-1

Definition 2.4. Discrete metric

Let X be a set. For x, y ∈ X , define

d(x, y) =

{1, if x 6= y

0, if x = y

Then d is a metric on X and is called the discrete metric on X .

Remark Consider a set X with the discrete metric. For p ∈ X ,

C 12(p) = ∅

andC1(p) = X − {p}

andC2(p) = ∅

Example 2.3 Let

C ([0, 1]) = {f |f : [0, 1] → R is a continuous function}

For f, g ∈ C ([0, 1]), define

d(f, g) := maxx∈[0,1]

|f(x)− g(x)| := max{|f(x)− g(x)||x ∈ [0, 1]}

Show that d is a metric on C ([0, 1]).Solution By the definition, d is nonnegative and symmetric. If f = g, then d(f, g) = 0. Supposethat d(f, g) = 0. For any x ∈ [0, 1], since

0 ≤ |f(x)− g(x)| ≤ maxt∈[0,1]

|f(t)− g(t)| = 0

we have|f(x)− g(x)| = 0

26

Page 34: Advanced calculus I-1

and hencef(x) = g(x)

This implies f = g. For f, g, h ∈ C ([0, 1]), by the triangle inequality of the Euclidean metric of R,we have

|f(x)− g(x)|+ |g(x)− h(x)| ≥ |f(x)− h(x)|

for any x ∈ [0, 1]. Therefore,

maxx∈[0,1]

|f(x)− h(x)| ≤ maxx∈[0,1]

(|f(x)− g(x)|+ |g(x)− h(x)|)

≤ maxx∈[0,1]

|f(x)− g(x)|+ maxx∈[0,1]

|g(x)− h(x)|

which givesd(f, h) ≤ d(f, g) + d(g, h)

27

Page 35: Advanced calculus I-1

K Exercise 2.1 k

1. Fix a prime number p. For x ∈ Q − {0}, write x = pn(ab) where a, b ∈ Z, a and b are not

divisible by p. Define

|x|p :=

{p−n, if x 6= 0

0, if x = 0

For x, y ∈ Q, defined(x, y) := |x− y|p

Show that (Q, d) is a metric space.2. Let M be the collection of all 2× 2 real matrices.

If

A =

(a b

c d

)∈M

define

|A| =

(|a| |b||c| |d|

)and max(|A|) := max{|a|, |b|, |c|, |d|}.For A,B ∈M , define

d(A,B) := max{|A− B|}

Show that (M,d) is a metric space.3. For X = (x1, ..., xn),Y = (y1, ..., yn) ∈ Rn, define

d(X,Y) :=n∑

i=1

|xi − yi|

(a). Show that d is a metric on Rn.(b). Let dE be the Euclidean metric on Rn. Find positive real numbers α, β such that

αdE(X,Y) ≤ d(X,Y) ≤ βdE(X,Y)28

Page 36: Advanced calculus I-1

for any X,Y ∈ Rn.4. For x, y ∈ R, define

d(x, y) := (x− y)2

Is d a metric on R? More generally, for n ∈ N, define

dn(x, y) := |x− y|n

for x, y ∈ R. Is dn a metric on R?

29

Page 37: Advanced calculus I-1

2.2 Topological spaces

Definition 2.5. Topology

A topology on a set X is a collection T of subsets of X that have the following properties:1. ∅ and X are in T .2. The union of any number of sets in T is in T .3. The intersection of any finite number of sets in T is in T .

A pair (X,T ) where T is a topology of X is called a topological space. On a topologicalspace (X,T ), a subset U ⊂ X is called an open set of X if U belongs to T .

Example 2.4 LetX = {1, 2, 3, 4}

andT := {∅, X, {1}, {2}, {1, 2}}

The T is a topology of X . LetT ′ := {∅, X, {2, 3, 4}}

30

Page 38: Advanced calculus I-1

Then T ′ is another topology of X . The two topological spaces (X,T ) and (X,T ′) are differenttopological spaces.

Definition 2.6. Open ball

Let (X, d) be a metric space. For p ∈ X, r > 0, the set

Br(p) := {x ∈ X|d(x, p) < r}

is called the open ball with radius r centered at p.

Proposition 2.1

Given a metric space (X, d). Let T be the collection of all subsets U of X that satisfy thefollowing property:

for every p ∈ U, there is r> 0 such that Br(p) ⊂ U

Then T is a topology of X .

Proof By the definition, ∅ and X are in T . Suppose that {Uα}α∈I is a collection of elements in T

where I is some index set. We need to show that

U :=⋃α∈I

is in T . For p ∈ U , p ∈ Uα for some α ∈ I . Since Uα is in T , by the definition, there is r > 0 suchthat

Br(p) ⊂ Uα ⊂ U

Hence U is in T . If V1, V2, ..., Vn are in T , we need to show that

V :=n⋂

i=1

Vi

is in T . For q ∈ V , q ∈ Vi for each i. Since Vi is in T , there is ri > 0 such that Bri(q) ⊂ Vi. Take

r = min{r1, r2, ...., rn}

31

Page 39: Advanced calculus I-1

ThenBr(q) ⊂ Bri(q) ⊂ Vi

for each i. Hence Br(q) ⊂ V which implies that V is in T . Therefore T is a topology of X .

Definition 2.7. A metric space is a topological space

The topology T in Proposition above of a metric space (X, d) is called the topology inducedfrom the metric. This is the topology when we consider X as a topological space.

Remark On a metric space (X, d), a subset U ⊂ X is open if and only if for every p ∈ U , thereexists r > 0 such that Br(p) ⊂ U .Remark Not every topological spaces is metrizable. That means for some topological space (X,T ),there is no metric on X such that T is the topology induced from the metric.

Proposition 2.2

♠In a metric space, every open ball is open.

Proof Let (X, d) be a metric space. Suppose that p ∈ X and R > 0. We want to show that BR(p)

is open. For q ∈ BR(p), take r = R− d(p, q). Then for any x ∈ Br(q),

d(x, p) ≤ d(x, q) + d(q, p) < r + d(p, q) = (R− d(p, q)) + d(p, q) = R

So x ∈ BR(p) which implies that Br(q) ⊂ BR(p) and hence BR(p) is open in X .Example 2.5 In R1, the interval (0, 1) is open in R1 but [0, 1] is not open in R1.Solution We observe that

(0, 1) = B 12(1

2)

hence it is open. For any open ball Br(0) centered at 0 where r > 0, Br(0) = (−r, r) whichalways contains some negative numbers hence Br(0) is not contained in [0, 1] no matter what the r

32

Page 40: Advanced calculus I-1

is. Therefore [0, 1] is not open in R.Example 2.6 In R2, the set

S = {(x, y) ∈ R2|12< x2 + y2 < 1}

is open butT = {(x, y) ∈ R2|1

2< x2 + y2 ≤ 1}

is not open.Solution We use d for the Euclidean metric of R2. Since (1, 0) ∈ T and any open ball centered at(1, 0) contains some (t, 0) where t > 1, hence any open ball centered at (1, 0) is not a subset of Tand hence T is not open.

To show that S is open, let p ∈ S and take

r = min{d(p, 0)− 1√2, 1− d(p, 0)}

Then for q ∈ Br(p),

d(q, 0) ≤ d(q, p) + d(p, 0) < r + d(p, 0) ≤ (1− d(p, 0)) + d(p, 0) = 1

andd(q, 0) ≥ d(p, 0)− d(p, q) ≥ d(p, 0)− (d(p, 0)− 1√

2) =

1√2

This means that q ∈ S and hence Br(p) ⊂ S. Therefore S is open.

33

Page 41: Advanced calculus I-1

Example 2.7 Let X be a set with the discrete metric. Then every subset of X is open.

Definition 2.8. Inherited metric and metric subspace

Given a metric space (X, d) and A ⊂ X . Let

dA := d|A×A : A× A→ R

be the restriction of d to A × A. Then dA is a metric on A which is called the metric on Ainherited from X . The metric space (A, dA) is called a metric subspace of X .

Note that for p, q ∈ A,dA(p, q) = d(p, q)

Example 2.8 The set [0, 1] with the metric inherited from R is a metric space. So [0, 1] is open in[0, 1] but [0, 1] is not open in R.Remark When we say that a set is open or closed, it is important to indicate in what topologicalspace we refer to. A set A ⊂ X is always open in A but it may not be open in X as shown in theexample above.

Definition 2.9. Neighborhood

♣Let X be a topological space. A neighborhood of a point p ∈ X is an open set containing p.

Definition 2.10. Interior point

Let X be a topological space and A ⊂ X . A point x ∈ A is called an interior point of A ifthere is a neighborhood U ⊂ X of x such that U ⊂ A. The interior of A is the set

int(A) := {a ∈ A|a is an interior point of A}

34

Page 42: Advanced calculus I-1

Remark In a topological space X , every point of X is an interior point of X .

Proposition 2.3

♠Let X be a metric space. A subset U ⊂ X is open if and only if int(U) = U .

Proof By the definition, int(U) ⊂ U . If U is an open set, by the definition, each point of U is aninterior point of U hence U ⊂ int(U). Therefore U = int(U). Conversely, if int(U) = U , then foreach point p ∈ U , there is a neighborhood V of p contained in U , hence by the definition, U is open.Example 2.9 Is it true that

int(A) ∪ int(B) = int(A ∪ B)

for A,B in some metric space X?Solution Let A = [0, 1], B = [1, 2] and X = R. Then int(A) = (0, 1), int(B) = (1, 2), but

int(A ∪B) = int([0, 2]) = (0, 2) 6= (0, 1) ∪ (1, 2) = int(A) ∪ int(B)

Example 2.10 Is it true that in a metric space (X, d), x ∈ X ,

int({y ∈ X|d(x, y) ≤ r}) = {y ∈ X|d(x, y) < r}?

Solution

35

Page 43: Advanced calculus I-1

1. Consider [0, 1] with the metric inherited from R. Then

int({x ∈ [0, 1]||x− 0| ≤ 1}) = int([0, 1]) = [0, 1]

but{x ∈ [0, 1]||x− 0| < 1} = [0, 1) 6= [0, 1]

2. Suppose that E is a set with more than one point. Consider E with the discrete metric andy ∈ E. Then

int({x ∈ E|d(x, y) ≤ 1}) = E

but{x ∈ E|d(x, y) < 1} = {y}

Example 2.11 LetS = {(x, y) ∈ R2|y ≥ x3}

Find int(S) in R2.Solution If p = (a, b) ∈ S satisfies the equation y = x3, for any r > 0, (a, b − r

2) ∈ Br(p) hence

Br(p) ( S which means that p is not an interior point of S. This means

int(S) ⊂ {(x, y) ∈ R2|y > x3}

In the following, we show that

{(x, y) ∈ R2|y > x3} ⊂ int(S)

Let p = (a, b) ∈ R2 such that b > a3.

36

Page 44: Advanced calculus I-1

Taker = min{1

2(

b− a3

3|a|2 + 3|a|+ 2), 1}

and q = (x, y) ∈ Br(p). Since|x− a|2 + |y − b|2 < r2

we have|x− a| < r and |y − b| < r

Furthermore,|x| = |a+ (x− a)| ≤ |a|+ |x− a| < |a|+ r ≤ |a|+ 1

Then

|a3 − x3| = |a− x||a2 + ax+ x2| < r(|a|2 + |ax|+ |x|2)

< r(|a|2 + |a|(|a|+ 1) + (|a|+ 1)2)

= r(3|a|2 + 3|a|+ 1)

which impliesa3 − x3 > −r(3|a|2 + 3|a|+ 1)

37

Page 45: Advanced calculus I-1

From the inequality y − b > −r, we have

y − x3 − (b− a3) = (y − b) + (a3 − x3) > −r − r(3|a|2 + 3|a|+ 1)

= −r(3|a|2 + 3|a|+ 2)

≥ −1

2(

b− a3

3|a|2 + 3|a|+ 2)(3|a|2 + 3|a|+ 2)

= −1

2(b− a3)

Therefore,y − x3 > (b− a3)− 1

2(b− a3) =

1

2(b− a3) > 0

which means that q ∈ S and hence Br(p) ⊂ S. Therefore p ∈ int(S) and we have

{(x, y) ∈ R2|y > x3} ⊂ int(S)

This shows that{(x, y) ∈ R2|y > x3} = int(S)

38

Page 46: Advanced calculus I-1

K Exercise 2.2 k

1. Show that (0, 1)× {0} is not open in R2.2. Let Y = (0, 1)× Z ⊂ R2 with the metric inherited from R2.

(a). Is (0, 1)× {0} open in Y ?(b). Is {1

2} × Z open in Y ?

3. Show that[√2,√3] ∩Q

is open in Q.4. Show that

X := {(x, y, z) ∈ R3 : x+ y + z 6= 1}

is open in R3.5. For two 2× 3 real matrices A = [ai,j], B = [bi,j] ∈ Mat(2× 3,R), define

d(A,B) := max{|ai,j − bi,j| : i = 1, 2, j = 1, 2, 3}

(a). Show that d is a metric on Mat(2× 3,R).(b). Let

X = {A ∈ Mat(2× 3,R) : rows of A are linearly indepedent}

Show that X is an open subset of Mat(2× 3,R) under the metric d.

39

Page 47: Advanced calculus I-1

2.3 Closed sets

Definition 2.11. Closed set

♣A set A in a topological space X is said to be closed if its complement X − A is open.

Example 2.12 Let X = {1, 2, 3}, T = {∅, X, {1}, {2}, {1, 2}}. Then (X,T ) is a topologicalspace. Note that

{X, ∅, {2, 3}, {1, 3}, {3}}

are all the closed subsets of X .Example 2.13

1. In a topological space X , the set X and ∅ are both open and closed in X .2. (0, 1), [0, 1), (0, 1] are not closed in R.3. Consider (0, 1) with the metric inherited from R, then it is a metric space and (0, 1) is closed

in (0, 1).4. Let

S = {(x, y) ∈ R2|0 < x ≤ 1, 0 ≤ y ≤ 1}

The set S is not closed in R2.5. Let

S = {(x, y) ∈ R2|x2 + y2 ≤ 1}

Then S is closed in R2.6. Let X = (−∞, 0) ∪ (0,∞). Then (0,∞) is both open and closed in X .

Proposition 2.4

♠Let (X, d) be a metric space and p ∈ X . Then {p} is closed in X .

Proof For q ∈ X − {p}, take r = d(p, q), then p /∈ Br(q) and hence Br(q) ⊂ X − {p} which

40

Page 48: Advanced calculus I-1

implies that it is open and therefore {p} is closed.

Proposition 2.5

In a topological space X ,1. the union of a finite number of closed subsets is closed.2. The intersection of an arbitrary family of closed subsets is closed.

Proof1. For closed subsets C1, ..., Cn of X ,

(n⋃

i=1

Ci)c =

n⋂i=1

Cci

and each Cci is open. The results follow from the fact that the intersection of a finite number

of open sets is open.2. For closed subsets Cα of X where α ∈ A for some set A,

(⋂α∈A

Cα)c =

⋃α∈A

Ccα

Then the result follows from the fact that the union of arbitrary number of open sets is open.

Corollary 2.2

♥Any finite set in a metric space is closed.

Proof Let X be a metric space and p1, ..., pn ∈ X . By Proposition 2.4, each {pi} is closed andhence

{p1, ..., pn} =n⋃

i=1

{pi}

is closed.Example 2.14 Let

S =∞⋃n=1

{ 1n}

41

Page 49: Advanced calculus I-1

Note that 0 /∈ S. For any r > 0, we may take n ∈ N such that 1n< r. Then

1

n∈ Br(0) ∩ S 6= ∅

Therefore R− S is not open and hence S is not closed in R.Example 2.15 Let

T =∞⋃n=1

{ 1n} ∪ {0}

Then T is closed in R. We divide p ∈ R− T into 3 cases:1. if p ∈ (−∞, 0), take r = |p|, then Br(p) ⊂ (−∞, 0) ⊂ T c;2. if p ∈ (1,∞), take r = p− 1, then Br(p) ⊂ (1,∞) ⊂ T c;3. if p ∈ (0, 1) ∩ T c, then there is n ∈ N such that

1

n+ 1< p <

1

n

Taker = min{p− 1

n+ 1,1

n− p}

ThenBr(p) ⊂ (

1

n+ 1,1

n) ⊂ T c

42

Page 50: Advanced calculus I-1

K Exercise 2.3 k

1. Let Y = (0, 1)× Z ⊂ R2 with the metric inherited from R2.(a). Is (0, 1)× {0} closed in Y ?(b). Is {1

2} × Z closed in Y ?

2. Let X = R− Z. Show that (1, 2) is both open and closed in X .3. Show that

{(x, y) ∈ R2 : y = x2}

is a closed subset of R2.4. Let {xn}∞n=1 be a sequence in R.

(a). If the sequence {xn}∞n=1 converges, does it imply that {|xn|}∞n=1 converge?(b). If the sequence {|xn|}∞n=1 converges, does it imply that {xn}∞n=1 converge?

5. LetA = {X ∈ R3 : X and (1, 2, 3), (1, 0,−1) are linearly depedent}

Show that A is closed in R3.

43

Page 51: Advanced calculus I-1

2.4 Limit points

Definition 2.12. Sequence

A sequence of points in a set X is a function f : N → X . We usually write a sequence f as{pn}∞n=1 where pn = f(n) for n ∈ N.

Definition 2.13. Convergence

Let (X, d) be a metric space. We say that a sequence of points {pn}∞n=1 in X converges top ∈ X if for any ϵ > 0, there exists N ∈ N such that for n ∈ N and n ≥ N ,

d(pn, p) < ϵ

We write pn → p, or pn → p as n→ ∞, or

limn→∞

pn = p

to indicate the convergence. We say that p is the limit of the sequence.

Example 2.16 The sequence { 2n

n2 + 2n

}∞

n=1

in R converges to 1.

Definition 2.14. Limit point

Let (X, d) be a metric space. For S ⊂ X , we say that a point p ∈ X is a limit point of S ifthere exists a sequence {pn}∞n=1 in S that converges to p.

44

Page 52: Advanced calculus I-1

Example 2.171. Let

S = { 1n|n ∈ N}

Then 0 /∈ S and 0 is a limit point of S.2. Let

S = (0, 1) ∪ {2} ⊂ R

By taking the constant sequence {2}∞n=1, we see that 2 is a limit point of S. More generally,every point of a set S is a limit point of S.

Lemma 2.1

Let (X, d) be a metric space and S ⊂ X . The following are equivalent.1. p is a limit point of S.2. For each r > 0, Br(p) ∩ S 6= ∅.

Proof Suppose that p is a limit point of S. By the definition, there is a sequence {pn}∞n=1 in Sthat converges to p. Hence for each r > 0, there is N ∈ N such that d(pn, p) < r for n > N . Sopn ∈ Br(p) ∩ S for n > N and hence

Br(p) ∩ S 6= ∅

45

Page 53: Advanced calculus I-1

To prove the other direction, pick pn ∈ B 1n(p) ∩ S. Then

d(pn, p) <1

n

Therefore the sequence {pn}∞n=1 converges to p and hence p is a limit point of S.

Definition 2.15. Closure

Let A be a subset of a metric spaceX . We write A for the set of all limit points of A inX . Theset A is called the closure of A in X .

Theorem 2.2

Let (X, d) be a metric space and A ⊂ X . Then A is closed in X if and only if

A = A

Proof Suppose thatA is closed and p ∈ X is a limit point ofA. If p /∈ A, p ∈ X −A. SinceX −A

is open, there is r > 0 such that Br(p) ⊂ X −A and hence Br(p)∩A = ∅. This means that p is nota limit point of A which is a contradiction. To prove the converse, suppose that all limit points of Abelong to A. Assume that A is not closed. ThenX −A is not open. So there is q ∈ X −A such thatfor any r > 0, Br(q) * X −A. Then Br(q) ∩A 6= ∅. By Lemma 2.1, q is a limit point of A and bythe hypothesis, q ∈ A which is a contradiction. Hence A is closed.Remark The notationA does not indicate where the closure ofA is taken. As shown in the followingexample, with respect to different spaces, the closures of Amay be different. So this notation is usedonly when it is clear where the closure is taken.Example 2.18 Let

S = { 1n|n ∈ N}

1. Consider S as a subset of R, thenS = S ∪ {0}

46

Page 54: Advanced calculus I-1

2. Consider S as a subset of (0, 1] where (0, 1] is endowed with the metric inherited from R, then

S = S

Example 2.19 For S = R− Z,S = R

Proposition 2.6

♠Let A ⊂ Z. Then A is closed in R.

Proof Let p ∈ R− A. If p /∈ Z, let n = bpc, the integer smaller than p and closest to p. Take

r = min{p− n, (n+ 1)− p}

Then r > 0 and (p− r, p+ r) ⊂ R−A. If p ∈ Z, (p− 12, p+ 1

2) ⊂ R−A. Therefore R−A is open

and hence A is closed in R.

Definition 2.16. Denseness

In a metric space X , a subset A ⊂ X is said to be dense if

A = X

The set A is somewhere dense if there exists an open non-empty set U ⊂ X such thatU ⊂ A ∩ U . The set A is nowhere dense if A is not somewhere dense.

47

Page 55: Advanced calculus I-1

Corollary 2.3

♥Z is nowhere dense in R.

Proof Assume that there exists a nonempty open subset U ⊂ R such that U ⊂ U ∩ Z. Note thatU ∩ Z ⊂ Z and hence by the proposition above, U ∩ Z is closed in R. Therefore

U ⊂ U ∩ Z = U ∩ Z

Let p ∈ U ∩ Z. Since U is open in R, there is 0 < r < 1 such that (p− r, p + r) ⊂ U . But p ∈ Z,p+ 1

2r ∈ (p− r, p+ r) is not an integer, therefore

(p− r, p+ r) * U ∩ Z

which is a contradiction. Therefore Z is nowhere dense in R.Example 2.20

1. The set Q is dense in R.2. The set N is nowhere dense in R.3. The set {x ∈ Q|x < 0} ∪ N is somewhere dense in R.

Solution Note that for any two real numbers p < q, there is x ∈ Q such that p < x < q. For anyp ∈ R and r > 0, take x ∈ Q such that p < x < p + r. Then Br(p) ∩ Q 6= ∅ which implies thatQ = R. The second assertion follows from the fact that Z is nowhere dense in R and N ⊂ Z, thus Nis also nowhere dense in R. Since the set {x ∈ Q|x < 0} is dense in (−∞, 0), it is somewhere densein R, so is the union {x ∈ Q|x < 0} ∪ N.Example 2.21 Is it true that

A ∩ B = A ∩B ?

Solution Take A = (0, 1), B = (1, 2). In R, A = [0, 1], B = [1, 2], and

A ∩ B = {1} but A ∩ B = ∅

48

Page 56: Advanced calculus I-1

Proposition 2.7

Let S be a subset of a metric space (X, d).1.

S = S

In particular, S is closed.2.

int(int(S)) = int(S)

In particular, int(S) is open.3.

S =⋂S⊂C

C is closed

C

4.int(S) =

⋃U⊂S

U is open

U

Proof1. If p is a limit point of S, there is a sequence {pn}∞n=1 in S that converges to p. Since each pn

is a limit point of S, there is qn ∈ S such that d(pn, qn) < 1n. Then

d(p, qn) ≤ d(p, pn) + d(pn, qn) → 0

as n→ ∞. Hence p is a limit point of S and we have S ⊂ S. The other direction follows fromthe definition.

2. For p ∈ int(S), there is r > 0 such that Br(p) ⊂ S. For each q ∈ Br(p), since Br(p) is open,there is r′ > 0 such that

Br′(q) ⊂ Br(p) ⊂ S

49

Page 57: Advanced calculus I-1

Hence q ∈ int(S) and Br(p) ⊂ int(S). Therefore p ∈ int(int(S)). The other directionfollows from the definition.

3. Since S is closed, the set on the right hand side is a subset of S. For p ∈ S, if p is not in theset on right hand side, there is some C closed, S ⊂ C such that p /∈ C. Since X − C is open,there is r > 0 such that Br(p) ∩ C = ∅. But S ⊂ C, Br(p) ∩ S = ∅ implies that p is not alimit point of S which is a contradiction.

4. Since int(S) is open and contained in S, it is a subset of the set on the right hand side. Forp ∈ U for some open set U contained in S, there is r > 0 such that Br(p) ⊂ U ⊂ S, thusp ∈ int(S).

Remark The closure S is the smallest closed set containing S, and the interior int(S) is the largestopen set contained in S.

50

Page 58: Advanced calculus I-1

K Exercise 2.4 k

1. (a). Show that { 12n|n ∈ N} is nowhere dense in R.

(b). Is { a2n|a, n ∈ N} somewhere dense in R?

(c). Is { a2n|a, n ∈ Z} dense in R?

2. Is Z×Qc dense in R2?3. Show that a subset S ⊂ X is nowhere dense if and only if int(S) = ∅.4. Prove that a setU ⊂ X is open if and only if none of its points are limit points of its complement.5. ForA = [ai,j], B = [bi,j] ∈Mat(n×n,R), the Euclidean metric onMat(n×n,R) is defined

to be

d(A,B) := (n∑

i,j=1

|ai,j − bi,j|2)12

(a). Is GL(n,R) dense in Mat(n× n,R) under the Euclidean metric?(b). LetD(n,R) be the collection of all n×n diagonalizable real matrices. IsD(n,R) dense

in Mat(n× n,R) under the Euclidean metric?

51

Page 59: Advanced calculus I-1

2.5 Metric subspaces and equivalent metrics

We recall that for a metric space (X, d) and a subset A ⊂ X , by restricting d to A×A, we get ametric dA on A. The metric space (A, dA) is called a metric subspace of X (see Definition 2.8). Inthe following, we want to study the relation between the topology of A and the topology of X .Remark For Y a metric subspace of X and A ⊂ Y , the notation A may cause confusion since wemay want to consider the closure of A in X . To avoid this confusion, we write clX(A) to indicatethe closure of A in X .

Proposition 2.8. Inheritance principle for closed sets

Given a metric space X and a metric subspace Y ⊂ X , a subset A ⊂ Y is closed in Y if andonly if there is some closed subset B in X such that

A = Y ∩B

Proof If A is closed in Y , let B = clX(A) be the closure of A in X . Then B is a closed subset ofX and

A ⊂ Y ∩B

Let p ∈ Y ∩B. SinceB is the closure ofA inX , we can find a sequence {pn}∞n=1 inA that convergesto p. Since p ∈ Y and A is closed in Y , this implies p ∈ A. Thus Y ∩B ⊂ A and hence we have

A = Y ∩B

Conversely, suppose that B is some closed subset of X and A = Y ∩ B. Let p ∈ clY (A). Thenthere is a sequence {pn}∞n=1 in A ⊂ B such that pn → p. So p is a limit point of B. But B is closed,p ∈ B. Also, since p ∈ clY (A), p ∈ Y . Combine these results together, we have

p ∈ Y ∩B = A

52

Page 60: Advanced calculus I-1

which means that clY (A) ⊂ A and hence A is closed in Y .Example 2.22 Let

X = R, Y = (0, 1], A = (0,1

2], B = [−1,

1

2]

Since A = Y ∩ B, by the result above, we know that A is closed in Y . Note that 0 ∈ clX(A) but0 /∈ clY (A). In general, clY (A) ( clX(A).

Thus we may consider closed subsets of Y are “inherited" from closed subsets of X . By takingcomplement, we have the following result for open sets.

Corollary 2.4. Inheritance principle for open sets

If Y ⊂ X is a metric subspace, a subset A ⊂ Y is open in Y if and only if there is some opensubset U in X such that

A = Y ∩ U

Proof Suppose that A ⊂ Y is open in Y . Then Y − A is closed in Y . By the inheritance principleProposition 2.8, there exists B ⊂ X which is closed in X such that

Y − A = Y ∩ B

Let U = X − B. Then U is open in X and

Y ∩ U = Y − Y ∩ U c = Y − Y ∩B = Y − (Y − A) = A

Conversely, suppose that there exists a subset V ⊂ X which is open in X and A = Y ∩ V . ThenX − V is closed in X and

Y − A = Y − Y ∩ V = Y ∩ (X − V )

By the inheritance principle for closed sets, Y − A is closed in Y . Therefore A is open in Y .

Corollary 2.5Suppose that Y is a metric subspace of X and A ⊂ Y .

1. If A is closed in Y and Y is closed in X , then A is closed in X .

53

Page 61: Advanced calculus I-1

♥2. If A is open in Y and Y is open in X , then A is open in X .

Proof1. By the inheritance principle for closed sets, there is a closed subset B ⊂ X such that

A = Y ∩ B

Since Y and B are closed in X , Y ∩ B = A is closed in X .2. By the inheritance principle for open sets, there is an open set U in X such that

A = Y ∩ U

Since Y and U are open in X , Y ∩ U = A is open in X .

Definition 2.17. Equivalent metrics

Suppose that d1, d2 are two metrics on X . We say that d1, d2 are equivalent if there existpositive constants α and β such that for every x, y ∈ X ,

αd1(x, y) ≤ d2(x, y) ≤ βd1(x, y)

Remark The two metric spaces (X, d1) and (X, d2) behave the same in properties related to metriconly.

Proposition 2.9

Suppose that d1, d2 are two equivalent metrics on X . A sequence {pn}∞n=1 in X converges top in d1 if and only if it converges to p in d2.

Proof This follows directly from the definition.

Definition 2.18Suppose that (X1, d1), (X2, d2) are metric spaces. LetX = X1×X2 be the Cartesian product

54

Page 62: Advanced calculus I-1

of X1 and X2. For P = (p1, p2), Q = (q1, q2) in X , define

dC(P,Q) :=√d1(p1, q1)2 + d2(p2, q2)2

dmax(P,Q) := max{d1(p1, q1), d2(p2, q2)}

dsum(P,Q) := d1(p1, q1) + d2(p2, q2)

Proposition 2.10

Let (X1, d1), (X2, d2) be metric spaces and X := X1 ×X2. Then dC , dmax, dsum are metricson X . Furthermore, they are equivalent and satisfy

dmax(P,Q) ≤ dC(P,Q) ≤ dsum(P,Q) ≤ 2dmax(P,Q)

for all P,Q ∈ X .

Proof We prove the triangle inequality for dC only since other properties are not difficult to get. LetP = (p1, p2), Q = (q1, q2), R = (r1, r2) ∈ X . Denote

A = (d1(p1, q1), d2(p2, q2)), B = (d1(q1, r1), d2(q2, r2)), C = (d1(p1, r1), d2(p2, r2))

Then A,B,C ∈ R2 and

||C||2 = d1(p1, r1)2 + d2(p2, r2)

2

≤ (d1(p1, q1) + d1(q1, r1))2 + (d2(p2, q2) + d2(q2, r2))

2

≤ ||A||2 + 2d1(p1, q1)d1(q1, r1) + 2d2(p2, q2)d2(q2, r2) + ||B||2

= ||A||2 + 2A · B + ||B||2

≤ ||A||2 + 2||A||||B||+ ||B||2 = (||A||+ ||B||)2

where the last inequality follows from the Cauchy-Schwart inequality. Hence

||C|| ≤ ||A||+ ||B||

55

Page 63: Advanced calculus I-1

This gives us the desire inequality

dC(P,R) =√d1(p1, r1)2 + d2(p2, r2)2

≤√d1(p1, q1)2 + d2(p2, q2)2 +

√d1(q1, r1)2 + d2(q2, r2)2

= dC(P,Q) + dC(Q,R)

Example 2.23 The discrete metric d on R is not equivalent to the Euclidean metric dE .Proof If d and dE are equivalent, there exist positive constants α, β such that

αd(x, y) ≤ |x− y| ≤ βd(x, y)

for any x, y ∈ R. For x = 1n, y = 0 where n ∈ N, we have

αd(1

n, 0) = α ≤ 1

n

for n ∈ N. This implies α = 0 which is a contradiction.

56

Page 64: Advanced calculus I-1

K Exercise 2.5 k

1. Let (X1, d1), (X2, d2) be metric spaces and X = X1 ×X2. Prove that dC , dmax and dsum aremetrics on X and

dmax ≤ dC ≤ dsum ≤ 2dmax

2. Letd1(x, y) := |x− y|, d2(x, y) :=

|x− y|1 + |x− y|

for x, y ∈ R. Show that(a). d2 is a metric on R;(b). d1 and d2 are not equivalent.

3. Letd3(x, y) := |arctan(x)− arctan(y)|

for x, y ∈ R.(a). Show that d3 is a metric on R.(b). Are d1 and d3 equivalent?

4. Let (X, d) be a metric space and d′ be a metric on X that is equivalent to d. Let T and T ′ bethe topology on X induced by d and d′ respectively. Show that T = T ′.

57

Page 65: Advanced calculus I-1

Advanced Calculus I Practice Midterm I

1. (10%) Let Y be a subset of a metric space X . Show that Y = Y .2. Let X be the set of all x ∈ [0, 1] whose decimal expansion contains only the digits 0, 5 or 6,

i.e., ifx = 0.x1x2x3....

then each xi = 0, 5 or 6. For each of the following questions, give a proof if your answer isYES and show by an example if your answer is No.(a). (5%) Is X dense in [0, 1]?(b). (5%) Is X countable?(c). (5%) Is X open in R?(d). (5%) Is X closed in R?

3. (10%) Show that {1, 2, 3} × [0, 2] and [0, 1] have the same cardinality.4. Let

S = {f |f : N → {0, 1} is a function}

For f, g ∈ S, define

d(f, g) :=∞∑n=1

|f(n)− g(n)|2n

(a). (10%) Show that d is a metric on S.(b). (5%) Let f ∈ S be the zero function, i.e., f(n) = 0 for all n ∈ N. Find all g ∈ S such

that d(f, g) = 1.(c). (5%) Given f ∈ S, find all g ∈ S such that d(f, g) = 1

2.

5. (10%) Let (X, d1), (Y, d2) be metric spaces. Define

d((x1, y1), (x2, y2)) := d1(x1, x2)2 + d2(y1, y2)

2

Is d always a metric on X × Y ?58

Page 66: Advanced calculus I-1

6. (10%) Let X = {1, 2, 3}. List all topologies of X that have 5 elements only.7. (10%) Show that if X is an infinite set, then there is a subset A $ X which has the same

cardinality as X .8. (10%) Let X = {A ∈ Mat(2,R)| rows of A are perpendicular}. Under the standard Eu-

clidean metric of Mat(2,R), is X closed in Mat(2,R)?

59

Page 67: Advanced calculus I-1

Advanced Calculus I Midterm I

1. (10%) State the Schroeder-Bernstein theorem.2. (10%) Let Y be a subset of a metric space (X, d). Show that int(Y ) is open in X .3. (10%) Show that R and R2 have the same cardinality.4. (10%) Show that if A ⊂ R is denumerable, then A× R is not open in R2.5. LetX be the set of all x ∈ [0, 1] whose decimal expansions (may not be unique) do not contain

the digit 5, i.e., for any decimal expansions of

x = 0.x1x2x3....

each xi 6= 5. For each of the following questions, give a proof if your answer is YES and showby an example if your answer is No.(a). (7%) Is X dense in [0, 1]?(b). (7%) Is X countable?(c). (8%) Is X open in R?(d). (8%) Is X closed in R?

6. (10%) For p = (x1, y1), q = (x2, y2) ∈ R2, define

dθ(p, q) := (|x1 − x2|θ + |y1 − y2|θ)1θ

where θ ∈ (−∞, 1]. For what θ is dθ a metric on R2?7. (10%) Let X = {(x, y) ∈ R2 : y = 2x}. Is X dense, somewhere dense or nowhere dense in

R2?8. (10%) Let

X = {A ∈Mat(2× 3,R)| rows of A are perpendicular}

Under the standard Euclidean metric of Mat(2× 3,R), is X open in Mat(2× 3,R)?

60

Page 68: Advanced calculus I-1

61

Page 69: Advanced calculus I-1

Chapter 3 Cauchy sequences

Page 70: Advanced calculus I-1

3.1 Continuous functions

Definition 3.1. Continuous function

Let f : X → Y be a function between topological spaces. We say that f is continuous if forany open set V in Y , f−1(V ) is open in X .

Example 3.1 Let X,Y be topological spaces and the topology of X be the discrete topology. Thenevery function f : X → Y is continuous.

Lemma 3.1

Let f : X → Y be a function and B ⊂ Y . Then

f−1(Bc) = (f−1(B))c

Proof

x ∈ f−1(Bc) ⇔ f(x) ∈ Bc

⇔ f(x) /∈ B

⇔ x /∈ f−1(B)

⇔ x ∈ (f−1(B))c

Proposition 3.1

A function f : X → Y between topological spaces is continuous if and only if f−1(C) isclosed in X for every closed subset C ⊂ Y .

Proof If f is continuous and C is closed in Y , then Cc is open in Y and hence

f−1(Cc) = (f−1(C))c

is open in X which implies f−1(C) is closed in X . Conversely, let U be an open set in Y . Then U c

63

Page 71: Advanced calculus I-1

is closed and by the hypothesis,f−1(U c) = (f−1(U))c

is closed in X which implies that f−1(U) is open in X .Remark If f : X → Y is a continuous function and U is open in X , f(U) may not be open in Y .

Theorem 3.1

Let f : X → Y be a function between metric spaces (X, dX) and (Y, dY ). Then f is continuousif and only if for each ϵ > 0 and p ∈ X , there is δ > 0 such that for q ∈ X with dX(p, q) < δ,

dY (f(p), f(q)) < ϵ

Proof Suppose that f is continuous. For p ∈ X and ϵ > 0, the open ball Bϵ(f(p)) is open in Y ,hence f−1(Bϵ(f(p))) is open in X . Since p ∈ f−1(Bϵ(f(p))), there is δ > 0 such that

Bδ(p) ⊂ f−1(Bϵ(f(p)))

which implies thatf(Bδ(p)) ⊂ Bϵ(f(p))

In other words, for any x ∈ X with dX(x, p) < δ,

dY (f(x), f(p)) < ϵ

For the converse, let V ⊂ Y be an open set. For p ∈ f−1(V ), since V is open, there is ϵ > 0

such that Bϵ(f(p)) ⊂ V . By the hypothesis, there is δ > 0 such that for any x ∈ Bδ(p),

dY (f(x), f(p)) < ϵ

Hence f(x) ∈ Bϵ(f(p)). Therefore

f(Bδ(p)) ⊂ Bϵ(f(p))

andBδ(p) ⊂ f−1(Bϵ(f(p))) ⊂ f−1(V )

64

Page 72: Advanced calculus I-1

which implies that f−1(V ) is open.Remark From this theorem, all functions that have been proved to be continuous in calculus classes,for example, sin, cos, tan, arcsin, arccos, arctan, exp, ln and rational functions, are continuous intheir domains.

Theorem 3.2

Given a function f : X → Y between metric spaces (X, dX) and (Y, dY ). The function fis continuous if and only if every sequence {pn}∞n=1 in X that converges to some p ∈ X , thesequence {f(pn)}∞n=1 converges to f(p).

Proof Suppose that f is continuous and {pn}∞n=1 is a sequence in X that converges to p ∈ X . Forϵ > 0, by the continuity of f , there is δ > 0 such that if dX(x, p) < δ, dY (f(x), f(p)) < ϵ. Sincepn → p, there is N ∈ N such that if n > N , dX(pn, p) < δ. Therefore

dY (f(pn), f(p)) < ϵ

By the definition, f(pn) → f(p).If f is not continuous, there exists p ∈ X and ϵ > 0 such that for each δn = 1

n, there is xn ∈ X

such that dX(xn, p) < 1n

butdY (f(xn), f(p)) ≥ ϵ

Then xn → p but {f(xn)}∞n=1 does not converge to f(p).

Theorem 3.3

Suppose that X,Y, Z are topological spaces. If f : X → Y, g : Y → Z are continuousfunctions, the composite g ◦ f : X → Z is continuous.

Proof Let U be an open set in Z. From basic set theory,

(g ◦ f)−1(U) = f−1(g−1(U))

Since g is continuous, g−1(U) is open in Y , and by the continuity of f , f−1(g−1(U) is open in X .

65

Page 73: Advanced calculus I-1

So g ◦ f is continuous.

Proposition 3.2

The four arithmetic operations +,−,× : R× R → R and ÷ : R× (R− {0}) → R of R arecontinuous.

Proof We consider R× R and R× (R− {0}) with the metric dsum. Let (x0, y0) ∈ R× R.Addition: For ϵ > 0, take δ = ϵ, then if dsum((x, y), (x0, y0)) < δ, we have

|(x+ y)− (x0 + y0)| = |(x− x0) + (y − y0)| ≤ |x− x0|+ |y − y0|

= dsum((x, y), (x0, y0)) < ϵ

Multiplication: For ϵ > 0, let a = |x0|+ |y0| and take

δ = min{1, ϵ

1 + 2a}

If dsum((x, y), (x0, y0)) < δ, i.e., |x− x0|+ |y − y0| < δ, we have

|xy − x0y0| = |(xy − x0y) + (x0y − x0y0)| ≤ |x− x0||y|+ |x0||y − y0|

≤ |x− x0|(|y − y0|+ |y0|) + |x0||y − y0| ≤ δ(δ + a) + aδ

≤ δ(1 + 2a) ≤ (1 + 2a)ϵ

1 + 2a= ϵ

Division: Suppose that y0 6= 0. Let a = |x0|+ |y0|. For ϵ > 0, take

δ = min{|y0|2, 1,

ϵy201 + a

}

Then if dsum((x, y), (x0, y0)) < δ, we have |y − y0| ≤ |y0|2

, hence

|y0| ≤ |y0 − y|+ |y| ≤ 1

2|y0|+ |y|

which implies |y| ≥ 12|y0| > 0. Therefore (x, y) lies in the domain of the division. Since

|yy0| ≥ 12|y0|2, and

|x| ≤ |x− x0|+ |x0| ≤ δ + |x0|+ |y0| ≤ 1 + a

66

Page 74: Advanced calculus I-1

we have

|xy− x0y0

| = |xy0 − x0y

yy0| ≤ |x||y0 − y|+ |x− x0||y|

|yy0|

≤ 2

|y0|2((1 + a)δ + δ(1 + a))

≤ 4ϵ

Definition 3.2. Homeomorphism

Given topological spaces X and Y . We say that a function f : X → Y is a homeomorphismif f is bijective, continuous and f−1 is continuous. If there is a homeomorphism between Xand Y , we say that X and Y are homeomorphic.

Example 3.21. The interval (0, 1) and R are homeomorphic. A homeomorphism ϕ : (0, 1) → R is given by

ϕ(x) = tan(π(x− 1

2))

2. Let f : [0, 2π) → S1 be defined by

f(x) = (cos x, sin x)

where S1 is the unit circle in the plane. Then f is continuous and bijective, but f−1 is notcontinuous. This can be seen by considering the sequence

{(cos(2π − 1

n), sin(2π − 1

n))}∞n=1

in S1. This sequence converges to (1, 0), but the sequence

{f−1(cos(2π − 1

n), sin(2π − 1

n))}∞n=1 = {2π − 1

n}∞n=1

is not convergent in [0, 2π).3. If d is the discrete metric on R. Then (R, d) and (R, dE) are not homeomorphic. Assume there

is a homeomorphism h : (R, d) → (R, dE), then an open set is sent to an open set. Note that in(R, d), {1} is open, but h({1}) = {h(1)} is not an open set in (R, dE). This is a contradiction.

67

Page 75: Advanced calculus I-1

4. If d1, d2 are two equivalent metrics on a set X , then (X, d1) is homeomorphic to (X, d2) sincethe identity map I : (X, d1) → (X, d2) is a homeomorphism.

5. An ellipse

E = {(x, y) ∈ R2|x2

a2+y2

b2= 1}

is homeomorphic to the unit circle

S1 = {(x, y) ∈ R2|x2 + y2 = 1}

A homeomorphism ψ : E → S1 is given by

ψ(x, y) = (x

a,y

b)

Let us recall the definition of an equivalence relation.

Definition 3.3. Equivalence relation

A relation on a set X is a subset of X ×X . An equivalence relation ∼ on a set X is a relationon X that has the following 3 properties:

1. reflexive: for all x ∈ X , x ∼ x;2. symmetric: if x ∼ y, then y ∼ x;3. transitive: if x ∼ y, y ∼ z, then x ∼ z.

If ∼ is an equivalence relation on X , for x ∈ X , the set

[x] := {y ∈ X : y ∼ x}

is called an equivalence class and x is called a representative of the equivalence class.

Once we have an equivalence relation on X , we may classify elements of X by equivalenceclasses.

Proposition 3.3

Define a relation on the collection of all topological spaces by X ∼ Y if X and Y arehomeomorphic. Then ∼ is an equivalence relation.

68

Page 76: Advanced calculus I-1

Proof In the following, X,Y, Z are topological spaces.Reflexive: The identity function I : X → X defined by I(x) = x is a homeomorphism, thus

X ∼ X .Symmetric: If X ∼ Y , there exists a homeomorphism f : X → Y . Then f−1 : Y → X is a also a

homeomorphism. So Y ∼ X .Transitive: If X ∼ Y and Y ∼ Z, there exist homeomorphisms f : X → Y and g : Y → Z, then

g ◦ f : X → Z is a homeomorphism, hence X ∼ Z.

69

Page 77: Advanced calculus I-1

K Exercise 3.1 k

1. Consider X with the discrete metric. Show that(a). Every subset of X is open and closed.(b). If f : X → Y is a function from X to another metric space Y , then f is continuous.(c). Which sequences converge in X?

2. Is Z considered as a metric subspace of R homeomorphic to Z with the discrete metric?3. (a). Is N homeomorphic to Z?

(b). Is Z homeomorphic to Q?(c). Is { 1

n: n ∈ N} homeomorphic to Q?

(d). Is {m+ 1n: n ∈ N,m ∈ Z} homeomorphic to Q?

4. Let f : X → Y be a homeomorphism between metric spaces. Show that A ⊂ X is dense ifand only if f(A) is dense in Y .

5. Let f : R− {0} → R be defined byf(x) =

1

x

(a). Is f a continuous function?(b). For any open interval (a, b) ⊂ R, find f−1(a, b).(c). Define g : R− {0} → R− {0} by

g(x) =1

x

Is g a homeomorphism?6. A function f : X → Y between topological spaces is said to be a closed map if for each closed

set C ⊂ X , f(C) is closed in Y .(a). If f is continuous, is f a closed map?(b). If f is a closed map, is f continuous?(c). If f is a homeomorphism, is f a closed map?(d). If f is a closed map which is also continuous and bijective, is f a homeomorphism?

70

Page 78: Advanced calculus I-1

(e). If f : R → R is a continuous surjection, must f be closed?7. Let f : Q → R be defined by

f(x) =

{0, if x ∈ (−∞,

√2) ∩Q

1, if x ∈ (√2,∞) ∩Q

Show that f is continuous.

71

Page 79: Advanced calculus I-1

3.2 Sequences and continuous functions in Rn

Proposition 3.4

Let {uk}∞k=1 be a sequence in Rn. Write uk = (uk,1, uk,2, ..., uk,n) and u = (u1, u2, ..., un) ∈Rn. Then {uk}∞k=1 converges to u if and only if {uk,i}∞k=1 converges to ui for all i = 1, 2, ...., n.

Proof Suppose that uk → u. Then for any ϵ > 0, there is N ∈ N such that ||uk − u|| < ϵ for allk > N . Since

|uk,i − ui| =√

(uk,i − ui)2 ≤

√√√√ n∑i=1

(uk,i − ui)2 = ||uk − u|| < ϵ

we have uk,i → ui. Conversely, suppose that uk,i → ui for all i = 1, 2, ..., n. Then for any ϵ > 0,there is Ni ∈ N such that |uk,i − ui| < ϵ

nfor all k > Ni. Take N = max{N1, ..., Nn}. Then for

k > N ,

||uk − u|| =

√√√√ n∑i=1

(uk,i − ui)2 ≤

√√√√(n∑

i=1

|uk,i − ui|)2 =n∑

i=1

|uk,i − ui| <n∑

i=1

ϵ

n= ϵ

Proposition 3.5

1. The addition + : Rn × Rn → Rn defined by

+((x1, ..., xn), (y1, ..., yn)) := (x1, ..., xn) + (y1, ..., yn) := (x1 + y1, ..., xn + yn)

is continuous.2. The scalar product · : R× Rn → Rn defined by

·(r, (x1, ..., xn)) := r(x1, ..., xn) := (rx1, ..., rxn)

is continuous.

Proof1. Suppose that Xk = (xk,1, ..., xk,n) and Yk = (yk,1, ..., yk,n) where k ∈ N are two sequences in

72

Page 80: Advanced calculus I-1

Rn which converges to X and Y respectively. Then

||(Xk + Yk)− (X+ Y)|| = ||(Xk − X) + (Yk − Y)|| ≤ ||Xk − X||+ ||Yk − Y||

→ 0 as k → ∞

This shows that + is continuous.2. Note that

||rXk − rX|| = |r|||Xk − X|| → 0 as k → ∞

This shows that · is continuous.

Corollary 3.1

Suppose that {λk}∞k=1 is a sequence in R that converges to λ and {uk}∞k=1 is a sequence in Rn

that converges to u respectively. Then1. λkuk → λu;2. if λk 6= 0 and λ 6= 0, then 1

λkuk → 1

λu.

Proof1. Note that

||λkuk − λu|| = ||(λkuk − λku) + (λku− λu)||

≤ |λk|||uk − u||+ |λk − λ|||u|| → 0 as k → ∞

This proves the claim.2. Since the function 1

xis continuous on R− {0}, it maps a convergent sequence to a convergent

sequence. Thus 1λk

→ 1λ. The result then follows from (1).

Proposition 3.6Let X be a metric space and f : X → Rm be a function. Write

f(x) = (f1(x), ..., fm(x))

73

Page 81: Advanced calculus I-1

♠Then f is continuous if and only if all functions f1, ..., fm : X → R are continuous.

Proof Suppose that xk → x. If f is continuous, by Theorem 3.2,

(f1(xk), ..., fm(xk)) = f(xk) → f(x) = (f1(x), ..., fm(x))

By Proposition 3.4, for each i = 1, ...,m, fi(xk) → fi(x) as k → ∞. Thus all functions f1, ..., fmare continuous. Conversely, if all f1, ..., fm are continuous, by Theorem 3.2, for each i = 1, ...,m,

fi(xk) → fi(x)

and by Proposition 3.4,f(xk) → f(x)

74

Page 82: Advanced calculus I-1

K Exercise 3.2 k

1. For I = (i1, ..., in), denote|I| = i1 + · · ·+ in

andXI = xi11 x

i22 · · · xinn

A polynomial f : Rn → R is a function of the form

f(X) =∑|I|≤d

aIXI

where aI ∈ R is a constant. Show that f is continuous(Hint: write f as a composition of somesimple functions that are clearly continuous).

2. Show that the determinant map

det :Mat(n× n,R) → R

is continuous.3. Is there a function f : R2 → R that is not continuous but

f(U) is open in R

for all open sets U ⊂ R2?

75

Page 83: Advanced calculus I-1

3.3 Cauchy sequences

Definition 3.4. Boundedness and Cauchy sequences

Let (X, d) be a metric space and A ⊂ X .1. The set A is said to be bounded if there is x ∈ X and N ∈ N such that d(a, x) < N for

all a ∈ A.2. A sequence {xk}∞k=1 in X is said to be bounded if the set formed by the sequence is a

bounded subset.3. A sequence {xk}∞k=1 in X is a Cauchy sequence if for ε > 0, there is N ∈ N such thatd(xn, xm) < ε for all n,m > N .

Example 3.3 The sequence { 1n}∞n=1 is a Cauchy sequence in R.

Proof Given ε > 0. Take N ∈ N such that N > ε. Then for n > m > N , we have

| 1n− 1

m| = n−m

nm=n−m

n

1

m< 1 · 1

m<

1

N< ε

Definition 3.5. Subsequences

Given a sequence {xi}∞i=1. A subsequence of {xi}∞i=1 is a sequence {xik}∞k=1 where the indicessatisfy

i1 < i2 < i3 < · · ·

Example 3.4{ 1

n2}∞n=1, {

1

n3}∞n=1, {

1

n4}∞n=1, {

1

2n}∞n=1, {

1

3n}∞n=1

are all subsequences of { 1n}∞n=1.

76

Page 84: Advanced calculus I-1

Proposition 3.7

In a metric space (X, d),1. every convergent sequence is a Cauchy sequence;2. a Cauchy sequence is bounded;3. if a subsequence of a Cauchy sequence converges to x, then the sequence converges tox.

Proof1. Suppose that xk → x. Then by the definition, for any ϵ > 0, there is N ∈ N such thatd(xk, x) <

ε2

for all k > N . Hence for all n,m > N ,

d(xn, xm) ≤ d(xn, x) + d(x, xm) <ε

2+ε

2= ϵ

2. By the definition, there isN ∈ N such that d(xn, xm) < 1 for all n,m > N . So d(xn, xN+1) <

1 for all n > N . Take

M = max{d(x1, xN+1), ..., d(xN , xN+1), 1}

Then d(xi, xN+1) < M + 1 for all i ∈ N.3. Suppose that {xn}∞n=1 is a Cauchy sequence and {xni

}∞i=1 is a subsequence of {xn}∞n=1 whichconverges to c. Then for all ϵ > 0, there is N1 ∈ N such that if i > N1,

d(xni, c) <

ϵ

2

Since {xn}∞n=1 is Cauchy, there is N2 ∈ N such that

d(xm, xn) <ϵ

2

for all m,n > N2. Take N = max{N1, N2}+1. Note that since {xni}∞i=1 is a subsequence of

{xn}∞n=1, by the definition, nN ≥ N . Then for n > N ,

d(xn, c) ≤ d(xn, xnN) + d(xnN

, c) <ϵ

2+ϵ

2= ϵ

So {xn}∞n=1 converges to c.

77

Page 85: Advanced calculus I-1

Definition 3.6. Complete metric space

♣A metric space X is complete if every Cauchy sequence in X converges in X .

Proposition 3.8

♠Every closed subset of a complete metric space is a complete metric space.

Proof Let X be a complete metric space and C be a closed subset of X . Suppose that {an}∞n=1 is aCauchy sequence in C. Then {an}∞n=1 is a Cauchy sequence in X and by the completeness of X , itconverges to some point a ∈ X . But C is closed, so a ∈ C.

78

Page 86: Advanced calculus I-1

K Exercise 3.3 k

1. Use only the definition to show that the following sequences are Cauchy:(a). { 1

n}∞n=1

(b). { 12n}∞n=1

(c). { nn2+1

}∞n=1

2. Given two Cauchy sequences {an}∞n=1, {bn}∞n=1 in Q. Show that(a). {an + bn}∞n=1 is Cauchy;(b). {anbn}∞n=1 is Cauchy.

3. (a). For each n ∈ N, find mn ∈ N such thatm2

n

n2< 2 <

(mn + 1)2

n2

(b). Letpn =

mn

n

Show that p2n → 2 and {pn}∞n=1 is Cauchy.(c). Show that {pn}∞n=1 does not have a limit in Q.

4. Is the setX = {(x, y) ∈ R2|x2 + y2 = sin(xy)}

a bounded subset of R2? Is it closed in R2?

79

Page 87: Advanced calculus I-1

3.4 A construction of the real numbers

Recall that a relationR on a setX is a subset ofX×X . In the following, we recall the definitionof partial order.

Definition 3.7

A relation ≤ on a set X is a partial order if it has the following 3 properties:1. reflexive: for all x ∈ X , x ≤ x;2. antisymmetric: if x ≤ y and y ≤ x, then x = y;3. transitive: if x ≤ y and y ≤ z, then x ≤ z.

If (x, y) or (y, x) are in the relation ≤, then we say that x, y are comparable. A set X with apartial order ≤ is called a partial ordered set, denoted as (X,≤).

Example 3.5 Let X = {1, 2, 3}. For A,B ∈ P(X), define

A ≤ B if A ⊆ B

Then ≤ is a partial order on P(X). Note that

{1} ≤ {1, 2}

and {1} and {2, 3} are not comparable.

Definition 3.8. Ordered field

1. A partial order ≤ on a set X is called a total order if for any x, y in X , x, y arecomparable.

2. Let (F,+, ·) be a field and ≤ be a total order on F. Then (F,+, ·,≤) is called an orderedfield if the following 2 properties are satisfied:(a). for any x, y, z ∈ F, if x ≤ y, then x+ z ≤ y + z;(b). if 0 ≤ x, 0 ≤ y, then 0 ≤ xy.

Example 3.6 The field of rational numbers Q with the standard partial order ≤ is an ordered field.80

Page 88: Advanced calculus I-1

Definition 3.9. Least upper bound

LetX be a set with a partial order ≤ andA ⊂ X . An element u inX is called an upper boundof A if

a ≤ u for all a ∈ A

If A has an upper bound, then A is said to be bounded above. An element r in X is called theleast upper bound of A if it satisfies the following two conditions:

1. r is an upper bound of A;2. if u is an upper bound of A, then r ≤ u.

We denote the least upper bound of A by lub(A), or sup(A).

Remark If r and r′ are least upper bounds of A, then r ≤ r′ and r′ ≤ r, thus r = r′. That means iflub(A) exists, then it is unique.Example 3.7 Under the standard ≤, R and Q are partially order sets. Let A = [1,

√2] ∩Q. Then in

R, lub(A) =√2, but considered A as a subset of Q, lub(A) does not exist in Q.

Example 3.8 For X = {1, 2, 3}, A = {∅, {1}} ⊂ P(X). Then {1, 2} and {1, 3} both are upperbounds of A . The least upper bound of A is {1}.

Definition 3.10. Greatest lower bound

Let X be a set with a partial order ≤ and A ⊂ X . An element ℓ in X is called a lower boundof A if

ℓ ≤ a for all a ∈ A

If A has a lower bound, then A is said to be bounded below. An element r in X is called thegreatest lower bound of A if it satisfies the following two conditions:

1. r is a lower bound of A;2. if ℓ is a lower bound of A, then ℓ ≤ r.

We denote the greatest lower bound of A by glb(A), or inf(A).

81

Page 89: Advanced calculus I-1

We have used real numbers in previous sections based on our naive idea of real numbers, but wehave not yet rigorously shown that they really exist. In the following, we give a simple constructionof the real numbers but skip some routine checkings.

Definition 3.11

A sequence {an}∞n=1 in Q is Cauchy if for any ε ∈ Q and ε > 0, there exists N ∈ N such thatif n,m > N , then

|an − am| < ε

LetR := { All Cauchy sequences in Q}/ ∼

where two Cauchy sequences in Q are equivalent

{an}∞n=1 ∼ {bn}∞n=1

if and only if{an − bn}∞n=1

converges to 0. The set Q is considered as a subset of R by identifying a rational numbera ∈ Q with the class represented by the constant sequence {a, a, a, ....}.

Remark If we denote0.a1a2a3.... := [{0.a1, 0.a1a2, 0.a1a2a3, ....}]

where for each n ∈ N, an ∈ {0, 1, 2, ..., 9} and

a := [{a, a, a, ...}]

for a ∈ Q. Then since{1, 1, 1, ....} and {0.9, 0.99, 0.999, ....}

82

Page 90: Advanced calculus I-1

are clearly equivalent, we have1 = 0.999....

Definition 3.12

For a = [{an}∞n=1], b = [{bn}∞n=1] ∈ R, define1.

a+ b := [{an + bn}∞n=1]

2.a · b := [{anbn}∞n=1]

3.a ≤ b

if there exist {a′n}∞n=1 ∈ a, {b′n}∞n=1 ∈ b and N ∈ N such that

a′n ≤ b′n

for all n ≥ N .

Then it is not difficult to show the following result.

Theorem 3.4

♥(R,+, ·,≤) is an ordered field.

Remark This construction relies on the Euclidean metric | · | on Q. Instead if we use the p-adic norm| · |p on Q, we get the p-adic numbers Qp.

Definition 3.13Define the absolute value function | · | : R → R by

|a| := [{|an|}∞n=1]

83

Page 91: Advanced calculus I-1

and the Euclidean metric on R by

dE(a, b) := |a− b| = [{|an − bn|}∞n=1]

for a = [{an}∞n=1], b = [{bn}∞n=1] in R.

Remark For a = [{an}∞n=1] ∈ R where each an ∈ Q. If we also write

an = [{an, an, an, ....}]

the constant sequence consisting of an, then

an → a as n→ ∞

This follows from the observation that

|an − a| = [{|an − am|}∞m=1]

and the sequence {am}∞m=1 is Cauchy, hence for ε > 0, there exists N ∈ N such that for n,m > N ,

|an − am| < ε

By the definition,|an − a| < ϵ

for n > N .Not difficult to check that this is well defined and defines a metric on R.

Definition 3.14

Let A ⊂ R. We say that A bounded above if there is M > 0 such that for any a ∈ A, a < M ,and we say that A is bounded below if there is N > 0 such that for any b ∈ A, b > N .

The following result is a cornerstone of mathematical analysis.

Theorem 3.5. The least upper bound property

♥If A ⊂ R is nonempty and bounded above, then lub(A) exists.

84

Page 92: Advanced calculus I-1

Proof Let u ∈ Q be an upper bound of A and a ∈ A. Let u0 := u and b0 ∈ Q be a rationalnumber such that b0 < a. We define two sequences inductively as follows. Suppose that un and bnare defined. Let

cn :=un + bn

2

If cn is an upper bound of A, let

un+1 := cn and bn+1 := bn

If cn is not an upper bound of A, let

un+1 := un and bn+1 := cn

Then {un}∞n=1 is a decreasing sequence and {bn}∞n=1 is an increasing sequence both in Q. Note thatin the first case,

un+1 − bn+1 = cn − bn =1

2(un − bn)

and in the second case,un+1 − bn+1 = un − cn =

1

2(un − bn)

Let M := u0 − b0. Then

un − bn =1

2(un−1 − bn−1) = · · · = 1

2nM

Given ε > 0 and ε ∈ Q. Take N ∈ N such that1

2NM < ε

Then for n > m > N ,

|un − um| = um − un < um − bN < uN − bN =1

2NM < ε

Therefore {un}∞n=1 is a Cauchy sequence in Q. Similar argument shows that {bn}∞n=1 is also a Cauchysequence in Q. Since

un − bn → 0

85

Page 93: Advanced calculus I-1

these two sequences {un}∞n=1 and {bn}∞n=1 are equivalent. Let

s := [{un}∞n=1] = [{bn}∞n=1] ∈ R

We claim that s is the least upper bound of A. If there is some a ∈ A such that a > s, take

ε = a− s > 0

Since un → s decreasingly, there exists um such

um − s <1

Thena− um = (a− s) + (s− um) > ε− 1

2ε > 0

This is a contradiction since um is an upper bound of A. Therefore s is an upper bound of A. If t isan upper bound of A and t < s, since bn → s increasly, there exists br such that t < br < s. Notethat by the construction of br, br is not an upper bound of A, thus there exists a ∈ A such that

br < a

Thent < a

which contradicts to the assumption that t is an upper bound of A. This shows that s is the leastupper bound of A.

86

Page 94: Advanced calculus I-1

Example 3.9 The least upper bound of (0,∞) does not exist.

Theorem 3.6. The completeness of R

♥R is a complete metric space.

Proof Let {an}∞n=1 be a Cauchy sequence in R and

A =∞⋃n=1

{an}

be the set consisting of points of the sequence. By Proposition 3.7, A is bounded. Then A iscontained in [−M,M ] for some M > 0. Let

S = {s ∈ [−M,M ]| there exist infinitely many n ∈ N such that an ≥ s}

Again S is contained in [−M,M ]. By the least upper bound property of R, b := lub(S) exists. Givenϵ > 0. Since {an}∞n=1 is a Cauchy sequence, there exists N1 ∈ N such that

|an − am| <ϵ

2for all n,m ≥ N1

Since b+ 12ϵ > b, b+ 1

2ϵ /∈ S which implies that there are at most finitely many a′ns, say an1 , ..., ank

exceed b+ 12ϵ. Take N2 ∈ N larger than n1, ..., nk, we have for n > N2,

an < b+1

Note that b− 12ϵ < b, so b− 1

2ϵ is not an upper bound for S. Therefore there exists some s ∈ S such

that s > b − 12ϵ. In particular, by the definition of S, there exist infinitely many n ∈ N such that

an ≥ s > b − 12ϵ. Hence there exists N ≥ max{N1, N2} such that aN > b − 1

2ϵ. Since N ≥ N2,

aN ∈ (b− 12ϵ, b+ 1

2ϵ) which implies that

|aN − b| < 1

For n > N ,|an − b| ≤ |an − aN |+ |aN − b| ≤ 1

2ϵ+

1

2ϵ = ϵ

This means that the sequence {an}∞n=1 converges to b.

87

Page 95: Advanced calculus I-1

Corollary 3.2

♥For n ∈ N, Rn is a complete metric space.

Proof Given a Cauchy sequence {uk}∞k=1 in Rn, write uk = (uk,1, ..., uk,n). Since

|uk,i − uℓ,i| ≤

√√√√ n∑j=1

(uk,j − uℓ,j)2 = ||uk − uℓ||

we see that {uk,i}∞k=1 is a Cauchy sequence in R. By the completeness of R, it converges to somevi ∈ R. Therefore, by Proposition 3.4, uk → v = (v1, ..., vn).

Definition 3.15. Increasing and decreasing sequence

Let {an}∞n=1 be a sequence in R. We say that the sequence is1. increasing if an ≤ an+1 for all n ≥ 1;2. decreasing if an ≥ an+1 for all n ≥ 1.

We say that the sequence is monotonic if it is either increasing or decreasing.

Theorem 3.7

Let {an}∞n=1 be a monotonic sequence in R. Then {an}∞n=1 is convergent if and only if it isbounded.

Proof If the sequence is convergent, then it is a Cauchy sequence, and hence by Proposition 3.7, itis bounded. Conversely, suppose that {an}∞n=1 is bounded. We consider the case that {an}∞n=1 is anincreasing sequence first. Let A be the set formed by the sequence. Since it is bounded,

b := lub(A)

exists. Given ϵ > 0. Then b− ϵ is not an upper bound of A, hence there exists aN such that

b− ϵ < aN ≤ b

Then for n ≥ N , since an ≥ aN , we have

|an − b| = b− an ≤ b− aN < ϵ

88

Page 96: Advanced calculus I-1

This shows that an → b. For the case of decreasing sequence, take

c := glb(A)

Then c+ ϵ is not a lower bound of A, hence there exists aM such that c ≤ aM < c+ ϵ. For n ≥M ,since an ≤ aM , we have

|an − c| = an − c ≤ aM − c < ϵ

This shows that an → c.We can also show that a real number has a decimal expansion. The proof of the following result

is given in the appendix.

Theorem 3.8

♥A real number has a decimal expansion.

89

Page 97: Advanced calculus I-1

K Exercise 3.4 k

1. Construct a continuous function f : X → Y between two metric spaces with the conditionthat there exists a Cauchy sequence {xn}∞n=1 in X but {f(xn)}∞n=1 is not a Cauchy sequencein Y .

2. Construct two metric spaces X and Y which are homeomorphic, but X is complete and Y isnot complete.

3. If f : X → Y is a continuous function between metric spaces and {xk}∞k=1 is a Cauchysequence in X , prove or disprove that {f(xk)}∞k=1 is a Cauchy sequence in Y .

4. Let {an}∞n=1 be a sequence in R.(a). Show that it has a monotonic subsequence.(b). Prove that a bounded sequence in R has a convergent subsequence.(c). For n ∈ N, let an ∈ [0, π) such that

an ≡ n mod π

I. Show that {an}∞n=1 has a convergent subsequence.II. Is {an}∞n=1 dense in [0, π]?(Hint: Show that there exists a convergent subsequence

and divide [0, π] into subintervals of length less than given ε.)III. Is {n sinn|n ∈ N} dense in R?

5. Let (X,≤) be a partial ordered set. Show that a subset A of X has at most one least upperbound.

6. Show the following statements are equivalent in R.(a). Every bounded above subset has a least upper bound.(b). Every bounded below subset has a greatest lower bound.

90

Page 98: Advanced calculus I-1

Appendix 3.4

Theorem. 3.8

♥A real number has a decimal expansion.

Proof Let x ∈ R. It suffices to prove the result for x > 0. Let n0 be the largest integer that issmaller or equal to x. We inductively choose integers n1, n2, n3, .... by requiring nk to be the largestinteger such that

n0 +n1

10+

n2

102+ · · ·+ nk

10k≤ x

If there is k ≥ 1 such that nk ≥ 10, we may take n′k−1 = nk−1 + 1 and we still have

n0 +n1

10+ · · ·+

n′k−1

10k−1≤ x

which contradicts to the requirement that nk−1 is the largest such integer. So each nk ∈ {0, 1, ..., 9}for k ≥ 1. Let

E = {n0 +n1

10+

n2

102+ · · ·+ nk

10k|k ∈ N}

Since x is an upper bound of E, r := sup(E) exists. If there is k ≥ 1 such that

x−k∑

i=0

ni

10i>

1

10k

thenk−1∑i=0

ni

10i+nk + 1

10k< x

which contradicts to the requirement that nk is the largest integer which satisfies this inequality.Therefore for each k ≥ 1,

x−k∑

i=0

ni

10i≤ 1

10k

91

Page 99: Advanced calculus I-1

If x− r > 0, choose N ∈ N such that 110N

< x− r. Then

x−N∑i=0

ni

10i≤ 1

10N< x− r

and we have

r <N∑i=0

ni

10i∈ E

This means that r is not an upper bound of E which is a contradiction. Hence x = r.

92

Page 100: Advanced calculus I-1

93

Page 101: Advanced calculus I-1

Chapter 4 Compactness

Page 102: Advanced calculus I-1

4.1 Basic properties of compactness

Definition 4.1. Cover

Let X be a topological space and Y ⊂ X be a subset. A collection of open subsets {Ui}i∈I ofX for some index set I is said to be an open cover of Y if

Y ⊂⋃i∈I

Ui

A subcover of an open cover {Ui}i∈I is a subcollection {Uj}j∈J where J ⊂ I which is also anopen cover of Y . A finite open cover is an open cover which contains finitely many open sets.

Definition 4.2. Compactness

A subset Y of a topological space X is said to be compact if every open cover of Y contains afinite subcover.

Example 4.1 If X is a topological space with finitely many points, then every subset A ⊂ X iscompact. This follows from the fact that X has finitely many open sets only.Example 4.2 Let Y = [0, 1] ⊂ R,

Un = (1

n+ 2,1

n) for n ∈ N, U = (−1

3,1

3), and V = (

2

3,5

3)

95

Page 103: Advanced calculus I-1

Then {Un, U, V }n∈N is an open cover of [0, 1]. Take

W1 = U,W2 = V,W3 = U1,W4 = U2

Then [0, 1] ⊂⋃4

i=1Wi. Hence {Wi}4i=1 is a finite subcover of {Un, U, V }n∈N.Example 4.3 Let Y = (0, 1) ⊂ R. Take Un = ( 1

n, 1). Then

⋃∞n=1 Un = (0, 1), but {Un}∞n=1

has no finite subcover. This is because if Un1 , ..., Unm is a finite subcover of {Un}n∈N wheren1 < n2 < · · · < nm, then

m⋃i=1

Uni= Unm = (

1

nm

, 1) 6= (0, 1)

which is a contradiction.

Proposition 4.1

♠The closed interval [a, b] is compact.

Proof Let A = {Ui}i∈I be an open cover of [a, b]. Then a ∈ Ui0 for some i0 ∈ I . Let

A = {c ∈ [a, b]|[a, c] can be covered by finitely many elements of A }

Then a ∈ A and A is bounded. By the least upper bound property of R, s := lub(A) exists. Assumethat s < b. Since s ∈ Ui1 for some i1 ∈ I and Ui1 is open, there exists 0 < δ < b−s

2such that

[s− δ, s+ δ] ⊂ Ui1

96

Page 104: Advanced calculus I-1

Since s− δ is not an upper bound of A, there exists t ∈ A such that

s− δ < t ≤ s

Then [a, t] can be covered by finitely many elements of A , say Ui2 , ..., Uin . By adding Ui1 , we have

[a, s+ δ] = [a, t] ∪ [s− δ, s+ δ] ⊂n⋃

j=1

Uij

Note thats+ δ < s+

b− s

2=b+ s

2< b

and hence s + δ ∈ A. This contradicts to the fact that s is an upper bound of A. Therefore s = b.Since b ∈ Uj0 for some j0, there exists 0 < ε < b − a such that [b − ε, b + ε] ⊂ Uj0 . From the factthat b− ε is not an upper bound of A, there is t′ ∈ A such that

b− ε < t′ ≤ b

and [a, t′] can be covered by finitely many elements of A , say by Uj1 , ..., Ujm . Then

[a, b] ⊂m⋃k=0

Ujk

Thus [a, b] is compact.

Proposition 4.2

♠Let (X, d) be a metric space. A compact subset Y ⊂ X is closed.

Proof We want to show that X − Y is open. Let a ∈ X − Y . For p ∈ Y , let r = d(p, a),Vp = B r

2(a),Wp = B r

2(p). Then Vp

⋂Wp = ∅. Since

Y ⊂⋃p∈Y

Wp

and Y is compact, there are finitely many Wp1 , ...,Wpm which cover Y . Let

W =m⋃i=1

Wpi , V =m⋂i=1

Vpi

97

Page 105: Advanced calculus I-1

If there is y ∈ W⋂V , y ∈ Wpi for some i and y ∈ Vpj for all j = 1, 2, ..., n. Hence y ∈ Wpi

⋂Vpi 6=

∅ which is a contradiction. Therefore W⋂V = ∅. Since a ∈ V and V ⊂ X − Y is open, X − Y is

open. Thus Y is closed.

Proposition 4.3

Let X be a metric space and Y ⊂ X a metric subspace. A set K ⊂ Y is compact in Y if andonly if K is compact in X .

Proof Suppose thatK ⊂ Y is compact in Y . Let {Ui}i∈I be a family of open sets inX that coverK.Then by the inheritance principle, Vi := Y

⋂Ui is open in Y and K ⊂

⋃i∈I Vi. By the compactness

of K, there exist Vi1 , Vi2 , · · · , Vin that cover K. So K ⊂⋃n

j=1 Uij . Conversely, suppose that K iscompact inX . Let {Wi}i∈J be a family of open sets in Y that coverK. By the inheritance principle,there exists open sets W ′

i in X such that Wi = W ′i

⋂Y . Since K is covered by {W ′

i}i∈J , by thecompactness of K, there exist W ′

i1,W ′

i2, · · · ,W ′

im that cover K. So

K = K⋂

Y ⊂m⋃j=1

W ′ij

⋂Y =

m⋃j=1

Wij

and hence K is compact in Y .

98

Page 106: Advanced calculus I-1

Proposition 4.4

Let X be a metric space and Y ⊂ X be a compact subset. Then every closed subset of Y iscompact.

Proof Let K ⊂ Y be a closed subset in Y and {Ui}i∈J be an open cover of K where each Ui isopen in X . Since Y is compact, by Proposition 4.2, Y is closed in X , and since K is closed in Y , byCorollary 2.5, K is closed in X . Then X −K is open. The collection {Ui, X −K}i∈J is an opencover of Y . By the compactness of Y , there exists a finite subcover.

{Ui1 , ..., Uin , X −K}

Since (X −K)⋂K = ∅ and

K ⊂ Y ⊂n⋃

j=1

Uij

⋃(X −K)

we have K ⊂⋃n

i=1 Uij . Therefore K is compact.

99

Page 107: Advanced calculus I-1

K Exercise 4.1 k

1. Using the definition of compactness, show that [0, 1]−Q is not compact.2. Show that in a topological space, the union of finitely many compact subsets is compact. Is

the result true for infinitely many compact subsets?3. Show that in a metric space, the intersection of any collection of compact subsets is compact.

Is the result true for any topological space?4. If a topological space X is not compact, is it true that it can not be covered by finitely many

open sets? Give an example.5. Consider S1 as a metric subspace of R2. Let pθ = (cos θ, sin θ), rθ = sin( 1

10(θ) + 1) where

θ ∈ [0, 2π)⋂

Q andUθ := Brθ(pθ)

be an open ball in R2 centered at pθ with radius rθ. Is {Uθ}θ∈[0,2π)∩Q an open cover of S1? Ifso, find a finite subcover.

100

Page 108: Advanced calculus I-1

4.2 The Heine-Borel theorem

Lemma 4.1

Let (X, d1), (Y, d2) be metric spaces. Consider X × Y with the metric dsum. Then a subsetU ⊂ X × Y is open if and only if for any (a, b) ∈ U , there is an open neighborhood V ⊂ X

of a and an open neighborhood W ⊂ Y of b such that V ×W ⊂ U .

Proof Suppose that U is open and (a, b) ∈ U . Then there exists δ > 0 such that for (x, y) ∈ X × Y

with dsum((x, y), (a, b)) < δ, (x, y) ∈ U . Let V = BXδ2

(a), and W = BYδ2

(b) where BXr (c) means

the open ball in X of radius r centered at c. For any (x, y) ∈ V ×W ,

dsum((x, y), (a, b)) = d1(x, a) + d2(y, b) <δ

2+δ

2= δ

Thus V × W ⊂ U . To prove the converse, suppose that for (a, b) ∈ U , there exists an openneighborhood V ⊂ X of a and an open neighborhood W ⊂ Y of b such that V ×W ⊂ U . By theopenness of V and W , there exists δ > 0 such that

BXδ (a) ⊂ V and BY

δ (b) ⊂ W

For any (x, y) ∈ BX×Yδ (a, b), we have

d1(x, a) ≤ dsum((x, y), (a, b)) < δ and d2(y, b) ≤ dsum((x, y), (a, b)) < δ

ThereforeBX×Y

δ ((a, b)) ⊂ BXδ (a)× BY

δ (b) ⊂ V ×W ⊂ U

By the definition, U is an open subset of X × Y .

101

Page 109: Advanced calculus I-1

Theorem 4.1

Suppose that (X, d1) and (Y, d2) are metric spaces and consider X × Y with the metric dsum.If A ⊂ X and B ⊂ Y are compact subsets, then A× B is a compact subset of X × Y .

Proof Let A = {Ui}i∈I be an open covering of A×B. If (a, b) ∈ Ui, since Ui is open, by Lemma4.1, there exist open subsets V (a, b, i) ⊂ X, W (a, b, i) ⊂ Y such that

(a, b) ∈ V (a, b, i)×W (a, b, i) ⊂ Ui

For each a ∈ A, since B is compact, there are finite sets Ba ⊂ B and Ja ⊂ I such that

B ⊂⋃b∈Ba

⋃i∈Ja

W (a, b, i)

SinceA ⊂

⋃a∈A

⋃b∈Ba

⋃i∈I

V (a, b, i)

the compactness of A implies that there are finite sets A′ ⊂ A, I ′ ⊂ I such that

A ⊂⋃a∈A′

⋃b∈Ba

⋃j∈I′

V (a, b, j)

ThenA× B ⊂

⋃a∈A′

⋃b∈Ba

⋃ℓ∈Ja∪I′

V (a, b, ℓ)×W (a, b, ℓ) ⊂⋃a∈A′

⋃ℓ∈Ja∪I′

Uℓ

Hence A× B is compact.102

Page 110: Advanced calculus I-1

An induction argument gives us the following result.

Corollary 4.1

Let (Xi, di) be a metric space for i = 1, ..., n. Consider the Cartesian product∏n

i=1Xi withthe metric

dsum((x1, ..., xn), (y1, ..., yn)) := d1(x1, y1) + · · ·+ dn(xn, yn)

If for each i = 1, ..., n, Ai ⊂ Xi is compact, then the productn∏

i=1

Ai

is a compact subset of∏n

i=1Xi.

Theorem 4.2. The Heine-Borel theorem

♥A subset A ⊂ Rn is compact if and only if A is closed and bounded.

Proof Suppose thatA ⊂ Rn is compact. Then by Proposition 4.2,A is closed. Since {B1(a)|a ∈ A}is an open cover ofA, by the compactness ofA, there exists a finite subcover, sayB1(a1), ..., B1(am).Let

N := max{||a1||, ..., ||am||}+ 1

Then for all i = 1, ..,m,B1(ai) ⊂ BN(0)

and hence A ⊂ BN(0) which means that A is bounded. For the converse, suppose that A is closedand bounded. Then we may take M > 0 such that

A ⊂ [−M,M ]n

By Proposition 4.1, [−M,M ] is compact and by Corollary 4.1, [−M,M ]n is compact. Since A is aclosed subset of a compact set, by Proposition 4.4, A is compact.Example 4.4 For any r > 0 and X ∈ Rn, Br(X) ⊂ Rn is compact.

103

Page 111: Advanced calculus I-1

4.2.1 A technique to show openness, closedness and compactness

To prove that some set A ⊂ X is closed, a strategy is to construct a continuous functionf : X → R such that A = f−1(a) for some a ∈ R. Since the set of a point {a} is closed in R, by thecontinuity of f , A is closed in X . The following result gives us some natural continuous functionsfrom metric spaces to R.

Proposition 4.5

Let (X, d) be a metric space. For a ∈ X , define fa : X → R by

fa(x) := d(a, x)

Then fa is continuous.

Proof Given ε > 0. Take δ = ε. For x, y ∈ X with d(x, y) < δ = ε, by the triangle inequality, wehave

d(a, x) ≤ d(a, y) + d(y, x) = d(a, y) + d(x, y)

Thusfa(x)− fa(y) = d(a, x)− d(a, y) ≤ d(x, y) < ε

On the other hand,d(a, y) ≤ d(a, x) + d(x, y)

implies thatfa(x)− fa(y) ≥ −d(x, y) > −ε

Combine these inequalities together, we have

−ε < fa(x)− fa(y) < ε

That means|fa(x)− fa(y)| < ε

104

Page 112: Advanced calculus I-1

and fa is continuous.Example 4.5 On Rn, for Y ∈ Rn, the function fY : Rn → R defined by

fY(X) := ||X− Y||

is continuous. In particular, for Y = 0, the function

f(X) := ||X||

is continuous on Rn.Example 4.6 Show that

Sn := {X ∈ Rn+1|||X|| = 1}

is compact.Proof Since Sn is bounded, by the Heine-Borel theorem, it is enough to prove that Sn is closed.Let f : Rn+1 → R be defined by

f(X) := ||X||

Since {1} is closed in R and f is continuous,

Sn = f−1(1)

is closed in Rn+1.Recall thatMat(n,R) is the collection of all n×n-real matrices, andGL(n,R) is the collection

of all invertible n× n-real matrices. We identify Mat(n,R) with Rn2 as metric spaces.Example 4.7 Show that GL(n,R) is open in Mat(n,R).Proof For A ∈Mat(n,R), write A = [ai,j] where i, j = 1, ..., n. Then

det(A) =∑σ∈Sn

sgn(σ)aiσ(i)

where Sn is the permutation group of n letters. Thus the determinant function

det :Mat(n,R) → R

105

Page 113: Advanced calculus I-1

is a polynomial and hence continuous. We have

GL(n,R) = (det)−1(R− {0})

Since R− {0} is open in R, GL(n,R) is open in Mat(n,R).

Definition 4.3

Let f : Rn → R be a function. Denote by

Z(f) := {X ∈ Rn|f(X) = 0}

The subset Z(f) is called the zero set of f .

Example 4.8 For x ∈ R, letf(x) = x(x− 1)

andh(x, y, z) := (f(x) + y2)2 + z2 − 1

102

The zero set Z(h) is a torus of genus 1. Note that h(x, y, z) = 0 if and only if

(f(x) + y2)2 + z2 =1

102

Then |z| ≤ 110

and

|f(x) + y2| = |x(x− 1) + y2| ≤ 1

10106

Page 114: Advanced calculus I-1

If x > 1 or x < 0, x(x− 1) > 0, thus

|x(x− 1) + y2| = x(x− 1) + y2 <1

10

implies that |y| < 1 and |x| < 2. If 0 ≤ x ≤ 1, |x(x − 1)| < 1, we have |y| ≤ 2. Thus Z(h) isbounded. Since h is polynomial, Z(h) is closed and by the Heine-Borel theorem, Z(h) is compact.

Example 4.9 For x ∈ R and n ∈ N, let

f(x) = x(x− 1)2(x− 2)2 · · · (x− (n− 1))2(x− n)

Then if x < 0 or x > n, f(x) > 0. Let

g(x, y) := f(x) + y2

andh(x, y, z) := g(x, y)2 + z2 − 1

102

We haveh(x, y, z) = 0 if and only if g(x, y)2 + z2 =

1

102

This implies |z| < 110

and |g(x, y)| < 110

. If |x| → ∞, f(x) → ∞. Then

|g(x, y)| = |f(x) + y2| → ∞

107

Page 115: Advanced calculus I-1

which is a contradiction. Thus points (x, y) that satisfy the inequality

|g(x, y)| < 1

10

is a bounded set. With the observation that |z| is bounded by 110

, we find that Z(h) is a boundedset. The function h is a polynomial thus continuous. Therefore Z(h) is closed and bounded. By theHeine-Borel theorem, Z(h) is compact.Remark The set Z(h) is a torus of genus n.

108

Page 116: Advanced calculus I-1

K Exercise 4.2 k

1. Let f : R3 → R be defined by

f(x, y, z) = x6y8 + x4z4 − 100xyz − 1

Show that the zero set Z(f) is not compact.2. Show that the orthogonal group

O(n) = {A ∈ GL(n,R)|AAt = AtA = I}

is compact.3. Show that every open set in Rn is the union of at most countably many open balls. Construct

a metric space (X, d) and an open set U ⊂ X such that U is not the union of countably manyopen balls of X .

4. Let A ⊂ Rn, B ⊂ Rm. If the Cartesian product A× B ⊂ Rn+m is compact, show that A andB are compact.

109

Page 117: Advanced calculus I-1

4.3 Continuous functions and compactness

Theorem 4.3

Let f : X → Y be a continuous function between topological spaces andK ⊂ X be a compactsubset. Then f(K) is a compact subset of Y .

Proof Suppose that f(K) ⊂⋃

i∈I Ui for some index set I where each Ui is an open set in Y . Sincef is continuous, f−1(Ui) is open for all i ∈ I . Since

K ⊂ f−1(f(K)) ⊂ f−1(⋃i∈I

Ui) =⋃i∈I

f−1(Ui)

{f−1(Ui)}i∈I is an open cover of K. By the compactness of K, there exist Ui1 , ..., Uin such that

K ⊂n⋃

j=1

f−1(Uij)

We have

f(K) ⊂ f(n⋃

j=1

f−1(Uij)) =n⋃

j=1

f(f−1(Uij)) ⊂n⋃

j=1

Uij

which implies that f(K) is compact.

Corollary 4.2

Let X,Y be two topological spaces which are homeomorphic. Then X is compact if and onlyif Y is compact.

Proof Let f : X → Y be a homeomorphism. If X is compact, by the theorem above, f(X) = Y iscompact. If Y is compact, since f−1 is continuous, by the theorem above, X = f−1(Y ) is compact.

Definition 4.4

If a property is preserved by all homeomorphisms between two topological spaces, such aproperty is called a topological property.

110

Page 118: Advanced calculus I-1

Example 4.10 Compactness is a topological property since it is preserved by homeomorphisms. Sowe know that [0, 1] and (0, 1) are not homeomorphic, S1 and R are not homeomorphic. Distance isnot a topological property. For example, (0, 1) andR are homeomorphic but for any homeomorphismf : (0, 1) → R, there are some p, q ∈ (0, 1) such that

|f(p)− f(q)| > 1

So|p− q| < |f(p)− f(q)|

The distance between p, q ∈ (0, 1) is not preserved by the homeomorphism.

Theorem 4.4

Suppose that f : X → Y is a bijective continuous function between metric spaces. If X iscompact, then f is a homeomorphism.

Proof We claim that f(U) is open in Y for any open set U in X . Since U c is closed in X and Xis compact, U c is compact. By Theorem 4.3, f(U c) is compact, and hence closed in Y . ThereforeY − f(U c) is open in Y . By the bijectivity of f , we have f(U) = Y − f(U c) which is open in Y .Hence f−1 is continuous and f is a homeomorphism.Remark This result is especially useful when it is difficult to find the inverse of a function.Example 4.11 Show that f : [0, π] → [1, eπ] defined by

f(x) = ex + sin x

is a homeomorphism.Proof From calculus, for x ≥ 0

f ′(x) = ex + cos x > 0

Therefore f is an increasing function that maps [0, π] onto [1, eπ]. Since f is continuous and bijective,the set [0, π] is compact, by the theorem above, f is a homeomorphism.

111

Page 119: Advanced calculus I-1

Lemma 4.2

1. If A ⊂ R is closed and supA exists, then supA ∈ A.2. If A ⊂ R is closed and inf A exists, then inf A ∈ A.

Proof For each n ∈ N, since supA− 1n

is not an upper bound of A, there exists an ∈ A such that

supA− 1

n< an ≤ supA

This implies that an → supA. SinceA is closed, supA ∈ A. The case for inf A is proved similarly.

Definition 4.5

Let f : X → R be a function. Write

maxx∈X

f(x) := max{f(x)|x ∈ X} and minx∈X

f(x) := min{f(x)|x ∈ X}

if they exist.

Remark Note that if maxx∈X f(x) exists, then

sup f(X) = maxx∈X

f(x)

Theorem 4.5. Maximum-Minimum Theorem

Let X be a compact metric space and f : X → R be a continuous function. Then there existx0, y0 ∈ X such that

f(x0) = maxx∈X

f(x) and f(y0) = minx∈X

f(x)

Proof We prove the case that f assumes its maximum value. The case for minimum value is provedsimilarly. By Theorem 4.3, f(X) ⊂ R is compact. By the Heine-Borel Theorem, f(X) is closedand bounded. Hence by Lemma 4.2, sup(f(X)) exists and is in f(X). Therefore

sup(f(X)) = maxx∈X

f(x)

112

Page 120: Advanced calculus I-1

and hence there exists x0 ∈ X such that

f(x0) = sup(f(X)) = maxx∈X

f(x)

Definition 4.6. Uniform continuity

Let (X, dX), (Y, dY ) be metric spaces and f : X → Y be a continuous function. Suppose thatA ⊂ X . We say that f is uniformly continuous on A if for any ε > 0, there exists δ > 0 suchthat for any x, y ∈ A, if dX(x, y) < δ, then

dY (f(x), f(y)) < ε

Remark For a continuous function, δ is taken for particular x. So if x1 6= x2, δx1 may be differentfrom δx2 . But for a uniformly continuous function, δ works for all points.Example 4.12 The function

h(x) = 3x

is uniformly continuous on R.Proof Given ε > 0. Take δ = 1

3ε. Then for any x, y ∈ R with |x− y| < δ,

|h(x)− h(y)| = |3x− 3y| = 3|x− y| < 3δ = ε

This shows that h is uniformly continuous on R.Remark To show that a function f : X → Y is not uniformly continuous on a set A, we need to findan ε > 0 and show that for any δ > 0, there exist x, y ∈ A with dX(x, y) < δ but

dY (f(x), f(y)) ≥ ε

Example 4.13 The functionf(x) =

1

x

is continuous but not uniformly continuous on (0,∞).

113

Page 121: Advanced calculus I-1

Proof Take ε = 1. For any δ > 0, take x such that 0 < x < 12min{δ, 1}, then |2x−x| = x < δ, but

|f(2x)− f(x)| = | 12x

− 1

x| = 1

2x≥ 1

So f is not uniformly continuous on (0,∞).Example 4.14 The function

g(x) = x2

is not uniformly continuous on R.Proof Take ε = 1. For any δ > 0, take x such that x > 1

δ. Then

|g(x+ 1

2δ)− g(x)| = |(x+ 1

2δ)2 − x2| = xδ +

1

4δ2 > 1 +

1

4δ2 > 1

So g is not uniformly continuous on R.

Theorem 4.6

Suppose that f : X → R is continuous andK ⊂ X is compact. Then f is uniformly continuouson K.

Proof Given ε > 0. For each x ∈ K, f is continuous at x, hence there exists δx > 0 such that ify ∈ Bδx(x),

|f(x)− f(y)| < ε

2

The collection {B 12δx(x)}x∈K is an open cover of K. By the compactness of K, there exist

x1, x2, x3, · · · , xn ∈ K such that{B 1

2δxi

(xi)}ni=1

is a finite subcover of K. Take

δ =1

2min{δx1 , δx2 , . . . , δxn}

For c1, c2 ∈ K with dX(c1, c2) < δ, since c1 ∈ B 12δxi

(xi) for some i, we have

dX(c2, xi) ≤ dX(c2, c1) + dX(c1, xi) < δ +1

2δxi

≤ 1

2δxi

+1

2δxi

= δxi

114

Page 122: Advanced calculus I-1

Then c1, c1 ∈ Bδxi(xi). By the continuity of f at xi, we have

|f(c1)− f(c2)| ≤ |f(c1)− f(xi)|+ |f(c2)− f(xi)| <ε

2+ε

2= ε

Hence f is uniformly continuous on K.Example 4.15

1. The function f(x) = 1x

is uniformly continuous on [12, 1] but not on (0, 1).

2. The function g(x) = x2 is uniformly continuous on [−100, 4] but not on (−100,∞).

115

Page 123: Advanced calculus I-1

K Exercise 4.3 k

1. Let D = {(x, y) ∈ R2|x2 + y2 ≤ 1} be the unit closed disc in R2 and

E := {(x, y) ∈ D|y = mx for some m ∈ Q}

Show that(a). E and D are not homeomorphic.(b). E and Q are not homeomorphic.

2. LetG := {x ∈ Q|2 < x2 < 3}

(a). Is G closed in R? In Q?(b). Is G bounded?(c). Is G compact?

3. Let (X, d) be a metric space, A, B be two compact, disjoint, non-empty subsets of X . Showthat there exist points a0 ∈ A, b0 ∈ B such that for all a ∈ A, b ∈ B,

d(a0, b0) ≤ d(a, b)

4. Let f : R → R be defined byf(x) = ex + x− sin x

Show that f is a homeomorphism.

116

Page 124: Advanced calculus I-1

4.4 The Bolzano-Weierstrass theorem

Definition 4.7. Sequentially compact

Let X be a metric space. A subset Y ⊂ X is called sequentially compact if every sequence inY has a subsequence that converges in Y .

Remark If a sequence {xk}∞k=1 converges, then all its subsequences converge.Example 4.16

1. The sequence {1,−1, 1,−1, ....} is bounded but not convergent. The following two subse-quences

{1, 1, 1, ....} and {−1,−1,−1, ...}

are convergent.2. The sequence {n}∞n=1 does not have any convergent subsequence and henceN is not sequentially

compact.Example 4.17 Let Y = (0, 1) ⊂ R. Then the sequence { 1

n}∞n=1 does not have a subsequence

converges in Y . The reason is that since the sequence converges to 0 in R, hence every subsequenceconverges to 0. Therefore they do not converge in Y .

Lemma 4.3

Let {xk}∞k=1 be a sequence in a metric space K and A be the set consisting of points of thesequence. If every subsequence of {xk}∞k=1 does not converge, then for any a ∈ K, a is not alimit point of A− {a}.

Proof Assume that there is a ∈ K which is a limit point of A− {a}. Then for any r > 0,

Br(a)⋂

(A− {a}) 6= ∅

117

Page 125: Advanced calculus I-1

Note that if for some r > 0, Br(a)⋂(A− {a}) is a finite set, say {xk1 , ..., xkj}, then take

r′ = min{d(a, xk1), ..., d(a, xkj)}

we haveBr′(a)

⋂(A− {a}) = ∅

which is a contradiction. Thus for any r > 0, Br(a) ∩ (A− {a}) has infinitely many points.We construct a subsequence inductively that converges to a as following. First we pick xi1 ∈

B1(a)⋂(A− {a}). Suppose that xin has been picked. Then since

B 1n+1

(a)⋂

(A− {a})

has infinitely many points, we may pick xin+1 in it such that in+1 > in. In this way, we get asubsequence

{xij}∞j=1

which converges to a and this contradicts to our assumption. Therefore a is not a limit point ofA− {a}.

Proposition 4.6

♠Let X be a metric space. If K ⊂ X is compact, then K is sequentially compact.

Proof Let A be the set consisting of points of the sequence {xk}∞k=1. We divide the proof into twocases. The first case is when A is a finite set, then some point in Amust appear infinitely many timesin the sequence hence form a convergent subsequence. The second case is when A has infinitelymany distinct points. We prove by contradiction. Assume that every subsequence of {xk}∞k=1 doesnot converge in K. Then by Lemma 4.3, for any a ∈ K, a is not a limit point of A − {a}, hencethere is ra > 0 such that Bra(a)

⋂A ⊂ {a}. Since {Bra(a)|a ∈ K} is an open cover of K, by the

compactness of K,

K ⊂n⋃

i=1

Brai(ai)

118

Page 126: Advanced calculus I-1

for some a1, ...., an ∈ K. But A ⊂ K and so some Brai(ai) must contain infinitely many points

of A which contradicts to the fact that Brai(ai)

⋂A ⊂ {ai}. Hence {xk}∞k=1 has a convergent

subsequence.

Definition 4.8. Totally bounded

A metric space X is said to be totally bounded if for any ϵ > 0, there is a finite set

{x1, ..., xn} ⊂ X

such that

X ⊂n⋃

i=1

Bϵ(xi)

Remark It is clear that if X is totally bounded, then X is bounded. The converse is not true.For example consider N with the discrete metric d, then N is bounded since N ⊂ B2(1), but eachB 1

2(n) = {n}, there do not exist finitely many points in N such that the union of their 1

2-balls is N.

Therefore N is not totally bounded.Example 4.18 The open interval (0, 1) is totally bounded. For any ε > 0, take N ∈ N such that1N< ε. Consider the open intervals centered at

1

N,2

N, ....,

N − 1

N

with radius ε, we have

(0, 1) ⊂N−1⋃k=1

(k

N− ε,

k

N+ ε) ∩ (0, 1)

This shows that (0, 1) is totally bounded.

Proposition 4.7

♠If (Y, d) is a metric space which is sequentially compact, then Y is totally bounded.

Proof If the conclusion is not true, there is ϵ > 0 such that Y is not covered by finitely many ballswith radius ϵ. Take y1 ∈ Y . Since Y is not covered by Bϵ(y1), we may pick y2 ∈ Y − Bϵ(y1).

119

Page 127: Advanced calculus I-1

Inductively, suppose we have taken y1, ..., yn. Sincen⋃

i=1

Bϵ(yi)

does not cover Y , we may pick

yn+1 ∈ Y −n⋃

i=1

Bϵ(yi)

Then we have a sequence {yi}∞i=1 with

d(yn, ym) ≥ ϵ

for any n 6= m ∈ N. If the sequence has a convergent subsequence, say {yij}∞j=1, then thissubsequence is Cauchy, and hence for j1, j2 large enough

d(yj1 , yj2) < ϵ

which is a contradiction. Therefore {yi}∞i=1 has no convergent subsequence which contradicts to thefact that Y is sequentially compact.

Definition 4.9. Lebesgue number

Suppose that X is a metric space and Y ⊂ X is a subset. Let {Ui}i∈I be an open cover of Y .If there is r > 0 such that for each y ∈ Y ,

Br(y) ⊂ Ui

for some i ∈ I , the number r is called a Lebesgue number for the open cover.

Example 4.19 Consider Y = { 1n|n ≥ 2} in R. The collection {( 1

n+2, 1n)}n≥1 is an open cover of Y .

But for any r > 0, it is clear that for n large enough, ( 1n+1

− r, 1n+1

+ r) * ( 1n+2

, 1n). So there is no

Lebesgue number for this open cover of Y .

Proposition 4.8

Let (X, d) be a metric space and Y ⊂ X . If Y is sequentially compact, then any open coverof Y has a Lebesgue number.

120

Page 128: Advanced calculus I-1

Proof Let {Ui}i∈I be an open cover of Y . Assume that for any r > 0, there is y ∈ Y such thatBr(y) * Ui for all i ∈ I . Then for every n ∈ N, there is yn ∈ Y such thatB 1

n(yn) * Ui, for all i ∈ I .

Since Y is sequentially compact, the sequence {yn}∞n=1 has a convergent subsequence, say {yni}∞i=1.

Suppose that yni→ a ∈ Y and a ∈ Ui0 for some i0. Since Ui0 is open in X , there is ϵ > 0 such that

Bϵ(a) ⊂ Ui0 . Take k ∈ N such that d(ynk, a) < ϵ

2and 1

nk< ϵ

2. Then

B 1nk

(ynk) ⊂ Bϵ(a) ⊂ Ui0

This contradicts to the property of ynk.

Remark By the result above, if Y is sequentially compact, then any open cover of Y has a Lebesguenumber.

Theorem 4.7. The Bolzano-Weierstrass theorem

♥A subset of a metric space is compact if and only if it is sequentially compact.

Proof Let X be a metric space and Y ⊂ X . If Y is compact, by Proposition 4.6, Y is sequentiallycompact. Conversely, suppose that Y is sequentially compact. We want to show that Y is compact.Let {Ui}i∈I be an open cover of Y . By Proposition 4.8, there exists a Lebesgue number r > 0 forthe open cover. By Proposition 4.7, Y is totally bounded. So

Y ⊂n⋃

j=1

Br(yj)

for some y1, ..., yn ∈ Y . Since r is a Lebesgue number for the open cover, Br(yj) ⊂ Uij for some ij .This implies that Y ⊂

⋃nj=1 Uij which is a finite subcover of the open cover {Ui}i∈I . Therefore Y is

compact.We also have the following equivalent result. A proof is given in the appendix.

Theorem 4.8

Let X be a metric space and Y ⊂ X . Then Y is compact if and only if Y is complete andtotally bounded.

121

Page 129: Advanced calculus I-1

Remark In a general metric space, compactness can be characterize by the following forms:

compact ⇔ sequentially compact ⇔ complete+totally bounded

In Rn, compactness has a simple description:

compact ⇔ closed + bounded

In a general metric spaceclosed + bounded ; compact

122

Page 130: Advanced calculus I-1

K Exercise 4.4 k

1. Let A ⊂ X be a metric subspace of a metric space X . Show that A is totally bounded if andonly if for any ε > 0, there is a finite set {x1, . . . , xn} ⊂ X such that

A ⊂n⋃

i=1

Bϵ(xi)

2. Let E be the set of all x ∈ [0, 1] whose decimal expansion contains only the digits 2 and 8. IsE countable? Is E dense in [0, 1]? Is E sequentially compact?

3. Suppose that (X, d) is a metric space which is not compact. Let {an}∞n=1 be a sequence ofdistinct points in X that has no convergent subsequences. For each n ∈ N, take rn > 0 suchthat Brn(an) ∩Brm(am) = ∅ for n 6= m. Let

fn(x) :=rn − d(x, a)rnn+ d(x, an)

and

f(x) =

{fn(x), if x ∈ Brn(an) for some n ∈ N;0, otherwise.

Show that fn and f are continuous functions. Is f bounded?4. Let X be a metric space. Show that if every continuous function f : X → R is bounded, thenX is compact.

123

Page 131: Advanced calculus I-1

Appendix 4.4

Theorem. 4.8

Let X be a metric space and Y ⊂ X . Then Y is compact if and only if Y is complete andtotally bounded.

Proof Suppose that Y is compact. By Proposition 4.7, Y is totally bounded. Now we claim thatY is complete. Let {xk}∞k=1 be a Cauchy sequence in Y . By the Bolzano-Weierstrass theorem,Y is sequentially compact. Thus {xk}∞k=1 has a convergent subsequence which converges to somepoint in Y . By Proposition 3.7, this implies that the sequence {xk}∞k=1 is actually convergent in Y .Hence Y is complete. Conversely, suppose that Y is totally bounded and complete. Let {xk}∞k=1 bea sequence in Y . We want to show that it has a convergent subsequence. Let A be the set formed bythis sequence. If A is a finite set, then some point must appear infinitely many times in the sequenceand hence form a convergent subsequence. If A is infinite, let {xki}∞i=1 be a subsequence of {xk}∞k=1

consisting of distinct points. Since Y is totally bounded, we may cover Y by finitely many open ballsB1(y11), ..., B1(y1m1) for some y11, ..., y1m1 ∈ Y . And hence some open ball contains a subsequenceof {xki}∞i=1, namely {z1i}∞i=1. Again by the totally boundedness of Y , we may cover Y by finitelyopen balls of radius 1

2and some of the open balls must contain a subsequence of {z1i}∞i=1, namely,

{z2i}∞i=1. Inductively, suppose that we have chosen a subsequence {zni}∞i=1 lying in some ball ofradius 1

n. Then we may cover Y by finitely many open balls of radius 1

n+1and hence some ball must

contain a subsequence of {zni}∞i=1, namely {z(n+1)i}∞i=1. Note that for n > m,

d(znn, zmm) <2

m

hence {znn}∞n=1 is a Cauchy sequence. By the completeness of Y , this sequence converges in Y . SoY is sequentially compact.

A bounded set in Rn is contained in some closed ball and a closed ball is compact, thusevery bounded subsequence in Rn has a convergent subsequence. In the following we give a more

124

Page 132: Advanced calculus I-1

constructive proof of this result.

Proposition 4.9

♠Every bounded sequence in R has a convergent subsequence.

Proof Let {xk}∞k=1 be a bounded sequence in R. Suppose that the sequence is bounded by M > 0,i.e., −M ≤ xk ≤ M for all k ∈ N. Bisect [−M,M ] into [−M, 0] and [0,M ]. Let I0 be one of[−M, 0], [0,M ] that contains a subsequence of {xk}∞k=1. Take any one of them if both of them satisfythis requirement. Take n0 ∈ N with xn0 ∈ I0. Bisect I0 again and let I1 be one of the intervals thatcontains a subsequence of {xk}∞k=1. We may take n1 > n0 such that xn1 ∈ I1. Continue in thisprocess, we get Ik with the following properties:

1. I0 ⊃ I1 ⊃ I1 ⊃ I2 ⊃ · · ·2. Ik = [ak, bk] with bk − ak =

M2k

3. n0 < n1 < n2 < n3 < · · ·4. xnk

∈ Ik for all k = 0, 1, 2, ....

Now consider the sequence {ai}∞i=1. Since Ik ⊃ Ik+1, we have ak ≤ ak+1 for all k. Thesequence {ak} is bounded by M and increasing, hence by Theorem 3.7 ai → a for some a ∈ R. Forany ϵ > 0, there is N1 ∈ N such that M

2N1< ϵ

2and there is N2 ∈ N such that |ai − a| < ϵ

2. Take

N = max{N1, N2}, then for all k > N ,

|xnk− a| ≤ |xnk

− ak|+ |ak − a| < M

2k+ϵ

2< ϵ

Therefore xnk→ a.

125

Page 133: Advanced calculus I-1

Advanced Calculus I Practice Midterm II

1. (a). (5%) State the Completeness Theorem of R.(b). (10%) Show that a bounded increasing sequence in R is convergent.

2. (a). (10%) Is Q ∩ [0, 1] compact in [0, 1]?(b). (10%) Give a metric space X and a closed and bounded subspace Y $ X such that Y is

not compact.3. (10%) Let X,Y be metric spaces and f : X → Y be a continuous function. If X is bounded

and f is surjective, must Y be bounded? Prove or give a counterexample.4. (a). (5%) If f : X → Y is a homeomorphism between metric spaces and {an}∞n=1 is a Cauchy

sequence in X , must {f(an)}∞n=1 be a Cauchy sequence in Y ?(b). (5%) Use the definition to show that

{ 1

n2 + 1}∞n=1

is a Cauchy sequence.(c). (5%) Show that if a Cauchy sequence has a convergent subsequence, then it is convergent.(d). (10%) Given two Cauchy sequences {(an, bn)}, {(cn, dn)} in R2, show that the sequence

{(ancn, bndn)}∞n=1 is a Cauchy sequence in R2.5. (10%) Let A be a subset of Rn and {Uα}α∈B be an open cover of A. Show that there is

countable subset C ⊂ B such that {Uα}α∈C is an open cover of A.6. (10%) Let (X, d) be a metric space and K ⊂ X be a compact set. Suppose that a ∈ X −K.

Show that the set {d(a, x)|x ∈ K} is bounded.7. (10%)Let

D = {(x, y) ∈ R2|x2 + y2 ≤ 1}

be the closed unit disc and

E = {(x, y) ∈ D|y = mx for some m ∈ Q}

126

Page 134: Advanced calculus I-1

Is E homeomorphic to Q?

127

Page 135: Advanced calculus I-1

Advanced Calculus I Midterm II

1. (a). (5%) State the definition of completeness.(b). (5%) LetX be a metric space andA ⊂ X be a compact subset. Show thatA is complete.(c). (10%) Show that a bounded decreasing sequence in R is convergent.

2. (a). (5%) Is Q ∩ [0, 1] compact in Q?(b). (10%) Let f : Q → R be a continuous function and A ⊂ Q be a compact subset. Must

f(A) be compact in R? Prove or give a counterexample.3. (a). (10%) Use the definition to show that

{ n

n2 + 1}∞n=1

is a Cauchy sequence.(b). (10%) Show that every Cauchy sequence in a metric space is bounded.(c). (5%) Let X,Y be complete metric spaces and f : X → Y be a continuous function. If

{an}∞n=1 is a Cauchy sequence in X , must {f(an)}∞n=1 be a Cauchy sequence in Y ?4. (10%) Let X be a metric space. Show that if A,B ⊂ X are compact, then A ∩B is compact.5. (10%)Let

D = {(x, y) ∈ R2|x2 + y2 ≤ 1}

be the closed unit disc andE = [0, 1]× [0, 1]

Is D homeomorphic to E?6. (10%) Let f : X → Y be an injective continuous function between metric spaces. Suppose thatA ⊂ X is somewhere dense. Is f(A) somewhere dense in Y ? Prove or give a counterexample.

7. (10%) Let X be a topological space and A ⊂ X be a compact subset. Must A be closed?Prove or give a counterexample.

128

Page 136: Advanced calculus I-1

129

Page 137: Advanced calculus I-1

Bibliography

[1] Marsden J. and Hoffman M.J., Elementary classical analysis, 2nd ed., Freeman, New York, 1993.[2] Pugh, C.C., Real mathematical analysis, Springer-Verlag, New York, 2002.[3] Rudin, W., Principles of mathematical analysis, 3rd edition, McGraw-Hill, New York, 1985.

Page 138: Advanced calculus I-1

Index

antisymmetric, 80

bijection, 6bijective, 6Bolzano-Weierstrass theorem, 121bounded, 76bounded above, 84bounded below, 84

Cantor’s diagonal method, 16Cantor’s theorem, 16cardinality, 8Cartesian product, 4Cauchy sequence, 76Cauchy-Schwarz inequality, 24circle, 23closed set, 40closure, 46codomain, 5compact, 95compactness, 95complete, 78complex number, 2continuous function, 63

convergence, 44countable, 8cover, 95

decimal expansion, 89decreasing sequence, 88dense, 47denumerable, 8discrete metric, 26domain, 5

equivalence relation, 68equivalent metrics, 54Euclidean metric, 25

finite, 8function, 5

greatest lower bound, 81

Heine-Borel theorem, 103homeomorphic, 67homeomorphism, 67

image, 5increasing sequence, 88

Page 139: Advanced calculus I-1

infinite, 8inheritance principle, 52inherited metric, 34injective, 6interior, 34interior point, 34intersection, 4inverse function, 6

least upper bound, 81least upper bound property, 84Lebesgue number, 120limit, 44limit point, 44lower bound, 81

maximum-minimum theorem, 112metric space, 22metric subspace, 34metrizable, 32

natural number, 2neighborhood, 34nowhere dense, 47

open ball, 31open set, 30ordered field, 80

partial order, 80preimage, 5proof by contradiction, 12

rational number, 2real number, 2reflexive, 68, 80

same cardinality, 8Schroeder-Bernstein theorem, 18sequence, 44sequentially compact, 117somewhere dense, 47statement, 2subcover, 95subsequence, 76surjective, 6symmetric, 68

topological property, 110topological space, 30topology, 30totally bounded, 119transitive, 68, 80

uncountable, 8uniform continuity, 113uniformly continuous, 113

132

Page 140: Advanced calculus I-1

union, 4upper bound, 81

well-ordering principle, 11

133