Compact set always contains its sup and inf

compactnessgeneral-topologyreal-analysissupremum-and-infimum

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?

Best Answer

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}<x_n\le M$. (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.