What Is a Pythagorean Triple?
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy the Pythagorean theorem, \(a^2 + b^2 = c^2\). The most famous example is (3, 4, 5), since \(9 + 16 = 25\). These triples describe right triangles whose three side lengths are all whole numbers, making them important in geometry, number theory, construction, and trigonometry.
How to Use This Calculator
Enter two whole numbers, \(m\) and \(n\), where \(m\) is greater than \(n\) and both are greater than zero. Press calculate, and the tool applies Euclid's formula to instantly produce a valid triple (a, b, c). It also displays \(a^2\), \(b^2\), and \(a^2 + b^2\) so you can confirm that the result equals \(c^2\).
The Formula Explained
Euclid's formula states that for any integers \(m > n > 0\):
$$(a,\,b,\,c) = \left(\text{m}^{2} - \text{n}^{2},\ \ 2\,\text{m}\,\text{n},\ \ \text{m}^{2} + \text{n}^{2}\right)$$
Substituting these into \(a^2 + b^2\) gives $$(m^2-n^2)^2 + (2mn)^2 = m^4 - 2m^2 n^2 + n^4 + 4m^2 n^2 = m^4 + 2m^2 n^2 + n^4 = (m^2 + n^2)^2,$$ which equals \(c^2\). This proves every \((m, n)\) pair yields a genuine Pythagorean triple. When \(m\) and \(n\) are coprime and not both odd, the triple is primitive (its terms share no common factor).
Worked Example
Let \(m = 2\) and \(n = 1\). Then $$a = 2^2 - 1^2 = 3, \quad b = 2 \times 2 \times 1 = 4, \quad c = 2^2 + 1^2 = 5.$$ The triple is (3, 4, 5), and indeed \(3^2 + 4^2 = 9 + 16 = 25 = 5^2\).
FAQ
Why must m be greater than n? If \(m \le n\), the value \(a = m^2 - n^2\) would be zero or negative, which cannot be a triangle side length.
Does this give every triple? Euclid's formula (with a scaling factor) generates all Pythagorean triples. A single \((m, n)\) pair gives one primitive or scaled triple at a time.
What is a primitive triple? A primitive triple is one where \(a\), \(b\), and \(c\) have no common divisor other than 1, such as (3, 4, 5) or (5, 12, 13).