Topology question on homeomorphism

58 Views Asked by At

Let $X$ be the subspace $(-\infty, 4) \cup [5, \infty) \subset \mathbb{R}$ and $f : X \rightarrow \mathbb{R}$ be the function defined as

$$ f(x) = \begin{cases} x+1, &\text{for } x < 4 \\ x, &\text{for } x \geq 5. \end{cases} $$

How do I show that $f$ is surjective? Is $f$ a homeomorphism?