Pythagorean Theorem As Sweeping Area

The Pythagorean Theorem is often taken as a fact about right triangles.

Let's try a broader interpretation: The Pythagorean Theorem explains how 2D area can be combined.

Here's what I mean. Suppose we have two lines lying around (the creatively named Line A and Line B). We can spin them to create area:

sweep-line

Ok, fun enough. Where's the mystery?

Well, what happens if we combine the line segments before spinning them?

sweep-combined-line

Whoa. The area swept out seems to change. Should simply moving the lines, not lengthening them, change the area?

Running The Numbers

Eyeballing the diagram above, it sure seems like the area grew. Let's work out the specifics.

As an example, suppose $a = 6$ and $b = 8$. When they're swept into circles ($\text{area} = \pi r^2$) we get:

\displaystyle{\text{Circle A} = \pi a^2 = \pi (6^2) = 36 \pi}

\displaystyle{\text{Circle B} = \pi b^2 = \pi (8^2) = 64 \pi  }

For a total of $36\pi + 64\pi = 100\pi$.

The combined segment has length $c = a + b = 14$, and when we spin it we get:

\displaystyle{\text{Circle C} = \pi c^2 = \pi (14^2) = 196 \pi }

Uh oh. That's way more area than before.

The Problem

What happened? Well, Circle A didn't change. But Circle B is much less than Ring B (just look at it!).

The issue: When Line B spins on its own, it can only reach 8 units out as it sweeps. When we attach Line B to Line A, it reaches out 6 + 8 = 14 units. Now the circular sweep covers more area, meaning Circle B is smaller than Ring B.

sweep-when-parallel

Mathematically, here's what happened.

\displaystyle{\underbrace{[a + b]^2}_{\text{Circle C}} = \underbrace{a^2}_{\text{Circle A}} + \underbrace{2ab + b^2}_{\text{Ring B}} > \underbrace{a^2}_{\text{Circle A}} + \underbrace{b^2}_{\text{Circle B}}}

Ignore $\pi$ for a moment since it's a common term. When expanding $c^2 = (a + b)^2 = a^2 + 2ab + b^2$, there's a new $2ab$ term that has to go somewhere. Because Circle A doesn't change, this extra area must appear in Ring B.

Making Things Line Up

It... sort of makes sense that the area changes, but I don't like it. Just moving things around shouldn't have this effect! Can the area ever be the same?

Sure, if we remove the $2ab$ term. The easy fix is to set $a=0$, but that's cheating and you know it.

Let's find a clever solution. Intuitively, the question is: How can Line A's length not help Line B as it spins?

Tilt it! As we rotate Line B, there's less benefit from Line A's length. Ladders are useless when lying on the floor, right?

sweep-when-parallel

When we go Full Perpendicular™, the $2ab$ term disappears and Circle B = Ring B. (In vector terms, the dot product is zero: $a \cdot b = 0$).

Ah -- that's the meaning of the Pythagorean Theorem. When line segments are perpendicular, the same area is swept whether the lines are combined or separated.

Checking The Math

It's not a bad idea to make sure the numbers line up.

Since the segments are now perpendicular, we know $c^2 = a^2 + b^2$, so:

\displaystyle{\text{Full distance} = c = \sqrt{a^2 + b^2}}

\displaystyle{\text{Width of ring} = \text{c - a} = \sqrt{a^2 + b^2} - a}

Now we can calculate:

\displaystyle{\text{Ring B} = \text{Circle C} - \text{Circle A} = \pi c^2 - \pi a^2 = \pi (a^2 + b^2) - \pi a^2 = \pi b^2 = \text{Circle B}}

Tada! The Ring and Circle sweep the same area.

In our example, we have Circle A = $36\pi$, Circle B = $64 \pi$, $c = \sqrt{36 + 64} = 10$. The ring width is $10 - 6 = 4$.

Summary

The Pythagorean Theorem is about more than triangles. When components are perpendicular, the area they make is independent of how they are arranged.

