Why does Cantor's diagonal argument not work for rational numbers? If we map every integer to a string that represents a rational number, and produce a number different from all the ones listed, we are essentially following Cantor's algorithm. But why does it not apply? Is it because we can't be certain that the number produced is a rational number?
 A: It applies, in the sense that you can carry it out. However, the number you obtain through the process is not a rational (it does not have a periodic decimal expansion).
To be precise, the procedure does not let you guarantee that the number you obtain has a periodic decimal expansion (that is, that it is a rational number), and so you are unable to show that the "diagonal number" is a rational that was not in the original list. In fact, if your original list is given explicitly by some bijection, then one is able to show just as explicitly that the number you obtain is not a rational. 
A: Despite replying to an old post, I would like to supplement things that that I missed out after reading all replies.
Fact:

*

*$\pi$ is irrational

Cantor's method has 1 property and I will respect it

*

*The generated new number must be different

Cantor's contradiction makes sense because the new number is

*

*Real number

*Resulted from the method, which means its different from all enumerated real numbers

The contradiction will makes sense to $\mathbb{Q}$ if the new number is

*

*Rational number

*Resulted from the method, which means its different from all enumerated rationals

Here's the key. The very method can give this number--$\pi$,

*

*Rational number (No, it isn't)

*Resulted from the method (Yes, it is different from all since its irrational)

This is how you conclude why is the generated number not necessarily rational, because the method gives a lot of freedom in picking the number
