Pythagorean Triples Generator

Pythagorean Triples Generator

Find Triples Containing a Number

What Are Pythagorean Triples?

A Pythagorean triple is a set of three positive integers (a, b, c) that satisfies the Pythagorean theorem: a² + b² = c². The simplest and most famous example is (3, 4, 5): 9 + 16 = 25.

Primitive vs Non-Primitive Triples

A primitive triple has no common factor among a, b, and c other than 1. For example, (3, 4, 5) is primitive. Multiplying any triple by a constant k gives another triple — (6, 8, 10) is a non-primitive multiple of (3, 4, 5).

Generating Pythagorean Triples (Euclid's Formula)

For any two positive integers m > n, the formula a = m²−n², b = 2mn, c = m²+n² generates a Pythagorean triple. If gcd(m,n) = 1 and m−n is odd, the triple is primitive.

Frequently Asked Questions

Are there infinitely many Pythagorean triples?
Yes. Since you can multiply any triple by any positive integer k and get another valid triple, and there are infinitely many primitive triples, the total count is infinite.
What is the 5-12-13 triple used for?
The (5, 12, 13) triple is used in construction and carpentry to verify right angles when the 3-4-5 rule would require too small a scale. Larger triples provide more accurate squaring of large surfaces.
Can Pythagorean triples have even numbers?
Yes. (6, 8, 10) is a valid triple. In a primitive triple, exactly one of a or b is even (the one generated by 2mn in Euclid's formula).