Is it true that a space-filling curve cannot be injective everywhere?

There are no continuous bijections from $\mathbb{R}$ to $\mathbb{R}^2$, or to $[0,1]^2$.

Suppose $f$ is a continuous injection from $\mathbb{R}$ into $\mathbb{R}^2$. Then for each $n \in \mathbb{N}$, $f|_{[-n,n]}$ is a continuous injection from a compact space to a Hausdorff space, and hence a homeomorphism onto its image. Thus the image $f([-n,n])$ is nowhere dense: it's compact, hence closed, hence if it were somewhere dense it would contain a closed ball. But then there would be infinitely many points that could be deleted from it without disconnecting it, contradicting it being homeomorphic to $[-n,n]$.

Thus the image of $f$ is a countable union of nowhere-dense sets. So by the Baire category theorem it can't be all of $\mathbb{R}^2$, or indeed any set with nonempty interior.


A proof of "No continuous bijection for $[0, 1]$ and $[0, 1]^2$":

Let $f$ be a continuous bijection from $[0, 1]$ to $[0, 1]^2$, $x \in [0, 1]$

$A = [0, 1] - x$, $B = [0, 1]^2 - f(x)$

A is not path-connected but B is, which leads to a contradiction.