# Thread: Continuous function from (0,1) to [0,1]

1. ## Continuous function from (0,1) to [0,1]

I came across a very confusing question.

Which of the following statements are true about the open interval $(0,1)$ and the closed interval $[0,1]$?

1. There is a continuous function from $(0,1)$ onto $[0,1]$.
2. There is a continuous function from $[0,1]$ onto $(0,1)$.
3. There is a continuous one-to-one function from $(0,1)$ onto $[0,1]$.

It's immediately clear to me that 3 is wrong because the inverse image of a closed set has to be closed and it isn't, but what about the other two?

Statement 2 requires that the function be onto but not one-to-one. If it is onto, then the entire closed unit interval gets mapped to the open unit interval, so the inverse image of $(0,1)$ should be $[0,1]$ and open sets should have on open inverse image.

Why doesn't the same argument work for statement 1? The answer key of the book says that statement one is the only correct one. If one is indeed true, is there a simple example of such a continuous function?

2. Originally Posted by eeyore
I came across a very confusing question.

Which of the following statements are true about the open interval $(0,1)$ and the closed interval $[0,1]$?

1. There is a continuous function from $(0,1)$ onto $[0,1]$.
2. There is a continuous function from $[0,1]$ onto $(0,1)$.
3. There is a continuous one-to-one function from $(0,1)$ onto $[0,1]$.
It's immediately clear to me that 3 is wrong because the inverse image of a closed set has to be closed and it isn't, but what about the other two?

Statement 2 requires that the function be onto but not one-to-one. If it is onto, then the entire closed unit interval gets mapped to the open unit interval, so the inverse image of $(0,1)$ should be $[0,1]$ and open sets should have on open inverse image.

Why doesn't the same argument work for statement 1? The answer key of the book says that statement one is the only correct one. If one is indeed true, is there a simple example of such a continuous function?

I don't think (1) is correct either: if f: (0,1) --> [0,1] is cont. and onto, then if w in (0,1) is s.t. f(w) = 1 we get f|: (0,1) - {w} --> [0,1) is onto
and continuous (with f| = the restriction of f).
But this can't be correct since (0,1) - w is not connected (it isn't an interval) whereas [0,1) is...

(3) is then same as (1) above (the argument about closed set doesn't work because both (0,1) and [0,1] are closed wrt the inherited topology of R)

About (2) a simmilar argument as above (taking out 1 and f(1)) shows it can't be either, or you can say that continuous images of compact sets are compact, and [0,1] is compact but (0,1) is not.

Tonio

3. I think 1 is true. You can construct an homeomorphism from [1/2,3/4] to [0,1] and then define f constant as 0 on (0,1/2] and 1 on [3/4,1). The problem with the given argument by Tonio is that w such that f(w)=1 can't be unique. In fact, this argument of Tonio shows that there is no a continuous bijection between (0,1) and [0,1], that is that 3 is not correct, but one needs to use inverse because connection is preserved by images and not preimages.