TITLE: Is mapping from a countable set to an uncountable set never surjective?
QUESTION [5 upvotes]: Suppose $f: X \rightarrow \mathbb{R}$, where $X$ is a countable set. Does it mean that it is always not surjective? (Sorry for such a basic question, but we never dealt with this question in elementary real analysis class).

REPLY [16 votes]: This is true, and does not require the axiom of choice. First of all, without loss of generality our countable set $X$ is $\mathbb{N}$. 
By definition, a set is uncountable if it does not inject into $\mathbb{N}$. But given a surjection $f: \mathbb{N}\rightarrow Y$, we can define an injection $g: Y\rightarrow \mathbb{N}$ as follows: $$g(x)=\min\{n: f(n)=x\}.$$ So if $Y$ is uncountable, no surjection from $\mathbb{N}$ to $Y$ exists.
This does not require the axiom of choice anywhere. Note that in Alex Wertheim's comment, he used choice to pick a representative of $\{a: f(a)=x\}$; however, since the domain of our map was well-ordered, we didn't need choice, and we could simply pick the least element. This works in general for any well-orderable set (and every countable set is well-orderable, by definition). 
By contrast, if $X$ is not well-orderable, then we may have a $Y$ which is larger than $X$ ($X$ injects into $Y$ but $Y$ doesn't inject into $X$) but such that $X$ does surject onto $Y$. Math without choice is weird.

In the specific case $Y=\mathbb{R}$, we can do even better: given a map $f:\mathbb{N}\rightarrow\mathbb{R}$, define a sequence of nontrivial closed intervals $I_n=[a_n, b_n]$ such that $I_n\supseteq I_{n+1}$ and $f(n)\not\in I_n$ (it's easy to show that such a sequence of intervals exists. Then $J=\bigcap I_n$ is nonempty; but any element of $J$ is not in the range of $f$. This is, in fact, Cantor's original argument for the uncountability of $\mathbb{R}$.