Appendix: Assorted Thoughts

  • The Law of Cosines explicitly shows the $2ab$ term which assumed to be zero in the Pythagorean Theorem. The area of Ring B can even be "negative" if we tilt Line B to point inside.
  • We can combine area from multiple dimensions ($x^2 + y^2 + z^2 + ...$). As long as they are mutually perpendicular, the area swept by each dimension is the area swept by the total.
  • The Pythagorean Theorem is a relationship in the 2D area domain ($c^2 = a^2 + b^2$). We start here and convert this to a relationship in the 1D domain ($c = \sqrt{a^2 + b^2}$). The conversion happens so often we forget where it began.
  • More on sweeping area: https://www.cut-the-knot.org/Curriculum/Geometry/PythFromRing.shtml

Happy math.

Topic Reference

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

Understanding Why Similarity Works

Similarity has bothered me for a long time. Why do all circles have the same formula for area — how do we know nothing sneaky happens when we make them larger? In physics, don’t weird things happen when you scale things (particles, insects, small children) to gargantuan sizes? You’re saying that every circle has the same formula, yet a 300-foot honeybee cannot fly?

Here’s the deal:

  • Similar shapes are zoomed versions of each other. Because we can’t tell them apart (read on for why), they must have the same internal formulas for area, perimeter, and so on.

  • However, items with the same formula aren’t exchangeable! Sure, all humans (from children to NBA players) have the “formula” that armspan = height. Fine — does that mean a 7 foot Sasquatch and my 18-inch nephew are equally good basketball players?

My “aha!” moment was separating the common formula (armspan = height) from the applicability of individual instances (infant vs. Sasquatch).

Why Scaled Objects Have The Same Formula

Thought experiments helped me realize that absolute size doesn’t matter when figuring out whether a formula can hold for all instances of a shape. An insight is that perceptions of “size” are often determined by us, the observer, and not the shape itself.

Field of Vision

Imagine a triangle on a piece of paper. It takes up some amount of room in your field of vision — say, 30%.

Now, move closer to the paper, so the triangle takes up most of your view — say, 90%. What changed? The triangle is the same, but the sides appear much bigger. Yet we know that the core properties (area, perimeter, etc.) haven’t changed — otherwise, we’d need to know someone’s distance from a triangle when calculating area!

scaled objects field of view

Create a Tube

This time, imagine a paper circle. Now, thicken the paper until you make a cylinder (of equal diameter) extending into the distant horizon. The part of the cylinder a few feet off “looks” to be 1/2 the size of the disc before you, yet you know they are the same size. The ratios inside (circumference to diameter, area to radius, etc.) must be the same also.

scaled objects tube

Photoshop Zoom

Imagine a triangle on a computer screen. Make all sorts of formulas for area, perimeter, and so on. Now, zoom the triangle by 300% and measure again. What changed? Sure, everything was bigger on the second measurement, but does the triangle “know” it’s being zoomed and change itself to make the formulas different?

Measurement Unit

Suppose you’re measuring ratios on a shape with your trusty ruler. You have your table full of figures: area to perimeter, diagonal to side, and so on. But whoops! It looks like you had written “cm” when you were actually measuring the sides in inches.

Do you need to redo your table because you were using the wrong unit? Does the shape know what units you’ve been using?

Enter Physics

My conundrum started when remembering a factoid from biology class: Godzilla couldn’t exist because he would overheat. Big lizards can’t do the same things little lizards can.

Why?

For simplicity, let’s assume Godzilla is a lizard cube. For any cube of side “s”, the volume is s3, and the surface area is 6 * s2.

Now, let’s assume that heat generated is proportional to volume (essentially your mass), and cooling is proportional to surface area (amount of skin you have exposed to that cool, breezy air). How much cooling do you have for each unit of girth mass?

\displaystyle{\frac{6 \cdot s^2}{s^3} = \frac{6}{s}}

For every unit of volume, we have 6 / s “surface area units” available to cool it. If s = 1cm (for example), then we have 6 / 1 = 6 square centimeters to cool ourselves for each cm3 of volume. Great.

But what if s = 10cm? Uh oh. Now we have 6 / 10 = .6 square centimeters of cooling. And if s = 100cm we only have .06 sq cm of cooling. At some point, our cooling cannot balance our heat requirements and Godzilla falls over. (Suppose he needs at least .1 square cm of cooling for each cubic cm to stay alive).

Remember our insight:

  • s3, 6 * s2, and 6 / s are common patterns in all cubes, no matter the size
  • 6 / 1 = 6, 6 / 10 = .6, 6 / 100 = .06 are particular instances of the “surface area to volume” formula. Some meet our heat requirements, others don’t.

