Recognizing Pythagorean Triples

Introduction

Welcome back to Real-World and 3D Applications! You are already through the first lesson of this course, so great job keeping the momentum going. Last time, we explored the converse of the Pythagorean theorem and practiced testing whether three side lengths form a right triangle by squaring, adding, and comparing. That three-step process works every time, but sometimes there is an even faster way.

In this lesson, we will learn to recognize special sets of whole numbers called Pythagorean triples. Once a few of these are committed to memory, we can confirm a right triangle almost instantly — no squaring required.

What Is a Pythagorean Triple?

A Pythagorean triple is a set of three positive whole numbers (a,b,c)(a, b, c) that satisfies the Pythagorean equation:

a2+b2=c2a^2 + b^2 = c^2

Because all three numbers are whole numbers with no decimals or square roots involved, the arithmetic is always clean. More importantly, whenever we recognize a triple, we know immediately that those three lengths form a right triangle without reaching for a calculator.

Think of Pythagorean triples as a cheat sheet built right into the math. Instead of squaring and comparing every time, we can simply spot the pattern and move on. The more triples we memorize, the faster we can work.

The Most Common Base Triples

A handful of Pythagorean triples appear so frequently in math problems and real-world measurements that they are worth memorizing. Here are the four we will focus on:

TripleVerification
3, 4, 59+16=259 + 16 = 25 ✓
5, 12, 1325+144=16925 + 144 = 169 ✓
8, 15, 1764+225=28964 + 225 = 289 ✓
7, 24, 2549+576=62549 + 576 = 625 ✓

The 3-4-5 triple is by far the most popular and shows up constantly in construction, design, and everyday geometry. The 5-12-13 triple is another favorite in both textbooks and practical applications. The remaining two are less common but still very useful to keep in your back pocket.

Notice that each of these triples passes the converse test we learned in the previous lesson. That is exactly what makes them special: the equation holds with whole numbers on every side.

Scaling a Triple: The Multiples Rule

Here is where things get really powerful. If we take any Pythagorean triple and multiply all three numbers by the same whole number, the result is also a Pythagorean triple. For example, doubling every side of 3-4-5 gives us 6-8-10, and tripling gives us 9-12-15. Both are guaranteed right triangles.

Let's see why this works. Suppose (a,b,c)(a, b, c) is a Pythagorean triple, so a2+b2=c2a^2 + b^2 = c^2. If we multiply each side by a whole number kk, our new sides become kaka, kbkb, and kckc. Now we square and add the two shorter sides:

(ka)2+(kb)2=k2a2+k2b2=k2(a2+b2)=k2c2=(kc)2(ka)^2 + (kb)^2 = k^2 a^2 + k^2 b^2 = k^2(a^2 + b^2) = k^2 c^2 = (kc)^2

The k2k^2 factors out neatly from both squared legs and lands exactly on the squared hypotenuse. This is not a coincidence — it is built directly into the algebra of the theorem. Scaling preserves the right-triangle property every single time.

A quick sketch shows the same idea visually. The triangle on the right is simply a larger copy of the one on the left, with every side doubled, and the right angle remains:

Side-by-side 3-4-5 and 6-8-10 right triangles showing scaling by 2
Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal