Let $(X, \tau)$ be a compact space and surjective function $f: X \rightarrow (0, \infty) $ (where $(0, \infty)$ is respect to the euclidean topology). Show that this function is continuous. If not, point the counterexample.
I have a big problem finding this surjective map (function). Do I have to find it? Or can I prove it in another way.
I will be grateful for any hint :)
Assume there exists a continuous surjective function $f: X \to (0,\infty)$. Since $X$ is compact, the image of $f$ is compact, which by surjectivity is the whole space $(0,\infty)$.
However, $(0,\infty)$ equipped with the euclidean topology is not compact, because the cover $\mathcal U := \ \{(n,n+1)~|~ n \in \mathbb N\ \}$ has no finite subcover.
Thus we get a contradiction.