TITLE: The diameter of a compact set.
QUESTION [12 upvotes]: Let $(X,d)$ be a metric space and define the diameter of a set $A$ as follows: 
$\operatorname{diam}A$ = $\sup\{d(x,y)\mathrel|x,y\in A \}$ if this quantity exists. 
Show that if $A$ is compact, then there are $a_1,a_2 \in A$ such that $\operatorname{diam}A = d(a_1,a_2)$.

REPLY [5 votes]: I'll write an answer with some blanks for you to fill. Hope that's alright.

$A$ is compact, therefore bounded, so $\operatorname{diam} A$ must exist. (Why can't $d(x, y)$ be arbitrarily large if $A$ is bounded?)
There is a sequence $x_n \in A$ and a sequence $y_n \in A$ such that $d(x_n, y_n) \to \operatorname{diam} A$. Explanation: If we assume that there are actually $x$ and $y$ with $\operatorname{diam} A = d(x, y)$ then this is obvious - take constant sequences. Otherwise, this follows from the definition of a supremum (fill in the details).
Since $A$ is compact, $x_n$ has a convergent subsequence. So does $y_n$.