# Preimage of a continous surjection from (0,1) to [0,1].

For a continuous function $f: X \to Y$, the preimage of every closed set in $Y$ is closed in $X$.

Let $g: (0,1) \to [0,1]$ be a continuous surjection.

Isn't the preimage of $[0,1]$ = $(0,1)$ open?

-
Yes but it's also closed since it's the whole space. – Rudy the Reindeer Sep 5 '12 at 13:26
What about this: "$g: [0,1] \to (0,1)$ (g is onto) cannot be continuous because a continuous function maps a compact set to a compact set"? Is this wrong because $(0,1)$ is closed since its the whole space, and it is bounded, and hence compact? – Legendre Sep 5 '12 at 13:29
Your argument that $(0,1)$ is compact uses the Heine-Borel theorem, which applies to $\mathbb{R}^n$, not arbitrary subspaces of it. It is true that $(0,1)$ is not compact in itself (under the topology induced from $\mathbb{R}$) so your argument about $g$ is correct. – Matthew Pressland Sep 5 '12 at 13:31
Re your comment question: It is not wrong. There is no continuous function $g:[0,1]\to\(0,1)$ which is onto. – Thomas Andrews Sep 5 '12 at 13:47
And what Matt said: your argument that $(0,1)$ is compact in itself doesn't work because where you write "...hence compact" you use Heine-Borel which is a theorem about subsets of $\mathbb R^n$ but here you consider $(0,1)$ as the whole space, not as a subset of $\mathbb R$. – Rudy the Reindeer Sep 5 '12 at 13:47

"Closed and bounded" is not the same as compact in general. Observe (for example) that $$\mathcal{U}=\bigl\{(1/n,1-1/n):n\in\Bbb Z,n>2\bigr\}$$ is an open cover of $(0,1)$, but has no finite subcover. Thus, you're right--such a $g$ cannot be continuous.
Another way to see that it $(0,1)$ isn't compact is to observe that (for example) $$x\mapsto\cfrac{2x-1}{4(x-x^2)}$$ is a homeomorphism $(0,1)\to\Bbb R$. Since $\Bbb R$ isn't compact, then neither can $(0,1)$ be. – Cameron Buie Sep 5 '12 at 13:43
Another way is to note that $f(x) = \frac{1}{x}$ is continuous on $(0,1)$, but unbounded. But on compact spaces, all continuous functions are bounded. (I'm not sure if this is circular or not). – Jason DeVito Sep 5 '12 at 13:55
It isn't circular, Jason. It's certainly true that all real-valued continous functions on compact spaces are bounded (or more generally, that all metric-space-valued continuous functions on compact spaces are bounded). Thus, there can't be an unbounded continuous function $X\to\Bbb R$ for compact spaces $X$. – Cameron Buie Sep 5 '12 at 14:12