Files
freeCodeCamp/guide/english/mathematics/pythagorean-triples/index.md
2019-03-21 18:40:53 +05:30

16 lines
624 B
Markdown

---
title: Pythagorean Triples
---
## Pythagorean Triples
A pythagorean triple is a set of three numbers, a, b, and c, that satisfies the equation `a^2 + b^2 = c^2`. When a triangle is made with side lengths equal to a, b, and c, it will be a right triangle.
The smallest pythagorean triple is 3,4,5. There is an infinite number of these pythagorean triples. They can be constructed using the following process:
When m and n are positive integers such that m is less than n:
- a = `n^2 - m^2`
- b = `2nm`
- c = `n^2 + m^2`
Then a, b, and c will form a pythagorean triple. The formula above is known as Euclid's formula.