Besides Euclid's formula, many other formulas for generating
Pythagorean triple
A Pythagorean triple consists of three positive integers , , and , such that . Such a triple is commonly written , and a well-known example is . If is a Pythagorean triple, then so is for any positive integer . A primitive Pythagorean triple is ...
s have been developed.
Euclid's, Pythagoras', and Plato's formulas
Euclid's, Pythagoras' and Plato's formulas for calculating triples have been described here:
The methods below appear in various sources, often without attribution as to their origin.
Fibonacci's method
Leonardo of Pisa
Fibonacci (; also , ; – ), also known as Leonardo Bonacci, Leonardo of Pisa, or Leonardo Bigollo Pisano ('Leonardo the Traveller from Pisa'), was an Italian mathematician from the Republic of Pisa, considered to be "the most talented Western ...
() described this method for generating primitive triples using the sequence of consecutive odd integers
and the fact that the sum of the first
terms of this sequence is
. If
is the
-th member of this sequence then
.
Choose any odd square number
from this sequence (
) and let this square be the
-th term of the sequence. Also, let
be the sum of the previous
terms, and let
be the sum of all
terms. Then we have established that
and we have generated the primitive triple
'a, b, c'' This method produces an infinite number of primitive triples, but not all of them.
EXAMPLE:
Choose
. This odd square number is the fifth term of the sequence, because
. The sum of the previous 4 terms is
and the sum of all
terms is
giving us
and the primitive triple
'a, b, c''=
, 4, 5
Sequences of mixed numbers
Michael Stifel
Michael Stifel or Styfel (1487 – April 19, 1567) was a German monk, Protestant reformer and mathematician. He was an Augustinian who became an early supporter of Martin Luther. He was later appointed professor of mathematics at Jena Universit ...
published the following method in 1544. Consider the sequence of
mixed number
A fraction (from la, fractus, "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight ...
s
with
. To calculate a Pythagorean triple, take any term of this sequence and convert it to an improper fraction (for mixed number
, the corresponding improper fraction is
). Then its numerator and denominator are the sides, ''b'' and ''a'', of a right triangle, and the hypotenuse is ''b'' + 1. For example:
:
Jacques Ozanam
Jacques Ozanam (16 June 1640, in Sainte-Olive, Ain – 3 April 1718, in Paris) was a French mathematician.
Biography
Jacques Ozanam was born in Sainte-Olive, Ain, France.
In 1670, he published trigonometric and logarithmic tables more accura ...
republished Stifel's sequence in 1694 and added the similar sequence
with
. As before, to produce a triple from this sequence, take any term and convert it to an improper fraction. Then its numerator and denominator are the sides, ''b'' and ''a'', of a right triangle, and the hypotenuse is ''b'' + 2. For example:
:
With ''a'' the shorter and ''b'' the longer legs of a triangle and ''c'' its hypotenuse, the Pythagoras family of triplets is defined by ''c'' − ''b'' = 1, the Plato family by ''c'' − ''b'' = 2, and the Fermat family by , ''a'' − ''b'', = 1. The Stifel sequence produces all primitive triplets of the Pythagoras family, and the Ozanam sequence produces all primitive triples of the Plato family. The triplets of the Fermat family must be found by other means.
Dickson's method
Leonard Eugene Dickson
Leonard Eugene Dickson (January 22, 1874 – January 17, 1954) was an American mathematician. He was one of the first American researchers in abstract algebra, in particular the theory of finite fields and classical groups, and is also remem ...
(1920) attributes to himself the following method for generating Pythagorean triples. To find integer solutions to
, find positive integers ''r'', ''s'', and ''t'' such that
is a perfect square.
Then:
:
From this we see that
is any even integer and that ''s'' and ''t'' are factors of
. All Pythagorean triples may be found by this method. When ''s'' and ''t'' are coprime, the triple will be primitive. A simple proof of Dickson's method has been presented by Josef Rukavicka, J. (2013).
Example: Choose ''r'' = 6. Then
.
The three factor-pairs of 18 are: (1, 18), (2, 9), and (3, 6). All three factor pairs will produce triples using the above equations.
:''s'' = 1, ''t'' = 18 produces the triple
, 24, 25because ''x'' = 6 + 1 = 7, ''y'' = 6 + 18 = 24, ''z'' = 6 + 1 + 18 = 25.
:''s'' = 2, ''t'' = 9 produces the triple
, 15, 17because ''x'' = 6 + 2 = 8, ''y'' = 6 + 9 = 15, ''z'' = 6 + 2 + 9 = 17.
:''s'' = 3, ''t'' = 6 produces the triple
, 12, 15because ''x'' = 6 + 3 = 9, ''y'' = 6 + 6 = 12, ''z'' = 6 + 3 + 6 = 15. (Since ''s'' and ''t'' are not coprime, this triple is not primitive.)
Generalized Fibonacci sequence
Method I
For Fibonacci numbers starting with and and with each succeeding Fibonacci number being the sum of the preceding two, one can generate a sequence of Pythagorean triples starting from (''a''
3, ''b''
3, ''c''
3) = (4, 3, 5) via
:
for ''n'' ≥ 4.
Method II
A Pythagorean triple can be generated using any two positive integers by the following procedures using generalized
Fibonacci sequence
In mathematics, the Fibonacci numbers, commonly denoted , form a integer sequence, sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. The sequence commonly starts from 0 and 1, although some authors start ...
s.
For initial positive integers ''h''
''n'' and ''h''
''n''+1, if and , then
:
is a Pythagorean triple.
Method III
The following is a
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** ''The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
-based approach to generating primitive triples with generalized Fibonacci sequences.
Start with a 2 × 2 array and insert two coprime positive integers ''( q,q' )'' in the top row. Place the even integer (if any) in the column.
:
Now apply the following "Fibonacci rule" to get the entries in the bottom
row:
:
Such an array may be called a "Fibonacci Box". Note that '' q', q, p, p' '' is a generalized Fibonacci sequence. Taking column, row, and diagonal products we obtain the sides of triangle
, b, c
The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline (t ...
its area ''A'', and its perimeter ''P'', as well as the radii ''r''
''i'' of its
incircle
In geometry, the incircle or inscribed circle of a triangle is the largest circle that can be contained in the triangle; it touches (is tangent to) the three sides. The center of the incircle is a triangle center called the triangle's incenter.
...
and three
excircles
In geometry, the incircle or inscribed circle of a triangle is the largest circle that can be contained in the triangle; it touches (is tangent to) the three sides. The center of the incircle is a triangle center called the triangle's incenter. ...
as follows:
:
The half-angle tangents at the acute angles are ''q/p'' and ''q'/p.
EXAMPLE:
Using
coprime
In mathematics, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equivale ...
integers 9 and 2.
:
The column, row, and diagonal products are: (columns: 22 and 117), (rows: 18 and 143), (diagonals: 26 and 99), so
:
The half-angle tangents at the acute angles are 2/11 and 9/13. Note that if the chosen integers ''q'', ''q are not
coprime
In mathematics, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equivale ...
, the same procedure leads to a non-primitive triple.
Pythagorean triples and Descartes' circle equation
This method of generating ''primitive Pythagorean triples'' also provides integer solutions to
Descartes' Circle Equation,
:
where integer
curvature
In mathematics, curvature is any of several strongly related concepts in geometry. Intuitively, the curvature is the amount by which a curve deviates from being a straight line, or a surface deviates from being a plane.
For curves, the canonic ...
s ''k
i'' are obtained by multiplying the reciprocal of each radius by the area ''A''. The result is ''k''
1 = pp', ''k''
2 = qp', ''k''
3 = q'p, ''k''
4 = qq'. Here, the largest circle is taken as having negative curvature with respect to the other three. The largest circle (curvature ''k''
4) may also be replaced by a smaller circle with positive curvature ( ''k''
0 = 4''pp' − qq' '').
EXAMPLE:
Using the area and four radii obtained above for primitive triple
4, 117, 125we obtain the following integer solutions to Descartes' Equation: ''k''
1 = 143, ''k''
2 = 99, ''k''
3 = 26, ''k''
4 = (−18), and ''k''
0 = 554.
A Ternary Tree: Generating All Primitive Pythagorean Triples
Each primitive Pythagorean triple corresponds uniquely to a Fibonacci Box. Conversely, each Fibonacci Box corresponds to a unique and primitive Pythagorean triple. In this section we shall use the Fibonacci Box in place of the primitive triple it represents. An infinite
ternary tree
:
In computer science, a ternary tree is a tree data structure in which each node has at most three child nodes, usually distinguished as "left", “mid” and "right". Nodes with children are parent nodes, and child nodes may contain references ...
containing all primitive Pythagorean triples/Fibonacci Boxes can be constructed by the following procedure.
Consider a Fibonacci Box containing two, odd, coprime integers ''x'' and ''y'' in the right-hand column.
:
It may be seen that these integers can also be placed as follows:
:
resulting in three more valid Fibonacci boxes containing ''x'' and ''y''. We may think of the first Box as the "parent" of the next three. For example, if ''x'' = 1 and ''y'' = 3 we have:
:
:
Moreover, each "child" is itself the parent of three more children which can be obtained by the same procedure. Continuing this process at each node leads to an infinite ternary tree containing all possible Fibonacci Boxes, or equivalently, to a ternary tree containing all possible primitive triples. (The tree shown here is distinct from the classic tree described by Berggren in 1934, and has many different number-theoretic properties.) Compare: "Classic Tree".
See also
Tree of primitive Pythagorean triples 500px, Berggrens's tree of primitive Pythagorean triples.
In mathematics, a tree of primitive Pythagorean triples is a data tree in which each node branches to three subsequent nodes with the infinite set of all nodes giving all (and only) primit ...
.
Generating triples using quadratic equations
There are several methods for defining
quadratic equations
In algebra, a quadratic equation () is any equation that can be rearranged in standard form as
ax^2 + bx + c = 0\,,
where represents an unknown value, and , , and represent known numbers, where . (If and then the equation is linear, not quadr ...
for calculating each leg of a Pythagorean triple. A simple method is to modify the standard Euclid equation by adding a variable ''x'' to each ''m'' and ''n'' pair. The ''m, n'' pair is treated as a constant while the value of ''x'' is varied to produce a "family" of triples based on the selected triple. An arbitrary coefficient can be placed in front of the "''x''" value on either ''m'' or ''n'', which causes the resulting equation to systematically "skip" through the triples. For example, consider the triple
0, 21, 29which can be calculated from the Euclid equations with a value of ''m'' = 5 and ''n'' = 2. Also, arbitrarily put the coefficient of 4 in front of the "''x''" in the "''m''" term.
Let
and let
Hence, substituting the values of ''m'' and ''n'':
:
Note that the original triple comprises the constant term in each of the respective quadratic equations. Below is a sample output from these equations. Note that the effect of these equations is to cause the "''m''" value in the Euclid equations to increment in steps of 4, while the "''n''" value increments by 1.
Generating all primitive Pythagorean triples using half-angle tangents
A primitive Pythagorean triple can be reconstructed from a half-angle tangent. Choose to be a positive rational number in to be for the interior angle that is opposite the side of length . Using
tangent half-angle formula
In trigonometry, tangent half-angle formulas relate the tangent of half of an angle to trigonometric functions of the entire angle. The tangent of half an angle is the stereographic projection of the circle onto a line. Among these formulas are th ...
s, it follows immediately that and are both rational and that . Multiplying up by the smallest integer that clears the denominators of and recovers the original primitive Pythagorean triple. Note that if is desired then should be chosen to be less than .
The interior angle that is opposite the side of length will be the
complementary angle
In Euclidean geometry, an angle is the figure formed by two rays, called the '' sides'' of the angle, sharing a common endpoint, called the ''vertex'' of the angle.
Angles formed by two rays lie in the plane that contains the rays. Angles ar ...
of . We can calculate from the formula for the tangent of the difference of angles. Use of instead of in the above formulas will give the same primitive Pythagorean triple but with and swapped.
Note that and can be reconstructed from , , and using and .
Pythagorean triples by use of matrices and linear transformations
Let be a primitive triple with odd. Then 3 new triples , , may be produced from using
matrix multiplication
In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the s ...
and Berggren's
three matrices ''A'', ''B'', ''C''. Triple is termed the ''parent'' of the three new triples (the ''children''). Each child is itself the parent of 3 more children, and so on. If one begins with primitive triple
, 4, 5 all primitive triples will eventually be produced by application of these matrices. The result can be graphically represented as an infinite
ternary tree
:
In computer science, a ternary tree is a tree data structure in which each node has at most three child nodes, usually distinguished as "left", “mid” and "right". Nodes with children are parent nodes, and child nodes may contain references ...
with at the root node. An equivalent result may be obtained using Berggrens's three
linear transformations
In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
shown below.
: