Geometry guide · 5 min read

Pythagorean Theorem: Formula and Examples

The Pythagorean theorem connects the three sides of any right triangle. If you know two sides, you can always find the third. Here is how to use it for hypotenuses, missing legs, coordinates, and word problems.

The Formula

a2+b2=c2a^2 + b^2 = c^2
  • aa and bb are the legs, the two sides that form the right angle.
  • cc is the hypotenuse, the longest side, directly across from the right angle.

The theorem only works for right triangles. The converse also works: if a2+b2=c2a^2 + b^2 = c^2 for three side lengths, the triangle has a right angle. For example, sides 9, 12, 15 form a right triangle because 81+144=225=15281 + 144 = 225 = 15^2. Sides 6, 7, 9 do not, because 36+49=8536 + 49 = 85, not 81.

Finding the Hypotenuse

When you know both legs, add their squares, then take the square root.

Example 1: The legs are 6 and 8. Find cc.

  1. Square the legs: 62=366^2 = 36 and 82=648^2 = 64.
  2. Add: 36+64=10036 + 64 = 100.
  3. Take the square root: c=100=10c = \sqrt{100} = 10.

Example 2: The legs are 5 and 7. Find cc.

  1. 52+72=25+49=745^2 + 7^2 = 25 + 49 = 74.
  2. c=74≈8.60c = \sqrt{74} \approx 8.60.

Not every answer is a whole number. Leave it as 74\sqrt{74} or round as your teacher asks.

Finding a Missing Leg

When you know the hypotenuse and one leg, subtract instead of add:

b2=c2−a2b^2 = c^2 - a^2

Example 1: The hypotenuse is 13 and one leg is 5. Find the other leg.

  1. Square both: 132=16913^2 = 169 and 52=255^2 = 25.
  2. Subtract: 169−25=144169 - 25 = 144.
  3. Square root: b=144=12b = \sqrt{144} = 12.

Example 2: The hypotenuse is 10 and one leg is 4.

  1. b2=100−16=84b^2 = 100 - 16 = 84.
  2. b=84=221≈9.17b = \sqrt{84} = 2\sqrt{21} \approx 9.17.

Quick sanity check: a leg must always be shorter than the hypotenuse.

Pythagorean Triples

A Pythagorean triple is a set of three whole numbers that fit a2+b2=c2a^2 + b^2 = c^2. Memorizing a few saves time on tests.

TripleCheck
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

Any multiple of a triple is also a triple. Since 3, 4, 5 works, so do 6, 8, 10 and 9, 12, 15. If you see legs of 15 and 20, you can spot that it is 3, 4, 5 times 5, so the hypotenuse is 25.

The Distance Formula Connection

The distance formula is just the Pythagorean theorem on a coordinate grid:

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

The horizontal change is one leg, the vertical change is the other leg, and the distance is the hypotenuse.

Example: Find the distance from (1,2)(1, 2) to (7,10)(7, 10).

  1. Horizontal change: 7−1=67 - 1 = 6.
  2. Vertical change: 10−2=810 - 2 = 8.
  3. d=62+82=36+64=100=10d = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10.

Word Problem: The Ladder

Problem: A 17-foot ladder leans against a wall. The bottom of the ladder is 8 feet from the wall. How high up the wall does the ladder reach?

  1. Draw it. The wall and ground form the right angle. The ladder is the hypotenuse, so c=17c = 17. The ground distance is one leg, a=8a = 8.
  2. Set up: 82+b2=1728^2 + b^2 = 17^2.
  3. Simplify: 64+b2=28964 + b^2 = 289.
  4. Solve: b2=225b^2 = 225, so b=15b = 15.

Answer: The ladder reaches 15 feet up the wall. (This is the 8, 15, 17 triple.) Paste it into the VeilGPT solver to check your steps on similar problems.

Common mistakes

  • Adding the squares when you are actually finding a leg. If you know the hypotenuse, subtract.
  • Labeling the wrong side as c. The hypotenuse is always the longest side, across from the right angle.
  • Thinking the square root of a^2 + b^2 equals a + b. For legs 3 and 4 the hypotenuse is 5, not 7.
  • Using the theorem on a triangle that has no right angle.

Try one yourself

A right triangle has a hypotenuse of 25 and one leg of 7. Find the length of the other leg.

Work it out, then check every step with the VeilGPT geometry solver.

Check it with VeilGPT

Questions about this topic

Does the Pythagorean theorem work for all triangles?

No, only right triangles. For other triangles you need the law of cosines, which reduces to the Pythagorean theorem when the angle is 90 degrees.

Does it matter which leg is a and which is b?

No. The two legs can be swapped. The only side that must be in the right spot is the hypotenuse, c.

Can the answer be a decimal?

Yes. Many right triangles have a side like the square root of 74. Leave it in exact form or round it, depending on the directions.

More study guides