An onto function $f: \mathbb{R}^2 \rightarrow \mathbb{R}^4$ Does there exist an onto function $f: \mathbb{R}^2 \rightarrow \mathbb{R}^4$? If $f$ is required to be linear then the answer is no, this follows from basic ideas of linear algebra.
In the case where we allow for $f$ to be an arbitray function, I believe the answer is that yes, such a function $f$ does exist, simply because the domain and codomain both have the same cardinality (uncountably infinite) and thus there is a bijection between the two.
How far does this generalize? If it is true then it must also be true that for each $n$ there exists a function $f$ such that $f: \mathbb{R} \rightarrow \mathbb{R}^n$ is onto.
What about $f: \mathbb{R} \rightarrow \mathbb{R}^{\mathbb{N}}$?
What about $f: \mathbb{R} \rightarrow \mathbb{R}^I$ where $I$ is an uncountable infinite set?
Thank you.
 A: Finite case
Yes, it is true that for each $n \in \Bbb N$, there exists a function $f_n : \Bbb R \to \Bbb R^n$ which is onto.
This is simply because $\Bbb R$ and $\Bbb R^2$ have the same cardinality and thus, by induction, so does $\Bbb R^n$. This means that there exists a bijection from $\Bbb R$ to $\Bbb R^n$.
Countable case
This is again true. As earlier, $\Bbb R^\Bbb N$ has the same cardinality as $\Bbb R$.
Here's a sketch of the proof: Show that $\{0, 1\}^\Bbb N \cong \Bbb R$ ($\cong$ denotes bijection of sets) and hence note
$$\Bbb R^\Bbb N \cong \{0, 1\}^{\Bbb N \times \Bbb N} \cong \{0, 1\}^\Bbb N \cong \Bbb R.$$
Uncountable case
As noted in the comments, simply saying that $I$ is uncountable does not tell us the cardinality of $I$. For example, $|I|$ could be $|\Bbb R|$ or $|\cal P(\Bbb R)|$ (or something else altogether).
I suspect that you wished to say $I \cong \Bbb R$. In this case, note that
$$|\Bbb R^\Bbb R| \ge |\{0, 1\}^\Bbb R| = |\cal P(\Bbb R)|.$$
It is a standard (and easy) theorem that there is no surjection from any set onto its power set. Thus, we see that there's no onto function from $\Bbb R$ onto $\Bbb R^\Bbb R$.
