Week 1 Discussion Notes

Table of Contents

Metric Spaces

When working with metric spaces, there are two main examples you want to have in mind:

  1. (R,)\p{\R, \abs{\,\cdot\,}}, which is useful to have in the back of your mind when doing proofs for general metric spaces.
  2. (R2,Euclidean distance)\p{\R^2, \text{Euclidean distance}}, which is useful when drawing pictures (this will be an especially helpful example when we get to point-set topology).
Definition (metric spaces)

Let XX be a non-empty set. A function d ⁣:X×X[0,)\func{d}{X \times X}{\pco{0, \infty}} is called a metric on XX if:

  1. d(x,y)=0    x=yd\p{x, y} = 0 \iff x = y
  2. (symmetry) d(x,y)=d(y,x)d\p{x, y} = d\p{y, x}
  3. (triangle inequality) d(x,y)d(x,z)+d(z,y)d\p{x, y} \leq d\p{x, z} + d\p{z, y}

The tuple (X,d)\p{X, d} is called a metric space.

In analysis, one of the most important concepts is convergence, i.e., limits:

Definition

Let (X,d)\p{X, d} be a metric space. We say that a sequence (xn)\p{x_n} converges to xx with respect to the metric dd if limnd(xn,x)=0\lim_{n\to\infty} d\p{x_n, x} = 0.

Equivalently, if for any ε>0\epsilon > 0, there exists NN such that if nNn \geq N, then d(xn,x)<εd\p{x_n, x} < \epsilon.

Motivation

Example 1.

Let X=C([0,1])X = C\p{\br{0, 1}} be the set of continuous functions on the interval [0,1]\br{0, 1}. We will consider two metrics on this set:

d1(f,g)=01f(x)g(x)dxd2(f,g)=supx[0,1]f(x)g(x)\begin{aligned} d_1\p{f, g} &= \int_0^1 \abs{f\p{x} - g\p{x}} \,\diff{x} \\ d_2\p{f, g} &= \sup_{x \in \br{0,1}} \abs{f\p{x} - g\p{x}} \end{aligned}

(In the live discussion, I flipped these.)

Consider the sequence fn(x)=xnf_n\p{x} = x^n. In the first metric,

d1(fn,0)=01xndx=1n+1n0.d_1\p{f_n, 0} = \int_0^1 x^n \,\diff{x} = \frac{1}{n + 1} \xrightarrow{n\to\infty} 0.

In the second metric,

d2(fn,0)=supx[0,1]xn=1.d_2\p{f_n, 0} = \sup_{x \in \br{0,1}} x^n = 1.

Our calculations show that fnf_n converges to 00 with respect to d1d_1 (which is called the L1L^1-metric), but it does not converge with respect to d2d_2 (which is called the sup\sup-metric or LL^\infty-metric).

Moral: Different metrics capture different types of convergence.

In analysis, one of the central concepts is convergence, and metrics are an important way to describe the type of convergence we have.

Examples

Example 2.
(Exercise 1.1.10)

Let X=RnX = \R^n and let

d2(x,y)=(i=1nxiyi2)1/2,d(x,y)=sup1inxiyi.\begin{aligned} d_{\ell^2}\p{x, y} &= \p{\sum_{i=1}^n \abs{x_i - y_i}^2}^{1/2}, \\ d_{\ell^\infty}\p{x, y} &= \sup_{1 \leq i \leq n} \abs{x_i - y_i}. \end{aligned}

Show that

1nd2(x,y)d(x,y)d2(x,y).\frac{1}{\sqrt{n}} d_{\ell^2}\p{x, y} \leq d_{\ell^\infty}\p{x, y} \leq d_{\ell^2}\p{x, y}.
Solution.

There are two inequalities to show:

1nd2(x,y)d(x,y)andd(x,y)d2(x,y).\frac{1}{\sqrt{n}} d_{\ell^2}\p{x, y} \leq d_{\ell^\infty}\p{x, y} \quad\text{and}\quad d_{\ell^\infty}\p{x, y} \leq d_{\ell^2}\p{x, y}.

Let's start with the first one. Notice that by definition of a supremum,

