I was a good math student in junior high, and I’m sure I did well on all my pi-related homework and test questions. I understood that pi was an irrational number, and knew, theoretically, that it had an endless number of non-repeating decimals. However, I had no real grasp of why it’s irrational. It was just another abstract, memorized math fact. But a few years back a realization came to me. So, in belated celebration of Pi Day on March 14, I offer my pictorial explanation of why pi is irrational.
The realization came when thinking about the formula for an area of a circle, Π r2 (pi * r2) where r is the circle’s radius. It dawned on me that the r2 referred to a real geometric square with sides and corners and all, not just a letter with a number above it, and that:
Pi represents the number of squares with a side of length r that would fill a circle with a radius of length r.
Therefore, my explanation of why pi’s digits are infinite is that no matter how many squares you put inside a circle, there will always be a smaller “corner” into which you can cram a smaller square. This leaves an even smaller corner for an even smaller square, and on and on without end.
I don’t know whether this is a mathematically valid explanation. But transforming this abstract concept into something I could draw with a pencil pleased me no end.
Pi and VBA
A pencil is one thing, but on Pi Day I decided to illustrate my explanation with Excel and VBA. It took me a really long time! First I tried using shapes, a reasonable, but really bad, idea. I ended up using just one shape, a circle, and a bunch of tiny cells, which are, after all, squares:
The circle above has a radius of 50. When all the squares that fit are filled in, their total area is about 3.08 times that of a square with a radius of 50. In other words, it’s fairly close to pi. If I change the settings to a radius of 100, the number climbs above 3.1, but still short of pi.
Programming this was challenging and fun. Because of the nature of the project I coded some things more loosely than normal. There’s a bunch of global variables, and even a “Select Case True” statement.
I did a lot of Unioning and Intersecting in the code. One thing I rediscovered is a major glitch with the Union statement, which gives you an incorrect cell count for the Union of two overlapping ranges:
Two Miscellaneous Things
My search for a screen-capture-to-animated-GIF program continues. I had been using Cropper, but it was unable to keep up with the circle’s “exit stage left” in the animation above. As you can see, I’m now trying ScreenCast-o-Matic, which has a nice interface, and both desktop and web versions. For $15 I can upgrade and remove their logo from the video, but when I tried this morning their website refused to take my money.
Finally, on Pi Day’s website it claims to be celebrated all around the world. It must be a fairly abstract reference in countries that use the, more logical, DMY date system, e.g., 14/3/2013.
Download!
Here’s a workbook with the code.




Firstly, I think you need to clarify your assumption about r being a rational number. Only then are you guaranteed that the area of a circle with radius = r will be irrational. If r = 1/SQRT(pi) then the area of the circle will equal 1 (which is rational), despite the fact that you could pack an infinite number of small squares into it.
Secondly, I think your argument about always being able to cram in more small squares would hold true for a basic right triangle as well, yet clearly the area of a triangle (with rational base & height) would not be irrational.
But the pictures were pretty, and I’m sure it served as a good VBA exercise.
Dang! I mean… thanks.
Regarding your first point, I didn’t say the circle’s area would be irrational, just that the number of squares with a side of r (pi) would be.
Regarding your second point, dang! You’re right. I could try to save myself by expanding it from squares to polygons, maybe, but a) it’s probably wrong and b) it would be really hard to code.
They are pretty, aren’t they?
To heck with accuracy. I like the squares analogy.
Re: http://www.aitnaru.org/images/Pi_Corral.pdf (Pop Quiz #2)
As for high school math, I passed (what happened in high school, stayed in high school). But to pass the tests, I memorized that “Pi is irrational” (good enough comprehension for true/false questions).
Now, 50 years later … and when memory issues arise … it’s time for a change in perspective: “Pi are both Square and Rational”.
Thanks. If you can grasp all that you’ve come a long way since high school!