If you’re interested, there are other structural problems with a lizard of that magnitude.

Examples Abound

The idea of finding patterns in similar shapes (and separating them from specific examples) is ubiquitous in math and the sciences. Here’s a few examples of “similarity” which often aren’t labeled as such.

Discovering Pi

Pi is the most famous example of similarity — all circles share the same ratio (circumference / diameter = pi). Again, no matter how much we zoom to make one circle appear like another, every circle has this fundamental trait.

The Physics of Spheres

A sphere is the most space-efficient shape — it gives the most volume for the least surface area. No matter if you’re an elephant or mouse, you’ll conserve the most heat by curling into a ball.

Planets and raindrops are spherical because of these unique properties — even though the scale difference for each example is enormous.

Trigonometry

Sine, cosine, and the rest of the trig family work off angles. And angles are perfect for similarity since size doesn’t matter (how long do the sides of a 45 degree angle need to be? It doesn’t matter!).

Because triangles with the same angles are similar, we can use the ratios inside one (i.e, triangles that fit inside the unit circle) and scale up the result for any example we need.

Algorithm Running Time

The running time of algorithms [O(n), O(n*log(n)), O(n2), etc.] are based on finding a “similarity class” describing the runtime. An algorithm with O(n2) should run 4x as slowly when the number of inputs are doubled.

However, for specific instances, the desired algorithm may be different: running 10 inputs with a O(n3) algorithm can be faster than running 10 million inputs with an O(n).

Object Oriented Programming

In programming, members of the same class (“similarity” class!) may share formulas like $Area = \pi r^2$. However, each instance of that class may have a different value of “r”. The class provides the general patterns while the instances provide the details.

Closing Thoughts

A few observations:

  • Separate the common formula from particular instances of a shape. All circles are similar, but a bigger pizza is better than small one, right?
  • Analogies help us remember. I have silly reminders about infant NBA players and “Godzilla cubes” that makes the “pattern vs example” concept more clear.
  • The idea of similarity is broader than just geometry — it’s about identifying classes of items that share the same internal properties.

The actual definition of similarity is more nuanced; you can reverse it and say shapes are similar if formulas based on their distance are always the same (they are uniformly scaled or dilated). But, those are fun diversions for another day — happy math!

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

Rescaling the Pythagorean Theorem

The Pythagorean theorem can apply to any shape, not just triangles. It can measure nearly any type of distance. And yet this 2000-year-old formula is still showing us new tricks.

Re-arranging the formula from this:

\displaystyle{c = \sqrt{a^2 + b^2}}

to this:

\displaystyle{c= a \cdot \sqrt{1 + (b/a)^2}}

helps us understand the relationship between slope (steepness) and distance. Let’s take a look.

Rescale Your Triangle

Scaling leads to new insights. Yes, \$500k/year is a lot; but it really comes alive when you imagine things costing 10x less (A new laptop? \$150. A new porsche? \$6000).

Rescaling formulas can be eye-opening as well. Let’s start with our favorite 3-4-5 triangle and divide every side by 3:

Triangle rescale

What happened?

Well, we have a smaller red triangle with sides 3/3 (aka 1), 4/3 and 5/3. We’ve got a mini version of the large triangle, and the Pythagorean Theorem still holds:

\displaystyle{1^2 + (4/3)^2 = (5/3)^2}

So Why’s This Special?

It doesn’t seem like much, but there’s some surprising insights:

General Triangle Rescaled

First, we can rescale any triangle to have 1 as the smallest side (divide by “a”). All similar triangles (i.e. those with the same ratios, like 3-4-5 and 6-8-10) will shrink into the same mini triangle.

This mini triangle has an interesting property: it only cares about the ratio b/a. The only “meaningful” numbers are 1 and (b/a), giving:

\displaystyle{\text{mini hypotenuse} = \sqrt{1 + (b/a)^2}}

And what’s special about b/a? It’s the slope of the hypotenuse line! It’s called the slope, the gradient, the derivative, rise over run — whatever the label, b/a is the rate at which the hypotenuse changes!

