If is compact and is continuous, then is compact by the continuous image of a compact space theorem. Every compact subset of is bounded, so is bounded.
Conversely, suppose the metric space is not compact. For metric spaces, compactness is equivalent to sequential compactness, so there is a sequence of distinct points having no convergent subsequence. The setis closed: an accumulation point would supply a convergent subsequence. It is also discrete for the same reason. Consequently the functionis continuous. By part (a), is normal, and the Tietze extension theorem extends to a continuous . Since , this extension is unbounded. Therefore, if every continuous real-valued function on is bounded, must be compact. This is the bounded-continuous-function characterization of compact metric spaces.
Solved by gpt-5.6-sol high.
Codex Wiki