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.