Math

Pythagorean Theorem Calculator

Calculate the missing side of a right triangle using the Pythagorean theorem. Find hypotenuse or leg length instantly.

Solve for
Hypotenuse (c)
5
Side a
3
Side b
4
Hypotenuse c
5
Perimeter
12
Area
6

What is the Pythagorean theorem?

The Pythagorean theorem is one of the most fundamental principles in mathematics, establishing a precise relationship between the three sides of any right triangle. A right triangle is a triangle containing exactly one 90-degree angle, and this theorem provides a reliable method for calculating unknown side lengths when two sides are known.

The theorem states that in any right triangle, the square of the length of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the lengths of the other two sides, commonly called the legs. This elegant relationship has been proven in hundreds of different ways throughout history and remains essential to fields ranging from construction to computer graphics.

The formula

For a right triangle with legs a and b, and hypotenuse c:

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

The hypotenuse is always the longest side of a right triangle and lies directly opposite the right angle. The two legs form the right angle itself, meeting at a 90-degree intersection. Understanding which side is which is crucial for applying the theorem correctly.

When you know the lengths of both legs, you can find the hypotenuse by adding their squares and taking the square root. Conversely, if you know the hypotenuse and one leg, you can find the remaining leg by subtracting the known leg's square from the hypotenuse's square, then taking the square root.

Solving for each side

Finding the hypotenuse (c)

When you know both legs of the triangle, calculate the hypotenuse using:

c=a2+b2c = \sqrt{a^2 + b^2}

For example, if one leg measures 6 units and the other measures 8 units, the hypotenuse equals √(36 + 64) = √100 = 10 units.

Finding a leg (a or b)

When you know the hypotenuse and one leg, find the missing leg:

a=c2b2a = \sqrt{c^2 - b^2} b=c2a2b = \sqrt{c^2 - a^2}

For instance, if the hypotenuse is 13 units and one leg is 5 units, the other leg equals √(169 - 25) = √144 = 12 units.

Common Pythagorean triples

Pythagorean triples are sets of three positive integers that perfectly satisfy the theorem without resulting in irrational numbers. These integer solutions have been studied for thousands of years and provide convenient reference points for practical applications.

TripleVerification
3, 4, 59 + 16 = 25
5, 12, 1325 + 144 = 169
8, 15, 1764 + 225 = 289
7, 24, 2549 + 576 = 625
9, 40, 4181 + 1600 = 1681
11, 60, 61121 + 3600 = 3721
20, 21, 29400 + 441 = 841

Any multiple of a Pythagorean triple also forms a valid triple. For example, doubling the 3-4-5 triple gives 6-8-10, and tripling it gives 9-12-15. This scaling property makes the basic triples extremely versatile for real-world applications where different unit scales may be needed.

Primitive Pythagorean triples are those where the three numbers share no common factor other than 1. The 3-4-5 and 5-12-13 triples are primitive, while 6-8-10 is not (being a multiple of 3-4-5). Mathematicians have developed formulas to generate all primitive triples using pairs of coprime integers.

Real-world applications

Construction and carpentry

The Pythagorean theorem is indispensable in construction work. The famous 3-4-5 rule allows builders to create perfect right angles without specialized equipment. By measuring 3 feet along one edge, 4 feet along another, and verifying that the diagonal measures exactly 5 feet, carpenters can confirm their corners are square.

This technique extends to laying foundations, framing walls, installing cabinets, and building decks. Any scale of the 3-4-5 ratio works equally well, so builders might use 6-8-10 feet for larger projects or 30-40-50 centimeters for smaller work.

Stair construction relies heavily on the theorem. The rise (vertical height), run (horizontal depth), and stringer length (the diagonal board supporting the steps) form a right triangle. Calculating the precise stringer length ensures stairs are structurally sound and meet building codes.

Roof framing similarly depends on these calculations. The span, rise, and rafter length form right triangles that must be calculated accurately for proper roof construction. Errors in these measurements can lead to structural problems or water drainage issues.

Navigation and distance calculation

When calculating straight-line distances between two points, the Pythagorean theorem provides the solution. If you know the north-south distance and east-west distance between two locations, the theorem gives you the direct distance.

GPS systems use three-dimensional versions of this principle to calculate positions. Aviation relies on these calculations for flight planning, determining optimal routes that account for altitude changes. Maritime navigation has used these geometric principles for centuries to plot courses across open water.

Screen dimensions and displays

Television and computer monitor sizes are measured diagonally, making the Pythagorean theorem essential for understanding display dimensions. A "55-inch TV" has a 55-inch diagonal, but the actual width and height depend on the aspect ratio.

