# Why is a function that maps a closed interval to a open one not onto?

First I'll state my current mathematical knowledge on the subject of homeomorphisme: very low. I'm doing a class of dynamical systems and I got the following question:

Let $f:[0,1] \rightarrow (2,8)$ and $f$ is one-to-one and continuous. Now show $f$ is not onto.

So I started of by stating that $f$ is either continuously increasing or continuously decreasing, that's because $f$ is one-to-one. Now intuitively it makes sense that $f$ cannot be onto since it maps a closed interval into a open one, but I don't know how to show/prove this.

The exercise has a hint that $[0,1]$ and $(2,8)$ are not homeomorphic but I have no idea how to use this.

• We don't need $f$ to be one one. Just continuity is sufficient to conclude. – Paramanand Singh Jan 10 '18 at 11:11

## 1 Answer

The image of the compact space $[0,1]$ under the continuous function $f$ is compact, hence a proper subset of $(2,8)$ because this isn't compact.

• I don't really understand your reasening, how does compactness relate to a function being onto? – Mathbeginner Jan 10 '18 at 16:43
• Since the image $\operatorname{Im}(f)$ of $f$ is compact and $(2,8)$ is not compact we cannot have $\operatorname{Im}(f)=(2,8)$, thus $f$ cannot be surjective. – Fabio Lucchini Jan 10 '18 at 16:46
• I know this to be true but do you have a prove, like a proof used in real analysis? – Mathbeginner Jan 12 '18 at 19:11
• – Fabio Lucchini Jan 12 '18 at 19:32