# How do we know pi is non-repeating?

**URL:** <https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977>\
**Category:** Factual Questions\
**Created:** [March 4, 2003, 10:57am UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977 "2003-03-04T10:57:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Second](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Second](https://boards.straightdope.com/u/Second)\
**Post date:** [March 4, 2003, 10:57am UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/1 "2003-03-04T10:57:42Z")

</div>

If [symbol]p[/symbol] is indeed infinite and non-repeating (which from what I remember in school, it is), how can this be proven? How can you know it never repeats if it is infinite?

---

<div class="post-metadata">

**Author:** ![Jabba](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@Jabba](https://boards.straightdope.com/u/Jabba)\
**Post date:** [March 4, 2003, 11:13am UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/2 "2003-03-04T11:13:58Z")

</div>

It can be shown that a decimal terminates or is recurring if and only if the number it represents is rational ( this is actually quite easy).  
It can also be shown that [symbol]p[/symbol] is irrational. This is somewhat more difficult and was proved by Lambert in 1760.

---

<div class="post-metadata">

**Author:** ![Orbifold](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Orbifold](https://boards.straightdope.com/u/Orbifold)\
**Post date:** [March 4, 2003, 3:45pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/3 "2003-03-04T15:45:59Z")

</div>

There are a couple of web pages giving proofs that pi is irrational; most of them are copies of a proof by Ivan Niven published in 1947. Feed “pi is irrational” into Google and you’ll get a number of them. Niven’s proof isn’t exactly straightforward, but it doesn’t require any knowledge besides some integral calculus. It boils down to: if pi is rational then we can construct an integral whose value is at the same time both an integer and strictly between 0 and 1, which is obviously a contradiction.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [March 4, 2003, 4:48pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/4 "2003-03-04T16:48:49Z")

</div>

Interestingly, the simplest proof I know that e is irrational uses the same contradiction (i.e., you assume that e is rational and find an integer between 0 and 1).

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [March 4, 2003, 5:03pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/5 "2003-03-04T17:03:10Z")

</div>

Interestingly, the simplest proof I know that e is irrational uses the same contradiction (i.e., you assume that e is rational and find an integer between 0 and 1).

---

<div class="post-metadata">

**Author:** ![Neurotik](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@Neurotik](https://boards.straightdope.com/u/Neurotik)\
**Post date:** [March 4, 2003, 5:42pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/6 "2003-03-04T17:42:49Z")

</div>

> [@](#):
>
> \*Originally posted by Orbifold \*  
> \*\*There are a couple of web pages giving proofs that pi is irrational; most of them are copies of a proof by Ivan Niven published in 1947. Feed “pi is irrational” into Google and you’ll get a number of them. Niven’s proof isn’t exactly straightforward, but it doesn’t require any knowledge besides some integral calculus. It boils down to: if pi is rational then we can construct an integral whose value is at the same time both an integer and strictly between 0 and 1, which is obviously a contradiction. \*\*

Any chance at all you can dumb down the explanation a bit more for me?

---

<div class="post-metadata">

**Author:** ![Orbifold](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Orbifold](https://boards.straightdope.com/u/Orbifold)\
**Post date:** [March 4, 2003, 5:58pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/7 "2003-03-04T17:58:49Z")

</div>

I can try, I suppose. So, suppose pi=a/b for some integers a and b. Let f(x)=sin(x)x[sup]n/sup[sup]n[/sup]/n!, where n is “sufficiently large”. Then it’s possible to show, by some fancy algebra, that the integral of f(x) as x varies from 0 to pi has to be an integer. But when n is really big, f(x) is positive and strictly less than 1 for all x between 0 and pi, so the integral of f(x) from 0 to pi has to be strictly between 0 and 1. It’s impossible for the integral to satisfy both conditions at the same time; hence the supposition was false and pi is not equal to a/b for any integers a and b.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [March 4, 2003, 6:26pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/8 "2003-03-04T18:26:15Z")

</div>

> [@](#):
>
> \*Originally posted by Orbifold \*  
> \*\*I can try, I suppose. So, suppose pi=a/b for some integers a and b. Let f(x)=sin(x)x[sup]n/sup[sup]n[/sup]/n!, where n is “sufficiently large”. Then it’s possible to show, by some fancy algebra, that the integral of f(x) as x varies from 0 to pi has to be an integer. But when n is really big, f(x) is positive and strictly less than 1 for all x between 0 and pi, so the integral of f(x) from 0 to pi has to be strictly between 0 and 1. It’s impossible for the integral to satisfy both conditions at the same time; hence the supposition was false and pi is not equal to a/b for any integers a and b. \*\*

“It’s all so simple now Jim! A child could do it!”

---

<div class="post-metadata">

**Author:** ![Orbifold](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Orbifold](https://boards.straightdope.com/u/Orbifold)\
**Post date:** [March 4, 2003, 8:24pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/9 "2003-03-04T20:24:23Z")

</div>

Well, what do you guys want? 😃 Shall I do the fancy algebra, point you to a website that does it, or what? Posting half a page of equations didn’t strike me as “dumbing down” the explanation, but I can go there if you want me to.

---

<div class="post-metadata">

**Author:** ![Shade](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Shade](https://boards.straightdope.com/u/Shade)\
**Post date:** [March 4, 2003, 9:18pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/10 "2003-03-04T21:18:42Z")

</div>

I had one guy say ‘pi is irrational? But isn’t 22/7, well, a fraction?’:smack:

In answer to your question; not really. Orbifold’s (cool nicname) explaining it as well as I can imagine it being explained.

---

<div class="post-metadata">

**Author:** ![Shade](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Shade](https://boards.straightdope.com/u/Shade)\
**Post date:** [March 4, 2003, 9:21pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/11 "2003-03-04T21:21:04Z")

</div>

The other answer is ‘why would it be rational’? It’s a wag, but if you find a number that isn’t a fraction of small integers, it’s probably irrational. How’s that for dumb 😃

---

<div class="post-metadata">

**Author:** ![Don\_Roberto](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@Don\_Roberto](https://boards.straightdope.com/u/Don_Roberto)\
**Post date:** [March 4, 2003, 9:21pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/12 "2003-03-04T21:21:09Z")

</div>

So here’s a slight dumbing down (hopefully not too much):

A standard technique in math is “proof by contradiction”. It works like this:

Say you have something to prove (like a = b).

Start the proof by assuming the opposite of what you want to prove (so you would assume that a does not equal b).

Do some fancy math, that **you know to be correct**. That means you only do things that are “legal” in math. If you are clever enough, you will eventually reach a contradiction (such as  
a = 3 **and** a = 4 – these cannot both be true simultaneously, so we have a contradiction.)

Now look back over your proof: you assumed something, then did a whole bunch of stuff that was right, and ended up with non-sense. The only way this can happen is if the original assumption was wrong. Since the original assumption was the opposite of what you wanted to prove, you have completed in the proof.

So for the pi case. We want to prove that pi is irrational (which we know means, from another proof, that it never repeats). Thus, we:

1. Assume pi is rational.
2. Do fancy math, all of which we know is valid.
3. Find that some quantity we used, a, is an integer (a whole number) and is simulaneously less than one and greater than zero. These conditions cannot hold simultaneously, so something must have been wrong.
4. Conclude that the initial assumption was wrong.

If pi is not rational, then it must be irrational. Thus, it never repeats. Voila!

---

<div class="post-metadata">

**Author:** ![CC](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@CC](https://boards.straightdope.com/u/CC)\
**Post date:** [March 4, 2003, 9:55pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/13 "2003-03-04T21:55:31Z")

</div>

I’m just sayin’ that if math class made that kind of sense, then a whole lot more of us would have hung in there and got ourselves an edumacation. In my limited experience INSIDE math classes, and my great experience outside of them, I have seen only one guy who could make it all interesting, AND understandable. Now, I’m up to two. Gracias, Don.

---

<div class="post-metadata">

**Author:** ![Homer](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@Homer](https://boards.straightdope.com/u/Homer)\
**Post date:** [March 4, 2003, 10:09pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/14 "2003-03-04T22:09:19Z")

</div>

But if pi is infinitely long, wouldn’t it contain all possible strings? And if it contains all possible strings, won’t it at some point contain a string that is a duplicate of itself? Or if it contains all possible strings, wouldn’t it then at some point contain a total inversion of it’s string up to the point of inversion?

Infinity makes all sorts of odd things possible. I don’t think mathematics worked out the “true” definitions of infinity (or zero) yet.

Tim

---

<div class="post-metadata">

**Author:** ![Homer](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@Homer](https://boards.straightdope.com/u/Homer)\
**Post date:** [March 4, 2003, 10:15pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/15 "2003-03-04T22:15:20Z")

</div>

Except I just realized that, in containing all possible strings, containing a string that is a duplicate of itself would be achieved simply by existing, so at least that problem is solved.

Tim

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [March 4, 2003, 10:36pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/16 "2003-03-04T22:36:44Z")

</div>

> [@](#):
>
> \*Originally posted by Homer \*  
> **But if pi is infinitely long, wouldn’t it contain all possible strings? And if it contains all possible strings, won’t it at some point contain a string that is a duplicate of itself? Or if it contains all possible strings, wouldn’t it then at some point contain a total inversion of it’s string up to the point of inversion?**

Consider 1.01001000100001… It’s infinitely long, but there are very many strings (like any that involve the digits 2-9) that do not occur.

If [symbol]p[/symbol] does contain all possible strings, there will be a repeat (because 123 and 1234 must both be present). But that doesn’t guarantee that any finite prefix is a palindrome. There was a thread a few months ago where we showed that writing the natural numbers in base 10 as a single string will never result in a palindrome. So there’s an infinite string with all possible finite length string with no palindromic finite prefix.

Does that mean it has no palindromes anywhere? Of course not; it contains all strings, even the palindromes.

\*\*

> [@](#):
>
> Infinity makes all sorts of odd things possible. I don’t think mathematics worked out the “true” definitions of infinity (or zero) yet.\*\*

If you don’t think we have any definition for zero, you don’t know what you’re talking about. But perhaps you’d care to elaborate.

There is no definition for “infinity”, nor is it likely that there ever will be. It can’t specify anything uniquely and even resemble what laypersons understand by the term.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [March 4, 2003, 10:37pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/17 "2003-03-04T22:37:47Z")

</div>

> [@](#):
>
> \*Originally posted by Homer \*  
> **Except I just realized that, in containing all possible strings, containing a string that is a duplicate of itself would be achieved simply by existing, so at least that problem is solved.**

In my understanding, every string is a duplicate of itself. But that doesn’t prove that it contains the same string twice. What did you mean here?

---

<div class="post-metadata">

**Author:** ![Cabbage](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@Cabbage](https://boards.straightdope.com/u/Cabbage)\
**Post date:** [March 4, 2003, 10:43pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/18 "2003-03-04T22:43:35Z")

</div>

**Homer** , it’s been conjectured that the decimal expansion of pi contains all possible _finite length_ strings of digits, but that hasn’t been proved (such a number is called _normal in base ten_. “Almost all” of the real numbers are normal in _any_ base; pi is believed to be one of these, but this property has never been proved of _any_ number, to my knowledge).

It’s certainly not the case that if a number is “infinitely long” that it must contain all possible strings. For example,

.010010001000010000010000001…

is infinitely long, but it’s missing _lots_ of possible strings-- it doesn’t include “11”, for example, nor does it include _any_ string involving 2,3,4,5,6,7,8, or 9. Similarly, while pi is infinitely long, there’s no guarantee that there will be a string of, say, a trillion digits consisting of only 0’s and 1’s.

As for the decimal expansion of a number containing all possible _infinitely_ long strings of digits, this is simply impossibe. A real number can contain only one _infinitely_ long string of digits–namely, that string of digits which represents that particular number, and no other.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [March 5, 2003, 7:18pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/19 "2003-03-05T19:18:23Z")

</div>

> [@](#):
>
> As for the decimal expansion of a number containing all possible infinitely long strings of digits, this is simply impossibe. A real number can contain only one infinitely long string of digits–namely, that string of digits which represents that particular number, and no other.

This doesn’t seem to be quite correct (or at least, it’s not obvious to me). Pi seems to contain lots of infinite strings:  
314159265…  
141592653…  
415926535…  
…

How about this: There are at most a countably infinite number of infinitely long strings in a decimal expansion of a number, but there are an uncountably infinite number of infinitely long strings of digits.

---

<div class="post-metadata">

**Author:** ![Cabbage](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@Cabbage](https://boards.straightdope.com/u/Cabbage)\
**Post date:** [March 5, 2003, 9:38pm UTC](https://boards.straightdope.com/t/how-do-we-know-pi-is-non-repeating/158977/20 "2003-03-05T21:38:47Z")

</div>

**ZenBeam** , yeah, that’s a good catch, thanks. I should have said that it has countably many infinite strings–the string of the number itself, and all of the different “tails” of that string (where you discard finitely many from the beginning of the string).
