Continuous mapping of Cantor Set to $[0,1]$ I read that $[0,1]$ is a continuous image of the Cantor set using the dyadic expansion $f$ of real numbers. $f$ is an onto function, since all $x \in [0,1]$ can be represented by an element in the Cantor set.
But $f$ should not be injective right? since otherwise we will have a homeomorphism between the Cantor set and $[0,1]$, but the Cantor set is disconnected while $[0,1]$ is connected. But I could not picture how the Cantor set cannot have a one-to-one function with $[0,1]$. How does $f$ not become injective (aside from the reason re homeomorphism)?

The Cantor set $K$ and $[0,1]$ are both compact Hausdorff spaces. A  continuous bijection from one compact Hausdorff space to another must be a homeomorphism. So if any  $f:K\to [0,1]$ was continuous, surjective, and injective then $f$ would be a homeomorphism, implying that $f^{-1}:[0,1]\to K$ is continuous and surjective, implying that the disconnected space $K$ is a continuous image of the connected space $[0,1],$ which is impossible.
