A set is compact if and only if every continuous function is bounded on the set?

2k Views Asked by At

I was asked to prove the following statement:

Let $K \subseteq R^n$. show that $K$ is compact (meaning closed and bounded) if and only if every continuous function is bounded on $K$.

What I did:

Suppose $K$ is not bounded, and so, it is not compact. Then the function $\sum |x_i|$ is a continuous unbounded function on $K$. Via contrapositive, this shows that if every function is bounded, then $K$ is also bounded.

What I need help with:

Assume $K$ is not closed. I need to find a continuous and unbounded function on $K$.

that will prove that if every continuous function is bounded on $K$, then $K$ is compact.

after that, i still need to show that if $K$ is compact then every continuous function $f: K \to \mathbb R$ is bounded.

Would someone point me in the right direction?

Clarification: it's not homework. I am preparing for an exam.

1

There are 1 best solutions below

1
On BEST ANSWER

If $K$ is not closed let $a\in \overline{K}\setminus K.$ Let $d_E$ denote the Euclidean metric then the function $H:K\to\mathbb{R} $$$H(t) =\frac{1}{d_E (t,a)}$$ is continouos and not bounded.