# Find the cardinality of the set of all continuous real-valued functions of one variable.

Find the cardinality of the set of all continuous real-valued functions of one variable.

Trying to solve this problem I stumbled upon one casualty whichI've been struggling for a while with. This is my solution:

The cardinality of this set is bounded below by the cardinality of $\mathbb R$, because $f: \mathbb R \to \mathbb C(\mathbb R)$ given by $f(x) = \mbox{function y = x}$ is an injection. Now, I tried to bound this set from above:
$$|\mathbb R| = |\mathbb R^{\aleph_0}| = |\mathbb R^\mathbb Q|$$
And now I tried to make an injection $$I: \mathbb C(\mathbb R) \to \mathbb R^\mathbb Q$$
given by $$I(x) = x \upharpoonright \mathbb Q$$
However, in order for this solution to be acceptable, I'd have to prove this:
$$x\upharpoonright \mathbb Q = y \upharpoonright \mathbb Q \Longrightarrow x=y$$
And this is where I got stuck. How can I tackle this proof?

$$\mathbb C(\mathbb R) - \mbox{Continuous real-valued functions}$$

• could you define your notations? – ziggurism Feb 5 '18 at 14:05

$|C(\mathbb{R})|$ is at least $|\mathbb{R}|$ because for every $c \in \mathbb{R}$, the constant function $f(x) = c$ belongs to $|C(\mathbb{R})|$. It is at most $|\mathbb{R}^\mathbb{Q}|$, because $\mathbb{Q}$ is dense in $\mathbb{R}$ and so a continuous function on $\mathbb{R}$ is determined by its values on $\mathbb{Q}$. And as you note, $|\mathbb{R}| = |\mathbb{R}^\mathbb{Q}|$.
• But the irrationals are dense in $\mathbb R$ as well. Could you, please, add some more explanations? – Aemilius Feb 5 '18 at 14:12
• If you know the values of a continuous function $f$ on every rational number, you know its values on every real number. If $x$ is real, then take a sequence $q_1, q_2, \ldots$ of rationals whose limit is $x$; then, by continuity, $f(x)$ is the limit of the sequence $f(q_1), f(q_2), \ldots$. There's nothing special about the rationals here: any dense subset of $\mathbb{R}$ would do. – Connor Harris Feb 5 '18 at 16:29