This makes sense. For every unit traveled along the short leg, we gain “slope units (b/a)” on the other leg. In a 3-4-5 triangle, we go 4/3 units “North” for every 1 unit “East”. And the length of our hypotenuse increases 5/3 (1.66) for every 1 unit East.

The result is pretty cool: we used the steepness of the hypotenuse (b/a) to find the distance traveled per unit East, $\sqrt{1 + (b/a)^2}$.

An Example, Please

This is a bit weird, so let’s do an example. Suppose we’ve gone 5 units East and 12 units North. What’s our distance from the starting point?

The traditional approach plugs in the Pythagorean Theorem to get $c = \sqrt{5^2 + 12^2} = 13$. It works, but let’s try our mini-triangle method:

5 12 Triangle Rescaled

Instead of a large triangle with sides 5 and 12, scale down by 5: we get a mini triangle with sides 5/5 (or 1) and 12/5. The “mini hypotenuse” is then $\sqrt{1 + (12/5)^2} = 2.6$. This means we travel 2.6 units along the hypotenuse for every 1 unit East. Going the full 5 units East (our original triangle) is 5 * 2.6 = 13 units. Neato — we got the same answer both ways.

But silly me, I made a mistake. Instead of 5 units on that trajectory, I meant 6. No 7. No wait, 8. 9, for sure.

Normally, we’d be furiously hammering that square root button to find the new distance. Maybe even using trigonometry to “make it easier”. But not today — since we’re on the same trajectory, we can re-use our scaling constant of 2.6:

We can find the new distance traveled with regular multiplication, with nary a square root in sight. Cool! This approach is faster for humans and computers alike — you wouldn’t believe the crazy approaches programmers take to avoid a square root.

Static and Dynamic Formulas

I’ve realized that our venerable Pythagorean Theorem focuses on a and b separately:

\displaystyle{c = \sqrt{a^2 + b^2}}

We consider a and b as separate elements, to be squared and summed. This approach is straightforward, and helps when designing bridges or making pictures of triangles. The traditional formula focuses on final values.

But the rescaled version has a new twist:

\displaystyle{c = a \cdot \sqrt{ \left(1 + (b/a)^2 \right)} }

We’re not that interested in the separate quantities — we want the ratio b/a, or the slope of the hypotenuse. This slope creates a scaling constant, $\sqrt{1 + (b/a)^2}$, that tells us how our “Eastward” motion translates to distance along our path. The dynamic formula focuses on rates of change.

If we have a hypothetical function f(x), we might write the dynamic Pythagorean Theorem this way:

\displaystyle{\text{distance along path} = x \cdot \sqrt{1 + (slope)^2}}

This concept is used in calculus to find the length of any line or curve — but we’ll save that for another day.

The key is to realize a single formula can be re-arranged and lead to new insights. Stay curious — we stop learning when we think we’ve “got it all figured out”.

Appendix 1: Slope vs. Distance

One point that confused me was separating the idea of slope (b/a) from distance traveled (the hypotenuse, c).

Slope is b/a, rise over run — how much height you get when you increase width. How “steep” the hill is, so to speak. Unfortunately, the word “slope” makes us think of the side of the hill — but slope is really about height.

Distance (the hypotenuse) is about the side of the hill — how far you’ve walked. The “steepness” isn’t that important — you’re laying a measuring tape on the ground, which could be flat, vertical or upside-down. Does the length of a board depend on how you hold it?

But, in our man-made world, slope and distance are related because we often express locations in terms of “units East (x coordinate)” and not “units along a path”. So when a map says “go 1 mile due East” and you’re in front a mountain (large slope), you end up traveling a large distance (more than 1 mile). When on a flat road (zero slope), 1 mile East is simply 1 mile East. The bigger the slope, the more distance you must travel to “go 1 mile East”.

Again, we see that the Pythagorean Theorem is not just about triangles — it can convert slope (steepness) into distance traveled. Happy math.

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

How To Measure Any Distance With The Pythagorean Theorem

We’ve underestimated the Pythagorean theorem all along. It’s not about triangles; it can apply to any shape. It’s not about a, b and c; it applies to any formula with a squared term.

It’s not about distance in the sense of walking diagonally across a room. It’s about any distance, like the “distance” between our movie preferences or colors.

If it can be measured, it can be compared with the Pythagorean Theorem. Let’s see why.

