Proof that the real numbers are countable: Help with why this is wrong

I was just thinking about this recently, and I thought of a possible bijection between the natural numbers and the real numbers. First, take the numbers between zero and one, exclusive. The following sequence of real numbers is suggested so that we have bijection.

0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.01, 0.02, ... , 0.09, 0.10, 0.11, ... , 0.99, 0.001, 0.002, ... , 0.999, 0.0001, etc.

Obviously, this includes repeats, but this set is countable. Therefore, the set of all numbers between zero and one is a subset of the above countable set, and is thus countable. Then we simply extend this to all real numbers and all the whole numbers themselves, and since the real numbers, as demonstrated above, between any two whole numbers is countable, the real numbers are the union of countably many countable sets, and thus the real numbers are countable.

Please help me with this. I understand the diagonalization argument by Cantor, but I am curious specifically about this proof which I thought of and its strengths and flaws.

Thanks.


Solution 1:

Your function ignores all the real numbers whose decimal representations are not finite, such as

$\dfrac13=0.3333\ldots$

The subset of real numbers that do have finite decimal representations is indeed countable (also because they are all rational and $\mathbb Q$ is countable).

Solution 2:

If you know Cantor's diagonalization argument, then you should be able to find a counterexample to your problem using it. Say the method we use to make the $k$-th digit of our new real number different from the $k$-th digit of the $k$-th number in your list is adding 1 to it (and make it 0 if it's 9). Then Cantor's argument gives the number $0.21111111111111...$ Which is not in your list because (as said below) you only have real numbers with finite decimal expansions in your list.

(was previously a comment, but made an answer following suggestion)