TITLE: Continuous self-maps on $\mathbb{Q}$
QUESTION [10 upvotes]: 1) Are $\mathbb{Q}$ and $\mathbb{Q}\setminus\{0\}$ homeomorphic?
2) If $S\subseteq \mathbb{Q}$ is a non-empty subset, is there a continuous surjection $f:\mathbb{Q}\to S$?

REPLY [3 votes]: Let me give yet another argument for the second question.  Note that you can partition $\mathbb{Q}$ into infinitely many nonempty open sets $U_n$ (for instance, let $\alpha_0<\alpha_1<\dots$ be your favorite unbounded increasing sequence of irrational numbers and let $U_n=(\alpha_{n-1},\alpha_n)\cap\mathbb{Q}$ where $\alpha_{-1}=-\infty$).  The surjection $f:\mathbb{Q}\to\mathbb{N}$ sending $U_n$ to $n$ is continuous.  Since any map with domain $\mathbb{N}$ is continuous, $\mathbb{Q}$ can continuously surject onto any space that $\mathbb{N}$ can surject onto, i.e. any countable nonempty space.