Skip to main content
Right Angle Triangle Calculator Logo
Right Angle Triangle Calculator
Special Triangles

Pythagorean Triple Generator

Generate integer Pythagorean triples using Euclid's formula from two coprime integers m and n.

1Pythagorean Triple Generator Inputs

Auto-calculating

2Calculated Results

Solved
Primary Result
--
Detailed Solution Breakdown
Applied Formula:a = m² - n², b = 2mn, c = m² + n²

Understanding the Pythagorean Triple Generator

Euclid's formula generates Pythagorean triples given any two positive integers m > n.

✓How to Use

Enter integers m and n.

★Worked Example

For m = 2, n = 1: a = 2² - 1² = 3, b = 2(2)(1) = 4, c = 2² + 1² = 5.

How Pythagorean Triple Generator Works?

The Pythagorean Triple Generator works by applying the Euclid parameter formulas a = m² - n², b = 2mn and c = m² + n² to two integers m and n. Any m greater than n produces a valid triple.

  1. 1

    Enter Parameter M

    Type the larger integer, which must exceed n.

  2. 2

    Enter Parameter N

    Type the smaller positive integer.

  3. 3

    Read The Generated Triple

    The three outputs always satisfy a² + b² = c².

  4. 4

    Check For Primitivity

    A triple is primitive when m and n are coprime and one of them is even.

Pythagorean Triple Generator Formula

The generator uses Euclid's parameterisation, which produces every primitive triple exactly once.

a = m² - n²

Returns the odd leg

b = 2mn

Returns the even leg

c = m² + n²

Returns the hypotenuse

m > n > 0

States the parameter condition

Pythagorean Triple Generator Conversion Table

This conversion table converts parameter pairs into triples and flags which are primitive.

Pythagorean Triple Generator conversion table
mnLeg aLeg bHypotenuse cPrimitive
21345Yes
3251213Yes
4115817Yes
4372425Yes
52212029Yes
318610No, 2 × (3,4,5)
5494041Yes

What Is Pythagorean Triple Generator?

The Pythagorean Triple Generator is a tool that builds integer right-triangle side sets from two parameters. The method comes from Euclid's Elements, Book X, and produces every primitive triple without repetition.

Infinitely many triples exist, and each primitive triple appears exactly once for one coprime parameter pair of opposite parity. Non-primitive triples such as 6-8-10 arise when m and n share a factor or are both odd.

What Are the Uses of Pythagorean Triple Generator?

There are 4 main uses of the Pythagorean Triple Generator, including exercise writing, integer test cases, number theory study, and layout mark values.

Writing Clean Exercises

Teachers generate side sets that avoid irrational answers in worked problems.

Creating Integer Test Cases

Developers need exact-value inputs to test geometry code without floating-point error.

Studying Number Theory

Parameter patterns show how parity and coprimality control primitivity.

Choosing Layout Mark Values

Site crews pick a triple whose scale fits the available tape length.

View All 99 Calculators →