September 15, 2011 UNIVERSITY OF NAIROBI FACULTY OF SCIENCE THIRD YEAR LECTURE NOTES SMA 301: REAL ANALYSIS I First Edition

WRITTEN BY :

Dr. Bernard Mutuku Nzimbi

REVIEWED BY:

School of Mathematics, University of Nairobi P.o Box 30197, Nairobi, KENYA.

EDITED BY:

Copyright ⃝c 2011 Benz, Inc. All rights reserved.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopy- ing, recording or otherwise, without the prior permission of the publisher. This page is intentionally left blank.

i Contents

About the Author v

Preface vi

Goals of a Real Analysis I Course viii

1 METRIC SPACES 1 1.1 Introduction ...... 1 1.2 Rudiments on Metric Spaces ...... 1 1.3 Examples of Metric and Metric spaces ...... 3 1.3.1 Useful Inequalities ...... 6 1.3.2 H¨older’s Inequality ...... 7 1.3.3 Minkowski’s Inequality ...... 8 1.3.4 Subspaces of a ...... 12 1.4 Equivalent Metrics ...... 12 1.5 Exercises ...... 18

2 STRUCTURE OF METRIC SPACES 22 2.1 Topology of a Metric Space ...... 22 2.1.1 Open Balls and Closed Balls in a Metric Space ...... 22 2.2 Interior points, Isolated Points and Open sets in a Metric Space . . . . . 28 2.2.1 Examples of Open Sets ...... 30 2.3 Limit Points, Points and Closed Sets in a Metric Space . . . . . 33 2.3.1 Examples of Closed Sets ...... 37 2.4 Subsets and Relative Topology ...... 40

ii 2.4.1 Relatively Open and Relatively Closed Subsets of Metric Spaces . 41 2.5 Diameter of Subsets and Distance Between Subsets in Metric Spaces . . . 42 2.6 Boundary of a Subset of a Metric Space ...... 45 2.7 Exercises ...... 48

3 DENSE SUBSETS IN A METRIC SPACE 54 3.1 Dense and Nowhere Dense Sets ...... 54 3.2 Exercises ...... 56

4 COMPACTNESS IN METRIC SPACES 58 4.1 Sequential Compactness, Notion of a Cover and a Compact Set . . . . . 58 4.2 Bolzano-Weierstrass Theorem and Compactness ...... 59 4.3 Heine- Borel Theorem and Compactness ...... 62 4.4 Exercises ...... 64

5 CONTINUITY IN METRIC SPACES 66 5.1 Continuity of a Function in a metric Space ...... 66 5.1.1 Epsilon-Delta Definition of Continuity in a Metric Space . . . . . 66 5.1.2 Continuity in terms of Open Balls ...... 67 5.2 Compactness and Continuity in Metric Spaces ...... 70 5.2.1 Uniform Continuity in Metric Spaces ...... 73 5.2.2 Continuity vs Metrics ...... 74 5.2.3 Compactness and Real-valued Continuous Functions: Applica- tions in Maxima and Minima Problems ...... 77 5.2.4 Continuity and Approximation ...... 78 5.3 Exercises ...... 79

6 COMPLETENESS IN METRIC SPACES 81 6.1 Convergence in Metric Spaces ...... 81 6.1.1 Criterion of Convergence ...... 81 6.1.2 Cauchy Criterion and Cauchy Sequences ...... 82 6.2 Compactness vs Completeness in Metric Spaces ...... 86 6.3 Baire Category Theorem ...... 90

iii 6.4 Completeness vs Equivalent metrics in Metric Spaces ...... 94 6.5 Exercises ...... 95

Bibliography 96

iv About the Author B.M. Nzimbi is a Lecturer in Pure Mathematics at the University of Nairobi. Dr. Nzimbi received his B.sc in Mathematics and Computer Science from the University of Nairobi (1995), Msc(Pure Mathematics) from University of Nairobi (1999), Msc(Mathematics) from Syracuse University (New York, USA) (2004), and his Ph.D in Pure Mathematics from University of Nairobi (2009), where he wrote his thesis in the area of Operator Theory under the direction of Prof. J.M. Khalagai. Before joining the University of Nairobi, he held a position at Catholic University of Eastern Africa (CUEA), where he was a part-time lecturer. Dr. Nzimbi has authored, co-authored and published numerous articles in professional journals in the areas of Operator Theory and differential geometry. He is the author of the textbooks ”Basic Mathematics”,”Linear Algebra I ” and ”Linear Algebra II ”, which are extensively used in the ODL programme at the University of Nairobi.

v Preface This book grew out of a course entitled Real Analysis I that I have taught at the Uni- versity of Nairobi during the past six years. It is intended as a textbook to be studied independently by students on their own or to be used in a course on Real Analysis I. In writing this book, I was guided by my long-standing experience and interest in teach- ing Real Analysis. The choice of material is not entirely mine, but laid down by the University of Nairobi SMA301: Real Analysis syllabus.

For the student, my purpose was to introduce students studying sciences and social sci- ences the beautiful field of real analysis. I wanted to write a succinct book that gets to interesting results in a minimal amount of time. This book can be read by under- graduate students who have had only one-semester course in introduction to analysis. Introduction to Analysis is the only explicit prerequisite for the course, but a cer- tain degree of mathematical sophistication is required.

For the instructor, my purpose was to design a flexible, comprehensive teaching tool using proven pedagogical techniques in mathematics. I wanted to provide instructors with a package of materials that they could use to teach Real Analysis I effectively and efficiently in the most appropriate manner for their particular set of students. I hope I have accomplished these goals without watering down the material.

This text is designed as a one-semester real analysis course to be taken by third year undergraduate students in a wide variety of majors, including mathematics, chemistry, physics, meteorology, geology, economics and other social sciences. The core material of this book consists of six chapters. Each chapter includes definitions, theorems and principles together with illustrative and other descriptive material, followed by several exercises of varying difficulty.

I finally wish to record my appreciation to my former students for their invaluable suggestions and critical review of the manuscript that made the writing of this book easy. I remain indebted to my former students for their patience and eagerness to read my sometimes not-so-polished notes and for much help in sorting out good exercise sets

vi which have been included in this book. I welcome your comments, suggestions for improvements and indication of errors. All the errors in this manuscript, if any, are entirely mine.

Bernard Mutuku Nzimbi Nairobi, 2011

vii Goals of a Real Analysis I Course Analysis is the branch of mathematics that deals with inequalities and limiting processes. The goal of this course is to acquaint the reader with the basic concepts of rigorous proof in analysis.

Special Features of this Book

Accessibility: There are no mathematical prerequisites beyond an introduction to analysis for this text. Each chapter begins at an easily understood and accessible level. Once basic mathematical concepts have been developed, more difficult material and ap- plications are presented.

Accessibility: This text has been carefully designed for flexible use. The depen- dence of chapters has been minimized. Each chapter is divided into sections and each section is divided into subsections that form natural blocks of material for teaching. Instructors can easily pace their lectures using these blocks.

Writing Style: The writing style of this book is direct and pragmatic. Precise mathematical language is used without excessive formalism and abstraction. Notations are introduced and used when appropriate. Care has been taken to balance the mix of notation and words in mathematical statements.

Mathematical Rigor and Precision: All definitions and theorems in this book are stated extremely carefully so that students will appreciate the precision of language and rigor need in mathematics. Proofs are motivated and developed and their steps are carefully justified.

Figures and Tables: Figures and tables in this book are carefully presented and illustrated.

Exercises: There is an ample supply of exercises in this book that develop basic skills and which are carefully graded for level of difficulty.

viii Chapter 1

METRIC SPACES

1.1 Introduction

One of the most important operations in mathematical analysis is the taking of limits. Here what matters is not so much the algebraic nature of the field of real numbers, but rather the fact that distance from one point to another on the real line (or in two or three dimensional space) is well-defined and has certain properties. All fundamental tools of metric spaces needed in mathematics and elsewhere in the sci- ences and social sciences are included in detailed exposition in this chapter.

Objectives At the end of this lecture, you should be able to: • Define a metric and a metric space. • Give examples of metric spaces. • Apply metric space theory in solving some practical problems.

1.2 Rudiments on Metric Spaces

Basic questions of analysis on the real line are tied to the notions of closeness and distances between points. The same issue of closeness comes up in more complicated settings, for instance, like when we are trying to approximate a function by a simpler

1 function. The notion of a metric space generalizes the properties of R that are associated with the distance given by the function

(x, y) 7−→ |x − y|

which is the standard metric or Euclidean metric in R. We introduce main properties of matric spaces (applicable in advanced real analysis). We abstract many of the properties of R to the context of a metric space, a set in which we can measure the distance between any two points. We introduce the general notion of distance for the general space emphasizing main properties of the distance with which we have an experience. Once a metric distance has been defined between any two points of a set, the set becomes well defined or metrized and it becomes a space. Once this is done, we should be able to talk of, for instance, the distance between two functions with the same conceptual ease as we talk of the distance between two points in the plane. This is applicable in convergence, continuity, completeness concepts, etc.

Definition 1.1 Let X be a non-empty set. A metric (or distance function) on X is any non-negative function d : X × X 7−→ R+

such that the following properties hold: (i). d(x, y) ≥ 0, ∀x, y ∈ X. (ii). d(x, y) = 0 if and only if x = y, ∀x, y ∈ X. (iii). d(x, y) = d(y, x), ∀x, y ∈ X. (iv). d(x, z) ≤ d(x, y) + d(y, z), ∀x, y, z ∈ X.

Inequality (iv) is called the triangle inequality. A set X equipped or endowed with the metric d and denoted (X, d) is called a metric space. In this case we will often refer to the set X as a ”space” and its elements x, y, etc as ”points”. Sometimes metric spaces are usually denoted by the same letter X as used for the underlying space, in cases where there is no possibility of confusion.

Remark 1.1 It is sometimes convenient to relax the condition that d(x, y) = 0 only if x = y when we allow the possibility that d(x, y) = 0 for some x ≠ y (that is, d lacks only

2 the property, d(x, y) = 0 iff x = y, of a metric)we call d a pseudo-metric. If d is a pseudo-metric for X, (X, d) is a pseudo-metric space. In many ways pseudo-metric spaces are more useful than metric spaces.

Example 1.1 Consider the set L1 of Lebesgue integrable functions on R. The distance function d defined by ∫ d(f, g) = |f − g| R

where f, g ∈ L1 is a pseudo-metric on L1.

The corresponding space is denoted by L1(R). This is a pseudo-metric space. We see

that two elements of L1(R) are equal if and only if as functions, they are equal almost everywhere. That is, they differ in sets of measure zero.

1.3 Examples of Metric and Metric spaces

1. The standard metric, the usual metric or Euclidean metric on R.

d : R × R 7−→ R+

defined by d(x, y) = |x − y|, ∀x, y ∈ R

2. The discrete metric is defined on any non-empty set X by { 1, x ≠ y d(x, y) = 0, x = y

where x, y are elements of X. The set equipped with this metric is called a discrete metric space or a space of isolated points. Note that all points of a discrete metric space lie at unit distance from each other. Indeed the first three properties of a metric are satisfied. It remains to prove the triangle inequality. Suppose d(x, y) = 1 and d(x, z) = d(y, z) = 0. However this would only be possible for x = y = z. Hence d(x, y) cannot be equal to 1. That is

d(x, y) ≤ d(x, z) + d(z, y) 1 ̸≤ 0 + 0

3 This proves that the triangle inequality is satisfied. Alternatively, note that it is almost trivial that

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

because the left hand side is always ≤ 1. If the right hand side is < 1, then both d(x, z) = 0 and d(z, y) = 0, and we infer that x = z and z = y, hence also x = y. This implies that the left hand side d(x, y) = 0, and the triangle inequality is fulfilled.

3. The set C[a,b] of all continuous functions defined on the closed interval [a, b] ⊂ R with + distance d : C[a,b] × C[a,b] 7−→ R defined by { } d(f, g) = sup |f(t) − g(t)| : t ∈ [a, b]

It is easy to show that (C[a,b], d) is a metric space. The first three properties of a metric

are easy to verify. To prove the triangle inequality, first note that for all f, g, h ∈ C[a,b],

|f(t) − h(t)| = |f(t) − g(t) + g(t) − h(t)| ≤ |f(t) − g(t)| + |g(t) − h(t)|

Taking supremum both sides of the inequality and using the properties of the supremum function we have that

sup |f(t) − h(t)| = sup |f(t) − g(t) + g(t) − h(t)| ≤ sup |f(t) − g(t)| + sup |g(t) − h(t)|

This is equivalent to d(f, h) ≤ d(f, g) + d(g, h)

for all f, g, h ∈ C[a,b]. This metric is called the supremum metric i.e. sup metric or the maximum metric i.e max metric, since any continuous functions on a closed and bounded inter- val assumes minimum and maximum. This space is called the ”function space”, to emphasize that its elements are functions.

4 Note that d(f, g) is precisely the greatest vertical gap between the functions f and g.

Figure 1.1: sup metric

We also define on (C[a,b] a new metric ∫ b ρ(f, g) = |f(t) − g(t)|, t ∈ [0, 1]. a This is called the L1 metric. Here ρ(f, g) is precisely the area of the region which lies between the functions f and g, shown below.

Figure 1.2: L1 metric

∞ | 1 − 1 | ∈ Example 1.2 Let X = (0, ) and d(x, y) = x y for all x, y X. Prove that d is a metric on X.

Solution 1 1 ∈ ∞ Clearly x , y exist since x, y (0, ). | 1 − 1 | ≥ ∀ ∈ (i). d(x, y) = x y 0, a, y X. | 1 − 1 | ∈ (ii). d(x, y) = x y = 0 if and only if x = y for all x, y X is obvious.

5 | 1 − 1 | | 1 − 1 | ∈ (iii). d(x, y) = x y = y x = d(y, x), for all x, y X. (iv). The triangle inequality follows easily from

1 1 1 1 1 1 1 1 1 1 d(x, z) = − = − + − ≤ − + − = d(x, y) + d(y, z) x z x y y z x y y z for all x, y, z ∈ X. We need the following inequalities in order to define more metric spaces.

Example 1.3 Show that d(x, y) = | arctan x − arctan y| defines a metric on R.

Solution Clearly d(x, y) = | arctan x − arctan y| ≥ 0, for all x, y ∈ R. The function arctan t is strictly increasing on R, hence d(x, y) = 0 if and only if x = y. It is also clear that d(x, y) = d(y, x), for all x, y ∈ R . To prove that triangle inequality, we note that

d(x, y) = | arctan x − arctan y| = | arctan x − arctan z + arctan z − arctan y| ≤ | arctan x − arctan z| + | arctan z − arctan y| = d(x, z) + d(z, y).

1.3.1 Useful Inequalities

Definition 1.2 Two real numbers p > 1 and q > 1 are called conjugate exponents or Ho¨lder conjugates of each other if 1 1 + = 1. p q The case p = q = 2 gives a form of the Cauchy-Schwarz inequality.

Exercise 1.1 Show that for all x ≥ 0 and y ≥ 0 and for conjugate exponents p and q, the following inequality holds xp yq xy ≤ + . p q

6 1.3.2 Ho¨lder’s Inequality

1 1 Theorem 1.2 (Ho¨lder’s Inequality) Let p > 1 and q > 1 such that p + q = 1 and let

a1, a2, ..., an ≥ 0 and let b1, b2, ..., bn ≥ 0. Then

∑n ( ∑n ) 1 ( ∑n ) 1 ≤ p p q q aibi ai bi i=1 i=1 i=1 Note that there is another version of integrals. Proof. 1 1 Note that if a > 0, b > 0, p > 1, q > 1 with p + q = 1, then by Exercise 1.1 we have

ap bq + ≥ ab (1.1) p q

Substituting ai a = 1 p p p p (a1 + a2 + ... + an) and bi b = 1 q q q q (b1 + b2 + ... + bn) with i = 1, 2, ..., n successfully in (1.1) and adding the resulting inequalities we then obtain ( ) ( ) 1 ap + ap + ... p 1 bp + bp + ... q a b + a b + ... + a b 1 2 an + 1 2 bn ≥ 1 1 2 2 n n p p p p p q p p p 1 q q q 1 p a + a + ...an q b + b + ...bn p q 1 2 1 2 (a1 + a2 + ...an) (b1 + b2 + ...bn) and this gives the required results. Specials Cases When p = 2 in the H¨older’s inequality, the inequality is called the Cauchy-Schwarz inequality, sometimes also known as Cauchy-Bunyakovsky- Schwarz inequal- ity(CBS) (named after Cauchy who discovered it in 1821, Bunyakovsky who stated it in 1859 and Schwarz who restated it 1889 ). It is encountered in many different set- tings such as linear algebra, probability theory and other areas.

Note that equality holds in the H¨older’s inequality if and only if the ai are all zero or there is a number λ such that bi = λai, i.e., if the ai and bi are proportional.

7 1.3.3 Minkowski’s Inequality

Theorem 1.3 (Minkowski’s Inequality) If p > 1 is rational and a1, a2, ..., an ≥ 0 and b1, b2, ..., bn ≥ 0, then

( ) 1 ( ) 1 [ ] 1 p p p p q q q q ≥ p p p p a1 + a2 + ... + an + b1 + b2 + ... + bn (a1 + b1) + (a2 + b2) + ... + (an + bn)

That is ( ∑n ) 1 ( ∑n ) 1 ( ∑n ) 1 p p ≤ p p p p (ai + bi) ai + bi i=1 i=1 i=1 Proof. ∑ n p Let s = i=1(ai + bi) . Then ∑n ∑n p−1 p−1 s = ar(ar + br) + br(ar + br) r=1 r=1 Using the fact that

(a + b)p = a(a + b)p−1 + b(a + b)p−1 = (a + b)(a + b)p−1

and applying H¨older’s inequality to each term on the right hand side we have

( ∑n ) 1 ( ∑n ) 1 ( ∑n ) 1 ( ∑n ) 1 ≤ p p (p−1)q q p p (p−1)q q s ar (ar + br) + br (ar + br) r=1 r=1 r=1 r=1 That is ( ∑n ) 1 [( ∑n ) 1 ( ∑n ) 1 ) 1 ] ≤ p p p p p p q s (ar + br) ar + br r=1 r=1 r=1 since (p − 1)q = p. We thus have

[( ∑n ) 1 ( ∑n ) 1 ] 1 p p ≤ q p p s s ar + br r=1 r=1 which gives the required result. Special Cases When p = 2 in the Minkowski’s inequality, the inequality is known as the triangle inequality.

8 Theorem 1.4 (Triangle Inequality) Let x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) be elements in Rn. Then v v v u u u u∑n u∑n u∑n t 2 ≤ t 2 t 2 (xi + yi) xi + yi (1.2) i=1 i=1 i=1

