# How to show K is compact?

Let K be a subset of R^n such that every continuous function from K to R (the reals) is bounded. Show that K is compact.

Thank you.

### 2 Answers

- SteinerLv 710 years agoBest Answer
Suppose K is not compact. Then, by Heine Borel theorem, K is not bounded or not closed.

If K is not bounded, define f(x) = ||x||, x ∈ K. Then, f is continuous. And since K is unbounded, for every M > 0 there is x ∈ K such that f(x) = ||x|| > M, which shows f is a continuous unbounded function from K to R.

If K is not closed, then K has a limit point a that doesn't belong to K. So, the function from K to R given by f(x) = 1/||(x - a|| is well defined and continuous. Since a is a limit point of K, then for every M > 0 we can find x ∈ K such that ||x - a|| < 1/M, which implies that f(x) > M. Hence, f is unbounded.

This shows that, if K is not compact, then there is a continuous f:K → R that's not bounded. By contraposition, the claim is proved.

- 3 years ago
considering ok and L are closed they're compact (considering X is compact). permit x be a factor no longer in ok. considering X is metric this is Hausdorff and as a result there exists 2 disjoint open contraptions Ux and Vx such that ok is a subset of Ux and x is contained in Vx. The set of all contraptions Vx, the place x is in L covers L. as a result there exists a finite subcover V1,...,Vn. permit U1,...,Un be the corresponding open contraptions from until eventually now. permit U be the intersection of U1,...,Un and F the union of V1,...,Vn. this is elementary to work out that U and V are as needed.