15
$\begingroup$

While revising, I came across this question(s):

A) Is there a continuous function from $(0,1)$ onto $[0,1]$?

B) Is there a continuous one-to-one function from $(0,1)$ onto $[0,1]$?

(clarification: one-to-one is taken as a synonym for injective)

I figured the answer to A is yes, with $\frac{1}{2}\sin(4\pi x)+\frac{1}{2}$ as an example.

The answer to part B is no, but what is the reason?

Sincere thanks for any help.

  • 1
    [Related](http://math.stackexchange.com/a/42310/5798).2012-07-07
  • 2
    You can avoid confusion by using "surjective" and "injective" instead of "onto" and "one-to-one" respectively.2012-07-07
  • 0
    possible duplicate of [Continuous bijection from $(0,1)$ to $\[0,1\]$](http://math.stackexchange.com/questions/42308/continuous-bijection-from-0-1-to-0-1)2012-07-07
  • 1
    @MattN.: the answer to [that question](http://math.stackexchange.com/questions/42308/continuous-bijection-from-0-1-to-0-1) does not answer this question.2012-07-07
  • 0
    I agree with robjohn, and vote not to close this question.2012-07-07
  • 0
    @robjohn But ["that question"](http://math.stackexchange.com/questions/42308/continuous-bijection-from-0-1-to-0-1) asks "Does there exist a continuous bijection from $(0,1)$ to $[0,1]$"? and b) of this question here asks "Is there a continuous one-to-one function from $(0,1)$ onto $[0,1]$?". How are they not the same?2012-07-07
  • 0
    @Matt: Because this is not just (B) but rather (A) *and* (B). There is no answer on the suggested duplicate which answers (A).2012-07-07
  • 0
    @AsafKaragila a) is not part of the question because it's already answered in the OP.2012-07-07
  • 0
    @Matt: So all those questions appearing on the site which go like "This is a question, this is my answer, is this correct?" should be closed as not a real question?2012-07-07
  • 1
    @Asaf: True, but the OP has already gotten to a continuous surjection, so the question is really only (B).2012-07-07
  • 0
    @AsafKaragila No and this question is not one of them.2012-07-07
  • 0
    @Cameron: But the same can be applied on other "is this correct" questions because the OP already has a proof (and often a very good proof). We don't close those questions, do we? If the OP was *sure* of their example, why bring it up? Why even bother putting this in the question to begin with? Why not mention that as an example, or point out that it is true and only ask for the second part?2012-07-07
  • 0
    @Matt: The OP wrote that the answer for (B) is no, so there is an answer. Why duplicate? Why not simply NARQ instead, if there is no question in this post? (also, see my comment to Cameron.)2012-07-07
  • 1
    @Asaf: Fair point. If it is closed, I will vote to reopen.2012-07-07

5 Answers 5

8

There isn't such a function. If $f$ is such a function, then $f$ is monotonic, and $f^{-1}$ too. But a monotonic function defined on an interval is continuous iff its range is an interval. So we have that $f$ is an homeomorphism from $(0,1)$ to $[0,1]$, which is impossible since one is compact and the other is non compact.

  • 0
    2.$$ f(x) = \left\{ \begin{array}{cl} 0 & x < \frac14 \\ 2x-\frac12 & \frac14 \leq x \leq \frac34 \\ 1 & x > \frac34 \end{array}\right. $$2018-09-03
  • 0
    Isn't a continuous function2018-09-03
6

A slightly simpler solution, perhaps, for the first part would be as follows:

Consider the function from $\left[\frac14,\frac34\right]$ to $[0,1]$ defined by $x\mapsto 2\left(x-\frac14\right)$. This is certainly a continuous function, and it is certainly onto $[0,1]$.

Define now:

$$f(x)=\begin{cases}0 & x<\frac14\\ 2\left(x-\tfrac14\right) & x\in\left[\tfrac14,\tfrac34\right]\\ 1 & x>\frac34\end{cases}$$

Of course this is not an injective function, but it is continuous and onto, as required.

  • 1
    Was not the OP asking about a $1-1$ function?2012-07-07
  • 0
    @GiovanniDeGaetano: The first part reads differently.2012-07-07
  • 0
    I'm sorry, I must have misread the question then.2012-07-07
3

Your example for A is fine.
For B "for a continuous function on an interval, being one-to-one is equivalent to being increasing throughout or decreasing throughout" so that no such function exists. (see (2.5)-(2.6) of this paper)

  • 0
    The [link](http://files.vipulnaik.com/math-152/oneoneandinverses.pdf) was broken.2015-06-10
0

Answer for (B): Continuous image of a compact set is compact. [see1]

Suppose $f: [0,1] \rightarrow (0,1)$ is a bijection and continuous. Then $f([0,1])=(0,1)$, which is compact by above theorem.

But in $\mathbb{R}$, the closed interval $[0,1]$ is compact; but the open interval $(0,1)$ is not compact.

Therefore if such $f$ does not exist, then $f^{-1}$ does not exist too, where $f^{-1}: (0,1) \rightarrow [0,1]$. (your question in (B))

-3

If such a function exists then (0,1) and [0,1] are homeomorphic. But if you delete 0 from [0,1] you get (0,1] which is connected. Deleting the point x in (0,1) which corresponds to 0 in [0,1] leaves you with (0,x) u (x,1) which is not connected ---> contradiction.

  • 2
    Any reason why you're posting a answer to a 3-year old question that already has an accepted answer?2015-10-02
  • 0
    No particular reason.2015-10-10
  • 0
    Unfortunately this answer is incomplete. "Such a function" would be a continuous bijection from $(0,1)$ to $[0,1]$. The matter of the question is to show that any continuous bijection from $(0,1)$ to $[0,1]$ is an open mapping, and thus a homeomorphism.2015-11-29