Pythagorean Triples: A Mathematical Exploration, Exams of Geometry

A Pythagorean triple is a triple of positive integers (a, b, c) where a2 +b2 = c2. Examples include (3,4,5), (5,12,13), and (8,15,17). Below is an ancient ...

Typology: Exams

2022/2023

Uploaded on 03/01/2023

salujaa
salujaa 🇺🇸

4.3

(11)

242 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PYTHAGOREAN TRIPLES
KEITH CONRAD
1. Introduction
APythagorean triple is a triple of positive integers (a, b, c) where a2+b2=c2. Examples
include (3,4,5), (5,12,13), and (8,15,17). Below is an ancient Babylonian tablet listing
15 Pythagorean triples. It is called Plimpton 322 (George Arthur Plimpton donated it to
Columbia University). More information about it can be found at [1].
Plimpton 322
Some Pythagorean triples are scalar multiples of other triples: (6,8,10) is twice (3,4,5).
We call a triple (a,b, c)primitive when the three integers have no common factor. For any
triple (a, b, c), if dis the greatest common divisor of all three terms then (a/d, b/d, c/d) is a
primitive triple and the original triple is a scalar multiple of this, so finding all Pythagorean
triples is basically the same as finding all primitive Pythagorean triples. Our goal is to
describe the primitive Pythagorean triples.
We will be using different characterizations of primitive triples, as described in the fol-
lowing lemma.
Lemma 1.1. For a Pythagorean triple (a, b, c), the following properties are equivalent:
1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Pythagorean Triples: A Mathematical Exploration and more Exams Geometry in PDF only on Docsity!

PYTHAGOREAN TRIPLES

KEITH CONRAD

  1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a^2 + b^2 = c^2. Examples include (3, 4 , 5), (5, 12 , 13), and (8, 15 , 17). Below is an ancient Babylonian tablet listing 15 Pythagorean triples. It is called Plimpton 322 (George Arthur Plimpton donated it to Columbia University). More information about it can be found at [1].

Plimpton 322

Some Pythagorean triples are scalar multiples of other triples: (6, 8 , 10) is twice (3, 4 , 5). We call a triple (a, b, c) primitive when the three integers have no common factor. For any triple (a, b, c), if d is the greatest common divisor of all three terms then (a/d, b/d, c/d) is a primitive triple and the original triple is a scalar multiple of this, so finding all Pythagorean triples is basically the same as finding all primitive Pythagorean triples. Our goal is to describe the primitive Pythagorean triples. We will be using different characterizations of primitive triples, as described in the fol- lowing lemma.

Lemma 1.1. For a Pythagorean triple (a, b, c), the following properties are equivalent: 1

2 KEITH CONRAD

(1) a, b, and c have no common factor, i.e., the triple is primitive, (2) a, b, and c are pairwise relatively prime, (3) two of a, b, and c are relatively prime.

Proof. To show (1) implies (2), we prove the contrapositive. If (2) fails then two of a, b, and c have a common prime factor. Suppose a prime p divides a and b. Then c^2 = a^2 + b^2 is divisible by p, and since p | c^2 also p | c, so p is a common factor of a, b, and c. A similar argument works using a common prime factor of a and c or of b and c. Thus (1) fails. It is easy to see that (2) implies (3) and (3) implies (1). 

Theorem 1.2. If (a, b, c) is a primitive Pythagorean triple then one of a or b is even and the other is odd. Taking b to be even,

a = k^2 − ^2 , b = 2k, c = k^2 + `^2

for integers k and with k > > 0 , (k, ) = 1, and k 6 ≡ mod 2. Conversely, for such integers k and ` the above formulas yield a primitive Pythagorean triple.

k ` a b c 2 1 3 4 5 3 2 5 12 13 4 1 15 8 17 4 3 7 24 25 Table 1. Examples of Primitive Triples

Table 1 lists examples of the values of k and for some primitive triples. Notice in particular that the triple (8, 15 , 17) is recorded in the table as (15, 8 , 17) because of the convention in Theorem 1.2 that the middle term of the triple is even. Since k 6 ≡ mod 2, one of k and is even and the other is odd. The first two rows in Table 1 shows that either k or can be even; it depends on the particular triple (a, b, c). How it depends on the triple will be seen at the end of Section 3. Let’s first check that the formula in Theorem 1.2 always yields primitive Pythagorean triples. For all k and ` in Z, the formula