Understanding The Theorem

We agree the theorem works. In any right triangle:

pythagorean theorem

If a=3 and b=4, then c=5. Easy, right?

Well, a key observation is that a and b are at right angles (notice the little red box). Movement in one direction has no impact on the other.

It’s a bit like North/South vs. East/West. Moving North does not change your East/West direction, and vice-versa — the directions are independent (the geek term is orthogonal).

The Pythagorean Theorem lets you use find the shortest path distance between orthogonal directions. So it’s not really about right triangles — it’s about comparing “things” moving at right angles.

You: If I walk 3 blocks East and 4 blocks North, how far am I from my starting point?

Me: 5 blocks, as the crow flies. Be sure to bring adequate provisions for your journey.

You: Uh, ok.

So what is “c”?

Well, we could think of c as just a number, but that keeps us in boring triangle-land. I like to think of c as a combination of a and b.

But it’s not a simple combination like addition — after all, c doesn’t equal a + b. It’s more a combination of components — the Pythagorean theorem lets us combine orthogonal components in a manner similar to addition. And there’s the magic.

In our example, C is 5 blocks of “distance”. But it’s more than that: it contains a combination of 3 blocks East and 4 blocks North. Moving along C means you go East and North at the same time. Neat way to think about it, eh?

Chaining the Theorem

Let’s get crazy and chain the theorem together. Take a look at this:

chained pythagorean theorem

Cool, eh? We draw another triangle in red, using c as one of the sides. Since c and d are at right angles (orthogonal!), we get the Pythagorean relation: c2 + d2 = e2.

And when we replace c2 with a2 + b2 we get:

\displaystyle{a^2 + b^2 + d^2 = e^2}

And that’s something: We’ve written e in terms of 3 orthogonal components (a, b and d). Starting to see a pattern?

Put on your 3D Goggles

Think two triangles are strange? Try pulling one out of the paper. Instead of lining the triangles flat, tilt the red one up:

3d pythagorean theorem

It’s the same triangle, just facing a different way. But now we’re in 3d! If we call the sides x, y and z instead of a, b and d we get:

\displaystyle{x^2 + y^2 + z^2 = \text{distance}^2}

Very nice. In math we typically measure the x-coordinate [left/right distance], the y-coordinate [front-back distance], and the z-coordinate [up/down distance]. And now we can find the 3-d distance to a point given its coordinates!

Use Any Number of Dimensions

As you can guess, the Pythagorean Theorem generalizes to any number of dimensions. That is, you can chain a bunch of triangles together and tally up the “outside” sections:

pythagorean theorem multiple dimensions

You can imagine that each triangle is in its own dimension. If segments are at right angles, the theorem holds and the math works out.

How Distance Is Computed

The Pythagorean Theorem is the basis for computing distance between two points. Consider two triangles:

  • Triangle with sides (4,3) [blue]
  • Triangle with sides (8,5) [pink]

distance example

What’s the distance from the tip of the blue triangle [at coordinates (4,3)] to the tip of the red triangle [at coordinates (8,5)]? Well, we can create a virtual triangle between the endpoints by subtracting corresponding sides. The hypotenuse of the virtual triangle is the distance between points:

  • Distance: $(8-4, 5-3) = (4,2) = \sqrt{4^2 + 2^2} = \sqrt{20} = 4.47$

Cool, eh? In 3D, we can find the distance between points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ using the same approach:

\displaystyle{\text{distance}^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}

And it doesn’t matter if one side is bigger than the other, since the difference is squared and will be positive (another great side-effect of the theorem).

How to Use Any Distance

The theorem isn’t limited to our narrow, spatial definition of distance. It can apply to any orthogonal dimensions: space, time, movie tastes, colors, temperatures. In fact, it can apply to any set of numbers (a,b,c,d,e). Let’s take a look.

Measuring User Preferences

Let’s say you do a survey to find movie preferences:

  1. How did you like Rambo? (1-10)
  2. How did you like Bambi? (1-10)
  3. How did you like Seinfeld? (1-10)

How do we compare people’s ratings? Find similar preferences? Pythagoras to the rescue!

If we represent ratings as a "point" (Rambo, Bambi, Seinfeld) we can represent our survey responses like this:

  • Tough Guy: (10, 1, 3)
  • Average Joe: (5, 5, 5)
  • Sensitive Guy: (1, 10, 7)

