5

Q: "Prove that a number is rational if and only if from some point on its decimal expansion becomes periodic"

Please help!! I am relatively new to algebra and I find these questions very abstract.

Any input/hint/solution would be highly appreciated!

God bless you math guys on stackexchange!

kn619
  • 101
  • What exactly does it mean if a number's decimal representation is periodic? Can you write an equation if $x = n.(a)(b)(b)(b)...$, where $(a)$ and $(b)$ are groups of digits? – Carl Schildkraut Sep 22 '16 at 03:18

4 Answers4

7

Suppose that $r = 0.a_0a_1...a_n\overline{b_0b_1...b_m}$ (remove the integral part of $r$, that keeps it as a rational/irrational), where $a_i$ is the fixed part and $b_i$ is the recurring part. Note that: $$ r\cdot10^{n} = a_0\ldots a_n + 0.\overline{b_0\ldots b_m} $$ $$ r\cdot10^{n+m} = a_0\ldots a_n b_0 \ldots b_m + 0.\overline{b_0\ldots b_m} $$

Subtract: $$ r(10^{m+n}-10^n) = a_0\ldots a_n b_0 \ldots b_m - a_0\ldots a_n $$ Which implies: $$ r = \frac{a_0\ldots a_n b_0 \ldots b_m - a_0\ldots a_n }{10^{m+n}-10^n} $$

So $r$ is rational.

A rational number must have a repeating/terminating expansion. To see this, first we remove the integer part and assume that $r = \frac{p}{q}$, where $p < q$. Next, we note that by multiplying the numerator by $10^n$ for sufficiently large $n$, we can assume that $\frac{p(10^n)}{q}$ in it's simplest form, is of the form $\frac{s}{t}$ where $\gcd(10,t) = 1$. Once, this happens, we have Euler's theorem: $t | (10^{\phi(t)} - 1)$ where $\phi(t)$ is the Euler totient function.

So what we do is: $$ \frac{s}{t} = \frac{s(10^{\phi(t)}-1) + s}{t10^{\phi(t)}} = \frac{s}{10^{\phi(t)}}\frac{(10^{\phi(t)}-1)}{t} + \frac{1}{10^{\phi(t)}}\frac{s}{t} $$ Now you see where the recurrence comes from. Apply the same trick on the second $\frac{s}{t}$: $$ \frac{s}{t} = \frac{s}{10^{\phi(t)}}\frac{(10^{\phi(t)}-1)}{t} + \frac{1}{10^{\phi(t)}}\bigg(\frac{s}{10^{\phi(t)}}\frac{(10^{\phi(t)}-1)}{t} + \frac{1}{10^{\phi(t)}}\frac{s}{t}\bigg) $$

You can see where the repeating decimal comes from. The final answer you will get is: $$ \frac{s}{t} = \frac{s}{t} (10^{\phi(t)}-1) \sum_{i=0}^\infty \bigg(\frac{1}{10^{i\phi(t)}}\bigg) $$

Thus, the part $\frac{s10^{\phi(t)}}t$ keeps repeating in the fraction, while the $10^n$ in the starting shifts the value by a slight bit. Hence the decimal recurs, because of this repeating part. If there's no repeating part, then because $n$ is finite we have a terminating decimal.

For example, let us take $\frac{4}{3}$. We subtract $1$ to give a proper fraction $\frac{1}{3}$. According to our hypothesis, $10^{3-1}-1 = 99$ is divisible by $3$, and the quotient is $33$. Hence, the answer is: $$ \frac{1}{3} = 0.\overline{33} \implies \frac{4}{3} = 1.\overline{33} $$

To take a slightly more non-trivial example, let us take $\frac{19}{12}$.

Here, we first subtract $1$ and make the fraction proper, to $\frac{7}{12}$. Then, we multiply by $10^2=100$ on the top, so that we get a new fraction $\frac{175}{3}$. We again remove the part $58$ to leave $\frac{1}{3}$.

Now, $\frac{1}{3} = 0.\overline{33}$, so $\frac{175}{3} = 58.\overline{33}$, and $\frac{7}{12} = 0.58\overline{33}$, and $\frac{19}{12} = 1.58\overline{33}$.

