# Is this statement equivalent to what I want to prove?

I want to prove the following statement: If $X\in \mathbb{R}^n$ has the property that every continuous function $f:X\to \mathbb{R}$ is bounded, then $X$ is compact.

So I thought a way of proving this was the contraposte the statement, together with Heine-Borel theorem.

Is this equivalent to show?:

If $X\subset \mathbb{R}^n$ is not closed and/or not bounded in the Euclidean metric d, then there exists a continuous function $f:X\to \mathbb{R}$ that is not bounded.

Also if yes, can I use that the norm function $\|x-y\|$ is continuous for a fixed to prove it?

Yes, it looks like you have the contrapositive down correctly. If the set is not bounded, then as you say, the norm map gives a continuous map which is not bounded, as desired. However, if the set is bounded but not closed, you will need to look at a different map. One possible solution is to find a limit point $p$ of $X$ which is not contained in $X$ (which can be done as $X$ is not closed), and then consider the map $f:X\to \mathbb{R}$, $$f(x)=\frac{1}{|p-x|}$$
• @seht111 Since $p$ is a limit point for $X$, we can choose elements of $X$ arbitrarily close to $p$, making $f(x)$ arbitrarily large. – 211792 Jan 6 '17 at 23:59
• @seht111 think about what it means for $p$ to be a limit point of $X$. Namely, it means that there are points in $X$ which are arbitrarily close to $p$, i.e. there are points for which $|p-x|$ is arbitrarily small. What is the reciprocal of a really small number? – TomGrubb Jan 6 '17 at 23:59