Chapter 4. Metric Spaces
Introduction
In multivariable calculus, we study vector-valued sequences, that is sequences in Rn, and vector-valued functions of several variables, that is functions f : A ⊆ Rn → Rm. In linear algebra, we study inner product spaces. An n-dimensional inner product space U can be given an orthonormal basis {u1, u2, · · · , un} (using the Gram-Schmidt Procedure)
and then we can identify it with Euclidean space Rn using the map φ : Rn → U given n
by φ(t) = tkuk. k=1
In real analysis, we combine ideas from linear algebra and multivariable calculus. For example, we study sequences in U and functions f : U → V , where U and V are inner product spaces. We are interested not only in n-dimensional inner product spaces (which, as mentioned above, can be identified with Rn), but also in infinite-dimensional vector spaces, such as the vector space of all sequences in R, and the vector space of all functions f : [a, b] → R.
Recall, from linear algebra, that given an inner product on a vector space U we can define a norm on U by ∥u∥ = ⟨u, u⟩ and we can define distance between two elements in U by d(u, v) = ∥u − v∥. In real analysis, we sometimes meet vector spaces which do not have an inner product, but they do have a norm. A vector space with a norm (but not necessarily with an inner product) is called a normed linear space, and we shall define these in this chapter. Also, we sometimes meet spaces (such as arbitrary subsets of inner product spaces) which are not vector spaces but which do have a well-defined notion of distance. Such spaces are called metric spaces, and we shall define these in this chapter.
In multivariable calculus, we often define what it means for a subset A ⊆ Rn to be open or closed. Intuitively, a subset A ⊆ R2 is open when it does not include its boundary points (we draw the boundary as a dotted line) and a closed subset does include its boundary points (and we draw the boundary as a solid line). In this chapter, we shall define what it means for a subset A ⊆ X to be open or closed when X is a metric space (including the case that X is an inner product space or a normed linear space), and we shall define exactly what the boundary of such a set is.
In the following chapter (Chapter 5) we shall study sequences in X and functions f : X → Y , where X and Y are metric spaces. We shall study convergence of sequences and limits of functions and continuity of functions (but we shall not deal with differentiation or integration of such functions). Some of the definitions and theorems from calculus can be generalized to apply in this more general setting.
1
Inner Product Spaces
4.1 Definition: Let U be a vector space over R. An inner product on U is a function ⟨ , ⟩ : U × U → R (meaning that if u, v ∈ U then ⟨u, v⟩ ∈ R) such that for all u, v, w ∈ U and all t ∈ R we have
(1)(Bilinearity)⟨u+v,w⟩=⟨u,w⟩+⟨v,w⟩, ⟨tu,v⟩=t⟨u,v⟩, ⟨u,v+w⟩=⟨u,v⟩+⟨u,w⟩, ⟨u,tv⟩=t⟨u,v⟩,
(2) (Symmetry) ⟨u, v⟩ = ⟨v, u⟩, and
(3) (Positive Definiteness) ⟨u, u⟩ ≥ 0 with ⟨u, u⟩ = 0 ⇐⇒ u = 0.
For u,v ∈ U, ⟨u,v⟩ is called the inner product of u with v. We say that u and v are orthogonal when ⟨u,v⟩ = 0. An inner product space is a vector space (over R) equipped with an inner product. Given two inner product spaces U and V over R, a linear map L : U → V is called a homomorphism of inner product spaces (or we say that L preserves inner product) when L(x),L(y) = ⟨x,y⟩ for all x,y ∈ U. A bijective homomorphism is called an isomorphism.
4.2 Example: The standard inner product on Rn is given by
n ⟨u,v⟩= ukvk.
k=1
4.3 Example: We write Rω to denote the space of sequences in R, and we write R∞
to denote the space of eventually zero sequences in R, that is Rω = u = (u1,u2,u3,···) each uk ∈ R
R∞ =u∈Rω |∃n∈Z+ ∀k≥n uk =0.
Recall that R∞ is an infinite-dimensional vector space with standard basis {e1 , e2 , e3 , · · ·} where e1 = (1,0,0,···), e2 = (0,1,0,···) and so on. Note that {e1,e2,e3,···} spans R∞ (and not all of Rω) because linear combinations are given by finite sums (not by infinite series). The standard inner product on R∞ is given by
∞
⟨u,v⟩= ukvk. k=1
Note that the sum here does make sense because only finitely many of the terms are nonzero (we cannot use the same formula to give an inner product on Rω).
4.4 Example: For a,b ∈ R with a ≤ b, we write
B[a,b] = B[a,b],R = f : [a,b] → Rf is bounded
C[a, b] = C[a, b], R = f : [a, b] → Rf is continuous. The standard inner product on C[a,b] is given by
b b
⟨f, g⟩ = f g = f(x)g(x) dx.
aa
Note that this is positive definite because ⟨f,f⟩ = b f(x)2dx ≥ 0 and if b f(x)2dx = 0 aa
the we must have f(x) = 0 for all x ∈ [a,b], using the fact that if g is non-negative and continuous on [a,b] with b g(x)dx = 0, then we must have g(x) = 0 for all x ∈ [a,b] (we
a
leave the proof of this fact as an exercise).
2
4.5 Theorem: Let U be an inner product space and let u,v ∈ U. If ⟨u,x⟩ = ⟨v,x⟩ for all x ∈ U, then u = v.
Proof: Supposethat⟨u,x⟩=⟨v,x⟩forallx∈U. Then⟨u−v,x⟩=⟨u,x⟩−⟨v,x⟩=0for allx∈U. Inparticular,takingx=u−vwehave⟨u−v,u−v⟩=0sothatu=v,by positive definiteness.
4.6 Definition: Let U be an inner product space. For u ∈ U, we define the norm (or
length) of u to be
4.7 Theorem: (Basic Properties of Inner Product and Norm) Let U be an inner product
∥u∥ = ⟨u, u⟩. space. Foru,v∈U andt∈Rwehave
(1) (Scaling) ∥tu∥ = |t| ∥u∥,
(2) (Positive Definiteness) ∥u∥ ≥ 0 with ∥u∥ = 0 ⇐⇒ u = 0,
(3) ∥u ± v∥2 = ∥u∥2 ± 2 ⟨u, v⟩ + ∥v∥2,
(4) (Pythagoras’ Theorem) ⟨u, v⟩ = 0 ⇐⇒ ∥u + v∥2 = ∥u∥2 + ∥v∥2,
(5) (Parallelogram Law) ∥u + v∥2 + ∥u − v∥2 = 2∥u∥2 + 2∥v∥2,
(6) (Polarization Identity) ⟨u, v⟩ = 1 ∥u + v∥ − ∥u − v∥, 4
(7) (The Cauchy-Schwarz Inequality) ⟨u, v⟩ ≤ ∥u∥ ∥v∥ with |⟨u, v⟩| = ∥u∥ ∥v∥ if and only if {u, v} is linearly dependent, and
(8) (The Triangle Inequality) ∥u∥ − ∥v∥ ≤ ∥u + v∥ ≤ ∥u∥ + ∥v∥.
Proof: You will have already seen a proof in a linear algebra course, but let us remind you of some of the proofs. The first 6 parts are all easy to prove. To prove Part 7, suppose first that {u, v} is linearly dependent. Then one of u and v is a multiple of the other, say v = tu with t ∈ R. Then we have |⟨u,v⟩| = |⟨u,tu⟩| = t⟨u,u⟩ = |t|∥u∥2 = ∥u∥∥tu∥ = ∥u∥∥v∥. Nextsupposethat{u,v}islinearlyindependent. Then1·v+t·u̸=0forallt∈R,soin particular v − ⟨u,v⟩ u ̸= 0. Thus we have
∥u∥2
0 < v − ⟨u,v⟩ u2 = ∥v∥2 − 2v, ⟨u,v⟩ u + ⟨u,v⟩ u2
∥u∥2
= ∥v∥2 − 2 ⟨u,v⟩2 + ⟨u,v⟩2
∥u∥2 ∥u∥2
∥u∥2 ∥u∥2 = ∥v∥2 − ⟨u,v⟩2
∥u∥2
so that ⟨u,v⟩2 ∥u∥2
< ∥v∥2 and hence |⟨u, v⟩| ≤ ∥u∥ ∥v∥. This proves Part 7. Using Parts 3 and 7, we have
∥u+v∥2 =∥u∥2 +2⟨u,v⟩+∥v∥2 ≤∥u∥2 +2|⟨u,v⟩|+∥v∥2 ≤ ∥u∥2 + 2∥u∥ ∥v∥ + ∥v∥2 = ∥u∥2 + ∥v∥2.
Taking the square root on both sides gives ∥u + v∥ ≤ ∥u∥ + ∥v∥. Finally note that ∥u∥ = ∥(u+v)−v∥ ≤ ∥u+v∥+∥−v∥ = ∥u+v∥+∥v∥ so that we have ∥u∥−∥v∥ ≤ ∥u+v∥, and similarly ∥v∥ − ∥u∥ ≤ ∥u + v∥, hence ∥u∥ − ∥v∥ ≤ ∥u + v∥. This proves Part 8.
3
Normed Linear Spaces
4.8Definition: LetU beavectorspaceoverR. AnormonU isafunction∥ ∥:U →R
(meaningthatifu∈U then∥u∥∈R)suchthatforallu,v∈U andallt∈Rwehave
(1) (Scaling) ∥tu∥ = |t| ∥u∥,
(2) (Positive Definiteness) ∥u∥ ≥ 0 with ∥u∥ = 0 ⇐⇒ u = 0, and (3) (Triangle Inequality) ∥u + v∥ ≤ ∥u∥ + ∥v∥.
For u ∈ U, the real number ∥u∥ is called the norm (or length) of u, and we say that u is a unit vector when ∥u∥ = 1. A normed linear space (over R) is a vector space equipped with a norm. Given two normed linear spaces U and V over R, a linear map L : U → V is called a homomorphism of normed linear spaces (or we say that L preserves norm) when L(x) = ∥x∥ for all x ∈ U. A bijective homomorphism is called an isomorphism.
4.9 Example: The standard inner product on Rn induces the standard norm on Rn, which is also called the 2-norm on Rn, given by
n 2 1 / 2 ∥u∥2 =∥u∥= ⟨u,u⟩= |uk| .
k=1
We also define the 1-norm and the supremum norm (also called the infinity norm)
on Rn by
n
∥u∥1 = |uk|,
k=1
∥u∥∞ =max|u1|,|u2|,···,|un|.
4.10 Example: The standard inner product on R∞ induces the standard norm, also called the 2-norm, on R∞ given by
∞ 2 1 / 2 |uk| .
⟨u,u⟩=
We also define the 1-norm and the supremum norm (also called the infinity norm)
on R∞ by
k=1
∥u∥∞ = sup|uk|k∈Z+} = max|uk|k∈Z+}.
∞ ∥u∥1 =
∥u∥2 =
∞
∥u∥1 = |uk|, k=1
4.11 Definition: For u ∈ Rw, we define the 1-norm of u, the 2-norm of u, and the supremum norm (or infinity norm) of u to be the extended real numbers
∞ 21/2 + |uk| and ∥u∥∞ = sup |uk|k∈Z
k=1
|uk| , ∥u∥2 =
Note that these can be infinite, with ∥u∥∞ = ∞ in the case that |uk| k ∈ Z+ is not
k=1
bounded above (by a real number). Define
l1 =l1(R)=u∈Rω∥u∥1 <∞},
l2 =l2(R)=u∈Rω∥u∥2 <∞, l∞ =l∞(R)=u∈Rω∥u∥∞ <∞.
4
4.12 Example: For the sequence (u ) in R given by u = 1 , we have
kk≥1
k 2k
∥u∥1= 2k =1,∥u∥2= 4k =√3 ,and ∥u∥∞=|u1|=2.
∞1 ∞11/2 1 k=1 k=1
For the sequence (vk)k≥1 given by vk = 1, we have k
∞ 1 1 / 2
<∞,and ∥v∥∞ =|u1|=1 givenbyw = 1 wehave
1
∞ 1
∥v∥1 = k =∞, ∥v∥2 =
k2 2 √6 kk≥1
k=1 k=1 infact∥v∥ = π . Forthesequence(w )
k √k
∥w∥1 = √k =∞, ∥w∥2 = k =∞,and ∥w∥∞ =|w|1 =1.
∞ 1 ∞ 1 1 / 2 k=1 k=1
4.13Theorem: WehaveR∞ ⊆l1 ⊆l2 ⊆l∞ ⊆Rω.
∞
Proof: If u ∈ R∞ then ∥u∥1 = |uk| < ∞ (because only finitely many of the terms are
k=1
nonzero) and so u ∈ l1. Thus we have R∞ ⊆ l1.
Suppose that u ∈ l1. Since ∥u∥1 = |uk| < ∞, we know that |uk| → 0 (by the Divergence Test from calculus) so we can choose m ∈ Z+ such that when k ≥ m we have |ak| ≤ 1. Then for k ≥ m we have |ak|2 ≤ |ak|. Since |ak| converges and |ak|2 ≤ |ak| for
k ≥ m, it follows that |ak|2 converges by the Comparison Test (from calculus). Thus
∞ ∥u∥2 =
2 1 / 2
|ak| <∞andsou∈l2. Thuswehavel1(R)⊆l2.
k=1
Supposeu∈l . Since∥u∥ 2 = |a |2 <∞wehave|a |2 →0(bytheDivergence
n n and y = (|v1|,|v2|,···,|vn|) ∈ R . Then ∥x∥2 =
2 1 / 2 |uk|
≤
∞ 2
|uk| = ∥u∥2
∞
22kk k=1
Test)hencealso|ak|→0. Choosem∈Z+ suchthatwhenk≥mwehave|ak|≤1. Then the set |ak|k ∈ Z+ is bounded above by M = max|a1|,|a2|,···,|am−1|,1, and so we have∥u∥∞ ≤M,andhenceu∈l∞. Thuswehavel2 ⊆l∞.
Finally note that l∞ ⊆ Rω, by definition. 4.14 Theorem:
(1) The space l2 is an inner product space with inner product defined by
∞
⟨u,v⟩= ukvk. k=1
(2) For p = 1, 2, ∞, the space lp is a normed linear space with norm given by ∥u∥p .
∞
Proof: To prove Part 1, we need to show that if u,v ∈ l2, then ukvk converges so the k=1
inner product is well defined. Let u,v ∈ l2. For n ∈ Z+, let x = (|u1|,|u2|,···,|un|) ∈ Rn
k=1
and similarly ∥y∥2 ≤ ∥v∥2. By applying the Cauchy-Schwarz Inequality in Rn we have
n
|ukvk| = ⟨x, y⟩ ≤ ∥x∥2 ∥y∥2 ≤ ∥u∥2∥v∥2. By the Monotone Convergence Theorem,
k=1
k=1 k=1
absolute convergence implies convergence, the series ukvk converges, as required.
We leave it as an exercise to verify that the 3 properties which define an inner product (in Definition 3.1) are all satisfied.
n∞
since |ukvk| ≤ ∥u∥2∥v∥2 for every n ∈ Z+, it follows that |ukvk| ≤ ∥u∥2∥v∥2. Since
5
k=1
∞
Because ⟨u,v⟩ = ukvk gives a (well-defined, finite-valued) inner product on l2, it k=1
follows (from Theorem 4.7) that this inner product induces a (well-defined, finite-valued)
∞ 21/2
norm on l2 given by ∥u∥ = ⟨u,u⟩ =
|uk| . This is the formula we used to
k=1
define the 2-norm, so the 2-norm is a norm on l2. To complete the proof of Part 2 of
the theorem, it remains to show that ∥u∥1 is a norm on l1, and ∥u∥∞ is a norm on l∞. We leave this as an exercise but we remark that that unlike the situation for the inner product ⟨u, v⟩, we do not need to verify that ∥u∥1 and ∥u∥∞ are finite-valued because this is immediate from the definition of l1 and l∞.
4.15 Example: For a,b ∈ R with a ≤ b, we write
B[a,b] = B[a,b],R = f : [a,b] → Rf is bounded,
C[a, b] = C[a, b], R = f : [a, b] → Rf is continuous.
For f ∈ C[a, b], we define the 1-norm and the 2-norm of f to be b
∥f∥1 = |f|, a
∥f∥2 =
.
b
a
|f|2
1/2
and for f ∈ B[a, b], we define the supremum norm (also called the infinity norm) of f tobe
∥f∥∞ =sup f(x)a≤x≤b .
We leave it as an exercise to show that these are indeed norms (in particular, show that the 1-norm and the 2-norm are positive-definite). The 2-norm on C[a,b] is induced by the inner product on C[a, b] given by
b b
⟨f,g⟩ = f g = f(x)g(x)dx.
aa
6
Metric Spaces
4.16 Definition: Let U be a normed linear space. For u,v ∈ U, we define the distance
between u and v to be
4.17 Theorem: Let U be as normed linear space. For all u,v,w ∈ U,
(1) (Symmetry) d(u, v) = d(v, u),
(2) (Positive Definiteness) d(u, v) ≥ 0 with d(u, v) = 0 ⇐⇒ u = v, and (3) (Triangle Inequality) d(u, w) ≤ d(u, v) + d(v, w).
Proof: The proof is left as an easy exercise.
4.18 Definition: Let X be a set. A metric on X is a map d =: X × X → R such that
for all a,b,c ∈ X we have
(1) (Symmetry) d(a, b) = d(b, a),
(2) (Positive Definiteness) d(a, b) ≥ 0 with d(a, b) = 0 ⇐⇒ a = b, and (3) (Triangle Inequality) d(a, c) ≤ d(a, b) + d(b, c).
For a,b ∈ X, d(a,b) is called the distance between a and b. A metric space is a set X which is equipped with a metric d, and we sometimes denote the metric space by X and sometimes by the pair (X, d). Given two metric spaces (X, dX ) and (Y, dY ), a map f : X → Y is called a homomorphism of metric spaces (or we say that f is distance preserving) when dY f(a),f(b) = dX(a,b) for all a,b ∈ X. A bijective homomorphism is called an isomorphism or an isometry.
4.19 Note: Every inner product space is also a normed linear space, using the induced norm given by ∥u∥ = ⟨u, u⟩. Every normed linear space is also a metric space, using the induced metric given by d(u, v) = ∥v − u∥. If U is an inner product space then every subspace of U is also an inner product space using (the restriction of) the same inner product used in U. If U is a normed linear space then every subspace of U is also a normed linear space using the same norm. If X is a metric space then so is every subset of X using the same metric.
4.20 Example: In Rn (or in any subset X ⊆ Rn), the standard metric (also called the 2-metric) is given by
k=1
d1(a,b)=∥a−b∥1=|ak−bk| and k=1
d∞(a,b)=∥a−b∥∞ =max|ak −bk|1≤k≤n.
In R3, let u = (1, 2, 5) and v = (3, 5, −1). Find d1(u, v), d2(u, v) and
d(u, v) = ∥v − u∥.
d(a,b)=d2(a,b)=∥a−b∥2 =
We also have the 1-metric and the supremum metric (or the infinity metric) given
by
4.21 Exercise:
d∞(u,v).
∞
7
n 2 1 / 2 |ak −bk| .
4.22 Example: In l1 or in any subset X ⊆ l1, we have the 1-metric given by
∞
d1(a,b)=∥a−b∥1 = |ak −bk|. k=1
In l2 or in any nonempty subset X ⊆ l2 we have the 2-metric given by
k=1
infinity metric) given by
d∞(a,b)=∥a−b∥∞ =sup|ak −bk|k∈Z+.
Since R∞ ⊆ l1 ⊆ l2 ⊆ l∞, we could (if we wanted) also any of the metrics dp in the space R∞ (just as we can use any of the metrics dp in Rn). We could also use any of the metric dp in the space l1, and we could use either of the metrics d2 or d∞ in the space l2.
d2(a,b)=∥a−b∥2 =
In l∞ or in any nonempty subset X ⊆ l∞ we have the supremum metric (or the
4.23 Exercise: Let (u ) and (v ) be the sequences in l given by u = 1 and
kk≥1kk≥1
v = 1 . Findd (u,v),d (u,v)andd (u,v).
1 k2k
k3k 1 2 ∞
∞ 2 1 / 2 |ak −bk| .
4.24 Example: Let a,b ∈ R with a ≤ b. In C[a,b] or in any subset X ⊆ C[a,b], we have the 1-metric and the 2-metric, given by
d1(f,g)=∥f−g∥1 = d2(f,g)=∥f−g∥2 =
b b
|f−g|= f(x)−g(x)dx, aa
b 1/2 b 2 1/2 |f−g|2 = f(x)−g(x) dx ,
aa
and in B[a, b] or in any subset X ⊆ B[a, b] we have the supremum metric (also called the infinity metric) given by
d∞(f,g)=∥f−g∥∞ =max f(x)−g(x)a≤x≤b .
4.25 Exercise: Define f,g : [0,1] → R be f(x) = x and g(x) = x2. Find d1(f,g), d2(f,g) and d∞(f, g).
4.26 Example: For any nonempty set X ̸= ∅, the discrete metric on X is given by d(x,y) = 1 for all x,y ∈ X with x ̸= y and d(x,x) = 0 for all x ∈ X.
4.27 Remark: There are, in fact, a ridiculously vast number of metrics that one could define on R. For example, if we let f : R → R be any bijective map then we can define a metric on R by d(x, y) = |f (x) − f (y)|. But in this course, we shall usually concern ourselves with the metrics described in the above examples.
8
Open and Closed Sets in Metric Spaces
4.28 Definition: Let X be a metric space. For a ∈ X and 0 < r ∈ R, the open ball, the
closed ball, and the (open) punctured ball in X centred at a of radius r are defined to
be the sets B(a,r)=BX(a,r)= x∈Xd(x,a)
4.31 Example: Let X be a metric space and let a ∈ X. Show that {a} is closed in X.
Solution: To show that {a} is closed, we shall show that {a}c = X \ {a} is open. Let b∈X\{a}. Letr=d(a,b)andnotethatsinceb̸=awehaver>0. Letx∈B(b,r). Then d(x,b) < r = d(a,b). Since d(x,b) ̸= d(a,b) we have x ̸= a so that x ∈ X\{a}. Thus B(b, r) ⊆ X \ {a}. This proves that X \ {a} is open, and so {a} is closed.
4.32Example: LetXbeametricspace. Showthatfora∈Xand0
Let x ∈ B(b, s) and note that d(x, b) < s. Then, by the Triangle Inequality, we have d(a, b) ≤ d(a, x) + d(x, b) < d(x, a) + s
and so d(x,a) > d(a,b)−s = r. Since d(x,a) > r we have x ∈/ B(a,r) and so x ∈ B(a,r)c. This shows that B(b,s) ⊆ B(a,r)c and it follows that B(a,r)c is open and hence that B(a, r) is closed.
4.33 Example: In R (using its standard metric), an open ball is the same thing as a bounded non-degenerate open interval, and a closed ball is the same thing as a bounded non-degenerate closed interval. The unbounded open intervals (a,∞), (−∞,b) are open, and the unbounded closed intervals [a, ∞) and (−∞, b] are closed. The degenerate closed intervals [a,a] = {a} are closed. The degenerate interval (a,a) = ∅ and the interval (−∞,∞) = R are both open and closed (see Theorem 4.34 below). The bounded non- degenerate half-open intervals [a, b) and (a, b] are neither open nor closed.
9
4.34 Remark: It is often fairly difficult to determine whether a given set is open or closed (or neither or both) directly from the definition of open and closed sets. We will be able to do this more easily after we have discussed limits of sequences and continuous functions in the next chapter.
4.35 Theorem: (Basic Properties of Open Sets) Let X be a metric space. (1)Thesets∅andX areopeninX.
(2)IfSisasetofopensetsinXthentheunionS= UisopeninX. U∈S
(3)IfSisafinitesetofopensetsinXthentheintersectionS= UisopeninX. U∈S
Proof: The empty set is open because any statement of the form “for all x∈∅ F” (where F is any statement) is considered to be true (by convention). The set X is open because given a ∈ X we can choose any value of r > 0 and then we have B(a,r) ⊆ X by the definition of B(a, r). This proves Part 1.
To prove Part 2, let S be any set of open sets in X. Let a ∈ S = U∈S U. Choose anopensetU∈Ssuchthata∈U. SinceUisopenwecanchooser>0suchthat B(a,r)⊆U. SinceU∈SwehaveU⊆S. SinceB(a,r)⊆UandU⊆Swehave B(a, r) ⊆ S. Thus S is open, as required.
ToprovePart3,letSbeafinitesetofopensetsinX. IfS=∅thenweusethe convention that S = X, which is open. Suppose that S ̸= ∅, say S = {U1,U2,···,Um} whereeachUk isanopenset. Leta∈S=mk=1Uk. Foreachindexk,sincea∈Uk we can choose rk > 0 so that B(a,rk) ⊆ Uk. Let r = min{r1,r2,···,rm}. Then for each index k we have B(a,r) ⊆ B(a,rk) ⊆ Uk. Since B(a,r) ⊆ Uk for every index k, it follows that B(a, r) ⊆ mk=1 Uk = S. Thus S is open, as required.
4.36 Theorem: (Basic Properties of Closed Sets) Let X be a metric space. (1) The sets ∅ and X are closed in X.
(2)IfSisasetofclosedsetsinXthentheintersectionS= KisclosedinX. K∈S
(3)IfSisafinitesetofclosedsetsinXthentheunionS= KisclosedinX. K∈S
Proof: This follows from Theorem 4.34, by taking complements using the fact that for a
set S of subsets of X we have Ac = Ac and Ac = Ac (these rules are A∈S A∈S A∈S A∈S
called DeMorgan’s Laws, and you should convince yourself that they are true if you have not seen them).
4.37 Example: When X is a metric space, a ∈ X and r > 0, the punctured ball B∗(a, r) is open (by Part 2 of Theorem 4.34) because B∗(a, r) = B(a, r) \ {a} = B(a, r) ∩ {a}c, and the sets B(a, r) and {a}c are both open.
∞
4.38Example: InR,notethat −1,1+1=[0,1],whichisclosedandnotopen,
n=1
so the intersection of an infinite set of open sets is not always open. Similarly, note that
∞
1,1− 1 = (0,1), which is open and not closed, so the union of an infinite set of
nn
nn n=1
closed sets is not always closed.,
10
Topological Spaces
4.39 Definition: A topology on a set X is a set T of subsets of X such that
(1)∅∈T andX∈T,
(2)foreverysetS⊆T wehaveS∈T,and
(3) for every finite subset S ⊆ T we have S ∈ T .
A topological space is a set X with a topology T. When X is a metric space, the set of all open sets in X is a topology on X, which we call the metric topology (or the topology induced by the metric). When X is any topological space, the sets in the topology T are called the open sets in X and their complements are called the closed sets in X. When S and T are both topologies on a set X with S ⊆ T, we say that the topology T is finer than the topology S, and that the topology S is coarser than the topology T. When S ⊄= T we say that T is strictly finer than S and that S is strictly coarser than T .
4.40 Example: Show that on Rn, the metrics d1, d2 and d∞ all induce the same topology.
Solution: For a, x ∈ Rn we have
n max |xi − ai| ≤
21/2 n n
1≤i≤n i=1
i=1
|xi − ai| ≤ n maxi=1 |xi − ai|
|xi − ai| ≤
d∞(a,x) ≤ d2(a,x) ≤ d1(a,x) ≤ nd∞(a,x).
and so
Itfollowsthatforalla∈Rn andr>0wehave
B∞(a,r) ⊇ B2(a,r) ⊇ B1(a,r) ⊇ B∞a, r . n
ThusforU⊆Rn,ifUisopeninRn usingd∞ thenitisopenusingd2,andifUisopen using d2 then it is open using d1, and if U is open using d1 then it is open using d∞.
4.41 Example: Show that on the space C[a, b], the topology induced by the metric d∞ is strictly finer than the topology induced by the metric d1.
Solution: For f, g ∈ C[a, b] we have
b b
d1(f,g)= |f−g|≤ max f(x)−g(x)=(b−a)d∞(f,g). a a a≤x≤b
It follows that for f ∈ C[a,b] and r > 0 we have
B∞(f, r) ⊆ B1f, (b − a)r.
Thus for U ⊆ C[a,b], if U is open using d1 then U is also open using d∞, and so the topology induced by the metric d∞ is finer (or equal to) the topology induced by d1.
On the other hand, we claim that for f ∈ C[a,b] and r > 0, the set B∞(f,r) is not open in the topology induced by d1. Fix g ∈ B∞(f,r) and let s > 0. Choose a bump
function h ∈ C[a, b] with h ≥ 0, b h < s and maxa≤x≤b h(x) > 2r for example, choose a
c∈(a,b)withc−a< s andthendefinehbyh(x)=3r1−x−afora≤x≤cand 2r c−a
h(x)=0forc≤x≤b. Thenwehaveg+h∈B1(g,s)butg+h∈/B∞(f,r). Itfollows that B∞(f,r) is not open in the topology induced by d1, as claimed.
4.42 Example: For any set X, the trivial topology on X is the the topology in which the only open sets in X are the sets ∅ and X, and the discrete topology on X is the topology in which every subset of X is open. Note that the discrete metric on a nonempty set X induces the discrete topology on X.
11
Interior and Closure
4.43 Definition: Let X be a metric space (or a topological space) and let A ⊆ X. The
interior and the closure of A (in X) are the sets
Ao = U ⊆ X U is open, and U ⊆ A,
A = K ⊆ X K is closed and A ⊆ K. WesaythatAisdenseinX whenA=X.
4.44 Theorem: Let X be a metric space (or a topological space) and let A ⊆ X.
(1) The interior of A is the largest open set which is contained in A. In other words,
Ao ⊆ A and Ao is open, and for every open set U with U ⊆ A we have U ⊆ Ao.
(2) The closure of A is the smallest closed set which contains A. In other words, A ⊆ A
andAisclosed,andforeveryclosedsetK withA⊆K wehaveA⊆K.
Proof: Let S = U ⊆ X U is open, and U ⊆ A. Note that Ao is open (by Part 2 of Theorem 4.34 or by Part 2 of Definition 4.38) because Ao is equal to the union of S, which is a set of open sets. Also note that Ao ⊆ A because Ao is equal to the union of S, which is a set of subsets of A. Finally note that for any open set U with U ⊆ A we have U ∈ S so that U ⊆ S = Ao. This completes the proof of Part 1, and the proof of Part 2 is similar.
4.45 Corollary: Let X be a metric space (or a topological space) and let A ⊆ X.
(1) (Ao)o = Ao and A = A.
(2) A is open if and only if A = Ao (3) A is closed if and only if A = A.
Proof: The proof is left as an exercise.
12
Interior Points, Limit Points and Boundary Points
4.46 Definition: Let X be a metric space and let A ⊆ X. An interior point of A is a point a ∈ A such that for some r > 0 we have B(a, r) ⊆ A. A limit point of A is a point a ∈ X such that for every r > 0 we have B∗(a, r) ∩ A ̸= ∅. An isolated point of A is a pointa∈AwhichisnotalimitpointofA. AboundarypointofAisapointa∈X such that for every r > 0 we have B(a,r)∩A ̸= ∅ and B(a,r)∩Ac ̸= ∅. The set of all limit points of A is denoted by A′. The boundary of A, denoted by ∂A, is the set of all boundary points of A.
4.47 Theorem: (Properties of Interior, Limit and Boundary Points) Let X be a metric space and let A ⊆ X.
(1) Ao is equal to the set of all interior points of A.
(2)AisclosedifandonlyifA′ ⊆A.
(3) A = A ∪ A′. (4) ∂A = A \ Ao.
Proof: We leave the proofs of Parts 1 and 4 as exercises. To prove Part 2, note that when a ∈/ A we have B(a, r) ∩ A = B∗(a, r) ∩ A and so
A is closed
⇐⇒ Ac is open
⇐⇒ ∀a∈Ac ∃r>0B(a,r)⊆Ac
⇐⇒ ∀a∈Rn a∈/A =⇒ ∃r>0 B(a,r) ⊆ Ac
⇐⇒ ∀a∈Rna∈/A=⇒∃r>0B(a,r)∩A=∅ ⇐⇒ ∀a∈Rna∈/A=⇒∃r>0B∗(a,r)∩A=∅ ⇐⇒ ∀a∈Rn∀r>0B∗(a,r)∩A̸=∅=⇒a∈A ⇐⇒ ∀a∈Rna∈A′ =⇒a∈A
⇐⇒ A′ ⊆ A.
To prove Part 3 we shall prove that A ∪ A′ is the smallest closed set which contains A. It is clear that A∪A′ contains A. We claim that A∪A′ is closed, that is (A∪A′)c is open. Leta∈(A∪A′)c,thatisleta∈Xwitha∈/Aanda∈/A′. Sincea∈/A′ we can choose r > 0 so that B(a,r)∩A = ∅. We claim that because B(a,r)∩A = ∅ it follows that B(a, r) ∩ A′ = ∅. Suppose, for a contradiction, that B(a, r) ∩ A′ ̸= ∅. Choose b ∈ B(a,r)∩A′. Since b ∈ B(a,r) and B(a,r) is open, we can choose s > 0 so that B(b,s) ⊆ B(a,r). Since b ∈ A′ it follows that B(b,s) ∩ A ̸= ∅. Choose x ∈ B(b,s) ∩ A. Then we have x ∈ B(b,s) ⊆ B(a,r) and x ∈ A and so x ∈ B(a,r) ∩ A, which contradicts the fact that B(a,r)∩A = ∅. Thus B(a,r)∩A′ = ∅, as claimed. Since B(a,r)∩A = ∅ and B(a,r)∩A′ = ∅ it follows that B(a,r)∩(A∪A′) = ∅ hence B(a,r) ⊆ (A∪A′)c. Thus proves that (A ∪ A′)c is open, and hence A ∪ A′ is closed.
ItremainstoshowthatforeveryclosedsetK inX withA⊆K wehaveA∪A′ ⊆K. LetK beaclosedsetinX withA⊆K. NotethatsinceA⊆K itfollowsthatA′ ⊆K′ because if a ∈ A′ then for all r > 0 we have B(a,r)∩A ̸= ∅ hence B(a,r)∩K ̸= ∅ and soa∈K′. SinceK isclosedwehaveK′ ⊆K byPart2. SinceA′ ⊆K′ andK′ ⊆K we haveA′ ⊆K. SinceA⊆K andA′ ⊆K wehaveA∪A′ ⊆K,asrequired. Thiscompletes the proof of Part 3.
13
Open and Closed Sets in Subspaces
4.48 Note: Let X be a metric space and let P ⊆ X. Note that P is also a metric space using (the restriction of) the metric used in X. For a ∈ P and 0 < r ∈ R, note that the open and closed balls in P , centred at a and of radius r, are related to the open and closed balls in X by
BP (a, r) = x ∈ P d(x, a) < r = BX (a, r) ∩ P, BP (a, r) = x ∈ P d(x, a) ≤ r = BX (a, r) ∩ P.
4.49Theorem: LetXbeametricspaceandletA⊆P⊆X.
(1)AisopeninP ifandonlyifthereexistsanopensetU inX suchthatA=U∩P.
(2) A is closed in P if and only if there exists a closed set K in X such that A = K ∩ P .
Proof: To prove Part 1, suppose first that A is open in P. For each a ∈ A, choose ra >0sothatBP(a,ra)⊆A,thatisBX(a,ra)∩P⊆A,andletU=a∈ABX(a,ra). Since U is equal to the union of a set of open sets in X, it follows that U is open in X. Note that A ⊆ U ∩P and, since BX(a,ra)∩P ⊆ A for every a ∈ A, we also have
U ∩P = BX(a,ra)∩P = BX(a,ra)∩P ⊆ A. Thus A = U ∩P, as a∈U a∈A
required.
Suppose, conversely, that A = U ∩ P with U open in X. Let a ∈ A. Since we
havea∈A=U∩P,wealsohavea∈U. Sincea∈UandUisopeninXwecan chooser>0sothatBX(a,r)⊆U. SinceBX(a,r)⊆UandU∩P=Awehave BP(a,r)=BX(a,r)∩P ⊆U∩P =A. ThusAisopen,asrequired.
To prove Part 2, suppose first that A is closed in P. Let B be the complement of A inP,thatisB=P\A. ThenBisopeninP. ChooseanopensetUinXsuchthat B = U ∩ P. Let K be the complement of U in X, that is K = X \ U. Then A = K ∩ P sinceforx∈Xwehavex∈A ⇐⇒ x∈Pandx∈/B ⇐⇒ x∈Pandx∈/U∩P ⇐⇒ x∈P andx∈/U ⇐⇒ x∈P andx∈K ⇐⇒ x∈K∩P.
Suppose, conversely, that K is a closed set in P with A = K ∩ P. Let B be the complement of A in P, that is B = P \ A, and let U be the complement of K in P, thatisU=P\K,andnotethatUisopeninP. ThenwehaveB=U∩Psince forx∈Pwehavex∈B ⇐⇒ x∈Pandx∈/A ⇐⇒ x∈Pandx∈/K∩P ⇐⇒ x∈P andx∈/K ⇐⇒ x∈P andx∈U ⇐⇒ x∈U∩P. SinceU isopenin P andB=U∩P weknowthatBisopeninP. SinceBisopeninP,itscomplement A = P \ B is closed in P .
4.50 Remark: Let X be a topological space and let P ⊆ X. Verify, as an exercise, that we can use the topology on X to define a topology on P as follows. Given a set A ⊆ P, wedefineAtobeopeninP whenA=U∩P forsomeopensetU inX. Theresulting topology on P is called the subspace topology.
14