Post

Why pi is not a repeating decimal

An accessible journey through Lambert's proof

Why pi is not a repeating decimal

This article was originally made as a blog post on my Art of Problem Solving profile page, hence it often references course titles and ideas from AoPS.

Let’s try to go through a proof that the digits at the end of $\pi=3.1415\ldots$ are non-repeating.

The way to do this is by showing two separate things:

  1. $\pi$ is irrational.
  2. If a number is irrational, then the digits at the end of that number are non-repeating.

Before we begin: I’m assuming you’ve heard of $\pi$ before, and that you know what the words rational and irrational mean. Essentially, I hope you’ve done a good job in Prealgebra. :)

$\pi$ is irrational

To begin, you’d need to know about trigonometric functions. Check out Introduction to Geometry for these! The main functions are called $\sin,\cos,\tan$ and they talk about ratios in right triangles.

Then, you’d need to know about Taylor series for trigonometric functions. This is a task in the Calculus textbook. In the AoPS course map, Calculus is the final core subject course.

It is possible, albeit very difficult, to combine those ideas to prove that \[\tan(x) = \cfrac{x}{1 - \cfrac{x^2}{3 - \cfrac{x^2}{5 - \cfrac{x^2}{7 - {}\ddots}}}}.\]

Take the opportunity to admire the beauty of this equation. Especially if you multiply it by $x$ on both sides. Stunning.

In 1761, Johann Heinrich Lambert showed that if $x$ is rational, then that big expression on the right is irrational.

He did this through a complicated proof by infinite descent. If you want to get a taste for what that means, there’s a great example on Wikipedia. A couple AoPS books have a similar example, but there this strategy is avoided.

Next, we write the contrapositive. This idea is introduced in the Intermediate Counting & Probability textbook. Basically, we are allowed to rewrite our previous statement like this: if the big expression on the right is rational, then $x$ is irrational.

To finish, let $x=\frac{\pi}{4}.$ Our good work learning geometry tells us that $\tan\left(\frac{\pi}4\right)=1.$ The big expression on the right is therefore equal to $1, $ which is rational, and so $x=\frac{\pi}{4}$ is irrational. It follows that $\pi$ is irrational.

If a number is irrational, then the digits at the end of that number are non-repeating

This question is easier in comparison, though that’s probably not surprising.

Again, we invoke the contrapositive. We can say that our question is equivalent to the following statement: if the digits at the end of a number are repeating, then that number is rational. Let’s prove this!

If our number $n$ has repeating digits at the end, we can say that it is of the form $n=A.B\overline{C},$ where $A,B,C$ are finite sequences of digits. We put a line over $C$ to denote that we repeat the sequence $C$ over and over again, forever.

Let $b,c$ be the number of digits in the sequences $B$ and $C$ respectively. Then, \begin{aligned} 10^{b}\cdot n&=AB.\overline{C}\\ &=AB.CCC\ldots\\ &=AB+\frac{C}{10^{c} }+\frac{C}{10^{2c} }+\frac{C}{10^{3c} }+\cdots\\ &=AB+C\left(\frac{1}{10^{c} }+\frac{1}{10^{2c} }+\frac{1}{10^{3c} }+\cdots\right). \end{aligned}

Let’s call the thing in parentheses $S.$ Then, \begin{aligned}10^c \cdot S &= 10^c\cdot \left(\frac{1}{10^{c} }+\frac{1}{10^{2c} }+\frac{1}{10^{3c} }+\cdots\right)\\ 10^c\cdot S &=1+\frac{1}{10^{c} }+\frac{1}{10^{2c} }+\frac{1}{10^{3c} }+\cdots\\ 10^c\cdot S&=1+S\\ 10^c\cdot S-S&=1\\ S(10^c-1)&=1\\ S&=\frac{1}{10^c-1}.\end{aligned}

This method for finding infinite sums appears in Introduction to Algebra B. To complete our work, we can substitute that result in! \begin{aligned}10^{b}\cdot n&=AB+C\left(\frac{1}{10^{c} }+\frac{1}{10^{2c} }+\frac{1}{10^{3c} }+\cdots\right)\\ &=AB+C\left(\frac{1}{10^{c}-1}\right)\\ &=AB+\frac{C}{10^{c}-1}\\ &=\frac{AB(10^{c}-1)+C}{10^{c}-1},\end{aligned} and so $n=\frac{AB(10^{c}-1)+C}{10^{b}(10^{c}-1)}.$ Both the numerator and the denominator are integers, so $n$ is rational.

We can actually test this! Say that we have $n=2.611\overline{34}.$ We have \[A=2,B=611,C=34,b=3,c=2.\] According to our formula, we should have that \[n=\frac{2611(10^2-1)+34}{10^3(10^2-1)}=\frac{258523}{99000}.\] Plugging that into a calculator, we indeed get $2.611343434\ldots,$ so this works!

Finally, we can combine our two facts to say - $\pi$ is irrational, hence the digits at the end of $\pi$ are non-repeating. Victory!

Final thoughts

All of this demonstrates a few things.

  • A question can be really complicated. However, that shouldn’t stop us from splitting it into steps, and we can look at the viable steps in depth. In fact, this is how a lot of math is taught, and for good reason!

  • Having a good understanding of many different kinds of math is really useful. This post combined knowledge from Introduction to Algebra A and B, Introduction to Geometry, Intermediate Counting & Probability and Calculus; I hope it was fun to see all these topics intermingling here.

  • Sometimes simple-looking questions have really difficult answers. In my experience, this is often true in competition math, so be wary of this!

There’s also a couple things I didn’t delve into in the above descriptions for brevity, but which seem good to know, and might answer some instinctive questions about this post.

The first proof isn’t necessarily the best proof

This post discusses Lambert’s proof for why $\pi$ is irrational from 1761. This was the first proof that $\pi$ is irrational! Since then, various mathematicians have come up with proofs which are arguably simpler. Nicolas Bourbaki (of Trench fame) has (or have?) a pretty slick proof which you can read here, though it still involves trigonometry and calculus. I’m not aware of any proofs where either is absent.

Geometric series

A sequence like $\frac{1}{10^c},\frac{1}{10^{2c}},\frac{1}{10^{3c}},\ldots$ is called geometric because the ratio of any two adjacent elements is the same.

There exists a quick formula for finding the sum of any infinite geometric series, which is shown in the Introduction to Algebra textbook. This would allow us to avoid introducing $S$ entirely.

Details on the contrapositive

The precise definition of the contrapositive of the statement “if $A$, then $B$” is “if not $B$, then not $A$”. We can make a truth table like this:

A B if A, then B not A not B if not A, then not B
T T T F F T
T F F F T F
F T T T F T
F F T T T T

We can see now that our statement and its contrapositive are equivalent. This allows us to freely substitute one for the other, which we do in both proofs.

The inspiration for delving into this topic was a short exchange with @tennisbeast14. It quickly blew up in size and became a blog post. Thanks to @tennisbeast14 for the curiosity!

This post is licensed under CC BY-NC-SA 4.0 by the author.