Pi-day randomness

One of my twitter friends was complaining about something that’s apparently making the rounds of Facebook for π-day. It annoyed me sufficiently to be worth ranting about a little bit.

Why isn’t π rational if π=circumference/diameter, and both measurements are plainly finite?

There’s a couple of different ways of interpreting this question.

The stupidest way of interpreting it is that the author didn’t have any clue of what an irrational number is. An irrational number is a number which cannot be written as a ratio of two integers. Another way of saying essentially the same thing is that there’s no way to create a finite representation of an irrational number. I’ve seen people get this wrong before, where they confuse not having a finite representation with not being finite.

π doesn’t have a finite representation. But it’s very clearly finite – it’s less that 3 1/4, which is obviously not infinite. Anyone who can look at π, and be confused about whether or not it’s finite is… well… there’s no nice way to say this. If you think that π isn’t finite, you’re an idiot.

The other way of interpreting this statement is less stupid: it’s a question of measurement. If you have a circular object in real life, then you can measure the circumference and the diameter, and do the division on the measurements. The measurements have finite precision. So how can the ratio of two measurements with finite precision be irrational?

The answer is, they can’t. But perfect circles don’t exist in the real world. Many mathematical concepts don’t exist in the real world. In the real world, there’s no such thing as a mathematical point, no such thing as a perfect line, no such thing as perfectly parallel lines.

π isn’t a measured quantity. It’s a theoretical quantity, which can be computed analytically from the theoretical properties derived from the abstract properties of an ideal, perfect circle.

No “circle” in the real world has a perfect ratio of π between its circumference and its diameter. But the theoretical circle does.

The facebook comments on this get much worse than the original question. One in particular really depressed me.

Just because the measurements are finite doesn’t mean they’re rational.
Pi is possibly rational, we just haven’t figured out where it ends.

Gah, no!

We know an awful lot about π. And we know, with absolute, 100% perfect certainty that π never ends.

We can define π precisely as a series, and that series makes it abundantly clear that it never ends.

pi = frac{4}{1} - frac{4}{3} + frac{4}{5} - frac{4}{7} + frac{4}{9} ...

That series goes on forever. π can’t ever end, because that series never ends.

Just for fun, here’s a little snippet of Python code that you can play with. You can see how, up to the limits of your computer’s floating point representation, that a series computation of π keeps on going, changing with each additional iteration.

def pi(numiter):
  val = 3.0
  sign = 1
  for i in range(numiter):
    term = ((i+1)*2) * ((i+1)*2 + 1) * ((i+1) *2 + 2)
    val = val + sign*4.0/term
    sign = sign * -1
  return val

18 thoughts on “Pi-day randomness

  1. Dan Drake

    I’m not sure about “π can’t ever end, because that series never ends.” Consider the number x, defined by 1 + 1/2 + 1/4 + 1/8 +… That series never ends, but x (or, more precisely, the decimal representation thereof) certainly ends!

    Reply
  2. Dan Drake

    I’m not sure about “π can’t ever end, because that series never ends.” Having an infinite series representation surely does not imply that a number has a non-terminating decimal representation: consider x = 1 + 1/2 + 1/4 + 1/8… That series doesn’t end, but the decimal representation of x surely does!

    Reply
  3. Sean

    Nitpick: Just because a number can be represented as an infinite series doesn’t imply that the number never “ends.” Consider 1/2 + 1/4 + 1/8 + 1/16 + ….

    Reply
    1. Sean

      Uh, never mind!

      Weird how this page had no comments when I made mine (which took just a couple of minutes to enter), but as soon as I submitted it, comments made twenty minutes prior appeared. Grrrr.

      Reply
  4. Daniel

    A cute variant of your code using a generator:

    def gen_pi(numiter):
    val = 3.0
    sign = 1
    yield val
    for i in xrange(numiter):
    term = ((i+1)*2) * ((i+1)*2 + 1) * ((i+1)*2 + 2)
    val += sign*4.0/term
    sign = sign * -1
    yield val

    which could be used to print out successive approximations:

    for x in gen_pi(100):
    print x

    Reply
  5. dete

    Ha! You write a whole post about how people being imprecise — that π isn’t infinite, it just has no finite representation — and then you include two representations of π that are finite. (Three if you count the Greek letter itself!)

    Perhaps you should be more precise?

    Reply
  6. Bard Bloom (@BardBloom)

    “That series goes on forever. π can’t ever end, because that series never ends.”

    Just to be pedantic, there are plenty of infinite series which converge to rational numbers, like 1 + 1/2 + 1/4 + 1/8 + …

    Of course you mean that we know, for nontrivial reasons, that the series you have given for π converges to an irrational number.

    Reply
  7. John Fringe

    Now public outcry demands that you write a popular proof about the convergence of pi, to redeem yourself for your vagueness about series’ convergence.

    Or… or… anyone interested could search for one on the internet. Either way works XD

    Reply
  8. ppnl

    In hyperbolic geometry circumference/diameter is not equal to pi and depends on the size of the circle. Can you have a geometry where circumference/diameter is a constant not equal to pi?

    Reply
    1. Jesse Raffield

      A simple way to do so would be to play around with the metric of the space you’re drawing your circle in. For example, ds^2 = dx^2 + dy^2 represents how things are measured in the Euclidean plane. We can tweak this to get the taxicab metric, which is ds = |dx| + |dy|, this geometry represents a space that can only be traversed in zig-zags. A shape of constant radius in this space would look like a square and would have pi = 4.

      Reply
      1. ppnl

        Yes I have heard of the taxicab metric but it seems to stretch the idea of a circle pretty far. The distance between corners seem to spoil the constancy of pi for example.

        Reply
        1. Richard

          “The distance between corners seem to spoil the constancy of pi for example.”

          What do you mean? I’m assuming you’re saying that the distance between two opposite points on the “circle” (square) is no longer constant. But the distance between any two opposite points of the “circle” is going to be precisely 2.

          Reply
          1. ppnl

            Sorry, I was misremembering how it worked. Still, it is a discrete metric that stresses what a circle is.

          2. Jesse Raffield

            The traditional taxicab metric acts on a discrete lattice of squares, but you can generalize it to include real numbers thus making it continuous.

  9. Fernando

    “PI” is a finite representation of PI. I think it would be a little bit more exact to say that given a finite set of symbols used to represent numbers, any irrational number would be an infinite string of permutations of the symbols on that set.

    The Nitpicker

    Reply

Leave a Reply to Jesse Raffield Cancel reply