For a 16:9 aspect ratio display, you can calculate the width and height from the diagonal measurement. This helps consumers understand how much wall space a TV will occupy and ensures proper mounting and viewing distances.

Sports and recreation

Athletic fields use the theorem for proper layout. Baseball diamonds require precise right angles at each base. Football fields need accurate corner measurements. The diagonal of a rectangular field can verify that the corners are truly square.

Pool and billiards players intuitively use geometric principles related to the theorem when planning shots. Rock climbers calculate route distances that involve vertical and horizontal components.

Special right triangles

Certain right triangles have fixed angle measurements that produce predictable side ratios. These special triangles simplify calculations in many practical situations.

45-45-90 triangle

Also called an isosceles right triangle, this triangle has two 45-degree angles and two equal legs. The relationship between the sides follows a fixed pattern:

c=a2c = a\sqrt{2}

If both legs measure 1 unit, the hypotenuse measures √2 units (approximately 1.414). This triangle appears frequently in design and architecture, particularly in diagonal bracing and square-based constructions.

30-60-90 triangle

This triangle has angles of 30, 60, and 90 degrees, with sides in the exact ratio of 1 : √3 : 2. The shortest side (opposite the 30-degree angle) serves as the reference:

  • Short leg: 1 unit
  • Long leg: √3 units (approximately 1.732)
  • Hypotenuse: 2 units

This triangle emerges naturally when you bisect an equilateral triangle, making it common in hexagonal patterns and engineering applications.

Related formulas

Triangle area

For a right triangle, the area calculation is straightforward since the two legs form the base and height:

Area=12×a×b\text{Area} = \frac{1}{2} \times a \times b

This formula works because the right angle ensures the legs are perpendicular, making one leg the base and the other the height.

Triangle perimeter

The perimeter is simply the sum of all three sides:

Perimeter=a+b+c\text{Perimeter} = a + b + c

Once you calculate any missing side using the Pythagorean theorem, finding the perimeter becomes straightforward addition.

Distance formula

The Pythagorean theorem directly leads to the coordinate geometry distance formula. For two points (x₁, y₁) and (x₂, y₂):

d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

This formula treats the horizontal and vertical distances as legs of a right triangle, with the direct distance as the hypotenuse.

Common mistakes to avoid

When applying the Pythagorean theorem, several errors frequently occur. The most common is misidentifying the hypotenuse. Remember that c must always be the longest side and must be opposite the right angle. If your calculation produces a hypotenuse shorter than a leg, you've made an error.

Another frequent mistake is forgetting to take the square root at the final step. The formula gives you c², not c directly. Similarly, when solving for a leg, remember to subtract (not add) and then take the square root.

Unit consistency matters significantly. If one measurement is in feet and another in inches, convert them to matching units before calculating. Mixed units will produce meaningless results.

Historical background

The theorem bears the name of Pythagoras, the ancient Greek mathematician and philosopher who lived around 570-495 BC. Pythagoras founded a school in Croton (southern Italy) where mathematics held an almost mystical significance. His followers, the Pythagoreans, believed that numbers and their relationships formed the foundation of all reality.

However, historical evidence suggests the theorem was known long before Pythagoras. Babylonian clay tablets from around 1800 BC demonstrate knowledge of Pythagorean triples and their relationships. The famous Plimpton 322 tablet contains a list of Pythagorean triples that predates Pythagoras by over a millennium.

Ancient Indian mathematicians described the theorem in the Sulba Sutras, texts dating from 800-500 BC that provided geometric rules for constructing altars. Chinese mathematicians independently discovered the relationship, as documented in the Zhou Bi Suan Jing, an ancient Chinese text on mathematics and astronomy.

Despite these earlier discoveries, Pythagoras or his school may have provided the first rigorous proof of the theorem. The distinction between knowing a mathematical fact and proving it rigorously represents a fundamental advance in mathematical thinking that the Greeks championed.

Proofs of the theorem

Over 400 distinct proofs of the Pythagorean theorem exist, making it one of the most proven results in all of mathematics. These proofs range from simple geometric rearrangements to sophisticated algebraic arguments.

The most intuitive proofs involve area comparison. By arranging four copies of the same right triangle around a square, you can demonstrate that the areas of squares built on each side satisfy the theorem's relationship. This visual approach makes the theorem accessible even to those without advanced mathematical training.

President James Garfield published an original proof in 1876 using a trapezoid construction. His proof demonstrates that mathematical discovery is not limited to professional mathematicians and that fresh perspectives can yield new insights into ancient problems.