Proof that every repeating decimal is rational

Suppose that the decimal is $x=a.d_1d_2\ldots d_m\overline{d_{m+1}\dots d_{m+p}}$, where the $d_k$ are digits, $a$ is the integer part of the number, and the vinculum (overline) indicates the repeating part of the decimal. Then

$$10^mx=10^ma+d_1d_2\dots d_m.\overline{d_{m+1}\dots d_{m+p}}\;,\tag{1}$$ and

$$10^{m+p}x=10^{m+p}a+d_1d_2\dots d_md_{m+1}\dots d_{m+p}.\overline{d_{m+1}\dots d_{m+p}}\tag{2}\;.$$

Subtract $(1)$ from $(2)$:

$$10^{m+p}x-10^mx=(10^{m+p}a+d_1d_2\dots d_md_{m+1}\dots d_{m+p})-(10^ma+d_1d_2\dots d_m)\;.\tag{3}$$

The righthand side of $(3)$ is the difference of two integers, so it’s an integer; call it $N$. The lefthand side is $\left(10^{m+p}-10^m\right)x$, so

$$x=\frac{N}{10^{m+p}-10^m}=\frac{N}{10^m(10^p-1)}\;,$$

a quotient of two integers.

Example: $x=2.34\overline{567}$. Then $100x=234.\overline{567}$ and $100000x=234567.\overline{567}$, so

$$99900x=100000x-100x=234567-234=234333\;,$$ and

$$x=\frac{234333}{99900}=\frac{26037}{11100}\;.$$


A non-rigorous proof would be the following. Suppose

$$x=x_0,\overline{x_1x_2x_3\dots x_n}$$

Then

$$10^nx=x=x_0x_1x_2x_3\dots x_n,\overline{x_1x_2x_3\dots x_n}$$

so $$10^nx-x=x_0x_1x_2x_3\dots x_n-x_0$$

and

$$x=\frac{x_0x_1x_2x_3\dots x_n-x_0}{10^n-1}$$

where $x_n\in\{0,1,\dots,9\}$

Simple example:

$$x=1,234234234\dots$$

then

$$10^3 x=1234,234234\dots$$

so

$$(10^3-1)x=1234-1$$

$$x=\frac{1233}{999}$$

If you want to get more rigorous, you can use the series expansion of a number, but, all in all, the proof's essence won't differ much.

ADD In the more general case

$$x=x_0,y_1y_2y_3\dots y_n\overline{x_1x_2x_3\dots x_n}$$

note

$$x=x_0,0\dots 0\overline{x_1x_2x_3\dots x_n}+0,y_1y_2y_3\dots y_n$$ and consider

$$x'=x_0,0\dots 0\overline{x_1x_2x_3\dots x_n}$$ The shifting is then of $10^{m+n}$, and we obtain the sum of two rational numbers, which is rational.


Let $q= 0.\overline{d_1d_2...d_k}$ be a repeating decimal with pattern $R = d_1d_2...d_k$ of length $k$.

Then we have: $$q=\sum_{n=1}^{\infty}{R\cdot 10^{-kn}}=R\left(\frac{1}{1-10^{-k}}-1\right)=\frac{R}{10^k-1}$$