A Pythagorean triple consists of three positive integers a, b, and c, such that a2 + b2 = c2. Such a triple is commonly written (a, b, c), a well-known example is (3, 4, 5). If (a, b, c) is a Pythagorean triple, then so is (ka, kb, kc) for any positive integer k. A triangle whose side lengths are a Pythagorean triple is a right triangle and called a Pythagorean triangle. A primitive Pythagorean triple is one in which a, b and c are coprime (that is, they have no common divisor larger than 1). For example, (3, 4, 5) is a primitive Pythagorean triple whereas (6, 8, 10) is not. Every Pythagorean triple can be scaled to a unique primitive Pythagorean triple by dividing (a, b, c) by their greatest common divisor. Conversely, every Pythagorean triple can be obtained by multiplying the elements of a primitive Pythagorean triple by a positive integer (the same for the three elements). The name is derived from the Pythagorean theorem, stating that every right triangle has side lengths satisfying the formula a 2 + b 2 = c 2 {\displaystyle a^{2}+b^{2}=c^{2}} ; thus, Pythagorean triples describe the three integer side lengths of a right triangle. However, right triangles with non-integer sides do not form Pythagorean triples. For instance, the triangle with sides a = b = 1 {\displaystyle a=b=1} and c = 2 {\displaystyle c={\sqrt {2}}} is a right triangle, but ( 1 , 1 , 2 ) {\displaystyle (1,1,{\sqrt {2}})} is not a Pythagorean triple because the square root of 2 is not an integer. Moreover, 1 {\displaystyle 1} and 2 {\displaystyle {\sqrt {2}}} do not have an integer common multiple because 2 {\displaystyle {\sqrt {2}}} is irrational. Pythagorean triples have been known since ancient times. The oldest known record comes from Plimpton 322, a Babylonian clay tablet from about 1800 BC, written in a sexagesimal number system. When searching for integer solutions, the equation a2 + b2 = c2 is a Diophantine equation. Thus Pythagorean triples are among the oldest known solutions of a nonlinear Diophantine equation.
Examples
There are 16 primitive Pythagorean triples of numbers up to 100:
Other small Pythagorean triples such as (6, 8, 10) are not listed because they are not primitive; for instance (6, 8, 10) is a multiple of (3, 4, 5). Each of these points (with their multiples) forms a radiating line in the scatter plot to the right. These are the remaining primitive Pythagorean triples of numbers up to 300:
Generating a triple
Euclid's formula is a fundamental formula for generating Pythagorean triples given an arbitrary pair of integers m and n with m > n > 0. The formula states that the integers
a = m 2 − n 2 , b = 2 m n , c = m 2 + n 2 {\displaystyle a=m^{2}-n^{2},\ \,b=2mn,\ \,c=m^{2}+n^{2}}
form a Pythagorean triple. For example, the integers
m = 2 , n = 1 {\displaystyle m=2,\ \,n=1}
generate the primitive triple (3, 4, 5):
a = 2 2 − 1 2 = 3 , b = 2 × 2 × 1 = 4 , c = 2 2 + 1 2 = 5. {\displaystyle a=2^{2}-1^{2}=3,\ \,b=2\times 2\times 1=4,\ \,c=2^{2}+1^{2}=5.}
The triple generated by Euclid's formula is primitive if and only if m and n are coprime and exactly one of them is even. When both m and n are odd, then a, b, and c will be even, and the triple will not be primitive; however, dividing a, b, and c by 2 will still yield a primitive triple when m and n are both odd and coprime. Every primitive triple arises (after the exchange of a and b, if a is even) from a unique pair of coprime numbers m, n, one of which is even. It follows that there are infinitely many primitive Pythagorean triples. This relationship of a, b and c to m and n from Euclid's formula is referenced throughout the rest of this article. Despite generating all primitive triples, Euclid's formula does not produce all triples—for example, (9, 12, 15) cannot be generated using integer m and n. This can be remedied by inserting an additional parameter k to the formula: every Pythagorean triple is generated uniquely by
a = k ⋅ ( m 2 − n 2 ) , b = k ⋅ ( 2 m n ) , c = k ⋅ ( m 2 + n 2 ) {\displaystyle a=k\cdot (m^{2}-n^{2}),\ \,b=k\cdot (2mn),\ \,c=k\cdot (m^{2}+n^{2})}
… excerpt ends here. Continue reading the full article.






