δ\delta

why do rational numbers have repeating decimals?

#math #numbertheory

My younger brother is learning about the relationship between decimals and fractions right now. Of course, some fractions (i.e. only powers of 2 and 5 in the denominator) have nice and intuitive decimal representations (think 1/4=0.251/4 = 0.25), but he's just learning about repeating decimals.

This led me to a thought: why do rational numbers have repeating decimals? We define irrational numbers as numbers whose decimal representations never end and never repeat1. I wonder why rational numbers repeat?

It wasn't quite as interesting as I'd hoped, but here's an outline of the proof:

  1. We use the traditional long division technique, adding a whole bunch of 0's after the decimal point
  2. We note that each digit that's spit out by the division depends only on the previous number
  3. Using Pigeonhole we can prove that the decimal either ends at some point or repeats

Proof time? Proof time.

We wish to show that any xQx \in \mathbb{Q} has a decimal representation that, at some point, becomes periodic.

Consider a rational number of the form p/qp/q, with p,qNp, q \in \mathbb{N}. We may use the standard long division algorithm to compute the decimal representation. This generates a sequence of digits in the decimal representation, computed one digit at a time. Let this sequence be d0,d1,d2d_0, d_1, d_2 \dots starting from the decimal point. Thus

pq=k.d0d1d2.\frac{p}{q} = k.d_0 d_1 d_2\dots.

Note that this sequence is computed using long division, so each term depends only on the previous term (after a certain point in the division n>n0n>n_0, since pp and qq are finite). Therefore, the sequence (dn)(d_n) is fully determined in one direction by the first digit computed. However, we have that diNd_i \in \mathbb{N} and 0di90\le d_i \le 9, so there are finitely many possible values in the sequence. However, the sequence is infinitely long (note that we consider 0.250.25 and other seemingly "finitely long" decimals to be represented as 0.250000.25000\dots). Thus there exists di=di+jd_i = d_{i+j} for some j>0j>0, by the Pigeonhole Principle.

Since any term in the sequence is determined from the previous term, then it follows that di+1=di+j+1d_{i+1} = d_{i+j+1}. By induction, this implies that, for any nin \ge i,

dn=dn+j,d_{n} = d_{n+j},

hence the sequence eventually becomes periodic. \blacksquare

An interesting point to be made here is that this argument is the exact same for any integer base bb. This lends itself to certain applications like powers of 22 times π\pi; you can always multiply by 2 to the point where you have a 0 to the immediate right of the decimal point, and similarly for 1. In fact, you can do this in infinitely many ways, since there are infinitely many 1's and 0's. Just some food for thought:)

Footnotes

  1. I vividly remember arguments where my friends just could not accept that π\pi never repeated. It led to the loss of recesses and paper, seeing as they tried writing all the digits until it repeated. Oh, to be young again...