(k^2 − ^2 )^2 + (2k)^2 = (k^2 + `^2 )^2

is true, so (k^2 − ^2 , 2 k, k^2 + ^2 ) is a Pythagorean triple when k > > 0.^1 When (k, ) = 1 and k 6 ≡ mod 2, let’s check (k^2 − ^2 , 2 k, k^2 + ^2 ) is a primitive triple. This follows (by Lemma 1.1) from showing k^2 −^2 and k^2 + ^2 are relatively prime. If d is a (positive) common divisor of k^2 −^2 and k^2 + ^2 then d divides their sum and difference, which are 2 k^2 and 2^2. Since k^2 + ^2 and k^2 −^2 are odd, d is odd, so d | k^2 and d | ^2. Since k and are relatively prime, so are k^2 and ^2 , so d = 1. If we relax any of the conditions on k and in Theorem 1.2 we won’t get a primitive Pythagorean triple. For instance, taking k = 3 and = 1 produces the triple (8, 6 , 10). The condition k 6 ≡ mod 2 is violated here. In the next two sections we will show in two ways, one algebraic and the other geometric, that every primitive Pythagorean triple (a, b, c) arises in the form given by Theorem 1.2:

(^1) Euclid, in Lemma 1 to Prop. 29 in Book 10 of his Elements, described Pythagorean triples, primitive or not, by a geometric formula essentially amounting to the formula (a, b, c) = (k^2 − ^2 , 2 k, k^2 + `^2 ).

4 KEITH CONRAD

(a/c, b/c)

x

y

Substituting the equation for the line into the equation for the unit circle gives us an equation whose roots are the x-coordinates of the two points on both the line and the circle:

1 = x^2 + y^2 = x^2 + (m(x + 1))^2 = (1 + m^2 )x^2 + 2m^2 x + m^2 ,

so

(3.1) 0 = (1 + m^2 )x^2 + 2m^2 x + m^2 − 1.

Since (− 1 , 0) and (a/c, b/c) lie on both the line and the circle, the two roots of (3.1) are − 1 and a/c. The sum of the roots is − 2 m^2 /(1 + m^2 ), so

−1 +

a c

2 m^2 1 + m^2

Thus a c

2 m^2 1 + m^2

1 − m^2 1 + m^2

Since (a/c, b/c) is on the line y = m(x + 1),

b c

= m

