Show that there does not exist a strictly increasing function $f : \mathbb Q \to \mathbb R$ such that $f(\mathbb Q) = \mathbb R$.

A strictly increasing function is necessarily injective. If $f(\mathbb{Q})=\mathbb{R}$, then the function is also surjective (by definition). This would imply that there exists a bijection between $\mathbb{Q}$ and $\mathbb{R}$.

EDIT: For the sake of completion, the statement is still true if $f$ is not assumed to be strictly increasing.

To see this, note that there exists a bijection between $\mathbb{N}$ and $\mathbb{Q}$. Therefore, if there were a surjection from $\mathbb{Q}$ to $\mathbb{R}$, there would be one from $\mathbb{N}$ to $\mathbb{R}$. But note that Cantor's argument actually shows that there is no surjection from $\mathbb{N}$ to $\mathbb{R}$. qed.

As a curiosity, note that this argument does not use AC.


We don't need the fact that $f$ is increasing. Suppose that $f(\Bbb Q)=\Bbb R$, then for any $x\in\Bbb R$ there is a $r_x\in\Bbb Q$ such that $f(r_x)=x$.

Since there are uncountable many $x\in \Bbb R$, the set of all $r_x$ must also be uncountable. However, $\Bbb Q$ is countable, a contradiction.


Here is a proof that does not use the uncountability of $\mathbb{R}$. Suppose $f:\mathbb{Q}\to\mathbb{R}$ is strictly increasing, and let $\alpha\in\mathbb{R}$ be any irrational number. Let $A=(-\infty,\alpha)\cap\mathbb{Q}$ and $B=(\alpha,\infty)\cap\mathbb{Q}$. Then every element of $f(A)$ is less than every element of $f(B)$, so $\sup f(A)\leq \inf f(B)$. Moreover, if $x\in A$, then $x+\epsilon\in A$ for sufficiently small rational $\epsilon>0$, so $f(x)<f(x+\epsilon)\leq \sup f(A)$. Similarly, if $x\in B$, then $f(x)>\inf f(B)$. Thus $$f(\mathbb{Q})=f(A)\cup f(B)\subseteq (-\infty,\sup f(A))\cup (\inf f(B),\infty),$$ so any $y\in [\sup f(A),\inf f(B)]$ is not in the image of $f$.