# Mathematics Prelims

## January 25, 2009

### Continuous Functions from the Reals to the Rationals

Filed under: Topology — cjohnson @ 6:45 pm

Using the ideas of connectedness previously discussed, we can show that a continuous function from $\mathbb{R}$ to $\mathbb{Q}$ must be constant.  We will do this by showing that if we have such a continuous function, we’d have a surjection between a connected space and a disconnected space, which we showed in the last post can’t happen.

Suppose $f : \mathbb{R} \to \mathbb{Q}$ is a non-constant map; we’re not making any assumptions about continuity or surjectivity, just that the image of the map has at least two distinct points.  Let $q_1, q_2$ be two distinct points in the image of $\mathbb{R}$; $q_1, q_2 \in f(\mathbb{R}) : q_1 \neq q_2$.  Now note that $f$ is a surjection from the reals to its image, $f(\mathbb{R})$.  Assume, without loss of generality, $q_1 < q_2$.  Since these points are distinct, there must be an irrational number in $\mathbb{R}$, call it $r$, between them.  Let $Q_1 = \{ q \in f(\mathbb{R}) : q < r \}$ and $Q_2 = \{ q \in f(\mathbb{R}) : q > r \}$.  Notice that these are open in the subspace topology of $f(\mathbb{R})$ as $\mathbb{Q} \cap (-\infty, r)$ is open in $\mathbb{Q}$ and $Q_1 = f(\mathbb{R}) \cap (\mathbb{Q} \cap (-\infty, r))$, and likewise for $Q_2$.  These two sets are clearly disjoint and cover $f(\mathbb{R})$ and are non-empty as $q_1 \in Q_1, \, q_2 \in Q_2$.  This means that $f(\mathbb{R})$ is a disconnected space.  We know that $f$ is a surjection to $f(\mathbb{R})$ a disconnected space.  This is impossible if $f$ is continuous, so we have if $f : \mathbb{R} \to \mathbb{Q}$ is non-constant it is not continuous, which by contrapositive means that if $f$ is continuous, it must be constant.

(This is a modified version of the proof in Crossley, with some gaps filled in.)