( (^) a

c

= m

1 − m^2 1 + m^2

2 m 1 + m^2

Since m is the slope of a line connecting (− 1 , 0) to a point on the unit circle in the first quadrant, 0 < m < 1. Write m = b/(a + c) in reduced form as m = /k with positive relatively prime integers k and. (Why don’t we write m = k/? Because the choice we made will match the formulas as written in Theorem 1.2.) Since m < 1, k >. Formulas for the reduced fractions a/c and b/c in terms of m are

(3.2)

a c

1 − (/k)^2 1 + (/k)^2

k^2 − ^2 k^2 +^2

and

(3.3)

b c

2(/k)^2 1 + (/k)^2

2 kk^2 +^2

By definition, k and are relatively prime. Let’s check that k 6 ≡ mod 2. If k ≡ mod 2 then k and are both even or both odd, and they are not both even since they are relatively

PYTHAGOREAN TRIPLES 5

prime. So k and are odd. Then the fraction 2k/(k^2 + `^2 ) in (3.3) has an even numerator and denominator, so it simplifies further:

2 kk^2 +^2

k(k^2 +^2 )/ 2

The numerator on the right is odd, so the numerator of the reduced form of this fraction (divide numerator and denominator by their greatest common factor) is odd. The reduced form is b/c by (3.3), so b is odd. But b is even by hypothesis, so we have a contradiction. Thus k and are not both odd, so k 6 ≡ mod 2. From the end of Section 1, the three numbers k^2 −^2 , 2k, and k^2 +`^2 form a Pythagorean triple and the first and third numbers are relatively prime, so the triple is primitive by Lemma 1.1. Therefore the fractions on the right in (3.2) and (3.3) are in reduced form. The fractions a/c and b/c are also in reduced form since the triple (a, b, c) is primitive, so the (positive) numerators and denominators match:

a = k^2 − ^2 , b = 2k, c = k^2 + `^2.

This concludes the geometric proof of Theorem 1.2.

Remark 3.1. While this derivation was motivated by geometry, the calculations were pure algebra and we could formulate them without any reference to a picture. That is, if we have numbers x and y where x^2 + y^2 = 1 and x 6 = −1, we can (without motivation) define the number m by declaring it to fit the condition y = m(x + 1), namely define m = y/(x + 1). Substituting m(x + 1) fo y in x^2 + y^2 = 1 tells us

x^2 + m^2 (x + 1)^2 = 1,

and expanding the square gives

0 = (1 + m^2 )x^2 + 2m^2 x + (m^2 − 1) = (1 + m^2 )(x + 1)

x +

m^2 − 1 1 + m^2

so from x 6 = −1 we have x = (1 − m^2 )/(1 + m^2 ) and y = m(x + 1) = 2m/(1 + m^2 ).

One nice consequence of our geometric derivation of the formula for primitive Pythagorean triples (a, b, c) is that it tells us which of k or ` will be even. The formula

m =

b a + c

`

k

says that /k is the reduced form fraction for b/(a + c). We know either or k is even. We will have k even when a + c is divisible by a higher power of 2 than b is, and is even when b is divisible by a higher power of 2 than a + c is. For instance, in the triple (3, 4 , 5), a + c = 8 and b = 4, so k is even. (Here k = 2 and = 1.) The triple (5, 12 , 13) has a + c = 18 = 2 · 9 and b = 12 = 2^2 · 3, so is even. (Here k = 3 and = 2.)

  1. Applications

Using the parametric formula for primitive Pythagorean triples, we can address questions concerning relations among the sides of a primitive right triangle. The most well-known Pythagorean triples, (3, 4 , 5), and (5, 12 , 13), have consecutive terms. We ask: what are all the Pythagorean triples (a, b, c) with a pair of consecutive terms (either a and b or b and c)? Any such triple is automatically primitive since consec- utive integers are relatively prime.

PYTHAGOREAN TRIPLES 7

we have

x^2 + 5x + 6 = (x + 2)(x + 3) and x^2 + 5x − 6 = (x − 1)(x + 6).

Are there more examples like this second one, where integral polynomials x^2 + mx + n and x^2 + mx − n both factor? Here m and n are nonzero. If we ask what happens when the sign of m changes, the answer is not interesting. Indeed, if x^2 + mx + n = (x − r 1 )(x − r 2 ) then x^2 − mx + n = (x + r 1 )(x + r 2 ), so either both of these factor (with integral coefficients) or both don’t. Therefore in our question on x^2 + mx ± n, we may assume m > 0. Since the issue is about sign changes on n, we may take n > 0 also.

By the quadratic formula, the roots of x^2 + mx ± n are

−m ±

m^2 ± 4 n 2

, which are

integers exactly when m^2 ± 4 n = . (Note m^2 ± 4 n ≡ m mod 2, so the numerator is even when the discriminant is a perfect square.) So we can factor x^2 + mx + n and x^2 + mx − n if and only if

m^2 − 4 n = d^2 , m^2 + 4n = e^2 , d and e ∈ Z.

Then d^2 + e^2 = 2m^2 , so d ≡ e mod 2. Solving,

m^2 =

d^2 + e^2 2

e + d 2

e − d 2

Thus we have a Pythagorean triple (without a specified even term) ( e − d 2

e + d 2

, m

e − d 2

e + d 2

< m.

As an exercise, show this Pythagorean triple is primitive if and only if (m, n) = 1. There is a one-to-one correspondence

Pythagorean triples (a, b, c) with a < b < c ←→ reducible x^2 + mx ± n,

given by

(a, b, c) 7 → x^2 + cx ±

ab 2

, x^2 + mx ± n 7 →

e − d 2

e + d 2

, m

with m^2 − 4 n = d^2 and m^2 + 4n = e^2. The table below shows some corresponding Pythagorean triples and reducible x^2 + mx ± n. In particular, the example x^2 + 5x ± 6 corresponds to the (3, 4 , 5) triple and thus is the simplest example.

a b c m n x^2 + mx + n x^2 + mx − n 3 4 5 5 6 (x + 2)(x + 3) (x − 1)(x + 6) 5 12 13 13 30 (x + 3)(x + 10) (x − 2)(x + 15) 8 15 17 17 60 (x + 5)(x + 12) (x − 3)(x + 20) 20 21 29 29 210 (x + 14)(x + 15) (x − 6)(x + 35) Using the formula for primitive Pythagorean triples, we can now write a formula for all the reducible pairs of polynomials x^2 + mx ± n where (m, n) = 1:

x^2 + (k^2 + ^2 )x ± k(k^2 − `^2 ),

where k > > 0, (k,) = 1, and k 6 ≡ mod 2. As an exercise, work out the factorization of this polynomial explicitly in terms of k and.

8 KEITH CONRAD

  1. Generalizations

Our two derivations of the parametric formula for primitive Pythagorean triples, one algebraic and the other geometric, are each worthwhile: they let us extend Theorem 1.2 in different directions.^2 The algebraic proof of Theorem 1.2 carries over to Pythagorean triples of polynomials in R[T ]. These are polynomials f (T ), g(T ), and h(T ) in R[T ] that satisfy

f (T )^2 + g(T )^2 = h(T )^2.

One example of such a triple is (T 2 − 1 , 2 T, T 2 + 1). Can we describe all polynomial Pythagorean triples? There are two features of the Pythagorean triples of integers that play no role when we look at Pythagorean triples of polynomials:

(1) The special attention to positive solutions of a^2 + b^2 = c^2 is ignored. We allow any polynomial solutions to f 2 + g^2 = h^2 with the only restriction being that f, g, and h are all nonzero. (2) The number 2 is an invertible constant in R[T ], so the even/odd aspect that occurs for integral Pythagorean triples simply drops out of consideration. Being divisible by 2 is not important in R[T ] since everything is divisible by 2: f (T ) = 2(f (T )/2) in R[T ]. We will call a Pythagorean triple of polynomials (f, g, h) primitive if the terms in it are pairwise relatively prime. This is the same as any two of the polynomials being relatively prime, and is also the same as (f, g, h) not being a non-constant multiple of another triple (polynomial analogue of Lemma 1.1).

Theorem 5.1. The primitive Pythagorean triples (f (T ), g(T ), h(T )) in R[T ] are given by the formulas

f (T ) = c(k(T )^2 − (T )^2 ), g(T ) = ± 2 ck(T )(T ), h = ±c(k(T )^2 + `(T )^2 )

where c ∈ R×^ and k(T ) and `(T ) are relatively prime in R[T ].

Proof. This is left as an exercise in adapting the techniques in the algebraic proof of Theorem 1.2. Note that if two polynomials are relatively prime and multiply to a squared polynomial, the two polynomials have to be squares up to constant multiple. This follows from unique factorization in R[T ]. 

The geometric proof of Theorem 1.2 gives us a non-trigonometric parametrization of the points on the unit circle: for each point (x 0 , y 0 ) on the circle x^2 + y^2 = 1 other than (− 1 , 0), has the form

(5.1) x 0 =

1 − m^2 1 + m^2

, y 0 =

2 m 1 + m^2

where m = y 0 /(x 0 + 1). The formulas in (5.1) for x 0 and y 0 arise by looking at the intersection points of the circle x^2 + y^2 = 1 and the line y = m(x + 1), where the linear

(^2) Other ways of getting the parametric formula use more advanced ideas: a proof based on factoring in the Gaussian integers is in Theorem 8.3 in https://kconrad.math.uconn.edu/blurbs/ugradnumthy/Zinotes. pdf and a proof based on Hilbert’s Theorem 90 from Galois theory is at the end of Section 4 of https:// kconrad.math.uconn.edu/blurbs/galoistheory/linearchar.pdf.

10 KEITH CONRAD

With these formulas, integrals of rational functions of cos θ and sin θ can be turned into inte- grals of rational functions of u. This method of integration is called a tan(θ/2)-substitution or a Weierstrass substitution.^3 It is based on having two different parametrizations of the unit circle, which allow us to express an integral involving one of the parameterizations (with trig functions) as an integral involving the other parametrization (with rational functions). What we just did with rational points on the unit circle is not true just for that curve. If we take any conic in the plane (a curve of degree 2: an ellipse, hyperbola, or parabola) that is defined by an equation having rational coefficients and we know one rational point on the conic, then slopes of lines through that point let us parametrize all the other rational points on the conic. Here is an example of this idea using another circle.

Theorem 5.2. The rational points on the circle x^2 + y^2 = 2 other than (− 1 , 1) can be described by the formula (^) ( 1 + 2m − m^2 m^2 + 1

m^2 + 2m − 1 m^2 + 1

where m ∈ Q. A rational point (x, y) other than (− 1 , ±1) arises this way using m = (y + 1)/(x + 1), and (− 1 , −1) arises this way using m = − 1.

Proof. The point (− 1 , −1) lies on the circle. A non-vertical line through (− 1 , −1) has the form y = m(x + 1) − 1. Any line through (− 1 , −1) intersects the circle in a second point, except for the tangent line y = −x − 2 (where m = −1).

x

y

To find the second point of intersection, substitute the equation of the line into the equation x^2 + y^2 = 2 and solve for the two roots of the resulting quadratic in x: one root is 1, and we can find the other root by the same method as in the geometric proof of Theorem 1.2. This will give the x-coordinate formula above, and substituting this into y = m(x + 1) − 1 gives the y-coordinate. The only rational point on x^2 + y^2 = 2 that we don’t find by this method is (− 1 , 1), which is the second intersection point of the circle with the vertical line through (− 1 , −1). This vertical line is not described by an equation of the form y = m(x + 1) − 1. The parameter value that gives the point (− 1 , −1) itself is m = −1, which is the slope of the tangent line to x^2 + y^2 = 2 at (− 1 , −1) (touching the point (− 1 , −1) twice, in a sense). 

Remark 5.3. Since x^2 + y^2 = 2 if and only if ((x − y)/2)^2 + ((x + y)/2)^2 = 1, the geometric proof of Theorem 1.2 yields (x − y)/2 = (1 − m^2 )/(1 + m^2 ) and (x + y)/2 = 2m/(1 + m^2 ). Adding and subtracting these equations recovers the formulas for x and y in Theorem 5.2.

(^3) See https://en.wikipedia.org/wiki/Weierstrass substitution.

PYTHAGOREAN TRIPLES 11

Armed with the description of the rational points on x^2 + y^2 = 2 in Theorem 5.2, we can get a description of the primitive integral solutions of a^2 + b^2 = 2c^2 , where primitive means a, b, and c have no common factor (equivalently, this means any two of a, b, and c are relatively prime, i.e., an analogue of Lemma 1.1 holds). In a primitive triple (a, b, c), a and b both must be odd, so 2c^2 ≡ 2 mod 8, hence c is odd as well. For Pythagorean triples, the middle term was chosen to be the even one. The analogue of that here is that we take c > 0 and pick the signs on a and b so that a 6 ≡ b mod 4. With these conventions, we have

a = k^2 + 2k^2 , b = ^2 + 2k − k^2 , c = k^2 + `^2

where (k, ) = 1, k 6 ≡ mod 2, and k > 0. Conversely, any triple defined by these formulas is a primitive solution to a^2 + b^2 = 2c^2 with b 6 ≡ a mod 4.

k ` a b c 1 2 1 7 5 1 − 2 − 7 − 1 5 1 4 − 7 23 17 4 1 23 − 7 29 2 5 − 1 41 29 Table 5. Primitive Solutions to a^2 + b^2 = 2c^2

Integers satisfying a^2 + b^2 = 2c^2 are not the sides of a right triangle, but they have an arithmetic interpretation: since c^2 = 12 (a^2 + b^2 ), c^2 is the average of a^2 and b^2. In other words, a^2 , c^2 , b^2 is an arithmetic progression of squares (taking a^2 < b^2 ). From Table 5, squaring the entries in the a, b, and c columns yield three such progressions: 1, 25 , 49 (common difference 24), 49, 289 , 529 (common difference 240), and 1, 841 , 1681 (common difference 840). There are infinitely many 3-term arithmetic progressions of squares in Z+, and we can find all of them from the parametrization of the rational points on x^2 + y^2 = 2 in Theorem 5.2. What about 4-term arithmetic progressions of squares? That is a more complicated story. See https://kconrad.math.uconn.edu/blurbs/ugradnumthy/4squarearithprog.pdf.

References [1] W. Casselman, http://www.math.ubc.ca/∼cass/courses/m446-03/pl322/pl322.html. [2] J. L. Poet and D. L. Vestal, Jr., “Curious Consequences of a Miscopied Quadratic,” College Math. J. 36 (2005), 273–277.