Proof. We have ∑n ∑2 ∑n ∑n ∑n 2 2 2 2 2 (xi + yi) = (xi + 2xiyi + yi ) = xi + 2 xiyi + yi i=1 i=1 i=1 i=1 i=1 We apply the Cauchy-Schwarz inequality to the middle term on the right, obtaining v v u u ∑n ∑n u∑n u∑n ∑n 2 ≤ 2 t 2t 2 2 (xi + yi) xi + 2 xi yi + yi i=1 i=1 i=1 i=1 i=1

Thus v v u u n ( n n ) ∑ u∑ u∑ 2 2 ≤ t 2 t 2 (xi + yi) xi + yi i=1 i=1 i=1 which gives the required result.

Note that equality holds if and only if either all the xi are zero or there is a non-negative

number λ such that yi = λxi, for i = 1, 2, 3, ..., n.

Corollary 1.5 Let x = (x1, x2, ..., xn), y = (y1, y2, ..., yn) and z = (z1, z2, ..., zn) be elements of Rn. Then v v v u u u u∑n u∑n u∑n t 2 t 2 t 2 (xi − zi) ≤ (xi − yi) + (yi − zi) i=1 i=1 i=1

Proof

Setting ai = xi − yi and bi = yi − zi, for i = 1, 2, 3, ..., n, we see that the inequality reduces to (1.2). 4. The Euclidean distance in X = Rn, d : Rn × Rn defined by v u u∑n t 2 d(x, y) = (xk − yk) k=1

9 n n where x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) are points in R is a metric on R called the Euclidean metric on Rn. It is easy to prove that d is a metric on Rn. The first three properties of a metric are easy to verify. For the triangle inequality, apply the Minkowski inequality. n Let x = (x1, x2, ..., xn), y = (y1, y2, ..., yn) and z = (z1, z2, ..., zn) be three points in R and let ak = xk − yk, bk = yk − zk, k = 1, 2, ..., n. Then the triangle inequality takes the form v v v u u u u∑n u∑n u∑n t 2 t 2 t 2 (xk − zk) ≤ (xk − yk) + (yk − zk) (1.3) k=1 k=1 k=1

or equivalently v v v u u u u∑n u∑n u∑n t 2 ≤ t 2 t 2 (ak + bk) ak + bk k=1 k=1 k=1 From the Cauchy-Schwarz inequality

( n ) n n ∑ 2 ∑ ∑ ≤ 2 2 akbk ak bk k=1 k=1 k=1 Thus v v u u n ( n n ) ∑ u∑ u∑ 2 2 ≤ t 2 t 2 (ak + bk) ak + bk i=1 k=1 i=1 Taking square roots, we get the required result. Rn endowed with this metric is called the Euclidean n-space or n-dimensional Euclidean space. If n = 1, then d(x, y) = |x − y|, which is the Euclidean metric on R.

2 5. Let ℓ be the set of all infinite sequences x = (x1, x2, ..., xk, ...) of real numbers x1, x2, ..., xk, ... satisfying the convergence condition ∑∞ xk < ∞ k=1 where distance between points is defined by v u u∑∞ t 2 d(x, y) = (xk − yk) (1.4) k=1

10 Clearly (1.3) makes sense for all x, y ∈ ℓ2, since it follows from the elementary inequality

± 2 ≤ 2 2 (xk yk) 2(xk + yk)

that convergence of the two series ∑∞ ∑∞ 2 2 xk, yk k=1 k=1 implies that of the series ∑∞ 2 (xk − yk) . k=1

At the same time, we find that if the points x = (x1, x2, ..., xk, ...), y = (y1, y2, ..., yk, ...) both belong to ℓ2, then so does the point

(x1 + y1, x2 + y2, ..., xk + yk, ...)

The function (1.4) obviously has the first three properties of a metric. To verify the triangle inequality which takes the form v v v u u u u∑∞ u∑∞ u∑∞ t 2 t 2 t 2 (xk − zk) ≤ (xk − yk) + (yk − zk) (1.5) k=1 k=1 k=1

Note that all the three sequences in (1.5) converge. Moreover, the inequality (1.3) holds for all n. Taking the limit as n −→ ∞ in (1.3), we get (1.5), thereby verifying the triangle inequality in ℓ2. Therefore ℓ2 is a metric space.

6. Consider the space C[a,b] of all continuous functions on the closed interval [a, b], but this time define distance by ∫ ( b ) 1 d(f, g) = [f(t) − g(t)]2dt 2 (1.6) a insteadofthesupmetric.T hismetriciscalledthe

11 2 2 L -metric. The resulting metric space will be denoted by C[a,b]. The first three proper- ties of a metric are obvious, and the fact that (1.6) satisfies the triangle inequality is an immediate consequence of the Cauchy-Schwarz inequality for integrals ( ∫ ) ∫ ∫ b 2 b b f(t)g(t)dt ≤ x2(t)dt y2(t)dt a ∑ a a R3 { ≤ ≤ } 7. Imagine as a union of strips n = (x1, x2, x3): n x3 n + 1 , made by materials of different indices of refraction υn. The time t(A, B) needed for a light ray to go from A to B in R3 defines a metric on R3.

Figure 1.3: Time as a metric

1.3.4 Subspaces of a metric space

Suppose (X, d) is a metric space and A is a non-empty subset of X. If x, y ∈ A, d(x, y) is the distance between x and y in the metric space (X, d), and clearly d generates a notion of distance between points in the set A. However, (if A ≠ X), d is not a metric for A because a metric for A is a function on A × A while d is a function on X × X. To remedy this defect, we let dA be the restriction of d to A × A. Then it is easy to verify that dA is a metric on A called the relative metric induced by d on A. The metric space (A, dA) is called the subspace of (X, d) generated by A. Note that the distance between two points in (A, dA) is precisely the distance between them in (X, d).

1.4 Equivalent Metrics

From the examples we have seen so far, we see that a given set may become a metric

space in a variety of ways. Let X be a given set and suppose that (X, d1) and (X, d2)

12 are metric spaces. We define the metrics d1 and d2 as equivalent, denoted by d1 ∼ d2 if there are strictly positive constants c1 and and c2 such that

c1d1(x, y) ≤ d2(x, y) ≤ c2d1(x, y) for all x, y ∈ X.

Example 1.4 In Rn, the metrics v u u∑n t 2 d1(x, y) = (xi − yi) i=1 and

d2(x, y) = max |xi − yi|, 1≤i≤n n where x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) ∈ R are equivalent.

Solution We can find j ∈ {1, 2, ··· , k} such that

d2(x, y) = max1≤i≤n |xi − yi|

= |xj − yj|

√ 2 = |xj − yj|

√∑ ≤ k | − |2 i=1 xi yi

= d1(x, y)

√ { } ∑ 2 ≤ k | − | i=1 max1≤i≤n xi yi

√ { } ∑ 2 k = i=1 d2(x, y)

√ = kd2(x, y)

13 That is √ d2(x, y) ≤ d1(x, y) ≤ kd2(x, y).

This proves that d1 and d2 are equivalent metrics.

Example 1.5 In Rn, the metrics

∑n ρ(x, y) = |xi − yi| i=1 (called the taxicab metric because, in the plane, the distance from x to y is the sum of the lengths of a horizontal segment and a vertical segment ”streets” joining x and y), and

d2(x, y) = max |xi − yi|, 1≤i≤n n where x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) ∈ R are equivalent.

Solution We can find j ∈ {1, 2, ··· , k} such that

d2(x, y) = max1≤i≤n |xi − yi|

= |xj − yj|

∑ ≤ n | − | i=1 xi yi

= ρ(x, y)

∑ ≤ k | − | i=1 max1≤i≤n xi yi

= k.d2(x, y)

That is

d2(x, y) ≤ ρ(x, y) ≤ k.d2(x, y).

This proves the claim. 

14 Figure 1.4: Taxicab or Manhattan metric

Remark 1.2 Using Examples 1.4 and 1.5 we can show that the following metrics are equivalent. ∑ n | − | ρ(x, y) = i=1 xi yi

√∑ n − 2 d1(x, y) = i=1(xi yi)

d2(x, y) = max1≤i≤n |xi − yi|

n where x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) ∈ R .

Solution We can find j ∈ {1, 2, ··· , k} such that

d2(x, y) = max1≤i≤n |xi − yi|

= |xj − yj|

∑ ≤ n | − | i=1 xi yi

= ρ(x, y)

∑ ≤ k | − | i=1 max1≤i≤n xi yi

= k.d2(x, y)

15 Analogously, with the same ”maximal” j,

d2(x, y) = max1≤i≤n |xi − yi|

= |xj − yj|

√ 2 = |xj − yj|

√∑ ≤ k | − |2 i=1 xi yi

= d1(x, y)

√ { } ∑ 2 ≤ k | − | i=1 max1≤i≤n xi yi

√ { } ∑ 2 k = i=1 d2(x, y)

√ = kd2(x, y) That is √ d2(x, y) ≤ d1(x, y) ≤ kd2(x, y).

A simple squaring shows that d1(x, y) ≤ ρ(x, y). This means that

d2(x, y) ≤ d1(x, y) ≤ ρ(x, y) ≤ k.d2(x, y) 

Definition 1.3 Let X and Y be sets. A one-to-one mapping f of X onto Y is called a homeomorphism between X and Y if f is continuous and the mapping f −1 inverse to f is also continuous.

The spaces X and Y are said to be homeomorphic if such a homeomorphism exists.

Definition 1.4 Let (X, d) and (Y, ρ) be metric spaces. An isometry f :(X, d) −→ (Y, ρ) is a bijection which preserves distances. That is d(p, q) = ρ(f(p), f(q)), for all p, q ∈ X.

16 If such an isometry exists between (X, d) and (Y, ρ), we say that (X, d) is isometric to (Y, ρ).

Theorem 1.6 If (X, d) is isometric to (Y, ρ), then (X, d) is also homeomorphic to (X, d) to (Y, ρ).

The converse of Theorem 1.6 is not generally true. Two metric spaces can be homeo- morphic but not isometric.