xiyid(x,y)\abs{x_i - y_i} \leq d_{\ell^\infty}\p{x, y}

for any 1in1 \leq i \leq n. Thus,

d2(x,y)=(i=1nxiyi2)1/2(i=1nd(x,y)2)1/2=(nd(x,y)2)1/2=nd(x,y)    1nd2(x,y)d(x,y),\begin{aligned} d_{\ell^2}\p{x, y} &= \p{\sum_{i=1}^n \abs{x_i - y_i}^2}^{1/2} \\ &\leq \p{\sum_{i=1}^n d_{\ell^\infty}\p{x, y}^2}^{1/2} \\ &= \p{n d_{\ell^\infty}\p{x, y}^2}^{1/2} \\ &= \sqrt{n} d_{\ell^\infty}\p{x, y} \\ \implies \frac{1}{\sqrt{n}} d_{\ell^2}\p{x, y} &\leq d_{\ell^\infty}\p{x, y}, \end{aligned}

which proves the first inequality. For the second inequality, we want to prove a statement about a supremum-we want to show that

sup1inxiyid2(x,y).\sup_{1 \leq i \leq n} \abs{x_i - y_i} \leq d_{\ell^2}\p{x, y}.

When you want to prove something like this, you almost never want to find an inequality with the supremum directly. Instead, you want to find an upper bound for every element you take the supremum of, i.e., you want to find an upper bound for xkyk\abs{x_k - y_k} that works for each 1kn1 \leq k \leq n (I switched to kk here since I want to use ii for the index in the sum):

xkyk=(xkyk2)1/2(i=1nxkyk2)1/2=d2(x,y).\begin{aligned} \abs{x_k - y_k} &= \p{\abs{x_k - y_k}^2}^{1/2} \\ &\leq \p{\sum_{i=1}^n \abs{x_k - y_k}^2}^{1/2} \\ &= d_{\ell^2}\p{x, y}. \end{aligned}

Thus, d2(x,y)d_{\ell^2}\p{x, y} is an upper bound for the set {xiyi1in}\set{\abs{x_i - y_i} \mid 1 \leq i \leq n}, so because the supremum is the least upper bound, you immediately get

d(x,y)=sup1inxiyid2(x,y).d_{\ell^\infty}\p{x, y} = \sup_{1 \leq i \leq n} \abs{x_i - y_i} \leq d_{\ell^2}\p{x, y}.
Example 3.
(Exercise 1.1.13)

Let XX be any set, and let dd be the discrete metric on XX:

d(x,y)={0if x=y,1if xy.d\p{x, y} = \begin{cases} 0 & \text{if } x = y, \\ 1 & \text{if } x \neq y. \end{cases}

Show that (xn)\p{x_n} converges to xx with respect to the discrete metric if and only if there exists an NN such that xn=xx_n = x for all nNn \geq N.

Solution.

There are two implications to prove:

"    \impliedby"

Assume that there exists NN such that xn=xx_n = x for all nNn \geq N. Given any ε>0\epsilon > 0, if nNn \geq N, then

d(xn,x)=d(x,x)=0<ε.d\p{x_n, x} = d\p{x, x} = 0 < \epsilon.

Thus, (xn)\p{x_n} converges to xx with respect to the discrete metric. (We never used the fact that dd is the discrete metric, so in this case, (xn)\p{x_n} actually converges to xx with respect to any metric.)

"    \implies"

Now assume that (xn)\p{x_n} converges to xx with respect to the discrete metric. This means that given any ε>0\epsilon > 0, there exists NN such that if nNn \geq N, then d(xn,x)<εd\p{x_n, x} < \epsilon.

Here, we will need to use the fact that dd is the discrete metric: if we pick ε=12\epsilon = \frac{1}{2}, then there exists an NN so that if nNn \geq N, then d(xn,x)<12d\p{x_n, x} < \frac{1}{2}. But dd is the discrete metric, so the only way this can occur is if d(xn,x)=0d\p{x_n, x} = 0, i.e., xn=xx_n = x. Thus, we have shown that if nNn \geq N, then xn=xx_n = x, which was what we wanted to show.