# Is the range of an injective function dense somewhere?

Consider an injective function $\,\,f:[0,1]\rightarrow[0,1].\,$ Then is it true that there always exists some non-empty open subinterval of $[0,1]$, such that $f([0,1])$ is dense in that subinterval? That is to say, do there exist $a$ and $b$ such that $a<b$ and for any $c$, $d$ in $(a,b)$, there exists a $y$ in $(c,d)$ such that $y=f(x)$ for some $x$?

I'd be much obliged if someone could give me ideas on how to go on about proving this or maybe provide a counter-example since I don't even know whether it's true or not.

• To be clear, $f$ is not required continuous? – Seth Oct 18 '14 at 18:13
• Nope, $f$ can be anything. All it has to be is injective. – sayantankhan Oct 18 '14 at 18:15

If $f$ is continuous, then the answer is: Yes.
If $f(x_1)=y_1<y_2=f(x_2)$, then $[y_1,y_2]\subset f[x_1,x_2]$, due to Intermediate Value Theorem.
However, if we allow $f$ to be discontinuous, then the answer is: No.
There exists an 1-1 and onto mapping between $[0,1]$ and the Cantor set, which is nowhere dense, and is equinumerous to $[0,1]$.
• My function $f$ need not be continuous. – sayantankhan Oct 18 '14 at 18:16