Diameter of a compact metric space Let $(X,d)$ be a compact metric space, then it's bounded, therefore $\operatorname{diam}(X)$ is finite, then there exists $x_0, x_1 \in X$ such that $\operatorname{diam}(X) = d(x_0, x_1)$. Is this explanation correct?
 A: I don't think your reasoning is entirely correct. There are plenty of metric spaces with finite diameter but such that there are no $x,y$ such that $\textrm{diam}(X) = d(x,y)$. For instance take the open interval $(0,1)$ (of course this set is not compact *wink)
Here's how I would tackle it. Consider the function $$f(x) = \max_{y \in X} d(x,y)$$ Show $f$ is continous and then as $X$ is compact, $f$ attains its supremum on $X$.
You can also do it with open covers, but I haven't checked all the details.
A: Define $f(x) = \max_{y \in X} d(x,y)$, then
$|f(x_1)-f(x_2)| \le d(x_1,x_2)$, hence $f$ is continuous.
Since $f$ is continuous, it has a $\max$ on $X$. In particular, there is some
$x_0$ such that $f(x_0) = \max_{x \in X} f(x)$. And similarly, there is some
$x_1$ such that $f(x_0) = d(x_0,x_1)$, and we have
$d(x_0,x_1) \ge d(x,y)$ for all $x,y \in X$.
A: You are only using boundedness, which is not sufficient as others have already pointed out.
I believe the simplest correct proof is this:
If $X$ is compact then so is $X \times X$, and $d$ is a continuous function on the compact set $X \times X$. A continuous function on a compact set is bounded and it attains its max and min values.
