# continuous function from (0,1) onto [0,1]?

by dumbQuestion
Tags: continuous, function
 P: 126 I know that there does not exist a continuos function from [0,1] onto (0,1) because the image of a compact set for a continous function f must be compact, but isn't it also the case that the inverse image of a compact set must be compact? and a set in R is compact iff its closed and bounded right?
P: 1,623
First consider the continuous surjection $f:(0,1) \rightarrow [0,1]$ defined as follows:
$$f(x) = \left\{ \begin{array}{lcl} 0 & : & x \in \left(0,\frac{1}{4}\right)\\[0.3em] 2x-\frac{1}{2} & : & x \in \left[\frac{1}{4},\frac{3}{4}\right]\\[0.3em] 1 & : & x \in \left(\frac{3}{4},1\right) \end{array} \right.$$
Now to answer your other questions ...

 Quote by dumbQuestion but isn't it also the case that the inverse image of a compact set must be compact?
Not all continuous maps satisfy this property. Those that do are called 'proper'.

 and a set in R is compact iff its closed and bounded right?
Assuming that you give $\mathbb{R}$ its usual topology and assuming you mean bounded with respect to the Euclidean metric, then yes.
P: 1,716
 Quote by dumbQuestion I know that there does not exist a continuos function from [0,1] onto (0,1) because the image of a compact set for a continous function f must be compact, but isn't it also the case that the inverse image of a compact set must be compact? and a set in R is compact iff its closed and bounded right?
map any set with any topology to a point. This map is continuous and its image is compact.

P: 350

## continuous function from (0,1) onto [0,1]?

(1/2) (sin(2pi x)+1) maps (0,1) onto [0,1].

Clearly the problem is that this function is not injective. Same problem with the example by jgens.

Does there exist an injective continuous function mapping (0,1) onto [0,1]? Assume there is, and suppose f(a)=0 and f(b)=1. WLOG assume b>a and let e>0 be small enough so that b+e<1. Since 1 is the max value of f, f(b+e) is strictly between 0 and 1. By the IVT, there exists c between a and b such that f(c)=f(b+e). So f can't be injective after all.

More generally if f is injective and continuous from an interval of R into R, then it must be monotonic and its inverse must be continuous as well.
 Sci Advisor P: 1,168 You can also use a result that a continuous bijection f: X--->Y , between X compact and Y Hausdorff , is a homeomorphism. And (0,1) and [0,1] are not homeomorphic for many reasons: [0,1] is compact and (0,1) is not, or (0,1) is 1-connected and [0,1] is not -- e.g., delete the endpoints of [0,1], and the space remains connected ( I think k-connectedness is also called the Euler number). This also shows there are no continuous bijections between (0,1) and [0,1) (because [0,1) is not 1-connected; remove 0, and it remains connected.)

 Related Discussions Calculus 0 Calculus & Beyond Homework 5 Calculus 13 Calculus & Beyond Homework 0 Calculus & Beyond Homework 2