Let $a,b\in\mathbb{R}$ and $a<b$. Which of the following statement(s) is/are true?
- There exists a continuous function $f:[a, b]\rightarrow (a,b)$ such that $f$ is one-one.
- There exists a continuous function $f:[a,b]\rightarrow(a,b)$ such that $f$ is onto.
- There exists a continuous function $f:(a, b)\rightarrow[a,b]$ such that $f$ is one-one.
- There exists a continuous function $f:(a, b)\rightarrow[a,b]$ such that $f$ is onto.
I have found an example for option 4: take a compact subset $[c,d]$ of $[a,b]$, find a bijection $f : [c,d] \to [a,b]$, and then extend $f$ to have domain $(a, b)$.
Also 2 can not be correct, because a continuous function on a compact set has compact image.
How to eliminate the others?