# Compact set - prove that supremum is actually maximum

There is a compact set $K$ in $\mathbb{R}^n$. The diameter of this set is defined as follows:

$D = \sup\limits_{x,\, y\, \in K}\|x-y\|$.

I need to prove there are two vectors $a,b$ in $K$ such that $\|a-b\| = D$, i.e. the maximum is also the supremum.

I've some suggestions but I don't think any of them is correct.

How could I prove it ?

-
Perhaps you should outline your suggestions and explain why you think none of them is correct. Using compactness to prove a supremum is attained is a fairly standard argument in point set topology. – hardmath Jan 8 '13 at 17:58
I know the group is closed and bounded, it makes sense the supremum is also the maximum , but I can't find a formal way to express this complaint – itamar Jan 8 '13 at 18:00

Since $K$ is compact, so is the product $K\times K$. A metric $d$ on a metric space $X$ always is a continuous function from $X\times X$ into $\mathbb R$. In your case it is defined as $d(x,y)=||x-y||$, so the continuity of $d$ can also be derived by composing the continuous functions $(x,y)\mapsto x-y$ and $x\mapsto||x||$, since subtraction and norm are also continuous. Now use that $d$ maps the compact set $K\times K$ to a compact set in $\mathbb R$.

-

By Bolzano-Weierstrass, $k$ must be closed. This gives the result pretty immediately.

-
As i've written - I know the group is closed and bounded, it makes sense the supremum is also the maximum , but I can't find a formal way to express this complaint – itamar Jan 8 '13 at 18:00

Let x and y are two points where D takes supremum. Now consider Cauchy sequences such that they converge x and y respectively and all the elements of sequence(s) must be in the given set. As the given set is compact, the limit of cauchy sequences exists and are in the set itself.

So the supremum is indeed maximum.

-
thanks for the answer ! Why should the sequences be specificly cauchy sequences ? Thanks – itamar Jan 8 '13 at 18:07

Hint: A continuous real function on a nonempty compact set attains its maximum and minimum, so back up from this well known result (Weierstrass Extreme Value Thm.) to identify what plays the role of the continuous real function and what plays the role of the compact set.

-
the compact set is K , the real function is actually the distance function from x to y . I know this function attains it's maximum, but why the maximum is actually the supremum ? – itamar Jan 8 '13 at 18:12
Actually both $x$ and $y$ are variables in this problem, so you need a different compact set (though closely related to $K$). – hardmath Jan 8 '13 at 18:26