For Pi Day 3/14/16: Triangle to Circles, and Back Again

Around this time last year, we heard a lot about 3/14/15 being a once-in-a-century Pi Day, because the date, including the year, matches the first few digits of pi (3.1415…). But the next digit after 3.1415 in the decimal expansion is 9, giving us 3.14159… So pi is a lot closer to 3.1416 than it is to 3.1415, which is why I want to wish you a Happy once-in-a-century Pi Day today, 3/14/16!

Pi fascinates us because it appears in so many unexpected places. Since pi is ultimately about circles (it’s defined, more or less, as the circumference of a circle of diameter 1), what this really means is that circles appear in many unexpected places. I want to show you one.

You need something with a corner (I used a Rubik’s cube), a cable or string of some kind, and two fixed, firm endpoints (I used the ends of a towel rod). Stretch the cable between the two endpoints across the corner. Now move the corner from one side to the other between the two endpoints, keeping the cable stretched across all three, like this:

Question: what’s the shape that the corner traces out? A triangle, a circle, a parabola, an ellipse, something else?

I told you there was a circle coming, so, yes, it turns out to be a circle. (Well, a semicircle, tracing out 180 degrees, or pi!) I find this a little surprising, because this set-up is quite different from a compass, which is based on spinning a fixed length around a center. Here, the length of cable stretched across the corner extends and then contracts as you move the corner from one side to the other. One good reason to try this out physically is that you can really feel the extension and contraction!

Here is an animation that might start to convince you:

Animated_illustration_of_thales_theorem

The mathematical fact afoot here is Thales’s Theorem, which says that if you put two points on two opposite ends of a circle (so the line between them is a diameter), then the line segments connecting those points with any third point on the circle will meet at a right angle. To give you an idea of why this is true, and play with pi some more, here’s a picture:

2000px-Thales'_Theorem.svg

The idea here is that if O is the center of the circle, then the line segments OA, OB, and OC all have the same length, because they’re all radii of the circle. This makes the two triangles AOB and BOC isosceles: each triangle has two equal sides, hence two equal angles, as illustrated in the picture. With this notation, the sum of the angles of triangle ABC is 2 \alpha + 2 \beta. But we know that the sum of angles of a triangle is 180 degrees (pi again!). Dividing by 2, we find that \alpha + \beta must be 90 degrees, which is Thales’s theorem.

One last thing: this picture also leads to a formula for the area of the right triangle in terms of the length of the hypotenuse. Let d be this length, i.e., the diameter extending from A to C. Look at triangle BOC again. The sum of its angles must also be 180 degrees, and since we know from above that 2 \alpha + 2 \beta = 180, we find that the missing angle, between segments OB and OC, must be 2 \alpha. This means the height of our triangle is \sin (2 \alpha) times the radius of the circle, or \sin (2 \alpha) \cdot d/2. Since the area of a triangle is half the base times the height, we find

{\rm{Area}} = \frac14 \cdot \sin(2 \alpha) \cdot d^2.

This last formula is actually connected in a very interesting way to the Pythagorean theorem. But that’s another blog post.

 

 

Once in a Lifetime: Happy Pi Day!

Today is 3/14/15, which might be an appealing date if you like math and circles, because 3.1415 are the first few digits in the decimal expansion of pi. (Some people celebrate 3/14 as Pi Day every year, and for them, having the year be 2015 is just icing on the cake, or, um, the pie.) While I am not big on numerology, everybody’s talking about pi today, so here are a few choice tastes of it. Toward the end, there will be monkeys.

First off, let’s agree on what pi is. It’s not 3.1415, because that’s not exactly pi, and it’s not 3.1415…, because it’s not so clear what’s supposed to come after that “…” . Also, please don’t say it’s “some important mathematical constant,” because heaven knows there are plenty of those. Pi is the circumference of a circle of diameter 1. Which is both a definition and a math problem: if a circle is a mile across, how far is it around?

Since today is 3/14/15 and we’re talking about pi, you already know that the answer is “about 3.1415 miles.” Let’s try to picture that. Have a look at the diagram below:

pi There’s a circle, a hexagon inside the circle, and a square outside the circle, and they are all the same distance across — a mile, say. Let’s figure out how far each one is around.

  • The square is easy: since it’s a mile across in the center, each side is a mile too, so it’s 4 miles around.
  • The hexagon is a little harder. The dashed lines divide the hexagon up into six equilateral triangles. Each triangle has two inner sides, which are 1/2 mile long each, and an outer side, which must be 1/2 mile long too. The outside of the hexagon is made up of 6 of those outer sides, so it’s 3 miles across.

The circle fits between them, longer around than the hexagon, not as long around as the square. So pi, the distance around the circle, is between 3 and 4. The circle is a lot closer to the hexagon than it is to the square, so pi must be a lot closer to 3 than it is to 4. The picture may not make the number 3.1415 pop into your head, but it certainly makes that number look plausible.

Here’s another picture you might like:

circle_wedges

This one is an illustration of perhaps the most famous fact about pi. The idea is to rearrange the circle into something that looks like a rectangle. (The more wedges you cut the circle into, the more rectangular the rearrangement; you get a true rectangle “in the limit.”) The height of the rectangle is r, the length of the circle. The length of the base is half the circumference of the circle (blue wedges only). We can express the length of the circumference in terms of pi: if a circle that’s a mile across is pi miles around, then our circle here, which is 2r miles across, must be 2πr miles around. So the base of the rectangle is πr miles long. And if you know the base and the height of a rectangle, you can compute the area: πr times r, or πr². Which must be the area of the circle as well.

Oh yeah, I promised you monkeys. A hundred monkeys typing for a hundred years might not produce the works of William Shakespeare, but they can get you a pretty good estimate of pi. Here’s how:

  1. Generate a bunch of pairs (x, y) of random numbers between –1 and 1. If you are doing this by the monkey method, you need to take all the letters your monkeys have typed and figure out some way of turning them into numbers. For example, you can break up their typescript into four-letter segments, read each segment as a 4-digit decimal in base 26, and convert it to base 10. Then add a minus sign in front if the last base 26 digit was odd. These days, using a computer is probably faster, and less smelly.
  2. For each pair, decide if it lies inside the unit circle ( + < 1) or outside. Circle_area_Monte_Carlo_integration.svg
  3. Find the fraction of pairs that landed inside the unit circle (709/900 in the picture above) and multiply it by 4. The idea is that the circle has area pi (r = 1), and the square has area 4 (because each side has length 2), so each pair you generated had a π/4 chance of landing inside the circle. That means that pi should be about 4 times the probability that you actually observed. In the example above, 709/900 × 4 is about 3.151, which is pretty close, although it would mean that you’d have to wait for your pi till tomorrow.

So that’s pi for you, folks. A a smidgen more than 3, a lot less than 4, and monkeys people have been trying to say exactly how much it is for over 2000 years. Happy Pi Day!