Complete Metric Spaces
Complete Metric Spaces
d˜ = d|Y ×Y .
3. We take any set X and on it the so-called discrete metric for X, defined by
(
1 if x 6= y,
d(x, y) =
0 if x = y.
2. Does d(x, y) = (x − y)2 define a metric on the set of all real numbers?
Page 2
p
3. Show that d(x, y) = |x − y| defines a metric on the set of all real numbers.
4. Find all metrics on a set X consisting of two points. Consisting of one point only.
Solution: If X has only two points, then the triangle inequality property is a
consequence of (M1) to (M3). Thus, any functions satisfy (M1) to (M3) is a
metric on X. If X has only one point, say, x0 , then the symmetry and triangle
inequality property are both trivial. However, since we require d(x0 , x0 ) = 0, any
nonnegative function f (x, y) such that f (x0 , x0 ) = 0 is a metric on X.
5. Let d be a metric on X. Determine all constants k such that the following is a metric
on X
(a) kd,
Solution: First, note that if X has more than one point, then the zero func-
tion cannot be a metric on X; this implies that k 6= 0. A simple calculation
shows that any positive real numbers k lead to kd being a metric on X.
(b) d + k.
6. Show that d(x, y) = sup |ξj − ηj | satisfies the triangle inequality for any x, y in l∞ .
j∈N
Page 3
Solution: Fix x = (ξj ), y = (ηj ) and z = (ζj ) in l∞ . Usual triangle inequality
on real numbers yields
7. If A is the subspace of l∞ consisting of all sequences of zeros and ones, what is the
induced metric on A?
Solution: For any distinct x, y ∈ A, d(x, y) = 1 since they are sequences of zeros
and ones. Thus, the induced metric on A is the discrete metric.
Solution: (M1) and (M3) are satisfied, as we readily see. For (M4),
Z b Z b
d(x, y) = |x(t) − y(t)| dt ≤ |x(t) − z(t)| + |z(t) − y(t)| dt
a a
= d(x, z) + d(z, y)
For (M2), the if statement is obvious. For the only if statement, suppose d(x, y) =
0. Then
Z b
|x(t) − y(t)| dt = 0 =⇒ |x(t) − y(t)| = 0 for all t ∈ [a, b]
a
Solution: (M1) to (M4) can be checked easily using definition of the discrete
metric.
10. (Hamming distance) Let X be the set of all ordered triples of zeros and ones.
Show that X consists of eight elements and a metric d on X is defined by d(x, y) =
Page 4
number of places where x and y have different entries. (This space and similar spaces
of n-tuples play a role in switching and automata theory and coding. d(x, y) is called
the Hamming distance between x and y.
where the last inequality follows from the induction hypothesis. Since k ≥ 3 is
arbitrary, the statement follows from induction.
12. (Triangle inequality) The triangle inequality has several useful consequences. For
instance, using the generalised triangle inequality, show that
Page 5
h i
= d(x, z) + d(y, w) by (M3) .
d(z, w) ≤ d(z, x) + d(x, y) + d(y, w)
=⇒ d(z, w) − d(x, y) ≤ d(z, x) + d(y, w)
h i
= d(x, z) + d(y, w) by (M3) .
14. (Axioms of a metric) (M1) to (M4) could be replaced by other axioms without
changing the definition. For instance, show that (M3) and (M4) could be obtained
from (M2) and
d(x, y) ≤ d(z, x) + d(z, y). (†)
Page 6
15. Show that the nonnegativity of a metric follows from (M2) to (M4).
Solution: The only inequality we have is (M4), so we start from (M4). Choose
any x ∈ X. If z = x, then for any y ∈ X,
h i
d(x, z) ≤ d(x, y) + d(y, z) from (M4)
h i
=⇒ d(x, x) ≤ d(x, y) + d(y, x) = 2d(x, y) from (M3)
h i
=⇒ d(x, y) ≥ 0 from (M2)
Page 7
1.2 Further Examples of Metric Spaces.
We begin by stating three important inequalities that are indispensable in various theo-
retical and practical problems.
∞ ∞
! p1 ∞
! 1q
X X X
Holder inequality : |ξj ηj | ≤ |ξk |p |ηm |q ,
j=1 k=1 m=1
1 1
where p > 1 and + = 1.
p q
∞ ∞
! 21 ∞
! 21
X X X
Cauchy-Schwarz inequality : |ξj ηj | ≤ |ξk |2 |ηm |2 .
j=1 k=1 m=1
∞
! p1 ∞
! p1 ∞
! p1
X X X
Minkowski inequality : |ξj + ηj |p ≤ |ξk |p + |ηm |p ,
j=1 k=1 m=1
where p > 1.
defines a metric on the sequence space s.PShow that we can obtain another metric
by replacing 1/2j with µj > 0 such that µj converges.
1 1
Solution: Choose p = q = 2, which are conjugate exponents since + = 1;
2 2
a2 b 2
we then have ab ≤ + . Multiplying by 2 and adding 2ab to both sides yield:
2 2
2ab + 2ab ≤ a2 + b2 + 2ab
Page 8
4ab ≤ (a + b)2
2
a+b
ab ≤ .
2
Since ab is a positive quantity, the desired statement follows from taking square
root of both sides.
4. (Space lp ) Find a sequence which converges to 0, but is not in any space lp , where
1 ≤ p < +∞.
Solution: Consider the sequence (bj ) with numbers a(k), N (k) times, where for
1
k ≥ 1, a(k) = and N (k) = 2k , i.e.
k
1 1 1 1 1 1 1 1 1 1 1 1
(bj ) = 1, 1, , , , , , , , , , , , , . . . . . . .
|{z} |2 2{z2 2} |3 3 3 3{z3 3 3 3}
2 times
4 times 8 times
p∞ ∞
1 X
p
X
j
By construction, (bj ) −→ 0 as j −→ ∞ and |bj | = 2 . However,
j=1 j=1
j
2j
since for all p ≥ 1, −→
6 0 as j −→ ∞, Divergence Test for Series implies
jp
∞
X
that the series |bj |p diverges for all p ≥ 1. By definition, this means that
j=1
/ lp for all p ≥ 1.
(bj ) ∈
Page 9
5. Find a sequence x which is in lp with p > 1 but x ∈
/ l1 .
1
Solution: The sequence (an ) = belongs to lp with p > 1 but not l1 .
n
Solution: Suppose δ(A) = 0, this means that d(x, y) = 0 for all x, y ∈ A; (M2)
then implies x = y, i.e. A has only one element. Conversely, suppose that A
consists of a single point, say x; (M2) implies that δ(A) = 0 since d(x, x) = 0.
8. (Distance between sets) The distance D(A, B) between two nonempty subsets A
and B of a metric space (X, d) is defined to be
D(A, B) = inf d(a, b).
a∈A
b∈B
Show that D does not define a metric on the power set of X. (For this reason we use
another symbol, D, but one that still reminds us of d.)
Solution: Consider X = {1, 2, 3} with d being the absolute value function, and
consider its power set A = {1} and B = {1, 2}. By construction, D(A, B) = 0
but A 6= B.
Page 10
1.3 Open Set, Closed Set, Neighbourhood.
Definition 1.3.1.
1. Given a point x0 ∈ X and a real number r > 0, we define three types of sets:
Br (x0 ) = {x ∈ X : d(x, x0 ) < r} (Open ball).
B̃r (x0 ) = {x ∈ X : d(x, x0 ) ≤ r} (Closed ball).
Sr (x0 ) = {x ∈ X : d(x, x0 ) = r} (Sphere).
In all three cases, x0 is called the center and r the radius.
2. A subset M of a metric space X is said to be open if it contains a ball about each
of its points. A subset K of X is said to be closed if its complement (in X) is
open, that is, K C = X \ K is open.
3. We call x0 an interior point of a set M ⊂ X if M is a neighbourhood of x0 . The
interior of M is the set of all interior points of M and may be denoted by Int(M ).
• By neighbourhood of x0 we mean any subset of X which contains an ε-neighbourhood
of x0 .
• Int(M ) is open and is the largest open set contained in M .
Page 15
Solution:
• Given x0 ∈ C[a, b], an open ball B1 (x0 ) in C[a, b] is any continuous function
x ∈ C[a, b] satisfying sup |x(t) − x0 (t)| < 1.
t∈[a,b]
3. Consider C[0, 2π] and determine the smallest r such that y ∈ B̃(x; r), where x(t) =
sin(t) and y(t) = cos(t).
Solution: We want to maximise y(t) − x(t) over t ∈ [0, 2π]. Consider z(t) =
cos(t) − sin(t), differentiating gives z 0 (t) = − sin(t) − cos(t), which is equal to 0
if and only if sin(t) + cos(t) = 0, or
3π 7π
tan(t) = −1 =⇒ tc = , .
4 4
√
Evaluating z(t) at√ tc gives z(tc ) = ± 2. Thus, the smallest r > 0 such that
y ∈ B̃r (x) is r = 2.
Page 17
(a) Show that this is always the case for X and ∅.
(b) Show that in a discrete metric space X, every subset is open and closed.
Page 18
1.4 Convergence, Cauchy Sequence, Completeness.
Definition 1.4.1. A sequence (xn ) in a metric space X = (X, d) is said to converge or
to be convergent if there exists an x ∈ X such that
lim d(xn , x) = 0.
n→∞
The space X is said to be complete if every Cauchy sequence in X converges, that is,
has a limit which is an element of X.
Theorem 1.4.5 (Closure, closed set). Let M be a non-empty subset of a metric space
(X, d) and M̄ its closure.
(a) x ∈ M̄ if and only if there is a sequence (xn ) in M such that xn −→ x.
xn −→ x0 =⇒ T xn −→ T x0 .
• The only if direction is proved using ε-δ definition of continuity, whereas the if di-
rection is a proof by contradiction.
Page 22
5. Is boundedness of a sequence in a metric space sufficient for the sequence to be
Cauchy? Convergent?
1
• (xn ) is not Cauchy in R since if we pick ε = > 0, then for all N , there
2
exists m, n > N (we could choose m = N + 1, n = N + 2 for example) such
1
that d(xm , xn ) = d(xN +1 , xN +2 ) = 1 > .
2
• (xn ) is not convergent in R since it is not Cauchy.
6. If (xn ) and (yn ) are Cauchy sequences in a metric space (X, d), show that (an ), where
an = d(xn , yn ), converges. Give illustrative examples.
Solution: Let (xn ) and (yn ) be Cauchy sequences in a metric space (X, d) and
fix an ε > 0. By definition, there exists N1 , N2 such that
ε
d(xm , xn ) < for all m, n > N1 .
2
ε
d(ym , yn ) < for all m, n > N2 .
2
Define a sequence (an ), with an = d(xn , yn ); observe that (an ) is a sequence in R.
Thus to show that (an ) converges, an alternative way is to show that (an ) is a
Cauchy sequence. First, generalised triangle inequality of d yields the following
two inequalities:
Page 24
7. Give an indirect proof of Lemma 1.4-2(b).
8. If d1 and d2 are metrics on the same set X and there are positive numbers a and b
such that for all x, y ∈ X,
ad1 (x, y) ≤ d2 (x, y) ≤ bd1 (x, y), (†)
show that the Cauchy sequences in (X, d1 ) and (X, d2 ) are the same.
Solution: Suppose (xn ) is any Cauchy sequence in (X, d1 ). Given ε > 0, there
ε
exists an N1 such that d(xm , xn ) < for all m, n > N1 . Using the second
b
inequality in (†),
ε
d2 (xm , xn ) ≤ bd1 (xm , xn ) < b = ε for all m, n > N1 .
b
Now suppose (yn ) is any Cauchy sequence in (X, d2 ). Given ε > 0, there exists
an N2 ∈ N such that d(ym , yn ) < aε for all m, n > N2 . Using the first inequality
in (†),
1 1
d1 (ym , yn ) ≤ d1 (ym , yn ) < (
aε) = ε for all m, n > N2 .
a a
Thus, (yn ) is also a Cauchy sequence in (X, d1 ).
Page 25
9. The Cartesian product X = X1 × X2 of two metric spaces (X1 , d1 ) and (X2 , d2 ) can
be made into a metric space (X, d) in many ways. For instance, for x = (x1 , x2 ) and
y = (y1 , y2 ), we proved previously that the following are metrics for X.
da (x, y) = d1 (x1 , y1 ) + d2 (x2 , y2 ).
p
db (x, y) = d1 (x1 , y1 )2 + d2 (x2 , y2 )2 .
dc (x, y) = max{d1 (x1 , y1 ), d2 (x2 , y2 )}.
Using Problem 8, show that (X, da ), (X, db ) and (X, dc ) all have the same Cauchy
sequences.
Solution: Let (zn ) be any Cauchy sequence in C, where zn = xn + iyn . For any
ε > 0, there exists an N ∈ N such that for all m, n > N ,
p
dC (zm , zn ) = |zm − zn | = (xm − xn )2 + (ym − yn )2 ≤ ε
=⇒ (xm − xn )2 + (ym − yn )2 ≤ ε2 .
The last inequality implies that for all m, n > N ,
(xm − xn )2 ≤ ε2 =⇒ |xm − xn | ≤ ε.
(ym − yn )2 ≤ ε2 =⇒ |ym − yn | ≤ ε.
Thus, both sequences (xn ) and (yn ) are Cauchy in R, which converges to, say, x
and y respectively as n −→ ∞ by completeness of R. Define z = x + iy ∈ C, then
convergence of (xn ) and (yn ) implies that dR (xn , x) and dR (yn , y) both converge
to 0 as n −→ ∞. Expanding the definition of dC (zn , z) gives
p
dC (zn , z) = |zn − z| = (xn − x)2 + (yn − y)2
p
= dR (xn , x)2 + dR (yn , y)2 −→ 0 as n −→ ∞.
This shows that z ∈ C is the limit of (zn ). Since (zn ) was an arbitrary Cauchy
sequence in C, this proves completeness of C.
Page 26
1.5 Examples. Completeness Proofs.
To prove completeness, we take an arbitrary Cauchy sequence (xn ) in X and show that it
converges in X. For different spaces, such proofs may vary in complexity, but they have
approximately the same general pattern:
1. Let a, b ∈ R and a < b. Show that the open interval (a, b) is an incomplete subspace
of R , whereas the closed interval [a, b] is complete.
Solution: Consider a sequence (xn ) in the metric space (a, b), | · | , where xn =
1 2
a + . Given any ε > 0, choose N ∈ N such that N > , then for any m, n >
n ε
2
N> ,
ε
1 1 1 1
d(xm , xn ) = − ≤ +
m n m n
ε ε
< + = ε.
2 2
This shows that (xn ) is a Cauchy sequence in (a, b). However, (xn ) −→ a ∈
/ (a, b)
as n −→ ∞. This shows that (a, b) is an incomplete subspace of R. Since [a, b]
is a closed (metric) subspace of R (which is a complete metric space), it follows
that the closed interval [a, b] is complete.
2. Let X be the space of all ordered n-tuples x = (ξ1 , . . . , ξn ) of real numbers and
d(x, y) = maxj |ξj − ηj |, where y = (ηj ). Show that (X, d) is complete.
n (m) (m)
Solution: Consider any Cauchy sequence (xm ) in R , where xm = ξ1 , . . . , ξn
.
Since (xm ) is Cauchy, given any ε > 0, there exists an N such that for all
m, r > N ,
(m) (r)
d(xm , xr ) = max |ξj − ξj | < ε
j=1,...,n
Page 27
Using these n limits, we define x = (ξ1 , . . . , ξn ). Clearly, x ∈ Rn . From (†), with
r −→ ∞,
(m)
|ξj − ξj | < ε for all m > N.
Since the RHS is independent of j, taking maximum over j = 1, . . . , n in both
sides yields
(m)
d(xm , x) = max |ξj − ξj | < ε for all m > N.
j=1,...,n
3. Let M ⊂ l∞ be the subpace consisting of all sequences x = (ξj ) with at most finitely
many nonzero terms. Find a Cauchy sequence in M which does not converge in M ,
so that M is not complete.
1 if j ≤ n,
(n)
ξj = j
0 if j > n.
1 1 1
i.e. xn = 1, , , . . . , , 0, 0, . . . . . . . Given any ε > 0, choose N such that
2 3 n
1
N + 1 > , then for any m > n > N ,
ε
(m) (n) 1 1
d(xm , xn ) = sup ξj − ξj = ≤ < ε.
j∈N n+1 N +1
1
This shows that (xn ) is Cauchy in M . However, it is clear that xn −→ x =
n
as n −→ ∞, but since x ∈ / M , (xn ) does not converge in M .
Page 28
5. Show that the set X of all integers with metric d defined by d(m, n) = |m − n| is a
complete metric space.
Solution: Observe that for any two distinct integers m, n, d(m, n) ≥ 1. This
implies that the only Cauchy sequences in X are either constant sequences or
sequences that are eventually constant. This shows that the set X of all integers
with the given metric is complete.
6. Show that the set of all real numbers constitutes an incomplete metric space if we
choose d(x, y) = | arctan x − arctan y|.
• Suppose, for contradiction, that (xn ) converges in R with the given metric.
By definition, there exists an x ∈ R such that
π
which then implies that arctan(x) must equal to , by uniqueness of limits.
2
π
This contradicts the assumption that x ∈ R, since arctan(x) < for any
2
x ∈ R.
7. Let X be the set of all positive integers and d(m, n) = |m−1 − n−1 |. Show that (X, d)
is not complete.
1 1
d(xm , xn ) = −
m n
and similar argument in Problem 1 shows that (xn ) is a Cauchy sequence. If (xn )
were to converge to some positive integer x, then it must satisfy
1 1
d(xn , x) = − −→ 0 as n −→ ∞.
n x
Page 29
1
Clearly, must be 0, which is a contradiction since no positive integers x gives
x
1
= 0.
x
8. (Space C[a, b]) Show that the subspace Y ⊂ C[a, b] consisting of all x ∈ C[a, b]
such that x(a) = x(b) is complete.
In particular, for every t ∈ [a, b], |fn (t) − f (t)| < ε for all n > N . This shows that
(fn (t)) converges to f (t) uniformly on [a, b]. Since the fn0 s are continuous function
on [a, b] and the convergence is uniform, the limit function f is continuous on [a, b].
We are left with showing f (a) = f (b) to conclude that f ∈ Y . Indeed, triangle
inequality for real numbers gives:
|f (a) − f (b)| ≤ |f (a) − fn (a)| + |fn (a) − fn (b)| + |fn (b) − f (b)|
= |f (a) − fn (a)| + |fn (b) − f (b)|
≤ 2 max |fn (t) − f (t)|
t∈[a,b]
= 2d(fn , f ) −→ 0 as n −→ ∞.
Solution: The proof employs the so called ε/3 proof, which is widely used in
proofs concerning uniform continuity. Choose any t0 ∈ [a, b] and ε > 0.
• Since (fn ) converges to f uniformly, there exists an N ∈ N such that for all
ε
t ∈ [a, b] and for all n > N , we have |fn (t) − f (t)| < .
3
• Since fN +1 is continuous at t0 ∈ [a, b], there exists an δ > 0 such that
ε
|fN +1 (t) − fN +1 (t0 )| < for all t ∈ [a, b] satisfying |t − t0 | < δ.
3
• Thus, if |t − t0 | < δ, triangle inequality gives:
|f (t) − f (t0 )| ≤ |f (t) − fN +1 (t)| + |fN +1 (t) − fN +1 (t0 )| + |fN +1 (t0 ) − f (t0 )|
Page 30
ε ε ε
< + + =ε
3 3 3
This shows that f is continuous at t0 .
Solution: Let (X, d) be a discrete metric space, for any two distinct x, y ∈ X,
d(x, y) = 1. This implies that the only Cauchy sequences in X are either constant
sequences or sequences that are eventually constant. This shows that a discrete
metric space is complete.
(n)
11. (Space s) Show that in the space s, we have xn −→ x if and only if ξj −→ ξj for
(n)
all j = 1, 2, . . . , where xn = ξj and x = (ξj ).
Solution: The sequence space s consists of the set of all (bounded or unbounded)
sequences of complex numbers and the metric d defined by
∞
X 1 |ξj − ηj |
d(x, y) = .
j=1
2j 1 + |ξj − ηj |
(n)
ξj − ξj ε
<
1+
(n)
− ξj
ξj 1+ε
h i
(n) (n)
ξj − ξj (1 + ε) < ε 1 + ξj − ξj
(n)
ξj − ξj < ε
(n)
This shows that ξj −→ ξj as n −→ ∞. Since j ≥ 1 was arbitrary, the result
follows.
Page 31
(n) (n)
Conversely, suppose −→ ξj for all j ≥ 1, where xn =
ξj ξj and x = (ξj ).
This implies that for every fixed j ≥ 1,
(n)
1 ξj − ξj
−→ 0 as n −→ ∞.
2j 1 + ξ (n) − ξ
j j
12. Using Problem 11, show that the sequence space s is complete.
(n)
Solution: Consider any Cauchy sequence (xn ) in s, where xn = ξj . Since
(xn ) is Cauchy, for every j ≥ 1, given any ε > 0, there exists an N such that for
all m, n > N we have
(m) (n)
1 ξj − ξj 1 ε
≤ d(x m , xn ) < .
2j 1 + ξ (m) − ξ (n) 2j 1 + ε
j j
(m) (n)
In particular, for every j ≥ 1, ξj − ξj < ε for all m, n > N . Hence, for
(1) (2)
every j ≥ 1, the sequence ξj , ξj , . . . is a Cauchy sequence of real numbers.
(n)
It converges by completeness of R, say, ξj −→ ξj as n −→ ∞. Since j ≥ 1
(n)
was arbitrary, this shows that ξj −→ ξj as n −→ ∞ for all j ≥ 1. Identifying
x = (ξj ), we have xn −→ x as n −→ ∞ from Problem 11. Since (xn ) was an
arbitrary Cauchy sequence in s, this proves completeness of s.
13. Let X be the set of all continuous real-valued functions on J = [0, 1], and let
Z 1
d(x, y) = |x(t) − y(t)| dt.
0
Solution: WLOG, take m > n. Sketching out |xm (t) − xn (t)|, we deduce that
Z 1 Z 1
m2 n2 1
d(xm , xn ) = (m − n) dt + √ −n dt
0 1
m2
t
Page 32
1 1 1 1 1 1 1
= (m − n) 2 + 2 − −n 2
− 2 = − .
m n m n m n m
Similar argument in Problem 1 shows that (xn ) is a Cauchy sequence in C[0, 1].
14. Show that the Cauchy sequence in Problem 13 does not converge.
Since the integrands are nonnegative, so is each integral on the right. Hence,
d(xn , x) −→ 0 would imply that each integral approaches zero and, since x is
1
continuous, we should have x(t) = √ if t ∈ (0, 1]. But this is impossible for a
t
continuous function, otherwise we would have discontinuity at t = 0. Hence, (xn )
does not converge, that is, does not have a limit in C[0, 1].
15. Let X be the metric space of all real sequencesP x = (ξj ) each of which has only
finitely many nonzero terms, and d(x, y) = |ξj − ηj |, where y = (ηj ). Note that
this is a finite
sum but the number of terms depends on x and y. Show that (xn )
(n)
with xn = ξj ,
1
(n) for j = 1, . . . , n,
ξj = j 2
0 for j > n.
∞
X 1
Solution: Since is convergent and it is a sum of positive terms, given any
j=1
j2
∞
X 1
ε > 0, there exists an N1 such that 2
< ε for all n > N1 . Choose N = N1 ,
j=n
j
then for all m > n > N ,
m ∞ ∞
X 1 X 1 X 1
d(xm , xn ) = 2
≤ 2
≤ < ε.
j=n+1
j j=n+1
j j=N +1
j2
This shows that (xn ) is a Cauchy sequence. For every x = (ξj ) ∈ X, there exists
an N = Nx such that ξj = 0 for all j > N . Then for all n > N ,
1 1 1 1
d(xn , x) = |1 − ξ1 | + − ξ2 + . . . + 2
− ξN + 2
+ ... + 2.
4 N (N + 1) n