I hope this procedure explains the reverse as well.

  • 1
    @kn619 . For the second part you can observe that if you carry out a long division to compute the digits of $p/q$ there is a remainder (possibly $0$) at each step and there are only $q$ possible remainders. So eventually a remainder will occur a second time, resulting in a repeating period. – DanielWainfleet Sep 22 '16 at 04:19
  • 1
    @астон вілла олоф мэллбэрг Thanks a lot! – kn619 Sep 24 '16 at 19:38
  • What does the notation $t|(10^{t-1}-1)$ mean? I just read about Euler's Theorem on Wiki and can't seem to relate it to that expression. We have two coprime integers $t$ and $10$, so Euler's Theorem tells us that $t^4 \equiv 1 $ (mod) $n$. – xoux Nov 02 '22 at 17:46
  • @evianpring My god, this answer is wrong as written and thank you for pointing it out. I believe a small amount of modification should have it running. I applied Euler wrongly : I meant to say that $t | 10^{\phi(t)} - 1$ (or , $10^{\phi(t)} \equiv 1 \pmod{t}$) because $t$ is coprime to $10$. So $10^{t-1}$ should change to $10^{\phi(t)}$ everywhere. (And indeed, the edits have been made, so the answer should be okay now. Once again, thank you very much and please find an upvote on one of your answers from my account). – Sarvesh Ravichandran Iyer Nov 02 '22 at 22:21
  • 1
    @SarveshRavichandranIyer: I simpler proof for the second part of the problem can be obtained without retorting to Euler's totient function. The key is to observe that the sequence of fractional parts of element in the sequence $r, 10r,\ldots$ take values in ${0,1/q,\ldots,(q-1)/q$. Thus there are $m\geq0$ and $n>0$ such that $10^mx - \lfloor 10^mx\rfloor = 10^{m+n}x - \lfloor 10^{m+n}x\rfloor $. I posted the ideas follwing some notes by I. Niven. – Mittens Nov 02 '22 at 23:13
  • @OliverDíaz I see, it's nice to have a much simpler proof of that part. Thank you for alerting me. – Sarvesh Ravichandran Iyer Nov 03 '22 at 03:11
4

This is a bijection so you need to prove it both ways:

(number is rational) -> (at some point its decimal expansion becomes periodic)

(at some point its decimal expansion becomes periodic) -> (number is rational)

For the first,

How can I prove that all rational numbers are either terminating decimal or repeating decimal numerals?

For the second,

Proof that every repeating decimal is rational

2

Proving that if the decimal expansion of $x$ is finite or periodic at some point, then $x$ is rational:

  • Let $|n|$ denote the number of decimal digits in $n$
  • Split $x$ into the following parts:
    • $\color\red{A}=$ the integer part, i.e., $\lfloor{x}\rfloor$
    • $\color\green{B}=$ the fraction part's non-periodic prefix
    • $\color\orange{C}=$ the fraction part's periodic postfix

Then:

$$x=\frac{\color\red{A}\cdot(10^{|\color\green{B}|+|\color\orange{C}|}-10^{|\color\green{B}|})+\color\green{B}\cdot(10^{|\color\orange{C}|}-1)+\color\orange{C}}{10^{|\color\green{B}|+|\color\orange{C}|}-10^{|\color\green{B}|}}$$

Hence $x$ is rational.


For example, consider $x=1.23\overline{456}$:

  • $\color\red{A}=1$
  • $\color\green{B}=23$
  • $\color\orange{C}=456$

Then:

$$x=\frac{\color\red{1}\cdot(10^{2+3}-10^{2})+\color\green{23}\cdot(10^{3}-1)+\color\orange{456}}{10^{2+3}-10^{2}}=\frac{41111}{33300}$$

barak manos
  • 43,109
1

Here is another solution to this old problem. Only the part $x$ rational implies periodic decimal expansion is done here.

Suffices to assume $0\leq x<1$. Let $x=p/q$ with $p,q$ integers $g.c.d(p,q)=1$. Then, the fractional part of the numbers in the sequence $x,10x,10^2x,\ldots$ take values on the set $\big\{0,\tfrac1q,\ldots, \tfrac{q-1}{p}\big\}$. Thus, there are numbers $m,n$ such that \begin{align} 10^mx-\lfloor 10^mx\rfloor = 10^{m+n}x-\lfloor 10^{m+n}x\rfloor\tag{1}\label{one} \end{align} Set $a_1:=\lfloor 10^{m+n}x\rfloor - \lfloor 10^{m}x\rfloor$. From \eqref{one}, $a_1=10^mx(10^n-1)$. There are integers $a_2$ and $a_3$ with $0\leq a_3<10^n-1$ such that $$10^mx=\frac{a_1}{10^n-1}=a_2+\frac{a_3}{10^n-1}=a_2+ \sum^\infty_{k=1}\frac{a_3}{10^{kn}}$$ By expressing the integer $a_3$ in use 10, we se that the number $\sum^\infty_{k=1}\frac{a_3}{10^{kn}}$ has periodic expansion, say $0.\overline{b_1\ldots b_n}$. Hence $$10^mx-a_2=0.\overline{b_1\ldots b_n}$$ whence we conclude that $x$ has a periodic decimal expansion.

Mittens
  • 39,145