Example 1.6 Let X be a non-empty set. Define two metrics on X as follows: { 1, x ≠ y d1(x, y) = 0, x = y

and { 2, x ≠ y d2(x, y) = 0, x = y

Assume X and Y have the same cardinality, greater than one. Then (X, d) and (Y, ρ)

are not isometric since distances between points in each space are different. But both d1 and d2 induce the discrete topology and two discrete spaces with the same cardinality are homeomorphic, so (X, d) and (Y, ρ) are homeomorphic. Similarly, if we consider the metric space X = (0, 1) and Y = (0, 2) both endowed with the usual metric on the real line. The function f : X −→ Y defined by f(x) = 2x x ∈ (0, 1) is a homeomorphism but not an isometry since X has diameter 1 and Y has

diameter 2, and hence X and y cannot be isometric. Clearly, two metrics d1 and d2 are

equivalent if the identity mapping of (X, d1) onto (X, d2) is a homeomorphism. Thus two metrics are equivalent if and only if they define the same open sets, that is, if a set is open with respect to one whenever it is open with respect to the other. Equivalently,

two metrics d1 and d2 are equivalent if xn → x in (X, d1) if and only if xn → x in

(X, d2).

17 1.5 Exercises

1. (a). Let X = R and define d(x, y) = sin2(x − y) for all x, y ∈ R. Is d a metric on R? Give a reason for your answer. (b). Show that d(x, y) = |ex − ey|, is a metric on R.

(c). Let Mn denote the set of n × n matrices. Define a function d : Mn × Mn −→ R by

d(A, B) = rank(A − B), A, B ∈ Mn.

Prove that d is a metric on Mn that is equivalent to to the discrete metric. (c). Put a metric d on W={all the words in a dictionary} by defining the distance between two distinct words to be 2−n if the words agree for the first n letters and are different at the (n + 1) letter. For example d(car, cart) = 2−3 and d(car, call) = 2−2. (i). verify that this is a metric on W .

(ii). Suppose that words w1, w2 and w3 are listed in alphabetical order. Find a formula for d(w1, w3) in terms of d(w1, w2) and d(w2, w3). n 2. Let X = R and define d(x, y) = max{|xk − yk| : k = 1, 2, 3, ..., n} where x =

(x1, x2, ..., xn) and y = (y1, y2, ..., yn) are in X. Show that (X, d) is a metric space. 3. Let d be a metric on X and M > 0. Define d(x, y) ρ(x, y) = 1 + d(x, y) and τ(x, y) = min{M, d(x, y)}

for all x, y ∈ X. Show that ρ and τ are also metrics on X which give rise to the same topology. 4. Given a metric space (X, d), prove that (a). |d(x, z) − d(y, u)| ≤ d(x, y) + d(z, u), for x, y, z, u ∈ X. (b). |d(x, z) − d(y, z)| ≤ d(x, y), for x, y, z ∈ X. 5. Show that the Euclidean metric is equivalent to the following metrics.

∑n d(x, y) = |xi − yi| (the taxicab metric or Manhattan metric) i=1

18 { }

ρ(x, y) = max1≤i≤n |xi − yi| 6. In Rn, define the metrics

d1(x, y) = |x − y|

√∑ n − 2 d2(x, y) = i=1(xi yi)

{| − |} d∞(x, y) = sup1≤i≤n xi yi

Show that d1, d2 and d∞ are equivalent to each other. 2 7. Show that (R , d2) is a metric space, where ∑n d2(x, y) = |xi − yi|, i=1

where x = (x1, x2, ..., xn), y = (y1, y2, ..., yn).

Is d2 is equivalent to

d(x, y) = max {|xi − yi|} 1≤i≤n defined on Rn?

8. For x, y ∈ R, define d4(x, y) = |x − 3y|. Is (R, d4) a metric space? Give a reason for your answer. 9. Let C be the subset of R2 consisting of pairs (cos θ, sin θ) for 0 ≤ θ < 2π. Define

d(p1, p2) = |θ1 − θ2|,

where p1 = (cos θ1, sin θ1), p2 = (cos θ2, sin θ2). Show that (C, d) is a metric space. 10. If d : X × X −→ R is a function with the following properties (ii). d(x, y) = 0 if and only if x = y. (iii). d(x, y) = d(y, x) for all x, y ∈ X. (iv). d(x, y) + d(y, z) ≥ d(x, z) for all x, y, z ∈ X, show that d is a metric on X. [Hint: set z = x in (iv) and use (iii) and (ii) to get 2d(x, y) = d(x, y) + d(y, x) ≥ d(x, x) = 0, so that d(x, y) ≥ 0]

11. Suppose that {ρi : i ∈ I} is a family of metrics for set X. Show that

σ(x, y) = sup ρ(x, y) ∀ x, y ∈ X

19 is a new metric on X (possibly taking the value ∞, of course.) 12. Let X be a non-empty set and ρ : X × X −→ R+ be a function with the following properties: (i). ρ(x, y) ≥ 0, for all x, y ∈ X. (ii). ρ(x, y) = 0 if and only if x = y. (iii). ρ(x, y) + ρ(y, z) ≥ ρ(x, z) for all x, y, z ∈ X. Show that if we set d(x, y) = ρ(x, y) + ρ(y, x),

then (X, d) is a metric space. 13. Codes metric Let X be a set that we think of as a set of symbols, and let Xn = X × X × X × · · · × X, the space of ordered words on n symbols. Given that two n words x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) ∈ X , let

d(x, y) = ♯{i : xi ≠ yi}

be the number of bits in x and y that are different. For instance if x = (c, a, r) and y = (c, a, t), then d(x, y) = 1. Show that d defines a metric on Xn. 14. Show that d(x, y) = |x − y|2 is not a metric on R. 15. Let S be the space of all sequences of real numbers. Show that the function d : S × S −→ R given by ∞ ∑ 1 |x − y | d(x, y) = n n , 2n 1 + |x − y | n=1 n n

where x = {xn}, y = {yn}, is a metric space on S. 16. Let N be the set of natural numbers and P(N) denote the collection of all subsets of N. Define the distance between A, B ∈ P(N) to be   0, if A = B d(A, B) = { 1 } ̸  , if A= B min (A−B)∪(B−A)

P N (a). Show that d is a metric on{ ( ). } (b). Show that d(A, C) ≤ max d(A, B), d(B,C) .

20 [Hint:(A − C) ⊂ (A − B) ∪ (B − C)]. (c). Show that d(N − A, N − B) = d(A, B).

17. Prove that if d1 and d2 are metrics on a set X, then d1 + d2 and max{d1, d2} are

d1 also metrics on X. Are the functions min{d1, d2}, and d1d2 metrics? d2 × −→ R+ 7−→ 18(. Prove) that if d : X X is a metric on X, then the function (x, y) f d(x, y) is a metric on X if f satisfies the following conditions: (1). f(0) = 0. (2). f is a monotonic increasing function, and (3). f(x + y) ≤ f(x) + f(y), for any x, y ∈ R.

21 Chapter 2

STRUCTURE OF METRIC SPACES

2.1 Topology of a Metric Space

From an intuitive viewpoint we frequently think of a metric space as Euclidean space of one, two or three dimensions. However, the definitions and theorems apply to all metric spaces, many of which are removed from ordinary Euclidean space. Having provided more mathematical structures to the original notion of a set by giving it a metric or distance function, we are now able to discuss more concepts. For example, we are able to give sense to the idea of ”closeness” between points and sets of points. The structural properties of metric spaces stem from the notion of an open neighborhood(nbhd),open ball or an open sphere, with the aid of which we shall be able to introduce open and closed sets, interior, closure and limit(accumulation) points. These open sets are useful: they generate convergence and continuity of sequences and functions. The topology

τX ⊂ P(X) of a metric space X is the family of of its open subsets.

2.1.1 Open Balls and Closed Balls in a Metric Space

Most of the properties of metric space we shall study will be definable in terms of open and closed balls.

Definition 2.1 Let (X, d) be a metric space and let x ∈ X and r > 0. By an open ball or open sphere centered at x radius r, denoted by B(x,r) we mean the set of points

22 y ∈ X satisfying the inequality d(x, y) < r. That is

B(x, r) = {y ∈ X : d(x, y) < r}

The fixed number x is called the center of the ball, and the number r is called its radius. An open ball or open sphere of radius ϵ is also called an open ϵ-ball center x,

ϵ-neighborhood of x, and is denoted by Nϵ(x) or N(x, ϵ). If precision is not required, we simply call it a neighborhood of x or a sphere.

Definition 2.2 Let (X, d) be a metric space and let x ∈ X and r > 0. By a closed ball or closed sphere centered at x radius r, denoted by B[x,r] we mean the set of points y ∈ X satisfying the inequality d(x, y) ≤ r. That is

B[x, r] = {y ∈ X : d(x, y) ≤ r}

The essential property of a ball is that it contains a ”solid” portion of the space near x. Examples of Open Balls

1. Let de be the Euclidean metric on R. The open ball B(x, r) in the Euclidean space

(R, de) is the open interval (x-r,x+r).

Figure 2.1: Open Ball B(x, r) in (R, de)

23 2 2. The open ball B(x, r) in the Euclidean space (R , de), where de denotes the Euclidean 2 metric in R is the open disc centered at x = (x1, x2), radius r in the usual sense.

2 Figure 2.2: Open Ball B(x, r) in (R , de)

3 3. The open ball B(x, r) in the Euclidean space (R , de), where de denotes the Euclidean 3 metric in R is the open sphere centered at x = (x1, x2, x3), radius r in the usual sense.

3 Figure 2.3: Open Ball B(x, r) in (R , de)

Remark 2.1 Different choices of metrics in a given space X result to different open balls. In metric spaces other than Euclidean, the shape of an open ball may be quite surprising to our usual way of their perception.

4. Consider the open ball B(x, r) in the space R2 equipped with the supremum metric { }

ρ(x, y) = max |x1 − y1|, |x2 − y2| i=1,2

24 It is easy to see that an open ball in (R2, ρ) is of square shape and that the correspond- 2 ing open ball Be(x, r) with respect to the Euclidean metric in R given in Example 2 is inscribed in the square.

2 2 Figure 2.4: Open Balls Bρ(x, r) and Bϵ(x, r) in (R , ρ) and (R , de)

For instance, the open ball B((0, 0), 1) in the space R2 with this metric is shown below.

{ } 2 Figure 2.5: Open Ball Bρ((0, 0), 1) in (R , ρ) with ρ(x, y) = max |x1 − y1|, |x2 − y2|

Note that the four sides forming the boundary of the boundary of Bρ((0, 0), 1) are not part of the open ball. In summary if we consider the three metrics in R2

(a) d(x, y) = max{|x1 − y1|, |x2 − y2|} (b) d (x, y) = |x − y | + |x − y | 1 √ 1 1 2 2 2 2 (c) d2(x, y) = (x1 − y1) + (x2 − y2)

25 2 where x = (x1, x2) and y = (y1, y2) are in R , the open balls are shown below.

Figure 2.6: Open Balls B(x, r) in R2 corresponding to the metrics (a), (b) and (c) above

In three dimensions, the corresponding possibilities are a cube of edge 2r, an octahedron √ of edge r 2, or a spherical ball of radius r (or ball bounded by the sphere center at x, radius r > 0) in each case centered at x as shown in the figure below(where the open balls are the given figures without their ”skins”).

(a) d(x, y) = max{|x1 − y1|, |x2 − y2|, |x3 − y3|} (b) d (x, y) = |x − y | + |x − y | + |x − y | 1 √ 1 1 2 2 3 3 2 2 2 (c) d2(x, y) = (x1 − y1) + (x2 − y2) + (x3 − y3)

Figure 2.7: Open Balls B(x, r) in R3 corresponding to the metrics (a), (b) and (c) above

26 5. Let (X, d) be a discrete metric space where d is the discrete metric. For any x ∈ X, an open ball centered at x, radius r is given by { {x}, r ≤ 1 B(x, r) = {y ∈ X : d(x, y) < r} = X r > 1

For instance B(x, 1) = {x} and B(x, 2) = X.

6. Let (C[a,b], d) be the metric space of continuous functions on the closed interval [a, b], where d is the sup metric defined by

d(f, g) = sup{|f(t) − g(t)| : t ∈ [a, b]}

An open ball

B(f, r) = {g ∈ C[a,b] : |f(t) − g(t)| < r} = {(t, y): t ∈ [a, b], y ∈ R, |y − f(t)| < r} is the family of all continuous functions with graphs in the tubular neighborhood of radius r of the graph of f as shown below.

Figure 2.8: Open Ball B(f, r) in (C[a,b], d) where d(f, g) = sup{|f(t) − g(t)| : t ∈ [a, b]}

Remark 2.2 It is worth noting that despite the suggestive language, the open balls of a metric space (X, d) need not be either round nor convex.

Recall that two metrics d1 and d2 are (topologically) equivalent if they have the same topology,i.e., the same family of open sets.

27 The following proposition yields necessary and sufficient conditions in order that the the

two metrics d1 and d2 are (topologically) equivalent.

Proposition 2.1 Let d1 and d2 be two metrics on X and let B1(x, r) and B2(x, r) be the corresponding open balls of center x and radius r > 0. The following claims are equivalent.

(a). d1 and d2 are (topologically) equivalent.

(b). every ball B1(x, r) is open i for d2 and every open ball B2(x, r) is open for d1.

(c). for all x ∈ X and r > 0 there are rx, ρx > such that

B2(x, rx) ⊂ B1(x, r)

and

B1(x, , ρx) ⊂ B2(x, r)

(d). the identity map i : X −→ X is a homeomorphism ( a one-to-one continuous map whose inverse is also continuous) between the metric spaces (X, d1) and (X, d2).

2.2 Interior points, Isolated Points and Open sets in a Metric Space

Definition 2.3 Let (X, d) be a metric space and A be a subset of X. A point x ∈ A is called an interior point of A if x has an open ball B(x, r) properly contained in A. That is B(x, r) ⊂ A. That if there exists an r > 0 such that B(x, r) ⊂ A.

The set or collection of all interior points of a set is called the interior of A, and is denoted by in(A) or A◦. Clearly

int(A) = {x ∈ A : x is an interior point}

Clearly int(A) ⊆ A. We say that a subset of a metric space X is a neighborhood of x if x is interior to A. The most commonly used neighborhoods of a point are the open balls B(x, r), but it is clear that any set larger than a neighborhood of x is itself a neighborhood of x. Neighborhoods can frequently play the same role as balls.

28 Definition 2.4 A subset A ⊆ X is said to be open if every point of A is an interior point. That is, for every x ∈ A there is an open ball B(x, r) such that B(x, r) ⊂ A. That is, if and only if it is a neighborhood of each of its points.

Note that int(A) is an open set.

Definition 2.5 Let (X, d) be a metric space and A ⊆ X. A point x ∈ A is called an of A if there is an open ball of x containing no points of A other than x itself. That is if {x} is an open set. A space X is said to be discrete if and only if all its points are isolated. A set A without isolated points is called perfect. Note that every point of a discrete set is isolated.

If N is taken as a space with the usual metric in R it is discrete. So too is the space { 1 ∈ N} A = n : n . Note that a set of isolated points needs not be necessarily discrete. That is

Discrete =⇒ Isolated

but the converse is not generally true.

Example 2.1 Let A = {x ∈ R : 1 ≤ x ≤ 4}∪{6, 9}. It is clear that 2 ∈ int(A), int(A) = (1, 4) and 6 and 9 are isolated points of A.

Example 2.2 Let A = {x ∈ R : 1 < x < 5}. It is clear that A is an open set.

Example 2.3 Let A = {x ∈ R : 1 < x ≤ 5} ⊂ (R, de). It is clear that A is not an open set. This is because 5 ∈ A but 5 is not an interior point. That is, there is no open ball B(5, r) however small r is such that B(5, r) ⊂ A. This open ball, will contain points not in A, however small r is.

Example 2.4 Let X be a nonempty set. Consider the function d : X ×X −→ R defined by { 2, if x ≠ y d(x, y) = 0, if x = y

Observe that Bd(z, 1) = {z}; so singleton sets are open and d induces the discrete topol- ogy on X. Accordingly, d is equivalent to the trivial discrete metric on X, which also induces the discrete topology.

29 2.2.1 Examples of Open Sets

The simplest examples of an open set are X and ∅. A more useful observation is that every open ball is an open set.

Theorem 2.2 Let (X, d) be a metric space. Every open ball B(x, r) ⊂ X is an open set.

Proof

Let B(x, r) be an open ball in (X, d). Let x1 ∈ B(x, r). Then r − d(x, x1) > 0. Take

r1 = r − d(x, x1) and show that B(x1, r1) ⊂ B(x, r). For every z ∈ B(x1, r1), by the triangle inequality

d(x, z) ≤ d(x, x1) + d(x1, z) < r − r1 + r1 = r.

Thus d(x, z) < r. This proves that z ∈ B(x, r). But z was picked arbitrarily. This proves that

B(x1, r1) ⊂ B(x, r).

Hence B(x, r) is an open set.

Figure 2.9: Open ball as an open set

Note that every open interval (a, b) on the real line equipped with the Euclidean metric is an open set.

Theorem 2.3 Let (X, d) be a metric space. The following statements are true. (a). Arbitrary union of open sets is an open set. (b). Finite intersection of open sets is an open set.

30 Proof

(a). Let {Ak : k ∈ I} be an indexed family of open sets in a metric space (X, d). Let ∪ A = Ak k∈I

If x ∈ A, then there is an index i such that x ∈ Ai. Since Ai is open, there is an r > 0 such that ∪ B(x, r) ⊂ Ai ⊆ Ak = A k∈I

That is ∪ B(x, r) ⊂ A = Ak ∈ ∪ k I Therefore A = k∈I Ak is open.

(b). Let A1,A2, ..., An be open sets in a metric space (X, d). Let ∩n A = Ai. i=1

If x ∈ A, then x ∈ Ai, for each i = 1, 2, 3, ..., n. It follows that there are r1, r2, ..., rn such that

B(x, ri) ⊂ Ai, i = 1, 2, ..., n

Let

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

Then obviously, B(x, r) ≠ ∅ and B(x, r) ⊂ Ai, i = 1, 2, 3, ..., n. Thus ∩n B(x, r) ⊂ A = Ai i=1 ∩ n  Therefore A = i=1 Ai is open.

Remark 2.3 The intersection of more than finitely many number of open sets in a metric space need not be open. That is, arbitrary intersection of open sets in a metric space need not be open. The reason is that in the proof of Theorem 2.2 (b) above r =

min{ri : i ∈ I} can be zero in which case we are talking of the point {x}, which is not open in the Euclidean metric.

31 ( ) − 1 1 R Example 2.5 Let An = 1 n , 1 + n in ( , de), where de denotes the usual or the Euclidean metric on R. Then ∩∞ Ai = {1}, i=1 which is not open in (R, de).

Example 2.6 Let (X, d) be a discrete metric space. Then any singleton set {x} for any x ∈ X and the entire set X are open sets. In addition, the empty set ∅ is also an open set. In general, in a discrete metric space every subset is an open set, since it is a union of one-point sets or singletons, all of which are open by Theorem 2.2.

Specifically, in R endowed with the discrete metric, all singletons are open sets. But in

R endowed with the Euclidean metric de, these sets are not open.

Example 2.7 Let A and B be subsets of a metric space (X, d). Prove that (a). int(A ∩ B) = int(A) ∩ int(B). (b). int(A) ∪ int(B) ⊆ int(A ∪ B).

Solution (a). Let x ∈ int(A ∩ B). Then there is an open ball B(x, r), centered at x with radius r > 0 such that B(x, r) ⊂ A ∩ B. This implies that B(x, r) ⊂ A and B(x, r) ⊂ B. That is, x is an interior point of A and x is an interior point of B. That is x ∈ int(A) and x ∈ int(B). This implies that x ∈ int(A) ∩ int(B). Therefore

int(A ∩ B) ⊆ int(A) ∩ int(B) (∗)

Conversely, suppose x ∈ int(A) ∩ int(B). Then x ∈ int(A) and x ∈ int(B). Therefore there exist open balls B(x, r1) ⊂ A and B(x, r2) ⊂ B. Let

r = min{r1, r2}

Then B(x, r) ⊂ A ∩ B. That is x ∈ int(A ∩ B). Therefore

int(A) ∩ int(B) ⊆ int(A ∩ B) (∗∗)

From (*) and (**), equality follows.

32 (b). Let x ∈ int(A) ∪ int(B). Without loss of generality(WLOG), let x ∈ int(A). Then there exist an open ball B(x, r) ⊂ A ⊆ A ∪ B. Hence x ∈ int(A ∪ B). Similarly, let x ∈ int(B). Then there exist an open ball B(x, r) ⊂ B ⊆ A ∪ B. Thus x ∈ int(A ∪ B). Therefore int(A) ∪ int(B) ⊆ int(A ∪ B).

Exercise 2.4 Let A be subset of a metric space (X, d). Prove that A is open if and only if A = int(A).

Remark 2.4 Note that the interior of relatively large sets may be empty. For instance int(R − Q) = int(Q{) = ∅. Similarly, int(Q) = ∅.

2.3 Limit Points, Closure Points and Closed Sets in a Metric Space

Definition 2.6 Let (X, d) be a metric space and A be subset of X. A point x ∈ X is called a closure point of A if every open ball B(x, r) centered at x with radius r > 0 contains at least one element of A (including x if x ∈ A). We will also say that x ∈ X is a closure point of A ”if every open ball B(x, r) centered at x with radius r > 0 meets A”. That is, B(x, r) ∩ A ≠ ∅. A closure point of A is also called a contact point of A. We also say that x is adherent to A or x adheres to A.

The set of all closure points of a set or the set of all points adherent to A is called the closure of A and is usually denoted as A. Obviously, A ⊆ A. Note that a closure point of a set A may or may not belong to A.

Definition 2.7 Let (X, d) be a metric space and A be subset of X. A point x ∈ X is called a of A if every open ball B(x, r) centered at x with radius r > 0 contains infinitely many points of A.

If A is a subset of a metric space (X, d), a point x ∈ X is said to be a cluster point or accumulation point of A if and only if x adheres to A − {x}, called a deleted neighborhood. That is, if B(x, r) ∩ A − {x} ̸= ∅.

33 That is, the set B(x, r) ∩ A contains at least one point of A other than x. That is, if if and only if every deleted neighborhood of x contains a point in A. ′ The set of all limit points of A, is called the derived set of A and is denoted by A or D(A). A set A without limit/accumulation points is called discrete(see previous section). That ′ is if A = ∅. ⊙ Note that a limit point of a set A may or may not belong to A. ⊙ Every point of A adheres to A. ⊙ Every limit point is a closure point but a closure point need not be a limit point. ′ That is A ⊆ A. ⊙ The set of isolated points I(A) is the set of adherent/closure points that are not limit ′ points of A. That is, I(A) = A − A ⊆ A. A necessary and sufficient condition for x to be an adherent to A is that every open ball about x of radius r > 0, meets A; in symbols

B(x, r) ∩ A ≠ ∅.

Example 2.8 Let A = {x ∈ R : 1 ≤ x < 4} ∪ {6}. Clearly 6 is a closure point(since B(6, r) contains 6 for all r > 0) but it is not a limit point of A. 6 is an isolated point of A.

It is now clear that a closure point is either a member of A or a limit point of A and may not belong to A. Intuitively, a limit point of a set A ⊂ X is a point in X which can be approximated by ′ points of A other than x. Clearly, A = A ∪ A . That is

A = A ∪ {x : x is a limit point of A}.

Example 2.9 Let (X, d) be a metric space and A be subset of X. The set A is said to be closed if it contains all its limit points.

⊙ Note that A is a . ⊙ Sets A for which A = A are closed sets.

34 Example 2.10 Let A = {x ∈ R : 0 ≤ x ≤ 5} ∪ {7, 8, 9} and B = {x ∈ Q : 0 ≤ x ≤ 1}

be subsets of (R, de), where de denotes the Euclidean metric on R. Note that every point of [0, 1], rational or not is a limit point of B. Clearly A is closed and A = {x ∈ R : 0 ≤ x ≤ 5} ∪ {7, 8, 9} while B is not closed, since it does not contain all its limit points. It is easy to show that B = {x ∈ R : 0 ≤ x ≤ 1} = [0, 1].

Theorem 2.5 In any metric space (X, d) the empty set ∅ and the entire set X are examples of closed sets.

Proof The empty set has no limit points, so it contains them all and is therefore closed. Since the full space X contains all points, it automatically contains its own limit points and thus is closed.

Theorem 2.6 Let (X, d) be a metric space. A subset A of X is closed if and only if A{ is open.

Proof Assume A is closed. We show that A{ is open. If A{ = ∅, then it is open by a previous remark. Let x ∈ A{. Since A is closed, and x ̸∈ A, x is not a limit point of A. Since x ̸∈ A and x is not a limit point of A, there is an open ball B(x, r) such that B(x, r) ∩ A = ∅. Clearly B(x, r) ⊂ A{, and since x was arbitrarily chosen as a point of A{, A{ is open. 

Theorem 2.7 The derived set of finite set in a metric space is empty.

Proof Left as an exercise.

Theorem 2.8 Let (X, d) be a metric space. Then the following statements are true. (a). Arbitrary intersection of closed sets is a closed set. (b). The union of a finite number of closed sets is a closed set.

Proof

(a). Let {Fα : α ∈ I} be an indexed family of closed sets, where I is an indexing set. Let x be a limit point of the intersection ∩ F = Fα. α∈I

35 Then any open ball B(x, r) centered at x with radius r > 0 of x contains infinitely many points of F , and hence contains infinitely many points of each Fα. Therefore x is a limit point of each Fα and hence belongs to each Fα (because Fα is closed and hence each must contains all its limit points). It follows that x ∈ F , and hence F is itself closed.

(b). Let ∪n F = Fn i=1 be the union of a finite number of closed sets Fn. We want to prove that if x is a limit point of F then x ∈ F . Suppose x does not belong to any of the sets F . Then x does not belong to any of the sets Fi and hence x cannot be a limit point of any of the Fi.

But then for every i there is an open ball B(x, ri), ri containing no more than a finite

number of points of Fi. Choosing

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

we get an open ball B(x, r) containing no more than a finite number of points of F , so that x cannot be a limit point of F . ∪ ̸∈ n This proves that a point x F cannot be a limit point. Hence F = i=1 Fn must contain all its limit points and is therefore a closed set. 

Alternative Proof We can use De Morgan’s laws to prove this result. ∩ { (a). Fα closed subsets of X. Let F = α∈I Fα. We know that F is closed if F is open by Theorem 2.5. But ∪ { { F = Fα α ∩ { is open by Theorem 2.2, since each Fα is open. Hence F = α∈I Fα must be closed.

(b). is proved similarly. Let F1,F2, ..., Fn be closed sets and ∪n F = Fn. i=1 { Then Fi is open. But ∩n { { F = Fn i=1

36 is a finite intersection of open sets, which is open by Theorem 2.2. Applying Theorem 2.5, we have that ∪n F = Fn i=1 must be closed. 

Remark 2.5 Note that an infinite union of closed sets need not be closed. For consider the family of closed sets {[ ] } 1 − n n − 1 F = , : n = 1, 2, ··· n n n of R endowed with the usual metric. Then for any k ∈ N,

∪k Fn n=1

is closed, but ∪ ∪ {[ ] ∞ ∞ 1−n n−1 n=1 Fn = n=1 n , n

∪ {[ ] ∞ 1 − − 1 , = n=1 n 1, 1 n

= (−1, 1) which is open.

2.3.1 Examples of Closed Sets

1. Note that every closed interval [a, b] is a closed set. 2. Every closed ball B[x, r] is a closed set.

3. The set of all functions f ∈ C[a,b] such that f(t) ≤ k, k a constant is a closed set.

4. Any set consisting of a finite number of elements or points is closed in (X, de), where de denotes the Euclidean metric. 5. In a discrete metric space (X, d), every subset is simultaneously open and closed (clopen). Recall that in a discrete metric space B(x, 1) = {x}. Interestingly, the closure of this open ball is B(x, r) = X for every x. (Moral: B(x, r) is not necessarily the closure of B(x, r)).

37 In general, for any set X, with the discrete metric

B(x, r) = {x} if r ≤ 1 B[x, r] = {x} if r < 1 B[x, r] = X if r = 1 B(x, r) = B[x, r] = X if r > 1

Proposition 2.9 Let (X, d) be a metric space. For an subset A of X, A is the smallest closed set containing A.

Proof Let B be an arbitrary closed set such that A ⊆ B. We need to prove that B{ ⊆ (A){. Since B is closed, B{ is open by Theorem 2.4. Hence, for each x ∈ B{, there is an open ball B(x, r) ⊂ B{. This implies that

B(x, r) ∩ B = ∅

and B(x, r) ∩ A = ∅

since A ⊆ B. Thus x ̸∈ A (by definition of closure), which is equivalent to x ∈ (A){. Therefore we have proved that x ∈ B{ =⇒ x ∈ (A){

Equivalently, B{ ⊆ (A){

We have shown that A ⊆ A ⊆ B and that A is the smallest closed set containing A.

Theorem 2.10 If (X, d) is the discrete metric space, then every subset is both open and closed.

Proof ⊂ ∈ ∈ { 1 { } ∈ Let A X and X A and y A . On the one hand, since B(x, 2 ) = x and x A, 1 ⊂ then B(x, 2 ) A. Therefore x is an interior point of A and thus A is open. 1 { } ∈ { 1 ⊂ { On the other hand, since B(y, 2 ) = y and y A , then B(y, 2 ) A . Therefore y is an interior point of A{ and thus A{ is open. This also proves that A is closed by Theorem 2.4. 

38 Theorem 2.11 Let (X, d) be a metric space. A subset A of X is closed if and only if A = A.

Proof (⇐=) Assume A = A. Then A is closed since A is always a closed set. (=⇒) Conversely, assume A is closed. Then every limit point of A belongs to A. That is x a limit point of A implies that x ∈ A. That is

x ∈ A =⇒ x ∈ A

This shows that A ⊆ A (2.1)

But the inclusion A ⊆ A (2.2)

is obvious. From (2.1) and (2.2), we have that A = A. 

Example 2.11 Prove that Q and Q{ are neither open nor closed.

Solution It is known that each irrational number x is a limit point of a sequence of rational numbers. Therefore, there is no open ball B(x, r), which does not contain rational points. Hence Q{ is neither closed nor open. Q cannot be open since otherwise every rational number x could be a center of an open ball containing just rational numbers. This is not possible, by the Density Theorem.

Example 2.12 Let A and B be subsets of a metric space (X, d). Prove that (a). A ∪ B = A ∪ B. (b). A ∩ B ⊆ A ∩ B.

Remark 2.6 Note that the closure of relatively small sets may be the entire set. For instance, Q = R and Q{ = R.

39 2.4 Subsets and Relative Topology

Let (X, d) be a metric space and Y ⊆ X. Then (Y, d) is a metric, too. The family of open sets in Y induced by the metric d is called the relative topology of Y . We want to compare the topology of X and the relative topology of Y .

The open ball in Y with center x ∈ Y and radius r > 0 is

BY (x, r) = {y ∈ Y : d(y, x) < r} = BX (x, r) ∩ Y

Figure 2.10: Open ball in Y

40 2.4.1 Relatively Open and Relatively Closed Subsets of Metric Spaces

One of the reasons for studying topological or metric concepts is to enable us to study properties of continuous functions. In most instances, the domain of a function f : X −→ Y is not all of X, but rather a proper subset of X. When discussing a particular function we will always restrict to our attention to the domain of the function rather than all of X. With this in mind, we make the following definition.

Definition 2.8 Let A be a subset of X. (a). A subset U of A is open in(or relatively open or open relative to) A if for every x ∈ U, there is an r > 0 such that B(x, r) ∩ A ⊂ U. (b). A subset C of A is closed in(or relatively closed or closed relative to) A if A − C or C{ is open in X.

When we say that A ⊆ B ⊆ X is open (or closed), it makes a difference whether we mean as a subset of B as a subset of X(the ambient space). For example, the set Q of rational numbers is closed as a subset of Q, but not as a subset of R.

Example 2.13 Let A = [0, ∞) and U = [0, 1) in (R, de), where de denotes the Euclidean metric on R. Then U is not open in R but is open in A since ∀x ∈ [0, 1),

B(x, r) ∩ [0, ∞) ⊂ [0, 1)

The following theorem provides a simple characterization of what it means for a set to be open or closed in A ⊂ X.

Theorem 2.12 Let (X, d) be a metric space and let Y ⊆ X. (a). A subset B of Y is open in Y if and only if B = Y ∩ A, for some open subset A of X. (b). A subset B of Y is closed in Y if and only if B = Y ∩ A, for some closed subset A of X.

Proof Since (b) follows at once from (a), we prove (a). (⇐=): Suppose that A is open in X and let x be a point in Y ∩ A. Since A is open in

X, there exists an open ball BX (x, r) ⊂ A, hence

BY (x, r) = BX (x, r) ∩ Y ⊂ A ∩ Y.

41 Thus B = A ∩ Y is open in Y . (=⇒): Conversely, suppose that B is open in Y . Then for any x ∈ B, there is an open ball

BY (x, rx) = BX (x, rx) ∩ B ⊂ B.

The set ∪ { } A = BX (x, rx): x ∈ B is an open set set in X and A ∩ Y = B. 

⊙ Note that BY = Y ∩ BX , where BY represents the closure of B calculated in the

space Y and BX is the closure of B calculated in the space X.

Also intY (B) = Y ∩ intX (B), where intY (B) represents the interior of B calculated in

the space Y and intX (B) represents the interior of B calculated in the space X.

Remark 2.7 Clearly

Open(closed) =⇒ relatively open(relatively closed)

but the converse is not generally true.

Corollary 2.13 A subset C of a closed subspace A of a metric space X is said to be closed in A if and only if it is closed in X.

Proposition 2.14 Let (X, d) be a metric space and Y ⊆ X. For an A ⊆ Y we have

(a). intY (A) = intX (A) ∩ Y .

(b). AY = AX ∩ Y . ′ ′ ∩ ′ (c). AY = AX Y , where AY is the derived set of A calculated in the space Y and where ′ AX is the derived set of A calculated in the space X,

2.5 Diameter of Subsets and Distance Between Subsets in Met- ric Spaces

Definition 2.9 Let A be a subset of a metric space (X, d). The diameter of A is defined as diam(A) = sup{d(x, y): x, y ∈ A}

42 Clearly, the diameter of a non-empty set A ⊂ X is either a non-negative real number or ∞.

Theorem 2.15 If A ⊆ B, then diam(A) ≤ diam(B).

Definition 2.10 A subset A of X is said to be bounded if its diameter is finite. That is if diam(A) < ∞. Equivalently, if A is contained in some open ball.

Example 2.14 Let A = {x = (x , x ) : 0 ≤ x ≤ 1, i = 1, 2} in R2. 1 2 i√ With the usual metric , this set has diameter 2; with the taxicab metric, the diameter is 2; with the max metric, its diameter is 1 and with the discrete metric, its diameter is 1.

Figure 2.11: Unit square A

Example 2.15 Let (X, d) be a metric space and A be a subset of X. Prove that the diameter of A is zero if and only if A has fewer than two elements.

Solution (⇐=): Suppose that A has fewer than two elements. Then either A = ∅ or A = {x}. If A = ∅, then clearly diam(A) = 0. If A = {x}, then diam(A) = sup d(x, x) = 0. (=⇒): Now suppose that diam(A) = 0. That is diam(A) = sup{d(x, y): x, y ∈ A} = 0 =⇒ d(x, y) = 0 =⇒ x = y since d is a metric. Trivially A = ∅ or A = {x}. That is, A has fewer than two elements.

Definition 2.11 Let A be a subset of a metric space (X, d) and x ∈ X. The number

d(A, x) = inf{d(a, x): a ∈ A} is called the distance between A and x.

43 Example 2.16 Prove that x ∈ A implies that d(A, x) = 0 but not conversely.

Solution If we choose x = a, we are done.

The converse is not generally true. For instance, if A = (0, 1) ⊂ (R, de) and x = 1, then d(A, x) = 0 although 1 ̸∈ A.

Definition 2.12 Let A and B be subsets of a metric space (X, d). The number { ∞ if A = ∅ or B = ∅ d(A, B) = (2.3) inf{d(a, b): a ∈ A, b ∈ B}, if A ≠ ∅,B ≠ ∅

is called the distance between A and B. Obviously, d({x}, {y}) = d(x, y), for all x, y ∈ X. Note that if one of the sets consists of a single point (2.3) becomes d(A, y) instead of d(A, {y}).

Example 2.17 Show that if A ∩ B ≠ ∅ then d(A, B) = 0 but not conversely.

Solution We prove by contradiction. Suppose A and B are non-empty and that d(A, B) = 0 and A ∩ B = ∅. Then there exist a ∈ A and b ∈ B such that

d(a, b) > 0 =⇒ inf {d(a, b)} > 0 a∈A,b∈B This is a contradiction since we had assumed that

d(A, B) = inf {d(a, b)} = 0 a∈A,b∈B This proves the claim.

Example 2.18 Consider the following intervals on the real line R: A = [0, 1),B = (0, 2]. If d denotes the usual metric on R, then d(A, B) = 0. On the other hand, if ρ is the discrete metric on R, then ρ(A, B)=1, since A and B are disjoint.

44 2.6 Boundary of a Subset of a Metric Space

Definition 2.13 Let (X, d) be a metric space. A point x ∈ X is called a boundary point of A ⊆ X if every open ball B(x, r) centered at x of radius r > 0 contains points in A and points in X − A or A{.

The set of al boundary points of a set A is called the boundary of A and is denoted by ∂(A), B′dary(A), frontier(A), etc. The boundary of a set A is the set of points which can be approached both from A and from the outside of A. It is the set of points in A, not belonging to int(A). Thus

∂(A) = A − int(A) = A ∩ (X − A) (2.4) = A ∩ A{

From(2.4) we see that the boundary of a set is a closed set (since it is an intersection of a two(finite) number of closed sets). Note that the empty set ∅ and the entire set X have empty boundaries.

Example 2.19 Let A = (0, 5). Find ∂(A).

Solution A = [0, 5], int(A) = (0, 5) = A. Therefore by (2.4) ∂(A) = [0, 5] − (0, 5) = {0, 5}.

Theorem 2.16 Let (X, d) be a metric space and A ⊆ X. Then

∂(A) = A ∩ (X − A)

Proof We need to show that the two sets are equal. It suffices to show that ∂(A) ⊆ A∩(X − A) and ∂(A) ⊇ A ∩ (X − A). (=⇒) Let x ∈ ∂(A). Suppose x ∈ A. Then x ∈ A since A ⊆ A. Let B(x, r) be an open ball centered at x, radius r > 0. Since x ∈ ∂(A), B(x, r) contains a point y of X − A. Since y ≠ x this implies that x is a limit point of X − A. Hence x ∈ X − A. Therefore x ∈ A ∩ (X − A). Now suppose x ∈ X − A. By the above reasoning x ∈ A ∩ (X − A), since every x ∈ X

45 is either in A or X − A. These arguments account for all possibilities. Thus

∂(A) ⊆ A ∩ (X − A) (2.5)

(⇐=) Conversely, let x ∈ A ∩ (X − A). Suppose x ∈ A. Since x ∈ X − A but not in X − A, then x must be a limit(accumulation or cluster) point of A. Let B(x, r) be an open ball centered at x, with radius r > 0. Then B(x, r) contains a point of A, namely, x and B(x, r) contains a point in X −A by the definition of a cluster point (y is a cluster point if t ∈ A but y ̸∈ A). Therefore B(x, r) contains at least a point of A and a pint of X − A. Since B(x, r) was arbitrary, it follows that all open balls centered at x have this property. Therefore x ∈ ∂(A). This proves that

A ∩ (X − A) ⊆ ∂(A) (2.6)

From (2.5) and (2.6) equality follows.  Note that ⊙ a boundary point of A ⊆ X is a closure point of X − A. ⊙ a closure point of A that is not a closure point of X − A is an interior point of A.

46 Proposition 2.17 Let (X, d) be a metric space and Y ⊆ X. For any A ⊆ Y , we have

∂Y (A) = ∂X (A) − ∂X (Y )

where ∂Y (A) is the boundary of A calculated in Y , ∂X (A) is the boundary of A calculated

in X and ∂X (Y ) is the boundary of Y calculated in X.

Figure 2.12: Boundary of A calculated in Y

Example 2.20 Let Y = [0, 1) ⊂ R. The open balls of Y are the subsets of the type

{y ∈ [0, 1) : |y − x| < r}.

i fx ≠ 0 and r is sufficiently small,

{y ∈ [0, 1) : |y − x| < r} ∩ [0, 1)

is again an open interval with center x, (x − r, x + r). But if x = 0, then for r < 1

BY (0, r) = [0, r).

Notice that x = 0 is an interior point of Y (for the relative topology of Y ), but it is as boundary point (see section § 2.6 for definition) for the topology of X = R. This is because, in the first case, we are considering Y as a subspace of itself and nothing exists outside it, every point is an interior point and ∂Y (Y ) = ∅. In the second case Y is a subset of R and 0 is at the frontier or boundary between Y and R − Y .

47 Example 2.21 Let (X, d) be a metric space. Show that the boundary of every subset of X is the null/ empty set.

Solution In a discrete metric space, every subset A is both open and closed. Thus

A = int(A) = A

Hence ∂(A) = A − int(A) = A − A = ∅.

Example 2.22 Prove that the every closed ball B[x, r] in a metric space (X, d) is a closed set.

Solution One way to prove this claim is to show that it contains its boundary. Let A = B[x, r] = {y ∈ X : d(x, y) ≤ r}. Then ∂(A) = {y ∈ X : d(x, y) = r}. Alternatively, we can show that the complement of B[x, r] is an open set. Note that B[x, r]{ = {y ∈ X : d(x, y) > r}. Suppose x is an element of B[α, r]{. Since x is not in B[x, r], then d(x, α) > r. Choose ϵ > 0 such that d(α, x) > r + ϵ. We claim that B[α, r] ∩ B(x, ϵ) = ∅. Suppose to the contrary that B[α, r] and B(x, ϵ) have a point z in common. Then by the triangle inequality d(α, x) ≤ d(α, z) + d(z, x) < r + ϵ

Since z ∈ B[α, r] and B(x, ϵ) this contradicts the choice of ϵ. Thus we have shown that every point x ∈ A{ is the center of a ball B(x, ϵ) ⊂ A{ and hence A{ is open as required, where A = B[x, r]. 

2.7 Exercises

1. Is it true that in a metric space A ⊆ B implies A ⊆ B? √ (Hint: Let A = Q,B = Q ∪ { 2}). 2. Let (X, d) be a metric space and A, B ⊆ X. Prove that (a) A is open if and only if A = int(A). (b). B − A = B − int(A).

48 (c). int(B − A) = int(B) − A.

3. Give an example of a subset of (R, de), where de is the usual metric such that diam(int(A)) < diam(A). n 4. Show that in any Euclidean metric (R , de)

B(x, r) = B[x, r]

Does this hold with respect to the discrete metric? 5. Give an example of a closed set that does not have a limit point. 6. Prove that A = A ∪ M, where M is the set of all points x such that d(A, x) = 0.

7. Let A1,A2 be subsets of a metric space (X, d). Show that

(i). d(A1,A2) = d(A2,A1).

(ii). A1 = {x ∈ X : d(A1, x) = 0}

(iii). d(A1,A2) = d(A1,A2) = d(A1, A2). 8. Prove that A ⊆ X is (a). closed if and only if it contains its boundary. (b). open if and only if it is disjoint from its boundary. 9. Prove that (a). A = A ∪ ∂(A). ′ (b). A ⊆ A. ′ (c). A is closed if and only if A ⊆ A. 10. Let A ⊆ X. Prove that (a). ∂(A) = ∂(A{). (b). the boundary of a A is empty if and only if the set is both open and closed. (c). ∂(∂(A)) ⊆ ∂(A). When do we have equality? (Hint: suppose boundary of A has no interior points). (d). ∂(∂(A)) = ∂(∂(∂(A))). (Hint: Use the fact that boundary of any set is closed). 11. Let A ⊆ X. Prove that (a). each point of A is either an interior point or a boundary point. (b). A is closed if and only if A = {x ∈ X : d(x, A) = 0}. [Copious Hint: (⇐=):A = {x ∈ X : d(x, A) = 0} = {x ∈ X : inf{d(x, y): y ∈ A} = 0} = {x : x ∈ A} = A . This proves that A is closed.

49 (=⇒): Suppose A is closed and that there exist an x ̸∈ A such that d(x, A) = 0. Since A is closed by assumption, there exists an r > 0 such that B(x, r) ∩ A = ∅. But then d(x, A ≥ r > 0), a contradiction. Therefore the conclusion A = {x : d(x, A) = 0}.

12. Prove that every non-isolated boundary point of A ⊆ X is a limit point of A and conversely. 13. Prove that int(A) = A − ∂(A). 14. Find ∂(A) where A = [0, 1) ∪ {2}. 15. Prove that (a). A = A, for any A ⊆ X. (b). int(A) = (A{){. (c). int(int(A)) = int(A). 16. Show that in any metric space ( ) diam B(x, r) ≤ 2r.

Give an example to show that strict inequality is possible. 17. If A and B are bounded sets of a metric space, show that A ∪ B is also bounded. Moreover, if A ∩ B ≠ ∅, show that

diam(A ∪ B) ≤ diam(A) + diam(B).

18. Let X be a metric space. Let and {Ai} be a family of subsets of X. Prove that (a). A = A for A ⊆ X. (b). A ∪ A ∪ · · · ∪ A = A ∪ A ∪ · · · ∪ A . ∩1 2 ∩ k 1 2 k (c). A ⊆ A . ∪α α ∪α α ⊇ (d). α Aα α Aα. (e). int(A ∩ A ∩ · · · ∩ A ) = int(A ) ∩ int(A ) ∩ · · · ∩ int(A ). ∪1 2 ∪ k 1 2 k (f). int( A ) ⊇ int(A ). ∩α α ∩α α ⊆ (g). int( α Aα) α int(Aα). 19. (a).Show that every point in Z ⊂ R is a limit point of Z while Z has no cluster points. (b). What are the cluster points of Q in R? 20. Let (X, d) be a metric space and A ⊆ X. Show that

50 (a). A = {x ∈ X : d(x, A) = 0}. (b). int(A) = {x ∈ X : d(x, A{) > 0}. (c). ∂(A) = {x ∈ X : d(x, A) = 0 and d(x, A{) = 0}. (d). x ∈ int(A) if and only if d(x, X − A) > 0 (Assume A ≠ X). 21. For P = (−2, 1) and Q = (3, 4) in R2, compute the distance from P to Q with respect to each of the following metrics (a). usual (b). taxicab (c). max (d). discrete 22. Determine the distance from the point (3, 4) to the unit square [0, 1] × [0, 1] in R2 with respect to the following metrics (a). usual (b). taxicab (c). max (d). discrete 23. Describe pictorially in R2 the set of points x whose distance from the origin is less than or equal to 1, with respect to each of the following metrics (a). usual (b). taxicab (c). max (d). discrete 24. Codes metric Let X be a set that we think of as a set of symbols, and let Xn = X × X × X × · · · × X, the space of ordered words on n symbols. Given that two n words x = (x1, x2, ..., xn) and y = (y1, y2, ..., yn) ∈ X , let

ρ(x, y) = ♯{i : xi ≠ yi} be the number of bits in x and y that are different. For instance if x = (c, a, r) and y = (c, a, t), then ρ(x, y) = 1. We know from the previous chapter that ρ is a metric on Xn. Characterize the open balls of Xn relative to the codes metric. [Hint: Write ∑ n ρ(x, y) = i=1 d(xi, yi), where d is the discrete metric in X]. 25. Let A = {(x, y) ∈ R2 : x = y} ⊂ R2 with the Euclidean metric in R2.

51 Find int(A), A and ∂(A). 25. Let (X, d) be a metric space and A ⊆ X. Show that diam(A) = diam(A), but in general diam(int(A)) ≤ diam(A). 26. Show that in Rn we have ∂(A) = ∅ if and only if A = ∅ or A = Rn. 27. Let X be a metric space. Show that

∂(int(A)) ⊆ ∂(A),

and that it may happen that ∂(int(A)) ⊂ ∂(A).

′ 28. Can the derived set A of limit points of A be bigger than, smaller than, or equal to A? Provide examples to illustrate all the possibilities. 29. Suppose that x is a limit point of a subset A of a metric space (X, d). Is x still a limit point of A if we modify the metric? 30. Suppose A is a closed subset of a metric space X. Is A still closed if we modify the metric? 31. Determine whether the interval I = (0, 1] is closed as a subset of each of the following spaces equipped with the usual metric d(x, y) = |x − y|. (a). A = R = (−∞, ∞); (b). B = (0, ∞); (c). C = (−∞, 1]; (d). D = (0, 1]; (e). E = [0, 1]; (f). F = {−1} ∪ (0, 1]. 1 32. Is A = {f ∈ C[0,1] : f(0) ≥ 0} a closed set, with respect to the L -metric? with the max metric? What about E = {f ∈ C[0,1] : f(0) ≥ f(1)} ⊂ C[0,1]? 33. Let (X, d) be a discrete metric space and p ∈ X and A, B ⊂ X. Prove that (a). { 1, if p ̸∈ A d(p, A) = 0, if p ∈ A

(b). { 1, if A ∩ B = ∅ d(A, B) = 0, if A ∩ B ≠ ∅

52 34. Give an example to show that for an open ball B(x, r), in a metric space (X, d) (a). B(x, r) need not be the closed ball B[x, r]. (b). ∂(B(x, r)) may not be {y ∈ X : d(x, y) < r}. 35. Find a metric space and two balls in it such that the ball with the smaller radius contains the ball with the larger one and does not coincide with it.

53 Chapter 3

DENSE SUBSETS IN A METRIC SPACE

3.1 Dense and Nowhere Dense Sets

indexset!dense

Definition 3.1 Let (X, d) be a matric space. A subset A of X is said to be dense in X if A = X. Equivalently, if and only if for every non-empty open subset G of X, A ∩ G ≠ ∅.

Note that a subset A of X is dense in X if every point of X is a limit point of A, or a point of A (or both). This means that elements in X can be approximated arbitrarily well by elements in A. This leads to the following result.

Proposition 3.1 A subset A of a metric space (X, d) is dense in X if and only if for

every x ∈ X we can find a sequence {xn} with values in A (that is xn ∈ A) such that

xn −→ x.

Example 3.1 1. The set of all rational numbers Q and the set of all irrational numbers Q{ are dense in R. Note that any real number can be approximated to any accuracy by rational numbers Q, Q being dense in R. n 2. The set of all points x = (x1, x2, ..., xn) with rational co-ordinates is dense in R .

54 3. The set of all points x = (x1, x2, ..., xn) with only finitely many non-zero co-ordinates 2 each a rational number is dense in ℓ , the space of all sequences {xn} such that ∑∞ 2 |xn| < ∞. n=1 4. The set of all polynomials with rational coefficients, denoted by XQ, is dense in the

space C[a,b]. Thus ∑ Q X = {f ∈ C[a,b] : f(x) = aixi; ai ∈ Q} i Therefore Q X = C[a,b].

Definition 3.2 Let (X, d) be a matric space. A subset A of X is said to be nowhere dense in X if it is dense in no open ball at all. That is if int(A) = ∅. Equivalently, A ⊆ X is nowhere dense in X if given any nonempty open set U, we can find a nonempty open set V ⊂ U such that A ∩ V = ∅.

Figure 3.1: Nowhere Dense Sets

Example 3.2 If A = {1, 3, 5} ⊂ (R, de), then A is nowhere dense since int(A) = ∅

Example 3.3 More examples of nowhere dense sets are: (a). As subsets of R, each of the following is nowhere dense: (i). any finite set { 1 ∈ N} (ii). the range of the sequence n : n

55 (iii). the set Z of integers

(b). As subsets of the plane, each of the following is nowhere dense: (i). any finite set (ii). the points whose coordinates are integers (iii). any finite collection of lines (iv). a circle.

Remark 3.1 Nowhere dense sets are diametrically opposite to dense sets. If we want to say that a set is not everywhere dense, how shall we formulate it? The set may not be dense everywhere but may be dense ”somewhere”. For instance look at the set Q ∩ [0, 1]. It is not dense everywhere but dense in any open interval J ⊂ (0, 1). The property of being nowhere dense is designed to describe those sets which are ”very thinly distributed” in their containing space. The thinness of the distribution is reflected in the fact that the closure of a nowhere dense set does not contain any open ball of positive radius. Due to this, nowhere dense sets are said to be ”small” in a certain sense.

Definition 3.3 A set A which fails to be nowhere dene, int(A) ≠ ∅, is thought of as being ”densely distributed ” near the interior points of A and is often called somewhere dense.

Definition 3.4 A set is called meager or of the first category if it can be written as a countable union of nowhere dense sets. If a set is not of the first category, then we say that it is of the second category.

3.2 Exercises

1. Show that Z is nowhere dense in R. 2. Show that the x-axis given by y = 0 is nowhere dense. 3. Does there exist a finite set which is dense in R? What can you say about a metric space in which a finite set is dense? 4. What are the dense subsets of a discrete metric space? 5. Let A and B be two dense subsets of a metric space X. Is A ∪ B dense in X? Is

56 A ∩ B dense in X? 6. If A and B are open dense subsets of a metric space X, is A ∩ B dense in X? 7. Give an example of a proper open dense subset of R. 8. Let A be dense in X. Show that every x ∈ X is at zero distance from A. That is, every open ball has at least one point of A. 9. Show that A is nowhere dense in X if and only if X − A is dense in X. 10. Let X be a metric space. Show the following are equivalent (a). A is dense in X. (b). every nonempty open set intersects A. (c). A{ = X − A has no interior points. (d). every open ball B(x, r) intersects A. 11. Show that the set A of points of Rn with rational coefficients and its complement are dense in Rn.

57 Chapter 4

COMPACTNESS IN METRIC SPACES

The notion of compactness can best be motivated by what we know about real-valued continuous functions . Continuous functions behave much more badly on open inter- vals than on closed intervals. For instance, on the interval (0, 1), the three functions 1 1 f1, f2, f3 defined by f1(x) = x , f2(x) = sin( x ), f3(x) = x are each continuous; but f1 is

unbounded, f2 has no limit as x tends to 0, and f3 attains neither its supremum nor its infimum on (0, 1). The ”best behaved” sets, where we do not encounter this difficulty, are called com- pact sets. Compact spaces resemble in many ways the properties of finite sets, even though they may be (and usually are) uncountable as sets. They provide a finite struc- ture for infinite sets. In a sense, compact spaces are the smallest kind of spaces. They are associated with the existence of maxima and minima of real-valued functions. In many applications where finiteness makes life easier (such as in optimization problems), compactness does the same thing.

4.1 Sequential Compactness, Notion of a Cover and a Compact Set

Definition 4.1 Let (X, d) be a metric space. A subset A of X is called sequentially

compact if every sequence in A has a subsequence xnk that converges to a point in A.

58 We use this definition to develop the notion of compactness in a metric space.

Definition 4.2 Let (X, d) be a metric space and A be a subset of X.A coveror cov- ering of A is a collection {Ui} of subsets whose union contains A. That is, ∪ A ⊆ Ui i

A subcover of a given cover is a sub-collection of {Ui} whose union also covers(contains) A.A finite subcover is a subcover (subcollection) that contains only a finite number of sets.

Definition 4.3 A subset A of a metric space (X, d) is called compact if every open cover of A has/admits a finite subcover.

4.2 Bolzano-Weierstrass Theorem and Compactness

Theorem 4.1 (Bolzano-Weierstrass Theorem) A subset of a metric space is compact if and only if it is sequentially compact.

To prove the above theorem, we need the following results.

Lemma 4.2 A compact subset A of a metric space X is closed.

Proof We show that X − A or A{ is open. ∈ − U − { 1 } Let x X A and consider the following collection of open sets n y : d(x, y) > n , where n = 1, 2, 3, ...

Since every y ∈ X with y ≠ x has d(y, x) > 0, y lies in some Un. Thus, the Un cover A,

and so there must be a finite subcover. One of these has a greatest index, say UN . 1 If r = N , then by construction 1 B(x, ) ⊂ X − A. N This proves that X − A or A{ is open. Hence A is closed.  Lemma 4.2 says that compact implies closed.

59 Lemma 4.3 If X is a compact metric space and B ⊆ X is closed, then B is compact.

Proof { Let Ui be an open cover of B and let V = X − B or B . Since by hypothesis B is closed,

V must be open. Thus {Ui,V } is an open cover of X. Since X is compact, every open cover has finite subcover. Thus {Ui,V } has a finite subcover, say

{U1, U2, ..., UN ,V }.

Then {U1, U2, ..., UN } is a finite open subcover of B. Therefore B is compact. 

Proof (Bolzano-Weierstrass Theorem)

(=⇒) Let A be compact. Assume there exist a sequence {xk} in A that has no convergent subsequence. In particular, this means that {xk} has infinitely many distinct points, say

y1, y2, ... and since there are no convergent subsequences, there is some open neighborhood Uk of yk containing no other yi. This is because if every neighborhood of yk contains yj, we could by choosing the neighborhoods which are open balls 1 B(y , ), m = 1, 2, ... k m select a subsequence converging to yk. We claim that the set

{y1, y2, ...} is closed. This set has no limit points, since there are no convergent subsequences.

Applying Lemma 4.3 to {y1, y2, ...} as a subset of A, we find that {y1, y2, ...} is compact, but {Uk} is an open cover that has no finite subcover, which is a contradiction. Thus the sequence {xk} has a convergent subsequence. The limit, say x lies in A since A is closed, by Lemma 4.2. (⇐=) Conversely, assume that A is sequentially compact. To prove that A is compact, let {Ui} be an open cover of A. We need to prove that this open cover has a finite subcover. To show this we proceed in several steps.

Lemma 4.4 There is an r > 0 such that for each y ∈ A, B(y, r) ⊂ Ui for some Ui.

60 Proof

For a contradiction, suppose not. Then for every positive integer n there is some yn such 1 U that B(yn, n ) is not contained in any i. By hypothesis, since A is sequentially compact,

yn has a convergent subsequence, say {zn} such that zn −→ z ∈ A. Since the Ui cover ∈ U U A, z i0 , for some i0 . Choose N large enough so that ϵ d(z , z) < n 2 and 1 ϵ < . N 2 Then 1 B(z , ) ⊂ U , n N i 1 ̸⊂ U a contradiction to the fact that B(yn, n ) i.

Using this argument, there is a finite number of the Ui such that ∪m A ⊂ Uk. k=1 This proves that A is compact. 

Remark 4.1 We have seen that compactness implies sequential compactness and vice versa.

Definition 4.4 A subset A of a metric space X is said to be totally bounded if for every r > 0 there is a finite number of open balls of radius r and centers in A which

cover A. That is for any xi ∈ A, i = 1, 2, ..., n and r > 0 ∪n A ⊆ B(xi, r). i=1 Theorem 4.5 For a subset A of a metric space X, the following statements are equiv- alent. (a). A satisfies the Bolzano-Weierstrass property. (b). A is complete and totally bounded.

The notion of completeness will be discussed later.

61 4.3 Heine- Borel Theorem and Compactness

Theorem 4.6 (Heine- Borel Theorem) A subset A of Rn is compact if and only if it is closed and bounded.

Lemma 4.7 Closed intervals in R are compact.

Note that in metric spaces Bolzano-Weierstrass compactness is equivalent to Heine- Borel compactness. Note also that the Heine- Borel Theorem does not hold in some metric spaces, e.g. non-Euclidean metric spaces.

Example 4.1 The set A = [1, 2] is compact.

Example 4.2 Show directly (using the notion of a cover) that the set 1 A = {0} ∪ { : n ∈ N} n

as a subset of (R, de) is compact.

Solution

Let {Ui} be an open cover of A. We must show that there is a finite subcover. The

point 0 lies in one of the open sets. Without loss of generality (WLOG), suppose 0 ∈ U1. U 1 −→ −→ ∞ Since 1 is open, and n 0 as n , there exists N such that 1 1 1 , , , ... N N + 1 N + 2

lie in U1. Relabeling, if need be, suppose that 1 1 ∈ U , ..., ∈ U 2 1 − N N

Then U1, U2 is a finite subcover, since it is a finite sub-collection of the {Ui} and it includes all the points of A. This shows that ∪n A ⊆ Ui, i=1 hence A is compact.

Note that from this open cover, we can extract a finite subcover for A, e.g. {U1, U2, U3} is a finite subcover of A.

62 Example 4.3 Show (using the notion of a cover) that the set A = (0, 1] as a subset of

(R, de) is not compact.

Solution Consider the open cover of A given by the family of open sets 1 {( , 2) : n = 1, 2, 3, ...}. n Obviously, ∞ ∪ 1 A ⊆ (0, 2) = ( , 2) n i=1 It is not possible to select any finite subcover of A for no finite subcover would include the point 0. Thus A = (0, 1] is not compact.

Remark 4.2 Note that the examples above can be solved easily by using the Heine- Borel Theorem.

Suppose X is a discrete metric space. Then each one-point set (singleton) is open and the family of all singletons is an open cover of A. Clearly, this cover has no proper sub-covering. This leads to the following result.

Theorem 4.8 Let X be a discrete metric space. If X is compact then X is finite.

Theorem 4.9 Let X be a metric space. Any finite subset of X is compact.

From Theorems 4.8 and 4.9 we conclude that compactness and finiteness coincide for discrete metric spaces. Note also that compact sets will coincide with closed and bounded n sets in Euclidean metric spaces (R , de), but this implication goes one way. This means that the Heine-Borel Theorem is true in Euclidean metric spaces. A closed and bounded set need not be compact in an arbitrary metric space. That is, compactness is, in general, a stronger property than closedness and boundedness put together. It often introduces more structure to the analysis. Since this is an important point which is often missed by many authors, we illustrate it here by several examples.

Example 4.4 The following examples show that a closed and bounded set need not be compact.

63 (1). If X is any infinite set endowed with the discrete metric d, then (X, d) cannot be a compact metric space. For instance

{B(x, 1)} ∀ x ∈ X

is an open cover of X which does not have a finite sub-collection that covers X. However, X is obviously closed and bounded, since

X ⊆ B(x, 2) ∀ x ∈ X

where B(x, 2) = {y ∈ Y : d(x, y) < 2}

4.4 Exercises

1. Prove that the infinite interval A = (0, ∞) ⊂ R is not compact by giving an open cover with no finite subcover. (Hint: Take Un = (n − 1, n + 1) 2. Consider R withe the Euclidean metric. Give an open cover of A = (−10, 10] that has no finite subcover.

3. Show that the closed unit ball in the function space C[0,1] is not compact by showing that it is not sequentially compact. (Hint: Construct a sequence of functions with norm less than or equal to one that does not have a convergent subsequence). 4. Show that the closed unit ball in any infinite-dimensional space is not compact. 5. Let A be a set with the discrete metric. Is A compact? Explain. 6. Let A, B ⊆ (X, d) such that A is compact and B is closed. If A ∩ B = ∅, show that d(A, B) > 0. 7. Verify that any infinite set in a discrete space is closed and bounded but not compact.

8. Prove that (R, de), where de denotes the usual metric, .is not compact in three ways. 9. Prove the following (a). If A and B are compact, so is A ∪ B.

(b). If {Ai : i ∈ I} is an arbitrary family of compact sets, then ∩ Ai i∈I

64 is also compact even if I is infinite. (c). Disprove (a) for unions of infinitely many compact subsets by a counterexample. 10. Let R be supplied with the Euclidean metric. Show that the collection 1 1 {( , 2 − ): n ∈ N} n n is a cover for (0, 1] but not for [0, 1).

65 Chapter 5

CONTINUITY IN METRIC SPACES

5.1 Continuity of a Function in a metric Space

Recall that a real function f : R −→ R is continuous at a point x0 ∈ R if for every ϵ > 0, ∃ a δ > 0 such that

|x − x0| < δ =⇒ |f(x) − f(x0)| < ϵ.

The definition of continuity of a function between metric spaces is an obvious general- ization of the definition for real-valued functions.

5.1.1 Epsilon-Delta Definition of Continuity in a Metric Space

By paraphrasing the definition of continuity of a function f : R −→ R , we get:

Definition 5.1 Let (X, d) and (Y, ρ) be metric spaces. A function

f :(X, d) −→ (Y, ρ)

is said to be continuous at the point x0 ∈ X if and only if for all ϵ > 0, ∃ a δ >

0(depending on x0 and ϵ) such that for all x ∈ X

d(x, x0) < δ =⇒ ρ(f(x), f(x0)) < ϵ

66 A function f :(X, d) −→ (Y, ρ) is continuous in X if it is continuous at every point in X.

Remark 5.1 There are other useful ways of formulating the notion of continuity in metric spaces-involving the topology (i.e. the open sets) and is applicable in more gen- eral situations.

Figure 5.1: Continuity of f in terms of open balls

5.1.2 Continuity in terms of Open Balls ( ) −1 The function f :(X, d) −→ (Y, ρ) is thus continuous if given Bρ(f(x), ϵ) in Y , f Bρ(f(x), ϵ) is open in X. That is if for all ϵ > 0 ∃δ > 0 such that

f(Bd(x, δ)) ⊂ Bρ(f(x), ϵ).

We say that f : X −→ Y is continuous in A ⊆ X if f is continuous at every point x ∈ A. Since A is a metric space with the induced metric of X, we also say that f : A −→ Y is continuous at x if for all ϵ > 0, ∃ δ > 0 such that ( )

f Bd(x, δ) ∩ A ⊂ Bρ(f(x), ϵ).

We need to get some notations right. Suppose f :(X, d) −→ (Y, ρ). For A ⊆ X

Bd(x, δ) = {y ∈ X : d(x, y) < δ} f(A) = {f(x): x ∈ A} is the image of A under f.

67 The image of the entire set X (i.e. f(X)) is the image of f. The pre-image of a set B ⊆ Y under f is the set of elements of X whose images belong to B. Thus f −1(B) = {x ∈ X : f(x) ∈ B}.

Warning: Be careful with these terminologies since their etymology can be misleading. For instance, the image of the pre-image of a set B can differ from B! Note the following ⊙ f(f −1(B)) = B if and only if B is contained in the image of f. ⊙ f(f −1(B)) ⊆ B for any map f : X −→ Y and B ⊆ Y . ⊙ f : X −→ Y is an injection if and only if f −1(f(A)) = A. ⊙ f −1(f(A)) = A if and only if f(A) ∩ f(X − A) = ∅. Using this notation we prove a criterion for continuity in terms of open sets.

Proposition 5.1 Let (X, d) and (Y, ρ) be metric spaces and f : X −→ Y be a function. The function f is continuous if and only if and only if f −1(O) is open in X for all open subsets O ⊆ Y .

Proof (=⇒): Assume f is continuous and O is open in Y . Let x ∈ f −1(O), that is f(x) ∈ O. Since O is open, there exists an ϵ > 0 such that B(f(x), ϵ) ⊆ O. By continuity, there exists a δ > 0 such that

f(Bd(x, δ)) ⊂ Bρ(f(x), ϵ) ⊂ O (5.1)

Therefore, taking inverse both sides of (5.1) we have

−1 Bd(x, δ) ⊂ f (O)

Since x ∈ f −1(O) was arbitrary, we deduce that f −1(O) is open. (⇐=): Conversely, let x ∈ X and ϵ > 0. We show that B(f(x), ϵ) is an open subset of

(Y, ρ). Indeed, let y ∈ Bρ(f(x), ϵ) and define

′ ρ(z, y) < ϵ = ϵ − ρ(y, f(x))

68 ′ Let z ∈ Y such that ρ(z, y) < ϵ . Then

ρ(f(x), z) ≤ ρ(f(x), y) + ρ(y, z) < ρ(f(x), y) + ϵ − ρ(f(x), y) = ϵ.

That is ρ(f(x), z) ≤ ρ(f(x), y) + ρ(y, z) < ϵ.

Thus ( )

Bρ y, ϵ − ρ(f(x), y) ⊂ Bρ(f(x), ϵ) ( ) This proves that B (f(x), ϵ) is open. By the assumption, we see that f −1 B (f(x), ϵ) ρ ( ) ρ −1 is an open set. Since x ∈ f Bρ(f(x), ϵ) , we can find δ > 0 such that ( ) −1 Bd(x, δ) ⊂ f Bρ(f(x), ϵ) .

Hence, for allx ˆ with d(x, xˆ) < δ, we have

ρ(f(x), f(ˆx)) < ϵ.

This proves that f is continuous.  Continuity can also be characterized as follows in terms of convergent sequences and in terms of relatively open and relatively closed sets.

Theorem 5.2 Let (X, d) and (Y, ρ) be metric spaces and f : A ⊂ X −→ Y be a mapping. Then the following assertions are equivalent. (i). f is continuous on A

(ii). For any convergent sequence {xk} such that

xk −→ x0

in A, we have

f(xk) −→ f(x0). (iii). For each open set U in Y , f −1(U) ⊂ A is open relative to A. That is

f −1(U) = V ∩ A

for some open set V . (iv). For each closed set F ⊂ Y , f −1(F ) ⊂ A is closed relative to A. That is

f −1(F ) = G ∩ A

for some closed set G.

69 Proposition 5.3 Let X,Y,Z be three metric spaces and x ∈ X. If f : X −→ Y is continuous at x and g : Y −→ Z is continuous at f(x), then g ◦ f : X −→ Z is continuous at x. In particular, composition of two continuous functions is continuous.

Proof Let ϵ > 0. Since g is continuous at f(x), there exists σ > 0 such that ( ) ( )

g BY (f(x), σ) ⊂ BZ g(f(x)), ϵ

Since f is continuous at x, there exist δ > 0 such that ( ) ( )

f BX (x, δ) ⊂ BY f(x), σ

and consequently, ( ) ( ) ( )

g ◦ f BX (x, δ) ⊂ g BY (f(x), σ) ⊂ BZ g ◦ f(x), ϵ .

This proves the claim. 

Proof 2(less intuitive proof) Let U ⊂ Z be an open set. We need to show ( ) (gf)−1(U) = f −1 g−1(U)

is open. −1 U The continuity of( g implies) that g ( ) is open in Y . The continuity of f then further implies that f −1 g−1(U) is open. 

Corollary 5.4 Let f : X −→ R be a function defined on a metric space X and let t ∈ R. Then (a). {x ∈ X : f(x) > t} and {x ∈ X : f(x) < t} are open sets. (b). {x ∈ X : f(x) ≥ t}, {x ∈ X : f(x) ≤ t} and {x ∈ X : f(x) = t} are closed sets.

5.2 Compactness and Continuity in Metric Spaces

We now turn to the investigation of the properties of continuous functions defined on compact metric spaces. A fundamental observation is the following: continuous image of a compact set is compact.

70 Theorem 5.5 Let (X, d) and (Y, ρ) be metric spaces and suppose f : X −→ Y is continuous and B ⊂ X is compact, then f(B) is compact.

Proof 1(Using convergence in metric spaces)

Let {yk} be a sequence in f(B). We show that {yk} has a subsequence converging to a point in f(B).

Let yk = f(xk), for xk ∈ B. Since B is compact, there is a convergent subsequence say, −→ ∈ xkn x for x B. By Theorem 5.2 (ii) above we have that −→ f(xkn ) f(x) { } { } and so f(xkn ) is a convergent subsequence of yk . This proves that f(B) is sequentially compact and hence compact. 

Proof 2 Take any open cover {Oi : i ∈ I} of f(B). Thus ∪ f(B) ⊆ Oi i Applying f −1 both sides we have ∪ −1 −1 B = f (f(B)) ⊆ f (Oi) i −1 Since f is continuous, f (Oi) is open (in B) and because B is compact, there is a finite −1 subcover of sets f (Oi), i = 1, 2, ..., n such that ∪n −1 B ⊆ f (Ok) (5.2) k=1

Applying f both sides of (5.2) we have ∪n ∪n −1 f(B) ⊆ f(f (Ok)) = Ok. k=1 k=1 Thus, f(B) is compact. 

Remark 5.2 Theorem 5.3 is a very useful observation. It gives us a useful sufficient condition for the inverse of an invertible function to be continuous. The next example shows this.

71 Example 5.1 Find a continuous function f : R −→ R and a compact set K ⊂ R such that f −1(K) is not compact.

Solution Let f : R −→ R be defied by f(x) = 0 ∀x ∈ R. Let K = {0}. It is easy to check that K is compact, but f −1(K) = R, which is not compact, since R is not bounded(by Heine-Borel Theorem). Note that f in Example 5.1 is not invertible(since it is not injective).

Theorem 5.6 Let (X, d) and (Y, ρ) be metric spaces and f : X −→ Y be a function. Show that the following claims are equivalent. (a). f : X −→ Y is continuous. (b). f(A) ⊂ f(A) for all A ⊂ X. (c). f −1(B) ⊂ f −1(B), for all B ⊂ Y .

Proof ( ) (a)=⇒(b): Suppose f is continuous. Then f −1 f(A) is closed in X, and since ( ) ( ) A ⊂ f −1 f(A) ⊂ f −1 f(A)

it follows that ( ) A ⊂ f −1 f(A) Applying f both sides we have f(A) ⊂ f(A). (b)=⇒(c): Assume (b). Then for B ⊂ Y (taking A = f −1(B)), we have ( ) ( ) ( ) f f −1(B) ⊂ f f −1(B) ⊂ f f −1(B) ⊂ B and therefore f −1(B) ⊂ f −1(B). Finally, when B is closed, this shows that

f −1(B) ⊂ f −1(B) = f −1(B) ⊂ f −1(B)

which shows that f −1(B) = f −1(B). Therefore f −1(B) is closed whenever B is closed which implies that f is continuous. 

72 5.2.1 Uniform Continuity in Metric Spaces

The notion of continuity is n inherently local one. If f : X −→ Y is continuous, we know that for any x ∈ X, the image of points nearby x under f are close to f(x), but we do not know if the word ”nearby” in this statement depends on x or not. A global property would allow us to say something like this: Given any ϵ > 0 we should be able to find a δ > 0 such that for any x ∈ X the images of points at most δ-away from x under f are at most ϵ-away from f(x). This property says something about the behavior of f on its entire domain, not only in certain neighborhoods of the points in its domain. This property is called uniform continuity.

Definition 5.2 Let (X, d) and (Y, ρ) be metric spaces and A ⊆ X. We say that function

f : A ⊆ (X, d) −→ (Y, ρ)

is uniformly continuous on A if for all ϵ > 0 ∃ a δ > 0(depending only on ϵ) such that for all x, y ∈ A d(x, y) < δ =⇒ ρ(f(x), f(y)) < ϵ

Remark 5.3 Obviously a uniformly continuous function is continuous but a continuous function need not be uniformly continuous. For instance, the map f : R+ −→ R+ defined 1 by f(x) = x , is continuous but not uniformly continuous. It has a relatively peculiar behavior near 0. Its nature of continuity at 1 and at 0.0001 seems quite different.

Example 5.2 1. f : R −→ R defined by f(x) = x is uniformly continuous on [0, 4]. 2. g : R −→ R defined by g(x) = x2 is continuous on (0, 4) but not uniformly continuous on (0, 4).

Example 5.3 Show that f :(R, de) −→ (R, de), (where de denotes the usual metric on R given by de(x, y) = |x − y| for all x, y ∈ R) defined by f(x) = 2x is uniformly continuous on (R, de).

Solution We need to show that given ϵ > 0 we can find a δ > 0(depending only on ϵ) such that for all x, y ∈ R |x − y| < δ =⇒ |f(x) − f(y)| < ϵ

73 Let ϵ > 0 be given such that

|x − y| < δ =⇒ |f(x) − f(y)| < ϵ i.e |2x − 2y| < ϵ i.e 2|x − y| < ϵ | − | ϵ i.e x y < 2 ≤ ϵ If we let δ 2 , we are done. Remark 5.4 Since compact sets are bounded, continuous functions on a compact set are bounded. Moreover, continuous functions on compact sets are uniformly continuous.

Theorem 5.7 Let :(X, d) −→ (Y, ρ) be a continuous function on a compact set X. Then f is uniformly continuous.

Proof We prove using the contrapositive. Suppose f is not uniformly continuous. Then there exists an ϵ > 0 such that for all δ > 0 there exists x, y ∈ X with d(x, y) < δ and ρ(f(x), f(y)) ≥ ϵ. 1 ∈ { } { } Taking δ = n for some n N, we find that there are sequences xn and yn in X 1 such that d(xn, yn) < n . Therefore

ρ(f(xn), f(yn)) ≥ ϵ (5.3)

Since X is compact, there are convergent subsequences of {xn} and {yn} which for simplicity, we again denote by {xn} and {yn}. From (5.3), the subsequences {xn} and

{yn} converge to the same limit, but the sequences {f(xn)} and {f(yn)} either converge or diverge to different limits. But this contradicts the continuity of f. This proves that f is uniformly continuous on X. 

5.2.2 Continuity vs Metrics

Remark 5.5 Warning: A continuous function f :(X, d) −→ (Y, ρ) remains continu- ous if we remetrize X by a metric equivalent to d, and similarly for Y . This is not true for uniform continuity. Re-metrizing the domain of a uniformly continuous function f with an equivalent metric may render f not uniformly continuous.

74 Example 5.4 Let (X, d) be a discrete metric space and Y be any metric space. Then the map f : X −→ Y is continuous.

Proof Recall that f :(X, d) −→ (Y, ρ) is continuous if ∀ ϵ > 0 ∃ δ > 0 such that for x ∈ X

d(x, a) < δ =⇒ ρ(f(x), f(a)) < ϵ, a ∈ X (5.4)

To prove that f is continuous, for any given a and ϵ > 0, we simply take δ = 1. Because X is discrete, d(x, a) < 1 which implies that x = a and ρ(f(x), f(a)) = 0 < ϵ. 

Example 5.5 The evaluation map

−→ R E : C[0,1]L∞ usual defined by E(f) = f(0), for all f ∈ C[0,1].

Proof

Recall that the L∞-metric on C[0,1] is the sup metric or max metric also called the uniform metric given by

d(f, g) = max |f(t) − g(t)|, f, g ∈ C[0,1], t∈[0,1].

In fact we have

d(E(f),E(g)) = |f(0) − g(0)| ≤ max |f(t) − g(t)| = d(f, g). 0≤t≤0 This implies that the definition of continuity holds for E if we take δ = ϵ.  ∫ 1 1 | − | Remark 5.6 If we change the max metric to the L -metric d(f, g) = 0 f(t) g(t) , then E is no longer continuous. To see this, in (5.4) let a to be the constant zero function 0 and ϵ = 1. For any δ > 0, we will find a function f such that the left hand side of (5.4) holds ∫ 1 max(f, 0) = |g(t)|dt < δ, 0 but the right hand side fails:

d(E(f),E(0)) = |f(0)| ≥ 1.

75 This function f can be easily constructed: { 1 − δ−1t, for 0 ≤ t ≤ δ f(t) = 0, for δ ≤ t ≤ 1

Example 5.6 Consider the summation map

R2 −→ R f : Euclidean usual defined by f(x, y) = x + y. Show that f is continuous.

Solution To check the continuity of f, we only need to consider the pre-image of balls in R, which are simply open intervals. Note that f −1(a, b) is an open strip in R2 at 135◦. It is intuitively clear (and not difficult to show) that f −1(a, b) is indeed open. Therefore f is continuous.

Figure 5.2: Pre-image of summation map f

Note the continuity property depends only on open subsets. Check that the summation map f is also continuous if we equip R2 with the taxicab metric.

n2 Example 5.7 The set Mn of all n×n matrices may be identified with R in an obvious way. With the Euclidean metrics, the map

det : Mn −→ R

76 is continuous, because det is a multivariable polynomial. Therefore det−1(R − {0}) is an

open subset of Mn. This open subset is simply all the invertible matrices.

−→ R Example 5.8 We have seen that the evaluation map E(f) = f(0) : C[0,1]max usual is continuous. As a consequence of this, the subset { } −1 U = f ∈ C[0,1] : f(0) > 1 = E (1, ∞)

is L∞-open (i.e open w.r.t. the max metric).

5.2.3 Compactness and Real-valued Continuous Functions: Applications in Maxima and Minima Problems

Maximum and minimum problems are of central importance in applications. For exam- ple, in many physical systems, the equilibrium state is one which minimizes energy or maximizes entropy, and in optimization problems, the desirable state of the system is one which minimizes an appropriate function. In statistical mechanics, entropy is the measure of the randomness of the microscopic constituents of a thermodynamic system, and in a closed thermodynamic system, it is a measure of of the amount of thermal energy not available to do work (a measure of the disorder or randomness in a closed system). It is also defined as an inevitable and steady deterioration of a system or soci- ety or a measure of the loss of information in a transmitted message, a tendency of all matter and energy in the universe to evolve toward a state of inert uniformity. The mathematical formulation of these problems is the maximization and minimization of a real-valued function f on a state X. Each point of the state space which is often a metric space represents a possible state of the system.

Theorem 5.8 (Bolzano-Weierstrass) Let K be a compact metric space and f : K −→ R be a continuous, real-valued function. Then f is bounded on K and it attains its min- imum and maximum. That is, there are points x, y ∈ K such that

f(x) = inf f(z) z∈K and f(y) = sup f(z). z∈K

77 Proof Since K is compact and f is continuous, then f(K) is compact in R by a previous result and thus f(K) is closed and bounded. Hence f is bounded by the Heine-Borel Theorem. It is enough to prove that f attains its infimum. Since f is bounded, it is bounded rom below and the infimum m of f on K is finite. By

the definition of the infimum, for each n ∈ N, there is an xn in K such that 1 m ≤ f(x ) ≤ m + n n This inequality implies that

lim f(xn) = m. (5.5) n→∞

{ }∞ The sequence xn n=1 need not converge but since K is compact the sequence has a con- { }∞ vergent subsequence which we denote xnk n=1. We denote the limit of the subsequence by x. Then, since f is continuous, we have from (5.4) that

f(x) = lim f(xn ) = m. k→∞ k Therefore f attains its infimum m at x. The proof that f attains its maximum M is similar: Let M = sup{f(x): x ∈ K}. Then f(K) is closed and M ∈ f(K). This means that there exists some xm ∈ K

with f(xm) = M, so that the bound M is attained. Since K is compact M is also the maximum element. Clearly,

m ≤ |f(x)| ≤ M. 

Note that the conclusion of Theorem 5.5 fails if K is not compact. For instance, f(x) = x defined on K = (0, 1) is bounded but has neither a maximum nor a minimum. Also 1 f(x) = x defined on K = (0, 1) is not bounded and has neither maximum nor a minimum.

5.2.4 Continuity and Approximation

A fundamental theorem in approximation theory is that any continuous function on [0, 1] may be uniformly approximated by polynomials. Specifically, this says that for any continuous function f(t) and ϵ > 0, there is a polynomial p(t) such that

|f(t) − p(t)| < ϵ ∀ 0 ≤ t ≤ 1.

78 It follows from this fact that the limit points of the subset PR(t) ⊂ C[0,1] with the max

metric, of polynomials is the whole space C[0,1]. Thus this set is dense in C[0,1].

5.3 Exercises

1. Assume that A ⊆ X is compact and f : A −→ R is continuous, Show that f(A) is a bounded subset of R. −→ 2. Let f, g :{X Y be two continuous} functions between metric spaces. Show that the set A = x ∈ X : f(x) = g(x) is closed. 3. Let (X, d) and (Y, ρ) be metric spaces and let f : X −→ Y be a continuous function. Show that

(a). if y0 ∈ Y is an interior point of B ⊂ Y and if f(x0) = y0, then x0 is an interior point of f −1(B).

(b). if x0 ∈ X is a closure/adherent point to A ⊂ X, then f(x0) is adherent to f(A).

(c). if x0 ∈ X is a boundary point of A ⊂ X, then f(x0) is a boundary point for f(A).

(d). if x0 ∈ X is a limit point of A ⊂ X, and f is injective, then f(x0) is a limit point of f(A). 4. Determine the continuity of the integration map

I : C[0,1] −→ Rusual,

defined by ∫ 1 I(f) = f(t)dt 0 1 for the L -metric as well as the max/uniform metrics on C[0,1]. 5. Prove that the sum- mation map

H : C[0,1] × C[0,1] −→ C[0,1]

(both sets with the max/uniform metric), defined by

H(f, g) = f + g

is continuous. What about the multiplication map? What about the L1 metric in place of the max

79 metric?

6. Fix a point a in a metric space X. Prove that f : X −→ Rusual defined by

f(x) = d(x, a),

is continuous. 7. Prove that the identity map

i : Rdiscrete −→ Rdiscrete

is continuous, while the other identity map

i : Rusual −→ Rdiscrete

is not continuous. 8. Let X be a finite metric space. Prove that any map f : X −→ Y is continuous. 9. Let A be a subset of a metric space (X, d). Consider the distance function from ⊂ −→ A X Y given by { } d(x, A) = inf d(x, a): a ∈ A .

Prove that

d(x, A) − d(y, A) ≤ d(x, y) and continuity of d(?,A). 10. Prove that the image of an everywhere dense set under a surjective continuous map is everywhere dense. 11. Is it true that the image of a nowhere dense set under a continuous map is nowhere dense? 12. Does there exists a nowhere dense set A of [0, 1] (with the usual topology induced out of the real line) and a continuous map f : [0, 1] −→ [0, 1] such that f(A) = [0, 1]?

80 Chapter 6

COMPLETENESS IN METRIC SPACES

We are presumably already familiar with the notion of completeness of the real line. We now make the natural generalization of the notion of completeness to the case of an arbitrary metric space. Cauchy’s criterion for convergence can readily be stated for general metric spaces. A metric space (X, d) is said to be complete if every sequence in it which satisfies the Cauchy’s criterion actually converges. Complete spaces have, so to speak, all their cracks filled in. We shall prove that in any metric space the cracks can be filled up by adjoining new points to give a complete space in the same way that R arises from Q.

6.1 Convergence in Metric Spaces

6.1.1 Criterion of Convergence

Definition 6.1 A sequence {xn} in a metric space (X, d) converges to x if foe every ϵ > 0 there is a natural number N such that

d(xn, x) < ϵ ∀ n ≥ N.

This notion is called the Criterion of Convergence.

81 6.1.2 Cauchy Criterion and Cauchy Sequences

In metric spaces, certain sequences, called Cauchy sequences, or fundamental sequences, are of primary importance.

Definition 6.2 A sequence {xn} in a metric space (X, d) is said to satisfy the Cauchy

criterion if given any ϵ > 0 ∃ a natural number Nϵ such that

d(xm, xn) < ϵ, ∀ m, n ≥ Nϵ.

Definition 6.3 A sequence {xn} in a metric space (X, d) is called a Cauchy sequence or a fundamental sequence if it satisfies the Cauchy criterion. That is, if and only

if it satisfies the following condition: for all ϵ > 0 ∃ a natural number Nϵ such that

d(xm, xn) < ϵ, ∀ m, n ≥ Nϵ.

More briefly, {xn} is a Cauchy sequence if

lim d(xm, xn) = 0. m,n→∞

An equivalent statement is that d(xn+k, xn) converges to 0 uniformly in k as n tends to infinity.

Theorem 6.1 Every convergent sequence in a metric space (X, d) is a Cauchy sequence.

Proof

Suppose xn −→ x. By the criterion of convergence, given any ϵ > 0 ∃ a natural number

Nϵ such that ϵ d(x , x) < , ∀ n ≥ N n 2 ϵ Now if m > n, we have ϵ d(x , x) < , ∀ m > n m 2 By the triangle inequality ϵ ϵ d(x , x ) ≤ d(x , x) + d(x, x ) < + = ϵ n m n m 2 2 Therefore

d(xm, xn) < ϵ, ∀ m, n ≥ Nϵ.

Hence {xn} is a Cauchy sequence. 

82 Remark 6.1 The converse of Theorem 6.1 is not always true. In some metric spaces

there are Cauchy sequences that do not converge. An example is the space (Q, de) of

rational numbers equipped with the Euclidean metric de(x, y) = |x − y|, inherited from R. The sequence 1.4, 1.41, 1.412, ...

is easily seen to be a Cauchy sequence which does not converge in (Q, d ). It converges √ e to 2 ̸∈ Q. Also the sequence 0.1, 0.101, 0.101001, 0.1010010001, ...

is a Cauchy sequence which does not converge in (Q, de). It converges to an irrational number since it is a non-recurring decimal.

Note that boundedness is a necessary condition for a sequence to be convergent. In effect, a sequence that is not bounded cannot be a Cauchy sequence, so it cannot be a convergent sequence either. Moreover, every Cauchy sequence is bounded. It is easy to show that every Cauchy sequence converges to the limit of any convergent subsequence.

Definition 6.4 A metric space (X, d) is said to be complete if every Cauchy sequence in the space converges to a point in X. Otherwise, X is said to be incomplete.

Remark 6.2 The spaces Rn, n = 1, 2, ... are complete. In particular, R is complete. The space of rational numbers Q is not complete. So is the space of irrational numbers. It turns out that every metric space may be imbedded in a complete metric space called the ”completion” of the space, in which it is dense. For the space of rational numbers, the corresponding complete space is the space of real numbers. In many developments in analysis, the completeness of the reals is used in the form of the so-called nested intervals theorem. It has the following counterpart in general metric spaces.

We consider more examples.

Example 6.1 The function space C[a,b] with the sup or max metric is complete.

83 Proof

Let {xn} be a Cauchy sequence in (C[a,b], d). Then for every ϵ > 0 there is an Nϵ such that

d(xn, xm) < ϵ m, n > Nϵ.

But this means that

sup{|xn(t) − xm(t)| : t ∈ [a, b]} < ϵ, m, n > Nϵ.

In particular, for every t ∈ [a, b], {xn(t)} is a Cauchy sequence of real numbers. By the

completeness of the real numbers, {xn(t)} converges to a number x(t), so that we have

determined a function x on [a, b]. Now, for every n > Nϵ

sup{|x(t) − xn(t)| : x ∈ [a, b]} ≤ ϵ.

This implies that {xn} converges uniformly to x, that x is continuous(since the limit of a uniformly convergent sequence of continuous functions is itself a continuous function), and

lim d(x, xn) = 0 n→∞

This means that the sequence {xn(t)} in (C[a,b], d) converges to a function x(t) in

(C[a,b], d). Thus (C[a,b], d) is a complete metric space.

1 Example 6.2 The function space C[a,b] with the L metric ∫ b d(x, y) = |x(t) − y(t)| dt a is not complete.

Proof − 1 Let a < c < b, and for every n so large that a < c n , define xn as:   ≤ ≤ − 1  0 if a t c n x (t) = − − 1 ≤ ≤ n  nt nc + 1 if c n t c  1 if c ≤ t ≤ b.

84 ≤ 1 1 { } Then d(xn, xm) n + m , from which it is obvious that xn is a Cauchy sequence.

Now, let x ∈ C[a,b]. Then

∫ − 1 ∫ ∫ c n c b d(xn, x) = |x(t)| dt + |xn(t) − x(t)| dt + |1 − x(t)| dt − 1 a c n c

and limn→∞ d(xn, x) = 0 implies that

x(t) = 0, t ∈ [a, b] and x(t) = 1, t ∈ (c, b].

Since it is impossible for a continuous function to have this property, {xn} does not have a limit.

Example 6.3 Show that A = (0, 1] is not complete.

Solution { 1 ∈ N} { } ⊂ { } Take xn = n : n . Clearly xn A and xn is a Cauchy sequence but xn −→ 0 ̸∈ A. Thus A is not complete.

Example 6.4 Show that Q is not complete.

Solution Consider the sequence

1.4, 1.41, 1.412, ...

This is a Cauchy sequence in Q which does not converge to a rational number.

Example 6.5 Let (X, d) be a discrete metric space. Characterize the sequences {xn} in

X such that d(xn, x) −→ 0.

Solution −→ 1 ∈ N If d(xn, x) 0, then choose ϵ = 2 . Then there exists an n0 such that 1 d(x , x) < ϵ = , for n ≥ n . n 2 0

This is only possible if d(xn, x) = 0. That is, if xn = x, for all n ≥ n0. We conclude that all the convergent sequences are constant eventually.

85 6.2 Compactness vs Completeness in Metric Spaces

Clearly, complete sets are closed, so that the property of being complete is stronger than the property of being closed. The property of being compact is stronger still. In fact compactness is stronger than closedness and boundedness combined. Compactness and completeness properties in metric spaces are very useful in analysis. They fea- ture in equicontinuity, contractions, etc which are applicable in differential and integral equations.

Proposition 6.2 Let A be a compact subset of a metric space (X, d). Then A is com- plete. In particular, A is closed.

Proof

Take a Cauchy sequence {xn} in A. Since A is compact,it is sequentially compact and { } ∈ hence there exists a convergent subsequence xnk with limit x A. We will show that

the whole sequence {xn} converges to x, so that A is complete. Let ϵ > 0. Let N be large enough so that ϵ d(x , x ) < , ∀ m, n > N; n m 2 Let k be large enough so that ϵ d(x , x) < , ∀ K > N. nk 2

Then, for n > N, nk > max(N, nk), we have ϵ ϵ d(x , x) ≤ d(x , x ) + d(a , x) < + = ϵ. n n nk nk 2 2

This proves that xn −→ x ∈ A. Therefore A is complete. The conclusion that A is closed follows easily from the fact that A contains all its limit points.

Remark 6.3 Note that

Bounded and Compact =⇒ Complete

but the converse is not true. That is, while every compact metric space is complete, it is obvious that completeness does not imply compactness. The set R of real numbers, for instance, is complete but not

86 compact. Even a complete and bounded metric space need not be compact. For example, a discrete space which contains infinitely many points is bounded and complete, but it is not compact. Similarly, metrizing R by means of the metric |x − y| ρ(x, y) = 1 + |x − y| yields a bounded and complete metric space, which is not compact.

Among the complete spaces, the compact ones are distinguished by a property called total boundedness.

Definition 6.5 A metric space (X, d) is said to be totally bounded if, for every ϵ > 0, X contains a finite set, called an ϵ-net, such that the finite set of open spheres or balls of radius ϵ and centers in the ϵ-net covers X.

Let A be a subset of a metric space (X, d) and let ϵ > 0. A finite set of points S = { } ∈ ∈ x1, x2, .., xn is called an ϵ-net for A if for every point p A, there exists xi0 S such with

d(p, xi0 ) < ϵ.

This means that if A is totally bounded then ∪ A ⊂ B(xi, r)

xi∈S Example 6.6 Let A = {(x, y): x2 + y2 < 4}, the open disc centered at the origin and 3 of radius 2. If ϵ = 2 , then the set { } S = 1, −1), (1, 0), (1, 1), (0, −1), (0, 0), (0, 1), (−1, −1), (−1, 0), (−1, 1)

is an ϵ-net for A. 1 1 1 On the other hand, if ϵ = 2 , then S is not an ϵ-net for A. For example p = ( 2 , 2 ) belongs 1 to A but the distance between p and any other point in S is greater than 2 .

87 The figure below illustrates this.

Figure 6.1: ϵ-net for A

Definition 6.6 A subset A of a metric space X is totally bounded if A possesses an ϵ-net for every ϵ > 0.

Note that A is totally bounded if and only if for every ϵ > 0, there is a decomposition of A into a finite number of sets, each with diameter less than ϵ. ⊙ The gap between completeness and compactness disappears if we strengthen the boundedness hypothesis to total boundedness.

Theorem 6.3 A metric space X is compact if and only if it is complete and totally bounded.

To prove this theorem , we need the following lemma.

Lemma 6.4 A metric space (X, d) is totally bounded if and only if every sequence in X has a Cauchy subsequence.

Proof of Theorem 6.3 (⇐=): Suppose X is complete and totally bounded. By Lemma 6.4, every sequence in X has a Cauchy subsequence, which converges since X is complete. Hence X is compact. (=⇒): Conversely, suppose X is compact. Then X is complete, by Proposition 6.2. Moreover, every sequence in X has a convergent, hence a Cauchy, subsequence. 

Proposition 6.5 Every totally bounded subset in a metric space (X, d) is bounded.

88 Proof Let (X, d) be a metric space and A be a totally bounded set of (X, d), and let r > 0. Since A is a totally bounded set of (X, d), then there exists S ⊂ X finite and such that ∪ A ⊂ B(x, r). x∈S Since, for all x ∈ S, B(x, r)) is a bounded set of (X, d), then ∪ B(x, r) x∈S is a bounded set of (X, d), and hence A is a bounded set of (X, d) too. 

Remark 6.4 While such properties as convergence and continuity are topological (i.e. having to do with open sets) this is not true of completeness, because the definition of a Cauchy sequence involves the metric too intimately to be given in terms of open sets alone. Completeness property is, of course, intrinsic to metric spaces. It is not preserved by topological equivalence.

To show that completeness is not topological, we note that (−1, 1) and R are home- omorphic spaces and that R is complete while (−1, 1) is not. To examine the situation more closely, consider the function x x 7−→ √ 1 − x2 which is a homeomorphism from (−1, 1) to R. It carries nonconvergent Cauchy sequence { − 1 } − { √n−1 } R 1 n in ( 1, 1) into 2n−1 , which is not a Cauchy sequence in . The fact lies in the fact that although x 7−→ √ x is continuous, it is not uniformly continuous. 1−x2

Proposition 6.6 Let A be a complete subspace of a metric space X. Then A is closed in X.

Proof

Suppose x is a limit point of A. Choose a sequence {xn} in A such that xn −→ x. Now,

{xn} is a Cauchy sequence and, since A is complete, it converges to a point y ∈ A. This shows that x = y and therefore x ∈ A. That is A contains all its limit points. Thus A is closed.  The converse of Proposition 6.6 is also true.

89 Theorem 6.7 Let (X, d) be a complete metric space. A subspace A of X is complete if and only if it is closed.

Proof We prove only the converse since the necessary condition has been proved in Proposition 6.6. (⇐=) Suppose that A is a closed subspace of a complete metric space X. To demonstrate that A is complete, consider a Cauchy sequence {xn} of points in A. Since X is complete, this sequence converges to a point x in X. The fact that A is closed insures that the limit x belongs to A. Thus each Cauchy sequence of points of A converges to a point of A, and we conclude that A is a complete subspace of X. 

Remark 6.5 Recall that a subset A of a metric space X is said to be nowhere dense in X if it is dense in no open ball at all, or equivalently if every open ball B(x, r) ⊂ X contains another ball B′(x, r) such that B′ ∩ A = ∅. This concept plays an important role in the Baire Category Theorem.

6.3 Baire Category Theorem

Theorem 6.8 (Baire Category Theorem) Let (X, d) be a complete metric space.

(a). Let Un be open dense subsets of X, for n ∈ N. Then ∩∞ Un n=1 is dense in X.

(b). Let Fn be nonempty closed subsets of X such that ∪ X = Fn n

Then at least one of the Fn’s has a nonempty interior. In other words, a complete metric space cannot be a countable union of nowhere dense closed subsets.

Theorem 6.9 (Nested Sequence Theorem)A metric space (X, d) is complete if and only if for every sequence {An} of closed sets with

An+1 ⊂ An, n = 1, 2, ...

90 and

lim diam(An) = 0, n→∞ the intersection ∩∞ An n=1 consists of exactly one point.

Corollary 6.10 In a complete metric space, a sequence of nested closed balls with di- ameters that converge to zero have a unique common point.

Remark 6.6 Note that the conditions limn→∞ diam(An) = 0, and that the Ai are close sets are both necessary. That is the conclusion of the Nested Sequence Theorem fails if any one of these conditions is not satisfied.

Example 6.7 Let X = R endowed with the usual metric and An = [n, ∞) ⊂ R. Clearly

X is complete, An are closed and An+1 ⊂ An. But ∩∞ An = ∅. n=1 Observe that

lim diam(An) ≠ 0. n→∞

R 1 ⊂ R Example 6.8 Let X = endowed with the usual metric and An = (0, n ] . Clearly

X is complete, An and An+1 ⊂ An.

lim diam(An) = 0. n→∞

But ∩∞ An = ∅. n=1

Observe that the An are not closed.

Corollary 6.11 (Baire) A complete metric space X cannot be represented as the union of a countable number of nowhere dense sets.

91 Proof Suppose to the contrary that ∪∞ X = An (6.1) n=1

where every set An is nowhere dense in X. Let B0 be a closed ball of radius 1. Since

A1 is nowhere dense in B0, being nowhere dense in X, there is a closed ball B1 of radius 1 ⊂ ∩ ∅ less than 2 such that B1 B0 and B1 A1 = . Since A2 is nowhere dense in B1 being 1 ⊂ nowhere dense in B0, there is a closed ball B2 of radius less than 3 such that B2 B1 and B2 ∩ A2 = ∅, and so on. In this way, we get a nested sequence of closed balls {Bn} with radii(and hence diameter) converging to zero such that

Bn ∩ An = ∅ (n = 1, 2, 3, ...)

By Theorem 6.9 ( Nested Sequence Theorem) the intersection ∩∞ Bn n=1

contains a point x in X. By construction, x cannot belong to any of the sets An, i.e ∪∞ x ̸∈ An. n=1 It follows that ∪∞ X ≠ An, n=1 contrary to (6.1). Hence the representation (6.1) is impossible. 

Proposition 6.12 In a complete metric space X, the intersection of a countable family of dense open sets is dense in X.

Proof Let {G } be a countable family of dense open sets in the complete metric space X. We n ∩ shall prove that n Gn is dense.

Let H be any open set and let En = X − Gn. Then En is closed and

int(En) = int(En) = X − Gn = ∅,

92 { }

so En ∩ H is a countable family of nowhere dense sets. Since ∪ (En ∩ H) ≠ H, n

we have ∩ H ∩ ( Gn) ≠ ∅. ∩ n  Thus n Gn is dense. Proposition 6.13 In a complete metric space, a meager set has no interior point, or, equivalently, its complement is dense.

Proof Let A be a family such that int(A ) = ∅. Suppose that there is an open set U with ∪n n U ⊂ A . For n n ∪ ∪ U ⊂ An ⊂ An, n n we deduce that ∩ { ⊂ U { An . n Baire’s Theorem then implies that U { is dense. Since U { is closed, we conclude that U { = X. That is U = ∅. 

Corollary 6.14 A complete metric space is a set of second category.

Note that though for a meager set A, we have int(A) = ∅, we may have int(A) ≠ ∅. For instance, A = Q ⊂ R.

Theorem 6.15 Let (X, d) be a complete metric space and let A be any set. Let B be the set of all functions from A to X, and τ be the (possibly infinite metric) for B defined by { ( ) } τ(f, g) = sup d f(x), g(x) : x ∈ A .

Then (B, τ) is a complete metric space.

Proof

Suppose that {fn} is a Cauchy sequence in B. For each fixed x ∈ A, the sequence

{fn(x)} is a Cauchy sequence in X since ( )

d fm(x), fn(x) ≤ τ(fm, fn).

93 Since X is complete, we can define

g : A −→ X by

g(x) = lim fn(x).

We must prove that fn −→ g in B. Let ϵ > 0 be given. Choose K so large that

τ(fm, fn) < ϵ ∀ m, n ≥ K.

For any fixed x and any m, n ≥ K, we have ( )

d fm(x), fn(x) < ϵ, so ( ) ( )

d g(x), fn(x) = lim d fm(x), fn(x) < ϵ. m→∞ Therefore

τ(g, fn) ≤ ϵ for any n ≥ K.

Thus fn −→ g in B. This proves that (B, τ) is a complete metric space. 

6.4 Completeness vs Equivalent metrics in Metric Spaces

Completeness is a metric invariant and not a topological invariant. This means that isometric spaces are both complete or both incomplete/non-complete and that there exist metric spaces X and Y that are homeomorphic, but X is complete and Y is non-complete. In fact homeomorphism preserve convergent sequences but not Cauchy sequences. Note that completeness of a space depends on the metric defined on it. For instance (0, 1] is not complete with respect to the usual metric on R. But this may not be true if we equip it with a different metric. For instance, if endow (0, 1] with the discrete metric, then the resulting space would be complete.

Indeed, if {xn} is a Cauchy sequence in a discrete space X, then there must exist an M ∈ N such that

xn = xn+1 = · · · ∀ n ≥ M

94 { } 1 which implies that xm converges in X, and hence it is Cauchy. If we let ϵ = 2 , since

{xn} is Cauchy, there exist n0 ∈ N such that 1 n, m ≥ n =⇒ d(x − n, x ) < =⇒ x = x . 0 m 2 n m

In other words, {xn} is of the form

{ } x1, x2, ..., xn0 , x, x, x, x, ...

That is, it is constant from some term on. Thus a sequence {xn} in a discrete metric space X is Cauchy if and only if it is of the form

{ } x1, x2, ..., xn0 , x, x, x, x, ... ,

which clearly converges to x ∈ X. Thus every trivial discrete space is complete.

Example 6.9 Consider X = R endowed with the usual metric d(x, y) = |x − y| and Y = R endowed with the metric

x y ρ(x, y) = − . 1 + |x| 1 + |y| Clearly X and Y are homeomorphic, a homeomorphism being given by the map x f(x) = , x ∈ R. 1 + |x| In particular, both metrics give rise to the same convergent sequences. However, the sequence {n} is not a Cauchy sequence for the Euclidean metric, but it is a Cauchy sequence for the metric ρ, since for n, m ∈ N, m ≥ n

n m n ρ(m, n) = − ≤ 1 − −→ 0 as n −→ ∞. 1 + n 1 + m 1 + n Since {n} does not converge in (R, ρ), Y = (R, ρ) is not complete.

Remark 6.7 Homeomorphic, but non-isometric spaces can sometimes have the same Cauchy sequences. A sufficient condition ensuring that Cauchy sequences with respect to different metrics on the same set X are the same, is that the two metrics are equivalent.

95 6.5 Exercises

1. Show that Q is not complete. { } { } 2. Let xn be a Cauchy sequence in a metric space. Suppose that the subspace xnk converges. Prove that {xn} converges.

3. Give an example of a complete metric space X and a nested sequence {An} of closed subsets of X such that ∩∞ An = ∅. n=1

[Hint: Think in terms of diam(An) −→ 0.] 4. Prove that the real line R equipped with the metric

d(x, y) = | arctan x − arctan y| is an incomplete metric space. 5. Show that ”completeness” is not a topological property. That is give an example of a complete metric space homeomorphic to an incomplete metric space. 6. Consider N with the metric { 0, if m = n d(x, y) = 1 1 + m+n , otherwise

Show that (a). Every Cauchy sequence is ”eventually” constant and hence (N, d) is a complete metric space. { ∈ N ≤ 1 } { ≥ } (b). Sn = m : d(m, n) 1 + 2n = m : m n is a nested sequence of closed balls whose intersection is empty. 7. Let (X, d) be a metric space such that d(A, B) > 0 for any pair of disjoint subsets A and B. Show that (X, d) is complete.

[Hint: If {xn} is Cauchy with distinct terms and which is not convergent, consider

A = {x2k+1 : k ∈ N}] 8. Let X be a metric space such that any closed and bounded subset of X is compact. Prove that X is complete.

9. If xn −→ x in a metric space (X, d) and y is any other point in the space, show that

lim d(xn, y) = d(x, y). n→∞

96 10. If xn −→ x and yn −→ y in a metric space (X, d), show that

lim d(xn, yn) = d(x, y). n→∞ { } { 1 } 11. Show that X = n : n = 0, 1, 2, 3, ... and Y = n : n = 1, 2, 3, ... are homeo- morphic as subspaces of R with the usual metric, but X is complete, while Y is not complete. 12. Show that if X is isometric to Y and X is complete, then Y is complete.

97 Bibliography

[1] Jerrold E. Marsden Michael J. Hoffman Elementary Classical Analysis, 2nd Ed., W.H. Freeman and Company, New York, 1993.

[2] Manfred Stoll, Introduction to Real Analysis, 2nd Ed., Addison Wesley Higher Mathematics, Boston, 2001.

[3] Jewgeni H. Dshalalow, Real Analysis: An introduction to the theory of real functions and Integration,Chapman Hall/CRC, 2001.

[4] A.J. White, Real Analysis: An Introduction, Addison Wesley, London, 1968.

[5] H.L Royden, Real Analysis: An Introduction, 3rd Ed., Prentice Hall, New Jersey, 1988.

[6] Walter Rudin, Principles of Mathematical Analysis, 3rd Ed., McGraw-Hill, Inc, New York, 1976.

98 Index

accumulation complete, 82 point, 33 completeness, 60 adherent, 33 completion, 82 conjugate exponents, 6 Baire Category Theorem, 88 contact point, 33 ball continuity, 65 closed, 22 uniform, 72 open, 22 continuous Bolzano-Weierstrass Theorem, 58 function, 65 boundary, 45 convergence, 80 point, 45 cover, 57 bounded, 42 finite, 57 Cauchy covering, 57 criterion, 80 criterion of convergence, 80 sequence, 80 deleted neighborhood, 33 closed dense ball, 22 set, 53 set, 22, 34 derived set, 33 sphere, 23 diameter, 42 closure, 33 discrete point, 33 metric cluster space, 3 point, 33 set, 29 codes metric, 20 distance, 1, 43 compact set, 57 equivalent

99 metrics, 12 metric, 4 Euclidean, 1 maximum n-space, 10 metric, 4 meager finite set, 55 cover, 57 metric, 2 frontier, 45 L2, 11 function space, 4 equivalent, 12 Heine- Borel Theorem, 60 Manhattan, 14 homeomorphic, 16 taxicab, 14 homeomorphism, 16 codes, 20 discrete, 3 incomplete, 82 euclidean, 3 inequality relative, 12 Cauchy-Bunyakovsky- Schwarz, 7 space, 2 Cauchy-schwarz, 6 metric space, 1 H¨older’s, 6 Minkowski’s, 7 neighborhood, 23 inequaltity deleted, 33 triangle, 2 Nested Sequence Theorem, 89 interior, 28 nowhere dense point, 28 set, 53 isolated open point, 28 ball, 22 isometric, 16 neighborhood, 22 isometry, 16 set, 22 Lebesgue integrable sphere, 22 functions, 3 perfect limit set, 29 point, 33 point max boundary, 45

100 pseudo-metric, 2 continuity, 72 space, 2 uniformly continuous, 72 usual metric, 3 realtive topology, 40 relatively closed, 40 open, 40 sequentially compact, 57 set discrete, 29 perfect, 29 first category, 55 nowhere dense, 53 somewhere dense, 55 somewhere dense set, 55 sphere, 23 standard metric, 3 subspace, 12 sup metric, 4 supremum metric, 4 topology metric space, 22 total boundedness, 86 totally bounded, 60, 86 triangle inequality, 2 uniform

101