4. Metric Spaces and Convergence
≪ 3. Comments on Homework 1 | Table of Contents | 5. Metric Space Topology ≫Let’s quickly recall the definition of a metric space:
Definition 1.
A metric space is a set \(X\) together with a function \(d:X\times X\to [0,\infty)\) satisfying the following properties:
- (Positive-definite) \(d(x, y)=0\) if and only if \(x=y\).
- (Symmetric) \(d(x, y)=d(y, x)\) for all \(x, y\in X\).
- (Triangle inequality) \(d(x, z)\leq d(x, y)+ d(y, z)\) for all \(x,y,z\in X\).
This \(d\) is called a metric, and you should think of it as measuring the distance between two points in your set. These three properties encode some intuition about how distances should work. One nice way of interpreting the triangle inequality is that “taking detours” will never save you time — if you want to go from \(x\) to \(z\), then the fastest way there is to go there directly; taking a stop at \(y\) in between will only cost you more time.
Sometimes, you’ll be tasked with showing that something is a metric space, and that really just amounts to showing that these three properties hold.
Exercise 2. Metrics on Sequences
Let \(X\) be the set of sequences of real numbers. Define a metric as follows: \[d\left( \left\lbrace a_n \right\rbrace, \left\lbrace b_n \right\rbrace \right)=2^{-\min \left\lbrace n\in \mathbb{N} : a_n\neq b_n \right\rbrace}.\] In words, the distance between two sequences is inversely proportional to the first index at which they differ. Prove that this really is a metric.
Exercise 3. The Uniform Metric
Let \(X\) be the set of bounded real-valued functions on \(\mathbb{R}\). Show that the metric \[d(f, g)=\sup \left\lbrace \left\lvert f(x)-g(x) \right\rvert : x\in \mathbb{R} \right\rbrace\] really is a metric.
Challenge 4.
Let \(n \geq 1\) be a fixed integer, and let \(p\geq 1\). Show that the function \(\mathbb{R}^n\times \mathbb{R}^n\to [0, \infty)\) given by \(\left( \mathbf x, \mathbf y\right)\mapsto\left(\sum _{i=1}^{n} \left\lvert x_i-y_i \right\rvert ^{p}\right) ^{\frac{1}{p} }\) is a metric. In fact, this is equivalent to showing that \[\left\lVert \mathbf x \right\rVert_p=\left( \sum _{i=1}^{n} \left\lvert x_i \right\rvert^p \right) ^{\frac{1}{p} }\] is a norm on \(\mathbb{R}^n\).
Note: When \(p=1\), this is called the taxicab metric, and when \(p=2\), this is the usual Euclidean distance.
Hint
Recall the definition of convergence in an arbitrary metric space:
Definition 5.
Let \((X, d)\) be a metric space. A sequence \(\left\lbrace x_n \right\rbrace\) is said to converge to some limit \(L\) with respect to \(d\) if for every \(\epsilon>0\), there exists some \(N_\epsilon\) such that for any \(n>N_\epsilon\), \(d\left( x_n,L \right)<\epsilon\).
In words, a sequence converges to its limit if it’s eventually arbitrarily close to its limit. The notion of convergence is dependent upon the metric: sequences that converge with respect to one metric may not converge with respect to another metric.
Exercise 6.
Let \(X\) be any set, and let \(d_0(x, y)\) be the trivial metric: \[d_0(x, y)=\begin{cases} 0 & x = y \\ 1 & x \neq y.\end{cases}\] When does a sequence \(\left\lbrace x_n \right\rbrace\) have a limit with respect to \(d_0\)?
Exercise 7.
Let \(X\) be the set of continuous, bounded real-valued functions on \(\mathbb{R}\) that satisfy \(\int _{\mathbb{R}} \left\lvert f(x) \right\rvert dx <\infty\). Define \[d_1(f, g)=\int _{\mathbb{R}} \left\lvert f(x)-g(x) \right\rvert dx\] and \[d_\infty(f, g)=\sup \left\lbrace \left\lvert f(x)-g(x) \right\rvert : x\in \mathbb{R} \right\rbrace.\] Give an example of a sequence that converges with respect to \(d_\infty\), but not with respect to \(d_1\). Give an example of a sequence that converges with respect to \(d_1\) but not \(d_\infty\).
Now let \(X\) be the set of functions as above, but whose domains are \([0, 1]\). Show that converge with respect to \(d_\infty\) implies convergence with respect to \(d_1\), but give an example that shows that convergence with respect to \(d_1\) does not imply convergence with respect to \(d_\infty\).
Exercise 8.
Give an example of a set \(X\) with two metrics \(d_1\) and \(d_2\) such that there exists a sequence \(\left\lbrace x_n \right\rbrace\) that converges with respect to both metrics but converges to two different limits in the two metrics.
Recall that any bounded sequence of real numbers has a converging subsequence. Later in this course, you’ll prove that this is true for any bounded sequence of vectors in \(\mathbb{R}^n\). These are great intuitive models for how metric spaces should behave, but the notion of boundedness can be very, very misleading. The trivial metric is an example of a metric that’s “bounded”, yet not every sequence will have a converging subsequence when \(X\) is infinite. Here’s a more interesting example:
Exercise 9.
Let \((X, d)\) be the metric space defined in Exercise 2. Show that \((X, d)\) is bounded in the sense that every \(\left\lbrace a_n \right\rbrace\in X\) satisfies \(d\left( 0, \left\lbrace a_n \right\rbrace \right)\leq 1\) (where \(0\) is the constant zero sequence). Find a sequence in \(X\) such that no subsequence converges.
In addition, the idea of “boundedness” does not really ever say much about the convergence of a sequence at all. This following exercise gives a way to turn an arbitrary metric into a bounded metric in such a way that doesn’t change the convergence of any sequences.
Exercise 10.
Let \((X, d)\) be any metric space. Define a new metric on \(X\) by \[d’(x, y)=\frac{d(x, y)}{1+d(x,y)}. \] Show that \(d’\) is really a sequence and that \((X, d’)\) is bounded in the sense that \(d’(x, y) < 1\) for all \(x, y\in X\). Moreover, show that if \(\left\lbrace x_n \right\rbrace\) is a sequence in \(X\), then \(x_n\) converges to a limit \(L\) with respect to \(d\) if and only if it converges to the same limit with respect to \(d’\).