And using the theorem, we can see how different people are:

  • Tough Guy to Average Joe: $(10 – 5, 1 – 5, 3 – 5) = (5, -4, -2) = \sqrt{(5)^2 + (-4)^2 + (-2)^2} = \sqrt{45} = 6.7$
  • Tough Guy to Sensitive Guy: $(10 – 1, 1 – 10, 3 – 7) = (9, -9, -4) = \sqrt{(9)^2 + (-9)^2 + (-4)^2} = \sqrt{178} = 13.34$

We can compute the results using a2 + b2 + c2 = distance2 version of the theorem. As we suspected, there’s a large gap between the Tough and Sensitive Guy, with Average Joe in the middle. The theorem helps us quantify this distance and do interesting things like cluster similar results.

This technique can be used to rate Netflix movie preferences and other types of collaborative filtering where you attempt to make predictions based on preferences (i.e. Amazon recommendations). In geek speak, we represented preferences as a vector, and use the theorem to find the distance between them (and group similar items, perhaps).

Finding Color Distance

Measuring “distance” between colors is another useful application. Colors are represented as red/green/blue (RGB) values from 0(min) to 255 (max). For example

  • Black: (0, 0, 0) — no colors
  • White: (255, 255, 255) — maximum of each color
  • Red: (255, 0, 0) — pure red, no other colors

We can map out all colors in a “color space”, like so:

color cube

We can get distance between colors the usual way: get the distance from our (red, green, blue) value to black (0,0,0) [formally labeled delta e]. It appears humans can’t tell the difference between colors only 4 units apart; heck, even 30 units looks pretty close to me:

color distance

How similar do these look to you? The color distance gives us a quantifiable way to measure the distance between colors (try for yourself). You can even unscramble certain blurred images by cleverly applying color distance.

The Point: You can measure anything

If you can represent a set of characteristics with numbers, you can compare them with the theorem:

  • Temperatures during the week: (Mon, Tues, Wed, Thurs, Fri). Compare successive weeks to see how “different” they are (find the difference between 5-dimensional vectors).
  • Number of customers coming into a store hour-by-hour, day-by-day, or week-by-week
  • SpaceTime distance: (latitude, longitude, altitude, date). Useful if you’re making a time machine (or a video game that uses one)!
  • Differences between people: (Height, Weight, Age)
  • Differences between companies: (Revenue, Profit, Market Cap)

You can tweak the distance by weighing traits differently (i.e., multiplying the age difference by a certain factor). But the core idea is so important I’ll repeat it again: if you can quantify it, you can compare it using the the Pythagorean Theorem.

Your x, y and z axes can represent any quantity. And you aren’t limited to 3 dimensions. Sure, mathematicians would love to tell you about the other ways to measure distance (aka metric space), but the Pythagorean Theorem is the most famous and a great starting point.

So, What Just Happened Here?

There’s so much to learn when revisiting concepts we were “taught”. Math is beautiful, but the elegance is usually buried under mechanical proofs and a wall of equations. We don’t need more proofs; we need interesting, intuitive results.

For example, the Pythagorean Theorem:

  • Works for any shape, not just triangles (like circles)
  • Works for any equation with squares (like 1/2 m v2)
  • Generalizes to any number of dimensions (a2 + b2 + c2 + …)
  • Measures any type of distance (i.e. between colors or movie preferences)

Not too bad for a 2000-year old result, right? This is quite a brainful, so I’ll finish here for today (the previous article has more uses). Happy math.

Topic Reference

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.

Surprising Uses of the Pythagorean Theorem

The Pythagorean theorem is a celebrity: if an equation can make it into the Simpsons, I'd say it's well-known.

\displaystyle{a^2 + b^2 = c^2}

But most of us think the formula only applies to triangles and geometry. Think again. The Pythagorean Theorem can be used with any shape and for any formula that squares a number.

Read on to see how this 2500-year-old idea can help us understand computer science, physics, even the value of Web 2.0 social networks.

Understanding How Area Works

I love seeing old topics in a new light and discovering the depth there. For example, I realize I didn't have a deep grasp of area until writing this article. Yes, we can rattle off equations, but do we really understand the nature of area? This fact may surprise you:

