numvana

Pythagorean Triple Generator

Generate whole-number Pythagorean triples (a² + b² = c²) from two integers using Euclid's formula, and check whether a triple is primitive.

Triple (a, b, c)
3, 4, 5
Check: a² + b² = c²
25 = 25
Is this a primitive triple?
Yes

How it works

Euclid's formula generates every whole-number solution to a² + b² = c² from two positive integers m > n > 0: a = m² − n², b = 2mn, c = m² + n². This is the same method behind well-known triples like 3-4-5 (from m=2, n=1) and 5-12-13 (from m=3, n=2) — practical for things like squaring a corner in construction, since any multiple of 3-4-5 forms a right angle.

A triple is 'primitive' — its three sides share no common factor — exactly when m and n are coprime (their greatest common divisor is 1) and have opposite parity (one even, one odd). If m and n don't meet that condition, the result is a whole-number multiple of a smaller primitive triple, which this calculator identifies. The scale factor k multiplies all three sides by the same amount, which always produces another valid triple, since (ka)² + (kb)² = k²(a² + b²) = k²c² = (kc)².

FAQ

Why does the calculator require m to be greater than n?

Euclid's formula only produces a valid triple with positive, non-degenerate sides when m > n > 0 — if m equaled n, side a (m² − n²) would be zero, and if m were less than n, it would come out negative.

What does it mean for a triple to not be primitive?

A non-primitive triple is just a primitive triple with every side scaled up by the same whole number — 6-8-10 is 2× the primitive 3-4-5 triple, for example. It's still a perfectly valid right-triangle solution, just not the 'smallest' version of that particular shape.

Related calculators