Analysis I Spring 2025: 32 of 39
2.2 Metric spaces
Definition (2.15). A metric space is a set X together with a real-valued
function d (called a distance function or metric),
d: X ⇥ X ! R,
satisfying the following properties for all x, y, z 2 X:
1. d(x, y) 0. Moreover, d(x, y) = 0 if and only if x = y.
2. d(x, y) = d(y, x).
3. d(x, z) d(x, y) + d(y, z).
We call (X, d) a metric space.
e d) is also a metric space for X
Note that (X, e ⇢ X.
Euclidean spaces Rk , k 2 N, are metric spaces.
• (R, d), where d(x, y) := |x y|.
• (R2 , d), where
p
d(x, y) := |x y| = (x1 y1 )2 + (x2 y2 ) 2
for x = (x1 , x2 ), y = (y1 , y2 ) 2 R2 .
32
Analysis I Spring 2025: 33 of 39
Neighborhood
Let (X, d) be a metric space, and let x 2 X, r > 0. Then:
• The set
Br (x) := { y 2 X | d(y, x) < r}
is called the open ball centered at x with radius r.
• The set { y 2 X | d(y, x) r} is called the closed ball centered at x
with radius r.
• We also denote Br (x) by Nr (x).
An open ball centered at x (i.e., Nr (x) for some r > 0) is also referred
to as a neighborhood of x.
Open balls and closed balls in R?
33
Analysis I Spring 2025: 34 of 39
Open sets
Definition (2.18-f,e). Let (X, d) be a metric space. Let E ⇢ X.
(f ) E is called open if for any x 2 E, there exists a neighborhood N of
x such that N ⇢ E (i.e., there exists r > 0 such that Nr (x) ⇢ E).
The empty set is also considered open.
(e) A point x 2 X is called an interior point of E if there exists a
neighborhood N of x such that N ⇢ E.
(f ’) E is called open if every point of E is an interior point of E.
Theorem (2.19). Every open ball is open.
Proof?
Recall that the distance function d(·, ·) satisfies that
d(x, z) d(x, y) + d(y, z)
for all x, y, z 2 X.
34
Analysis I Spring 2025: 35 of 39
Examples in R
• A point set {a} with a 2 R is not an open subset of R. Why?
• The open interval In = ( 1 1
n, n) with n 2 N is an open subset of R.
Choose a finite number of positive integers n1 , . . . , nJ , then
I n1 \ · · · \ I nJ = I n⇤ with n⇤ = max(n1 , . . . , nJ ).
• Inifinite intersections of open sets are not in general open:
\
1 1
n, n = {0} is not an open subset of R.
n2N
• How about unions of open sets?
35
Analysis I Spring 2025: 36 of 39
Theorem (2.24-c,a). Let (X, d) be a metric space.
(1) Both ? and X are open.
(2) If G1 and G2 are open, then G1 \ G2 is open.
Tn
For any finite collection G1 , . . . , Gn of open sets, i=1 Gi is open.
(3) For any collection {G↵ }↵2⇤ of open sets with an index set ⇤,
S
↵2⇤ G↵ is open.
Proof of theorem.
(1) By definition, ? is open, and X is open because every point x 2 X
obviously has a neighborhood contained in X.
(2) Suppose G1 and G2 are open, and take any point x 2 G1 \G2 . Since x 2 Gi
and Gi is open (for i = 1, 2), there exist radii r1 , r2 > 0 with Bri (x) ⇢ Gi .
Consder the open ball Br (x) with
r :=
Then
Br (x) ⇢ Bri (x) ⇢ Gi , for i = 1, 2.
Hence Br (x) ⇢ G1 \ G2 . This shows that G1 \ G2 is open.
S
(3) Let {G↵ }↵2⇤ be a collection of open subsets. If x 2 ↵2⇤ G↵ , then x 2 G↵0
for some ↵0 2 ⇤.
Then...
36
Analysis I Spring 2025: 37 of 39
Closed sets
Definition (2.18-b,d). Let (X, d) be a metric space. Consider a point
x 2 X and a subset E ⇢ X.
(b) A point x is called a limit point of E if every neighborhood of x
contains a point y 2 E \ {x}.
(d) E is called closed if it contains all of its limit points, that is, every
limit point of E is contained in E.
A subset E ⇢ X is called open if for every x 2 E, there is a neighborhood
N of x such that N ⇢ E.
Theorem (2.23). E is open if and only if its complement E c is closed.
Corollary. A set F is closed if and only if its complement F c is open.
Proof of Theorem 2.23
37
Analysis I Spring 2025: 38 of 39
Theorem (2.24-d,b). Let (X, d) be a metric space.
(1) Both ? and X are closed.
(2) If F1 and F2 are closed, then F1 [ F2 is closed.
S
For any finite collection F1 , . . . , Fn of closed sets, ni=1 Fi is closed.
T
(3) For any collection {F↵ }↵2⇤ of closed sets, ↵2⇤ F↵ is closed.
Remark. Set Fn = [ 1 + n1 , 1 1
n] for each n 2 N. Each Fn is closed in R.
Their union is
[h i
1 1
1+ n, 1 n = ( 1, 1),
n2N
which is not a closed subset of R. This demonstrates that infinite unions of
closed sets are not in general closed.
Proof of theorem.
(1) This follows immediately from the fact ? = X c and X = ?c .
(2) By DeMorgan’s laws, we have
(F1 [ F2 )c = F1c \ F2c .
Since F1c and F2c are open, their intersection F1c \ F2c is open by Theorem
2.24(c). Hence, (F1 [ F2 )c = F1c \ F2c is open, which implies that F1 [ F2 is
closed.
(3) By DeMorgan’s laws, we have
⇣ \ ⌘c [
F↵ = F↵c .
↵2⇤ ↵2⇤
c
Since
⇣T each⌘c F↵ is open, their union is open by Theorem 2.24(a). Hence,
T
↵2⇤ F↵ is open. Therefore, ↵2⇤ F↵ is closed.
38
Analysis I Spring 2025: 39 of 39
Example. Every closed ball is closed.
Let (X, d) be a metric space. Let x 2 X and r > 0. Let D(x, r) be the closed
ball centered at x with radius r > 0, i.e.,
D(x, r) = {y 2 X | d(y, x) r}.
Claim: (D(x, r))c = X \ D(x, r) is open. In other words, for every point
y 2 X \ D(x, r), there exists a neighborhood of y contained in X \ D(x, r).
Proof?
From the relation d(x, y) d(x, z) + d(z, y), we have
d(x, z) d(x, y) d(z, y).
39