# Compact set always contains its sup and inf

I am sorry if my question might seem minor, but I just want to clarify this point for myself. So in other thread on mathstackexchange, it is stated and proved that compact sets always contain their inf and sup. The explanation is straightforward, using Heine-Borel characterization, since compact set is bounded, hence it always has sup and inf. On the other hand, since compact sets are closed, then since by properties of sup and inf we can always devise a sequence of points in the set converging to sup/inf, hence sup/inf are in the set.

My problem with the above proof is the last part using closedness. The argument asserts that inf and sup belong to the compact set, because closed sets contain there limit points, but what if sup and inf are not limit points of the set? This could easily happen, if the sequence that we devise consists only of points equal to sup and inf.

Eg: Consider the set $$[-2,2] \cup \{3\}$$, which is compact. But its sup is not a limit point.

Does the argument break down?

• Compact? Really? – Lord Shark the Unknown Jan 15 at 17:58
• You meant $[-2,2]\cup\{3\}$. So forget "limit point"; it's easy to show that $\sup A\in\overline A$ regardless. – David C. Ullrich Jan 15 at 18:01
• I am sorry for my silly mistake. – Renat Sergazinov Jan 15 at 21:16

A proof does not necessarily require limit point argument. Let $$K$$ be a compact subset of $$\Bbb R$$ and $$M=\sup K$$. Then by the definition of the supremum, for each $$n\in\Bbb N$$, there exists $$x_n\in K$$ such that $$M-\frac{1}{n}. (Note that if $$M$$ is an isolated point of $$K$$, then $$x_n=M$$ for all sufficiently large $$n$$.) It easy easy to see that $$\lim\limits_{n\to \infty} x_n =M$$. Since $$K$$ is closed, it follows $$M\in K$$. Similarly, $$m=\inf K$$ also belongs to $$K$$. Thus $$K$$ has both maximum and minimum.
• @RenatSergazinov Umm ... actually, I'm arguing that we do not need to think cases separately ... First, If $M$ is an isolated point, then $x_n$ should be equal to $M$ for all but finitely many $n$. If $M\notin K$ ($M\in K$ is not proved yet), then $x_n$ approaches to $M$ strictly from below. Two cases are dealt with automatically and simultaneously by the construction of $x_n$. – Song Jan 15 at 21:23