TITLE: Proof that the irrational numbers are uncountable
QUESTION [64 upvotes]: Can someone point me to a proof that the set of irrational numbers is uncountable? I know how to show that the set $\mathbb{Q}$ of rational numbers is countable, but how would you show that the irrationals are uncountable?

REPLY [5 votes]: One can use a variant of the familiar Cantor diagonalization argument. Let us suppose that $x_1,x_2,x_3,\dots$ is an enumeration of the irrationals. Let $d_n$ be the $n$-th decimal digit of $x_n$ after the decimal point. 
Let $w_n=5$ if $d_n$ is not equal to $3$ or $4$, and let $w_n=6$ if $d_n$ is equal to $3$ or $4$.  
Now we give the decimal representation of an irrational $y$ not in the list $x_1,x_2,x_3,\dots$.  Very roughly speaking, it is the number whose $n$-th digit after the decimal point is $w_n$. But some modification is made to ensure irrationality. 
First we describe the $n$-th digit $e_n$ after the decimal point of $y$, where $w_n=5$. List these $n$ as $n_1,n_2,n_3,n_4,\dots$.   Let $e_{n_1}=5$. Let $e_{n_2}=6$. Let $e_{n_3}=e_{n_4}=5$. Let $e_{n_6}=6$. Let $e_{n_7}=e_{n_8}=e^{n_9}=5$. Let $e_{n_{10}}=6$. Continue, leaving longer and longer strings of unchanged $5$'s.
The same procedure is used to produce the $n$-th digit $e_n$ after the decimal point of $y$, where $w_n=3$. Leave longer and longer strings of these unchanged, and switch the digit to $4$ occasionally. 
The number $y$ we produce has decimal expansion which differs in the $n$-th place from the corresponding digit of $x_n$. The occasional switches from $5$ to $6$ or $3$ to $4$ ensure that the decimal expansion of $y$ is not ultimately periodic.