The area of any shape can be computed from any line segment squared. In a square, our "line segment" is usually a side, and the area is that side squared (side 5, area 25). In a circle, the line segment is often the radius, and the area is pi * r^2 (radius 5, area 25 pi). Easy enough.

We can pick any line segment and figure out area from it: every line segment has an "area factor" in this universal equation:

\displaystyle{\text{Area} = \text{Factor} \cdot (\text{line segment})^2}

Shape Line Segment Area Area Factor
Square
Surprising Uses of the Pythagorean Theorem
Side [s] s2 1
Square
Surprising Uses of the Pythagorean Theorem
Perimeter [p] 1/16 p2 1/16
Square
Surprising Uses of the Pythagorean Theorem
Diagonal [d] 1/2 d2 1/2
Circle
Surprising Uses of the Pythagorean Theorem
Radius [r] pi r2 pi (3.14159...)

For example, look at the diagonal of a square ("d"). A regular side is $\frac{d}{\sqrt{2}}$, so the area becomes $\frac{1}{2} d^2$. Our "area constant" is 1/2 in this case, if we want to use the diagonal as our line segment to be squared.

Now, use the entire perimeter ("p") as the line segment. A side is $\frac{p}{4}$, so the area is $\frac{p^2}{16}$. The area factor is 1/16 if we want to use $p^2$.

Can we pick any line segment?

You bet. There is always some relationship between the "traditional" line segment (the side of a square), and the one you pick (the perimeter, which happens to be 4 times a side). Since we can convert between the "traditional" and "new" segment, it doesn't matter which one we use -- there'll just be a different area factor when we multiply it out.

Can we pick any shape?

Sort of. A given area formula works for all similar shapes, where "similar" means "zoomed versions of each other". For example:

  • All squares are similar (area always $s^2$)
  • All circles are similar, too (area always $\pi r^2$)
  • Triangles are not similar: Some are fat and others skinny -- every "type" of triangle has its own area factor based on the line segment you are using. Change the shape of the triangle and the equation changes.

Yes, every triangle follows the rule "area = 1/2 base * height". But the relationship between base and height depends on the type of triangle (base = 2 * height, base = 3 * height, etc.), so even then the area factor will be different.

Why do we need similar shapes to keep the same area equation? Intuitively, when you zoom (scale) a shape, you're changing the absolute size but not the relative ratios within the shape. A square, no matter how zoomed, has a perimeter = 4 * side.

Because the "area factor" is based on ratios inside the shape, any shapes with the same "ratios" will follow the same formula. It's a bit like saying everyone's armspan is about equal to their height. No matter if you're a NBA basketball player or child, the equation holds because it's all relative. (This intuitive argument may not satisfy a mathematical mind -- in that case, take up your concerns with Euclid).

I hope these high-level concepts make sense:

  • Area can be be found from any line segment squared, not just the "side" or "radius"
  • Each line segment has a different "area factor"
  • The same area equation works for similar shapes

Intuitive Look at The Pythagorean Theorem

