Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have troubles showing the following:

Let $(X,\rho)$ be a compact metric space and $F \subset X$ a closed subset. Prove that if diam $F < \infty$, then there exist $x_{0}, y_{0} \in F$ such that diam $F= \rho(x_{0},y_{0})$.

It looks so trivial yet hard to find the trick.

share|cite|improve this question
Consider $\rho: F \times F \to [0,\infty)$ and observe that a continuous function on a compact set attains its maximum. The condition on the diameter of $F$ is superfluous (since $X$ has finite diameter already). – t.b. Mar 26 '12 at 22:00
Another way to see that compact metric sets have a finite diameter, fix $x\in X$ and consider the open cover by $B(x,r)=\{y\in X\mid d(x,y)<r\}$ for $r\in\mathbb R^+$. By compactness there is a finite subcover $B(x,r_1),\ldots,B(x,r_n)$ let $r$ be the maximal radius amongst $r_1,\ldots,r_n$. We have if so that $X\subseteq B(x,r)$ and thus has a finite diameter. – Asaf Karagila Mar 26 '12 at 22:47
up vote 5 down vote accepted

For the sake of having an answer:

Since $F$ is closed in $X$, it is compact. Then $F \times F$ is compact, too, and $\rho: F \times F \to [0,\infty)$ is a continuous function on a compact set, so it attains its maximum. In other words, there is a point $(x_0,y_0) \in F \times F$ such that $\rho(x_0,y_0) = \max{\{\rho(x,y)\,:\,(x,y) \in F \times F\}} = \operatorname{diam}{F}$ which is precisely the statement you ask about.


  1. We didn't use that $F$ has finite diameter, because it follows from our argument.
  2. It would be enough to assume that $F$ is a compact subset of $X$ instead of assuming compactness of $X$ itself.
  3. Compactness is necessary: equip a countable set $X = \{x_n\}_{n \geq 2}$ with the metric given by $d(x_n,x_m) = \max{\{1-1/n,1-1/m\}}$ if $n \neq m$. Then $\operatorname{diam}{X} = 1$ but no two points are at distance $1$ to each other.
share|cite|improve this answer
In other words, it's follows from the X-treeeeeeme value theorem. – you Mar 27 '12 at 0:44
@t.b. Which metric is it that makes $F \times F$ compact and $p: F \times F \rightarrow [0,\infty)$ a continuous function? – Dosomemaths Oct 12 '13 at 15:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.