# How does every real number have a decimal representation?

I am a little bit confused at how every real number can have at least one decimal representation, because:

• There are uncountable many real numbers
• There are countable strings of infinite length over a finite alphabet

I would expect that there can be no injection from the real numbers to the infinite strings over {0,1,2,3,4,5,6,7,8,9,.}. Is there a mistake in my assumption or reasoning? Does this only mean that some different real numbers must have the same decimal representation?

• The second statement is false even for the alphabet {$0,1$} Cantor's diagonal method shows that there are uncountable many infinite long words. The set of finitely long words over some finite alphabet however is countable. Jul 31 at 15:16

## 2 Answers

Your second point is not correct. There are uncountably many strings of infinite length, even though there are only countably many strings of finite but unbounded length. This makes sense because the latter correspond to terminating decimals, which are a subset of the rationals.

You can see by diagonal argument that the set of infinite strings is uncountable: assume it is countable, and order the strings $$s_1,s_2,\ldots$$, then construct a string which is different to $$s_1$$ in position $$1$$, different to $$s_2$$ in position $$2$$, and so on.

The number of digits in any given infinite decimal representation is countably infinite (and equal to the cardinality of the naturals).

The number of possible infinite decimal representations is uncountably infinite (and equal to the cardinality of the continuum).