Euclid's Formula for Pythagorean Triples
Euclid's formula produces integer right triangles from any integers ; primitive triples arise when and are coprime and not both odd. It is used to generate Pythagorean triples and in number-theory problems about sums of squares.
LaTeX
a=m^2-n^2,\quad b=2mn,\quad c=m^2+n^2\qquad (m>n>0)Variables
- positive integers with m > n
- legs
- hypotenuse
Example
Generate the triple for .
- , , .
- Check: .
Answer: .