# Past exam paper question - Metric Spaces

Let $A$ be a non-empty compact subset of $X$. Prove that there exist points $a,b \in A$ such that $$d(a,b) = \sup \left\{ d(x,y):x,y \in A \right\}\,.$$

The question was split into two pieces with us needing to show:

$$| d(x,y) - d(x',y') | \leq d(x,x') + d(y,y')$$

My attempt was to say that if $A$ is compact $\exists a,b \in A$ such that there are Cauchy sequences $\left\{ x_n \right\} , \left\{ y_n \right\}$ such that for $\epsilon_1, \epsilon_2 > 0,\, d(x_n,a) < \epsilon_1\text{ and }d(y_n,b) < \epsilon_2 \,$.

Using this I can say:

$$| d(x_n,y_n) - d(a,b) | \leq d(x_n,a) + d(y_n,b) < \epsilon_1 + \epsilon_2 = \epsilon_3$$

$\square$

Is this completely wrong?

-
Where do you get $a, b$ from? – Dylan Moreland Dec 9 '11 at 7:24

That sounds a little fishy. I think what they meant you to do, or what is the quickest solution, is to note that evidently $d:A\times A\to\mathbb{R}$ is continuous (it's the restriction of the continuous map $d:X\times X\to\mathbb{R}$ to the subspace $A\times A$). But, $A\times A$ is compact (this is Tychonoff's theorem) and so by the extreme value theorem $d$ attains a maximum on $A\times A$.
I agree. I think the hint is meant to help you show that the metric is continuous on $X \times X$. Just a note: proving that a product of two compact spaces is compact is not so bad. I remember Tychonoff being kind of tricky. – Dylan Moreland Dec 9 '11 at 7:30