Why is a repeating decimal a rational number?

I believe the fundamental problem (or confusion) here is that OP finds it difficult to believe that a rational number, which is a ratio of two finite integers, can have a representation which is infinite. This confusion is primarily due to the fact that most people try to think of a number and its representation as one and the same thing. However the concept of a number is different from the concept of representing it.

I will provide a simple example. In decimal notation the number "five" is written as $5$, but in binary it is written as $101$ and in ternary as $12$. Same is the case for rational numbers. A fraction like "one/two" can be written as $0.5$ in decimals (as a finite expression), but the same can't be written as a finite decimal in ternary. Similarly "one/three" can be written as a finite decimal in ternary, but as an infinite one in normal base ten.

It has to be understood very clearly that a rational number may or may not have finite representation depending on the kind of representation chosen. Also it is better to understand why some rationals can have finite decimal representation and others don't have such finite decimal representation. Here the following result helps:

A rational number $p/q$ can be represented as a finite decimal in base $b$ notation, if and only if denominator $q$ divides $b^{n}$ for some positive integer $n$.

Also it should be noted that in case the decimal representation is not finite, then it has to follow a repeating pattern. This happens because the decimal representation is obtained via division of $p$ by $q$ and hence the only possible choices for remainder are $0, 1, 2,\ldots, q - 1$. If at some point we get a $0$ remainder then the decimal representation is finite; otherwise the remainder has to repeat and lead to a repeating non-terminating decimal representation.


$$\begin{align} 0.3333333333333\ldots &= 0.3 +0.03 +0.003 +0.0003+ \ldots\\ &=\frac{3}{10} + \frac{3}{100} + \frac{3}{1000}+ \frac{3}{10000} +\ldots \end{align}$$

If you know the sum of a geometric sequence, that is: $$a+aq+aq^2+aq^3+\ldots = \frac{a}{1-q} \quad\text{ if $|q| < 1$}$$

you can use it to conclude that for $q = \frac{1}{10}$:

$$\frac{3}{10} + \frac{3}{100} + \frac{3}{1000}+ \frac{3}{10000} +\ldots =\frac{\frac{3}{10}}{1-\frac{1}{10}}=\frac{1}{3} $$


a=0.333333333333333...

multiply by 10 10a=3.333333333333333...

10a-a=3.3333333....- 0.3333333...

so 9a=3 a=1/3 and it’s rational