We can all agree the Pythagorean Theorem is true (here's 75 proofs). But most proofs offer a mechanical understanding: re-arrange the shapes, and voila, the equation holds. But is it really clear, intuitively, that it must be a2 + b2 = c2 and not 2a2 + b2 = c2? No? Well, let's build some intuition.

There's one killer concept we need: Any right triangle can be split into two similar right triangles.

pythagorean theorem proof by similarity

Cool, huh? Drawing a perpendicular line through the point splits a right triangle into two smaller ones. Geometry lovers, try the proof yourself: use angle-angle-angle similarity.

This diagram also makes something very clear:

  • Area (Big) = Area (Medium) + Area (Small)

Makes sense, right? The smaller triangles were cut from the big one, so the areas must add up. And the kicker: because the triangles are similar, they have the same area equation.

Let's call the long side c (5), the middle side b (4), and the small side a (3). Our area equation for these triangles is:

\displaystyle{\text{Area} = F * \text{hypotenuse}^2}

where F is some area factor (6/25 or .24 in this case; the exact number doesn't matter). Now let's play with the equation:

\displaystyle{\text{Area (Big)} = \text{Area (Medium)} + \text{Area (Small)}}

\displaystyle{F c^2 = F b^2 + F a^2}

Divide by F on both sides and you get:

\displaystyle{c^2 = b^2 + a^2}

Which is our famous theorem! You knew it was true, but now you know why:

  • A triangle can be split into two smaller, similar ones
  • Since the areas must add up, the squared hypotenuses (which determine area) must add up as well.

This takes a bit of time to see, but I hope the result is clear. How could the small triangles not add to the larger one?

Actually, it turns out the Pythagorean Theorem depends on the assumptions of Euclidean geometry and doesn't work on spheres or globes, for example. But we'll save that discussion for another time.

Useful Application: Try Any Shape

We used triangles in our diagram, the simplest 2-D shape. But the line segment can belong to any shape. Take circles, for example:

pythagorean theorem circle

Now what happens when we add them together?

circle areas

You guessed it: Circle of radius 5 = Circle of radius 4 + Circle of radius 3.

Pretty wild, eh? We can multiply the Pythagorean Theorem by our area factor (pi, in this case) and come up with a relationship for any shape.

Remember, the line segment can be any portion of the shape. We could have picked the circle's radius, diameter, or circumference -- there would be a different area factor, but the 3-4-5 relationship would still hold.

So, whether you're adding up pizzas or Richard Nixon masks, the Pythagorean theorem helps you relate the areas of any similar shapes. Now that's something they didn't teach you in grade school.

Useful Application: Conservation of Squares

The Pythagorean Theorem applies to any equation that has a square. The triangle-splitting means you can split any amount (c2) into two smaller amounts (a2 + b2) based on the sides of a right triangle. In reality, the "length" of a side can be distance, energy, work, time, or even people in a social network:

Social Networks.

Metcalfe's Law (if you believe it) says the value of a network is about n2 (the number of relationships). In terms of value,

  • Network of 50M = Network of 40M + Network of 30M.

Pretty amazing -- the 2nd and 3rd networks have 70M people total, but they aren't a coherent whole. The network with 50 million people is as valuable as the others combined.

Computer Science

Some programs with n inputs take n2 time to run (bubble sort, for example). In terms of processing time:

  • 50 inputs = 40 inputs + 30 inputs

Pretty interesting. 70 elements spread among two groups can be sorted as fast as 50 items in one group. (Yeah, there may be constant overhead/start up time, just work with me here).

Given this relationship, it makes sense to partition elements into separate groups and then sort the subgroups. Indeed, that's the approach used in quicksort, one of the best general-purpose sorting methods. The Pythagorean theorem helps show how sorting 50 combined elements can be as slow as sorting 30 and 40 separate ones.

Surface Area

The surface area of a sphere is 4 pi r2. So, in terms of surface area of spheres:

  • Area of radius 50 = area of radius 40 + area of radius 30

We don't often have spheres lying around, but boat hulls may have the same relationship (they're like deformed spheres, right?). Assuming the boats are similarly shaped, the paint needed to coat one 50 foot yacht could instead paint a 40 and 30-footer. Yowza.

Physics

If you remember your old physics classes, the kinetic energy of an object with mass m and velocity v is 1/2 m v2. In terms of energy,

  • Energy at 500 mph = Energy at 400 mph + Energy at 300 mph

With the energy used to accelerate one bullet to 500 mph, we could accelerate two others to 400 and 300 mph.

Try Any Number

You can use any set of numbers that make a right triangle. For example, enter a total amount (50) and one subportion (30), and the remainder will appear below:

Suppose you want to see if a large pizza (16 inches) is bigger than two mediums (12 inches). Plug in 16 for C, and 12 for A. It looks like the large pizza can be split into a 12-inch and 10.5-inch pizza, so two-mediums are in fact bigger.

Enjoy Your New Insight

Throughout our school life we think the Pythagorean Theorem is about triangles and geometry. It's not.

When you see a right triangle, realize the sides can represent the lengths of any portion of a shape, and the sides can represent variables in any equation that has a square. Maybe it's just me, but I find this pretty surprising.

There's much, much more to this beautiful theorem, such as measuring any distance. Enjoy.

Topic Reference

Join 450k Monthly Readers

Enjoy the article? There's plenty more to help you build a lasting, intuitive understanding of math. Join the newsletter for bonus content and the latest updates.