Exercise 12.1.3: Let X be a set, and let d : X × X → [0

Math 402
Homework 1 Solutions
Homework 1
Page 398: 12.1.3,12.1.5,12.1.5,12.1.12,12.1.15
Exercise 12.1.3: Let X be a set, and let d : X × X → [0, ∞) be a function.
(a) Give an example of a pair (X, d) which obeys axioms (bcd) of Definition 12.1.2 but not (a).
(b) Give an example of a pair (X, d) which obeys axioms (acd) of Definition 12.1.2 but not (b).
(c) Give an example of a pair (X, d) which obeys axioms (abd) of Definition 12.1.2 but not (c).
(d) Give an example of a pair (X, d) which obeys axioms (abc) of Definition 12.1.2 but not (d).
Solution.
For (a) take: X = R and d(x, y) = 1 ∀x, y ∈ R.
Clearly property (a) is false. Also (b), and (c) are clearly true, and the triangle inequality is also
satisfied as 1 ≤ 1 + 1 = 2
(Due to Hyungjung) Another example is: X = R, d(x, y) = 1 + |x − y|.
Property (a) is obviously false. And again (b) and (c) are clearly true. And the triangle inequality
is also satisfied as follows: d(x, z) = 1 + |x − z| but |x − z| ≤ |x − y| + |y − z| so d(x, z) ≤
1 + |x − y| + |y − z| ≤ 1 + |x − y| + 1 + |y − z| = d(x, y) + d(y, z). Thus the triangle inequality is
satisfied.
For (b) take: X = R and d(x, y) = 0 ∀x, y ∈ R
Here property (b) is false. And it is clear that properties (a),(c), and (d) are true.
(Due to Peterson) Another example is: X = R2 and d((x, y), (x0 , y 0 ) = |y − y 0 |
Property (a) is definitely true. (b) is false as if we take x 6= x0 and y = y 0 then we get d((x, y), (x0 , y 0 ) =
0. (c) is true since |y − y 0 | = |y 0 − y|. (d) is also true since d((x, x0 ), (z, z 0 )) = |x0 − z 0 | ≤
|x0 − y 0 | + |y 0 − z 0 | = d((x, x0 ), (y, y 0 )) + d((y, y 0 ), (z, z 0 ))
For (c) My example was just a special case of the following, so let us just prove this general case
instead.
(Due to Sara, Jorge, Brian, Amanda) take X = R and

 0 if x = y
a if x < y
d(x, y) =
 b
if x > y
Where a, b > 0 and a 6= b.
First, without loss of generality, assume that a > b
By definition (a) and (b) are true. Also, (c) is false, consider: d(2, 4) = a, but d(4, 2) = b. And for
(d) let us do the following:
1
Let x, y, z ∈ X
Case 1: (x 6= y 6= z) Without loss of generality assume that x < y < z.
Thus we have: d(x, y) = a, d(x, z) = a, d(y, x) = b, d(y, z) = a, d(z, x) = b, d(z, y) = b
So we get:
d(x, y) = a ≤ a + b = d(x, z) + d(z, y)
d(x, z) = a ≤ a + a = d(x, y) + d(y, z)
d(y, x) = b ≤ a + b = d(y, z) + d(z, x)
d(y, z) = a ≤ b + a = d(y, x) + d(x, z)
d(z, x) = b ≤ b + b = d(z, y) + d(y, x)
d(z, y) = b ≤ b + a = d(z, x) + d(x, y)
In each case the triangle inequality holds.
Case 2: (x = y, and x, y 6= z) Suppose that x, y < z. Each of these assumptions is without loss of
generality since we will consider every case below (and of course the letters can be switched around).
So we have: d(x, y) = 0, d(x, z) = a, d(y, x) = 0, d(y, z) = a, d(z, x) = b, d(z, y) = b
And thus we get the following:
d(x, y) = 0 ≤ a + b = d(x, z) + d(z, y)
d(x, z) = a ≤ 0 + a = d(x, y) + d(y, z)
d(y, x) = 0 ≤ a + b = d(y, z) + d(z, x)
d(y, z) = a ≤ 0 + a = d(y, x) + d(x, z)
d(z, x) = b ≤ b + 0 = d(z, y) + d(y, x)
d(z, y) = b ≤ b + 0 = d(z, x) + d(x, y)
Again the triangle inequality holds for each case (a similar argument shows for z < x = y).
Case 3: (x = y = z)
Trivial since each distance will be 0, and of course 0 ≤ 0 + 0.
In each case we get that the triangle inequality, property (d), is true.
For (d) take: X = {1, 2, 3} and define d as follows.
d(1, 1) = 0, d(1, 2) = 3, d(1, 3) = 1
d(2, 1) = 3, d(2, 2) = 0, d(2, 3) = 1
d(3, 1) = 1, d(3, 2) = 1, d(3, 3) = 0
By definition properties (a), (b), and (c) are true. However, the triangle inequality does not hold:
Consider the following: d(1, 2) d(1, 3) + d(3, 2) as 3 1 + 1 = 2.
Lame example, I know, so let us look at some more interesting ones.
2
(Due to Brian) X = R and

if x = y
 0
3 if x 6= y and both x, y ∈ Q or both x, y 6∈ Q
d(x, y) =

1
otherwise (one in Q and the other not)
By definition (a), (b) and (c) are true. For (d) consider: x ∈ Q, y ∈ Q, z 6∈ Q. Then d(x, y) =
3, d(x, z) = 1, d(y, z) = 1. But then d(x, y) 6≤ d(x, z) + d(z, y) As 3 6≤ 1 + 1 = 2
Some notes about this example, and my example: First note the number 3, here we actually only
need a number larger than 2 (or we could say that we just need a number larger than twice the
other non-zero number (in these two cases 1). Also in the last example, we could have used any
partition of the real line. For example, we could have had both x,y are positive, or both negative
(instead of both rational, or both irrational), and this would have given us a metric space on R
(Due to Hyungjung, Jorge) X = R, d(x, y) = |x − y|2
Clearly we get that properties (a),(b), and (c) are true. For (d) consider x = 1, y = 4, z = 5. Then
d(x, z) = |1 − 5|2 = | − 4|2 = 16, d(x, y) = |1 − 4|2 = | − 3|2 = 9, and d(y, z) = |4 − 5|2 = | − 1|2 = 1,
but then we get that d(x, z) 6≤ d(x, y) + d(y, z) as 16 6≤ 9 + 1 = 10.
(Due to Sara) X = R and
d(x, y) =
0
if x = y
if x =
6 y
|x−y|
e
By definition (a), (b) and (c) are true. For (d) consider: x = 1, y = 4, z = 5 then d(x, z) 6≤
d(x, y) + d(y, z) as e4 6≤ e3 + e.
Exercise 12.1.5: Let n ≥ 1 and let a1 , ..., an and b1 , ..., bn be real numbers. Verify the identity:
!2
! n !
n
n
n
n
X
X
X
1 XX
ai b i +
(ai bj − aj bi )2 =
a2i
b2j
2
i=1
i=1 j=1
i=1
j=1
and conclude the Cauchy-Schwarz inequality:
!1/2
n
n
X
X
ai b i ≤
a2i
i=1
i=1
n
X
!1/2
b2j
j=1
Then use the Cauchy-Schwarz inequality to prove the triangle inequality:
n
X
i=1
!1/2
(a2i + b2i )
≤
n
X
!1/2
a2i
i=1
+
n
X
!1/2
b2j
j=1
Proof. We will prove the first part by induction on n.
Base Case (n = 1)
1
X
i=1
!2
ai b i
1
n
1 XX
1
+
(ai bj − aj bi )2 = a21 b21 + (a1 b1 − a1 b1 )2 = a21 b21 =
2 i=1 j=1
2
3
1
X
i=1
!
a2i
1
X
j=1
!
b2j
Thus the base case is true.
Inductive Step. Assume for some n that the ugly mess we want to show is true, is true, and then
show it is true for n + 1
!2
n+1
n+1 n+1
X
1 XX
ai b i +
(ai bj − aj bi )2
2
i=1
i=1 j=1
=
n
X
!2
(ai bi ) + an+1 bn+1
i=1
=
n
X
!2
ai b i
+2
i=1
=
n
X
=
!
a2i
=
!
a2i
=
!
a2i
=
!
a2i
=
!
a2i
n
X
!
b2j
+2
=
i=1
n
X
n
X
(ai bi an+1 bn+1 )+a2n+1 b2n+1 +
+
+
n
X
(ai bn+1 − an+1 bi )2
i=1
a2i b2n+1 + a2n+1 b2i − 2an+1 bi ai bn+1 ind. hyp.
n
X
a2n+1 b2i
+
a2i b2n+1
a2n+1 b2n+1
n
X
+
a2n+1 b2i + a2i b2n+1
−2
n
X
(ai bi an+1 bn+1 )
i=1
i=1
n
X
!
b2j
+
n
X
a2n+1 b2i
+
i=1
n
X
!
b2j
+ a2n+1
n
X
a2i + a2n+1
n
X
n
X
!
b2i
i=1
n+1
X
!
b2i
a2i b2n+1 + a2n+1 b2n+1
i=1
+ b2n+1
i=1
!
a2i
(ai bj − aj bi )
i=1
!
b2j
2
i=1
i=1
n
X
!
i=1 j=1
(ai bi an+1 bn+1 )+a2n+1 b2n+1 +
j=1
!
n X
n
X
i=1
i=1
n+1
X
n
X
+2
j=1
i=1
n
X
b2j
j=1
i=1
n
X
!
j=1
i=1
n
X
n
X
j=1
i=1
n
X
1
(ai bi an+1 bn+1 )+a2n+1 b2n+1 +
2
i=1
i=1
n
X
n
X
#
" n n
n
n
X
X
1 XX
2
2
2
(ai bj − aj bi ) +
(ai bn+1 − an+1 bi ) +
(an+1 bj − aj bn+1 )
+
2 i=1 j=1
i=1
j=1
+ b2n+1
n
X
!
a2i
+ a2n+1 b2n+1
i=1
n
X
!
a2i + a2n+1
i=1
!
b2j
j=1
This mess proves the inductive step, so we are done with the first part.
To prove the second part, note that we get the following from the first part (since the other term
is greater than or equal to 0):
4
n
X
!2
n
X
≤
ai b i
i=1
!
a2i
n
X
i=1
!
b2j
j=1
But now we can take the square root of both sides and we get that:
n
!1/2
!1/2
n
n
X
X
X
ai b i ≤
a2i
b2j
i=1
i=1
j=1
Which was what we wanted
To prove the last part let us do the following:
n
X
2
(ai + bi ) =
i=1
=
≤
n
X
(a2i + b2i + 2ai bi )
i=1
n
X
(a2i ) +
n
X
i=1
i=1
n
X
n
X
(a2i ) +
(b2i ) + 2
i=1
!1/2
!1/2
n
X
(b2i ) + 2
i=1
n
X
(ai bi )
i=1

=
n
X
(a2i )
i=1
(a2i )
+
i=1
n
X
n
X
!1/2
(b2j )
From C-S
j=1
!1/2 2
(b2j )

j=1
So we have:
n
X

(ai + bi )2 ≤ 
n
X
i=1
!1/2
(a2i )
+
i=1
n
X
!1/2 2
(b2j )

j=1
And now taking the square root of both sides we get:
!1/2
!1/2
!1/2
n
n
n
X
X
X
(ai + bi )2
≤
(a2i )
+
(b2j )
i=1
i=1
j=1
Which was what we wanted.
Exercise 12.1.6: Show that (Rn , dl2 ) in Example 12.1.6 is indeed a metric space.
Proof. Math is awesome.
(a) d(x, x) =
n
X
i=1
!1/2
2
(xi − xi )
=
n
X
!1/2
0
=0
i=1
(b) if x 6= y then there is some i such that xi 6= yi and hence we have |xi − yi | > 0 and since each
term of the following sum is greater than or equal to zero, we get:
5
n
X
d(x, y) =
!1/2
(xi − yi )2
>0
i=1
(c) Since (xi − yi )2 = (yi − xi )2 we immediately get that d(x, y) = d(y, x)
(d) We basically proved this in Exercise 12.1.5. We want to show that d(x, z) ≤ d(x, y) + d(y, z).
And this is equivalent to showing that:
n
X
!1/2
2
(xi − zi )
i=1
≤
n
X
!1/2
2
(xi − yi )
+
i=1
n
X
!1/2
(yi −
zi2 )
i=1
But if we use the final result in Exercise 12.1.5 with ai = xi − yi and bi = yi − zi then we get exactly
the above expression.
Exercise 12.1.12: Prove Proposition 12.1.18.
Proposition 12.1.18: Let Rn be a Euclidean space, and let (x(k) )∞
k=m be a sequence of points in
(k)
(k)
(k)
(k)
n
(k)
R . We write x = (x1 , x2 , . . . , xn ), i.e., for j = 1, 2, . . . , n, xj ∈ R is the j th co-ordinate of
x(k) ∈ Rn . Let x = (x1 , . . . , xn ) be a point in Rn . Then the following four statements are equivalent:
(a) (x(k) )∞
k=m converges to x with respect to the Euclidean metric dl2 .
(b) (x(k) )∞
k=m converges to x with respect to the taxi-cab metric dl1 .
(c) (x(k) )∞
k=m converges to x with respect to the sup norm metric dl∞ .
(k)
(d) For every 1 ≤ j ≤ n, the sequence (xj )∞
k=m converges to xj
Proof. We will prove this the following way: a ⇒ b, b ⇒ d, d ⇒ c, c ⇒ a
(a ⇒ b)
Given > 0 take 0 = /n. Then we know that there exists N > m such that dl2 ((x(k) )∞
k=m , x) <
0
= /n ∀k ≥ N .
But,
!1/2
n
X
(k)
|xj − x|2
dl2 ((x(k) )∞
k=m , x) =
j=1
So,
6
n
X
!1/2
(k)
|xj
< 0
2
− x|
j=1
⇒
n
X
!
(k)
|xj − x|2
< (0 )2
j=1
(k)
⇒ |xj − x|2 < (0 )2 ∀j
(k)
⇒ |xj − x| < 0
n
X
(k)
⇒
|xj − x| < n0 = n · /n
⇒
j=1
n
X
(k)
|xj − x| < j=1
⇒ dl1 (x(k) , x) < Which was what we wanted.
(b ⇒ d)
We have that for any > 0 there exists N > m such that dl1 ((x(k) )∞
k=m , x) < ∀k ≥ N .
But,
n
X
(k)
(k) ∞
dl1 ((x )k=m , x) =
|xj − x|
j=1
So,
n
X
(k)
|xj − x| < j=1
(k)
But, |xj − x| ≥ 0 ∀j
(k)
Thus, |xj − x| < ∀j
(k)
Hence, (xj )∞
k=m converges to xj , as desired.
(d ⇒ c)
(k)
We have that ∀j, given 0 > 0 ∃Nj > m such that |xj − xj | < 0 ∀k ≥ Nj . So given > 0 take
(k)
N = max{N1 , N2 , . . . , Nn } then we have |xj − xj | < ∀k ≥ N and ∀j = 1, . . . , n.
And since we have a finite number of j’s we have that:
(k)
(k)
sup{|xj − xj | : 1 ≤ j ≤ n} = max{|xj − xj | : 1 ≤ j ≤ n} < . Thus (x(k) )∞
k=m converges to x.
(c ⇒ a)
√
(k) ∞
0
0
Given
√ > 0 take = / n > 0 Then there exists N > m such that dl∞ ((x )k=m , x) < =
/ n ∀k ≥ N .
7
But,
(k)
dl∞ (x(k) , x) = sup{|xj − x| : 1 ≤ j ≤ n}
So,
(k)
sup{|xj − x| : 1 ≤ j ≤ n} < 0
Also since we have a finite number n the sup is just the max. Hence,
(k)
(k)
(k)
(k)
∃i such that ∀j |xj − x| ≤ |xi − x| = max{|xj − x| : 1 ≤ j ≤ n} = sup{|xj − x| : 1 ≤ j ≤ n}
Thus,
√
(k)
|xi − x| < 0 = / n
√ (k)
⇒ n|xi − x| < (k)
⇒ n|xi − x|2 < 2
n
X
(k)
(k)
⇒
|xj − x|2 < n|xi − x|2 < 2
j=1
⇒
n
X
!1/2
(k)
|xj − x|2
<
j=1
⇒ dl2 ((x(k) )∞
k=m , x) < Which is what we wanted.
So we have proved that a ⇒ b ⇒ d ⇒ c ⇒ a, and this proves the proposition.
Exercise 12.1.15: Let
X :=
{(an )∞
n=0
:
∞
X
|an | < ∞}
n=0
be the space of absolutely convergent sequences. Define the l1 and l∞ metrics on this space by
∞
dl1 ((an )∞
n=0 , (bn )n=0 ) :=
∞
X
|an − bn |;
n=0
∞
dl∞ ((an )∞
n=0 , (bn )n=0 ) := sup |an − bn |.
n∈N
Show that these are both metrics on X, but show that there exists sequences x(1) , x(2) , . . . of elements
of X (i.e., sequences of sequences) which are convergent with respect to the dl∞ metric but not with
respect to the dl1 metric. Conversely, show that any sequence which converges in the dl1 metric
automatically converges in the dl∞ metric.
Proof. Now let us prove that dl1 is a metric on X.
∞
First we have to show that dl1 ((an )∞
n=0 , (bn )n=0 ) < ∞ (We have to show this since our function d is
supposed to map into [0, ∞)).
∞
First note that (an )∞
n=0 , (bn )n=0 ∈ X hence they are bounded (otherwise their series would not
converge). So we have |an |, |bn | < M ∀n
8
Let SN =
N
X
|an − bn | which is clearly an increasing sequence.
n=1
SN =
N
X
|an − bn | ≤
n=1
N
X
|an |+ ≤
N
X
n=1
|bn | ≤
n=1
∞
X
|an |+ ≤
n=1
∞
X
|bn | = 2L < ∞
n=1
So SN is increasing and bounded. Hence,
sup
N
N
X
|an − bn | < ∞ and lim
N →∞
n=1
N
X
|an − bn | = sup
N
X
N
n=1
|an − bn | < ∞
n=1
∞
Thus, dl1 ((an )∞
n=0 , (bn )n=0 ) < ∞
P∞
P∞
∞
(a) dl1 ((an )∞
n=0 , (an )n=0 ) =
n=0 |an − an | =
n=0 0 = 0
(b) If the sequences are
then there is some i such that ai 6= bi and so |ai − bi | > 0 Thus
Pdifferent,
∞
∞
,
(b
)
)
=
|a
−
bn | > 0.
dl1 ((an )∞
n n=0
n
n=0
n=0
∞
∞
∞
(c) Since |ai − bi | = |bi − ai | for all i we clearly have that dl1 ((an )∞
n=0 , (bn )n=0 ) = dl1 ((bn )n=0 , (an )n=0 )
(d) Let (cn )∞
n=0 ∈ X. By the standard triangle inequality in R we get the following:
SN =
N
X
|an − cn | ≤
N
X
|an − bn | +
|bn − cn | ≤
∞
X
|an − bn | +
∞
X
|bn − cn |
n=1
n=1
n=1
n=1
n=1
N
X
Since SN is bounded and increasing we can let N → ∞ and get that:
∞
∞
∞
X
X
X
|an − cn | ≤
|an − bn | +
|bn − cn |
n=1
n=1
n=1
Thus we have the triangle inequality for dl1 .
Now we will show that dl∞ is a metric on X.
∞
First we will show that dl∞ ((an )∞
n=0 , (bn )n=0 ) < ∞
Let xn = |an − bn | a sequence that is clearly bounded from below, and since |an − bn | ≤ |an | + |bn | ∀n
∞
also bounded above. Hence the sup xn is also bounded, and thus we have dl∞ ((an )∞
n=0 , (bn )n=0 ) < ∞.
∞
(a) dl∞ ((an )∞
n=0 , (an )n=0 ) = supn∈N |an − an | = supn∈N 0 = 0
(b) If the sequences are different, then there is some i such that ai 6= bi and so |ai − bi | > 0. Thus,
∞
dl∞ ((an )∞
n=0 , (bn )n=0 ) = supn∈N |an − bn | > 0
∞
∞
∞
(c) Since |ai −bi | = |bi −ai | for all i we clearly have that dl∞ ((an )∞
n=0 , (bn )n=0 ) = dl∞ ((bn )n=0 , (an )n=0 )
(d) We know that we have the triangle inequality in R ∀n.
That is, |an − cn | ≤ |an − bn | + |bn − cn |
Now if we take the sup on the right hand side over n ∈ N we get:
|am − cm | ≤ sup{|an − bn | + |bn − cn | : n ∈ N} ≤ sup |an − bn | + sup |bn − cn |
n∈N
Now take the sup over m ∈ N on the left hand side, and we get:
9
n∈N
sup |am − cm | ≤ sup |an − bn | + sup |bn − cn |
m∈N
n∈N
n∈N
Giving us the triangle inequality in dl∞ .
To prove that convergence in l1 implies convergence in l∞ note the following.
P
Given > 0 there is N > 0 such that ∞
n=0 |an − bn | < ∀n > N .
Hence |an − bn | < ∀n.
So we get that sup |an − bn | < .
And that is what we wanted.
Now we will give an example of a sequence that converges with respect to dl∞ , but does not converge
with respect to dl1 .
Consider:
x(1) = (1, 0, 0, 0, 0, . . .)
1 1
(2)
x =
, , 0, 0, 0, . . .
2 3
1 1 1
(3)
x =
, , , 0, 0, . . .
3 4 5
..
.
1
1
1
(k)
x =
,
,...,
, 0, 0, . . .
k k+1
2k − 1
So we have:
sup |x(k)
n
1 1
− 0| = sup = → 0 as k → ∞
k
k
But,
∞
X
n=0
|x(k)
n |
k−1 X
1 k
1
=
n + k ≥ 2k = 2 > 0.
n=0
Hence the sequence converges in dl∞ , but does not converge to zero in dl1 .
Example by Anatoly.
Consider the following:
k
an(k) = 2
k ≥ 1, n ≥ 0
k + n2
(k)
First let us show that {an } ∈ X.
∞ ∞ ∞
X
X
k 1X
1
1
= k
=
k 2 + n2 k 2
1 + ( n )2 k
1 + ( nk )2
k
n=0
n=0
n=0
Let fk (x) =
1
. So for all k, fk (x) is positive and decreasing on [0, ∞).
1 + ( xk )2
10
Hence we can use the Integral test:
Z
∞
I=
Z
fk (x) =
0
0
∞
1
1 + ( xk )2
x
k
⇒ dx = kdu, and u(0) = 0, u(∞) = ∞. So,
Z ∞
u=∞
1
π
I=k
du = k arctan u
=k
2
1+u
2
u=0
0
Let us make the substitution u =
∞
∞
∞ X
k 1X
1
1
1X
Thus by the integral test, the series
converges. But,
=
k 2 + n 2 .
k n=0 1 + ( nk )2
k n=0 1 + ( nk )2
n=0
(k)
Thus {an } ∈ X.
(k)
Now let us show that dl∞ ({an }, {0}) = 0.
k 1
k
= .
is decreasing, so we get that sup 2
Clearly 2
2
k + n2
k
n∈N k + n
And, limk→∞
1
k
= 0.
(k)
Hence, dl∞ ({an }, {0}) = 0.
(k)
Now let us show that dl1 ({an }, {0}) 6= 0.
First note that if f is a decreasing function on [0, ∞) then we have the following inequalities (think
upper and lower step functions):
∞
X
n=1
And since fk (x) =
Hence,
Z
f (n) ≤
∞
f (x)dx ≤
0
∞
X
f (n)
n=0
1
is decreasing on [0, ∞) we get that:
1 + ( xk )2
Z ∞
π
fk (x)dx =
2
0
∞
X
1
f (n) ≥ .
2
n=0
(k)
Thus, dl1 ({an }, {0}) 6= 0.
Note: You may have noticed that in both examples we showed that the subsequences did not
converge to a specific point with respect to dl1 , but the exercise says to show that it does not
converge at all with respect to dl1 . However, we were also asked to prove that if a sequence
converges to x with respect to dl1 then it converges to x with respect to dl∞ . So if we know that a
subsequence converges to y with respect to dl∞ then if it converges with respect to dl1 then it must
also converge to y (otherwise what we proved earlier would not be a true statement).
11