Doodling with π
I was the maths consultant on Google's π-day doodle. Here's what it's all about.

I’ve always loved Google’s Doodles honouring famous scientists or nice pieces of science and maths. I’m also a big fan of Pi Day and I’ve written celebrating the mathematical constant before. So when I was contacted a few weeks ago and asked if I would act as the math(s) consultant for Google on a Doodle they were planning for π Day (3.14 in US date format) it was a no-brainer for me.
The designers of the Doodle told me they wanted to explain Archimedes’ method for approximating pi. Although there were approximations of π before Archimedes (from Babylon and Egypt – both within 1% of the true value) it wasn’t until Archimedes that we had an algorithm for rigorously calculating pi. Around 250 BCE Archimedes used a method known as the method of exhaustion to bound π above and below.
His idea was that he could draw two regular polygons (closed two-dimensional shapes made of straight lines of the same length) – one on the outside (circumscribing) of a circle and one on the inside (inscribing). It would be possible to calculate the perimeters of these polygons. Knowing that the perimeter of the inscribing polygon would be smaller than that of the circle (the circumference), while the circumscribing polygon’s perimeter would be bigger, he would be able to bound the circumference of the circle between two values. Finally, recognising that the circumference of the circle is given by 2πr, where r is the radius, he would be able to bound π between two values. Better still, if the radius, r, were 1 then this would make the calculation even easier.
Archimedes started out using hexagons as the bounding polygons, likely because they could be broken down into equilateral triangles making the calculation of the perimeter easier. But hexagons don’t look very much like circles (see the first still from the Google Doodle below). This initial attempt would have bounded π between 3 and approximately 3.4641. Not very good, given the Egyptians and Babylonians had both done much better centuries earlier.
But Archimedes’ real trick was to develop an algorithm which allowed him to calculate the perimeters of polygons with twice the number of sides from polygons whose perimeters he already knew. So once he had the perimeters of the 6-sided hexagons, he could go on and calculate the perimeters of the 12-sided dodecagons (see figure below).

This is the formula which is displayed on each side of the Google Doodle. an is the perimeter of the circumscribing polygon with n sides and bn that of the inscribing polygon with n sides, so that bn < 2π < an. The first step in Archimedes’ formula is to calculate the perimeter of the circumscribing polygon with 2n sides, a2n, using an and bn, and then to calculate the perimeter of the inscribing polygon with 2n sides, b2n, using a2n and bn.
Once he had the perimeters of the dodecagons he could iterate to find the perimeters of the 24-gons (see below) and thence the 48-gons. Each time his bounds on π improved.
Archimedes only had the power to take the calculations to 96-sided polygons (don’t get me wrong, this is still incredibly impressive). If he could have done the calculations precisely then he would have found bounds for π between 3.1410 and 3.1427. As it was, he made approximations during his calculations in order to express his final answers as fractions. He ended up bounding π between 223/71 and the famous approximation 22/7 (that is, in decimal, 3.1408 < π < 3.1429). This upper bound is accurate to 0.04% and gives rise to Pi Approximation Day 22/7 (the 22nd of July) in the UK date format. It’s worth noting that Pi Approximation Day is actually a slightly more accurate approximation to π than the 3.14 of π Day itself.
Archimedes’ approximation of π was the most accurate known for around 400 years until Ptolemy gave a value of 3.1416. Around 480 AD, Zu Chongzhi bounded π between 3.1415926 and 3.1415927 using Archimedes’ method of bounding a circle by polygons with 12,288 sides. Indeed Archimedes’ method would remain the dominant method for approximating π for centuries after his death until it eventually gave way to infinite series approximations. So associated did the constant become with Archimedes, that π is still occasionally referred to as Archimedes’ constant.
As for me, I had a great time working with the creative team in order to bring Archimedes’ method to life in the 21st century. If you’d like to have a look at the Doodle in action then you can find it here.




The best and one of the easiest approximations of pi that I know is 355/113, which gives 3.141 592 920 35 (the figures are all according to a Texas Instruments 34 calculator), accurate to 6 decimal places, almost 8.5×10⁻⁶% (it's actually 8.4914×10⁻⁶). It's only 267×10⁻⁹ greater than π (or 267 nano units, if you like, rounded to the nearest billionth. The actual figure is 266.764 189 404 97×10⁻⁹). The reason I find this astonishingly accurate approximation so easy to remember is that it's just the inverse of 113355 split into two: (113/355)⁻¹. Or, more simply, divide the last three digits by the first three: 355/113. Of all the approximations I know, it's by far the most accurate (as a percentage it's 25× more accurate, i.e. as in comparing something that's accurate to within 25% to something that's accurate to within 1%. It's accurate to within 0.000 008% where the nearest approximation is only accurate to within 0.000 2%).
Comparing the approximations, I've rounded to 8 significant digits):
22/7 = 3.142 857 1, 99.959 766%, 3 SD;
377/120 = 3.141 666 6, 99.997 644%, 4 SD;
3927/1250 = 3.141 600 0, 99.999 766%, 4 SD;
355/113 = 3.141 592 9, 99.999 992%, 7 SD;
π = 3.141 592 7
An accuracy to within 0.4‰ (100-99.959 766) is already remarkably accurate, 4/10,000, but apart from 22/7, I find the other two approximations much harder to remember.
I'm sure you're well aware of all these approximations, please excuse my labouring the point. As we're discussing pi, are you aware of the Indiana Pi Bill? On January 18, 1897, the state representatives of Indiana voted to declare the value of pi as 3.2. The bill was was written by a physician and (thankfully) amateur mathematician and was actually intended to facilitate a method of squatting the circle. How an amateur mathematician could even contemplate such lunacy 🤪🤯. He must have known that pi was defined as the ratio of a circle's circumference to its diameter? I find it baffling that anyone could entertain the idea that there's any way you can change that constant without changing the properties of either the circle or its diameter. However, it is important to note that this attempt was not successful and the bill did not become law. The bill was introduced in the Indiana General Assembly as bill #246. It is considered one of the most notorious attempts to establish a mathematical truth through legislation. Fortunately for the IGA there happened to be a mathematician, C A Waldo, present as witness who explained their folly to them. Imagine the disastrous consequences if the bill has passed and people had actually used π = 3.2 in their calculations! And why stop at 3.2, why not go the whole hog and declare that π = 3?
One last surprising fact, the pie chart (I know, but I couldn't resist) was invented by Florence Nightingale. She was actually an innovative statistician, particularly when it came to presenting her data. Her innovations, including the pie chart, helped persuade parliament to enact several important bills that greatly reduced fatalities among wounded soldiers. Personally, I think her achievements in the field of statistics are more significant than her compassion and concern for her patients, but something she is far less well known for. She deserves far more credit for her work in that field.