IP331.com | Online Tools
HomeNumber Theory ToolsPythagorean Triple Generator

Pythagorean Triple Generator

Use Euclid formula to generate primitive and non-primitive Pythagorean triples

m (larger)
n (smaller)
Scale Factor k

Euclid Formula

a = k x (m^2 - n^2)
b = k x (2mn)
c = k x (m^2 + n^2)
Condition: m > n, m,n positive integers

The Euclid formula generates all primitive Pythagorean triples when m and n are coprime and not both odd. The scale factor k produces non-primitive triples from any primitive base.

For primitive triples, m and n must be coprime with opposite parity (one even, one odd). Using k > 1 generates scaled (non-primitive) triples.

What Is a Pythagorean Triple?

A Pythagorean triple is a set of three positive integers that satisfy the Pythagorean theorem. They represent the side lengths of a right triangle and have been studied for thousands of years since the time of ancient Babylonians.

Primitive

gcd(a,b,c)=1. m,n coprime, opposite parity. (3,4,5), (5,12,13), (8,15,17) are examples.

Non-Primitive

k > 1: (6,8,10)=2x(3,4,5), (9,12,15)=3x(3,4,5). Any multiple of a primitive triple works.

Euclid Proof

Euclid proved that the formula generates all triples in his Elements (Book X). It remains the standard method today.

History

The oldest known triple (3,4,5) was used by ancient Egyptians for surveying. Babylonian tablet Plimpton 322 lists 15 triples from 1800 BCE.

Teaching Example: m=4, n=3, k=1. a = 4^2 - 3^2 = 16-9 = 7. b = 2x4x3 = 24. c = 4^2+3^2 = 16+9 = 25. Triple: (7,24,25). Verify: 7^2+24^2=49+576=625=25^2. Primitive? gcd(7,24)=1, yes! m,n coprime and opposite parity (4 even, 3 odd).

Applications

Geometry Number Theory Cryptography Construction Surveying Math Education

FAQs about Pythagorean Triples

What is a Pythagorean triple?
Three integers a,b,c satisfying a^2+b^2=c^2. The smallest is (3,4,5). Primitive triples have gcd(a,b,c)=1.
How does Euclid formula work?
a=m^2-n^2, b=2mn, c=m^2+n^2 with m>n. For m=4,n=3: (7,24,25). Scale by k for non-primitive triples.
What is the triple (6,8,10)?
(6,8,10) = 2x(3,4,5). It is non-primitive because gcd(6,8,10)=2. Every non-primitive triple is a multiple of a primitive one.
What conditions make a primitive triple?
m,n must be coprime (gcd=1) and of opposite parity (one even, one odd). m=4,n=1 gives (15,8,17). Both odd like m=3,n=1 gives (8,6,10)=2x(4,3,5), not primitive.

More Number Theory Tools

Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.

© 2026 IP331.com — Free Online Tools. All rights reserved.

About · Contact · Privacy Policy · Cookie Policy · Terms of Use · Disclaimer · Sitemap