***It’s recommended that you read this article on a computer or tablet. I apologize that the formatting isn’t great on a smartphone!***

Almost everyone learns the Pythagorean theorem in school. Today, we will discuss something you may or may not have learned about: Pythagorean triples! Just in case you haven’t, a Pythagorean triple is the length of the two legs and the hypotenuse of a special right triangle whose side lengths are whole numbers. For example, there is a right triangle with side lengths 3, 4, and 5, so we call the triplet of whole numbers (3,4,5)(3,\,4,\,5) a Pythagorean triple. If you’re skeptical, we can check that there is a right triangle with side lengths 3, 4, and 5 using the Pythagorean theorem (really, it’s converse, which was also proved in Euclid’s Elements) by observing that 32+42=9+16=25=52.3^2+4^2 = 9+16 = 25 = 5^2. We could equivalently say that a Pythagorean triple is a triplet of whole numbers that satisfy the a2+b2=c2.a^2 + b^2 = c^2.

If your experience was anything like mine, you were simply told to memorize a handful of them, then moved on to the next topic. This might leave you wondering how people can find the triples. Is it trial and error? But that can’t be, since back 3,700 years ago people figured out that (3367,3456,4825)(3367, 3456, 4825) is a Pythagorean triple! There is no way someone found this simply by guessing! There must be some step-by-step or algorithmic method, or maybe a formula, to find at least some triples. As it turns out, there is a formula to compute all Pythagorean triples! Our goal for today is to deduce the formula that determines all Pythagorean triples, and then prove that it works. Very ambitious! So, let’s get started.

Definition (Pythagorean Triple): A triplet of natural numbers,1 (a,b,c)(a,b,c), that satisfy the equation, a2+b2=c2,a^2 + b^2 = c^2, is known as a Pythagorean triple.

Pythagorean Triple (a,b,c)(a,b,c) iff a2+b2=c2,wherea,b,c∈ℕ.a^2 + b^2 = c^2,\;\;\mathrm{where}\;\;a,b,c\in \N.

Examples of Pythagorean triples and Setting the Stage

Before we start trying to find all Pythagorean triples let’s first see a few examples:

  1. (5,12,13)\;\;(5,\,12,\,13) is a Pythagorean triple since 52+122=25+144=169=132.5^2+12^2 = 25+144 = 169 = 13^2.
  2. (8,15,17)\;\;(8,\,15,\,17) is a Pythagorean triple since 82+152=64+225=289=172.8^2+15^2 = 64+225 = 289 =17^2.

But wait… take a look at the first, fourth, and fifth examples. Multiplying the triplet in (i) by 2, we get the triplet in (iv):

(2⋅𝟑)2+(2⋅𝟒)2=(2⋅𝟓)2isthesameas62+82=102.(2\cdot{\color{red}{\mathbf3}})^2+(2\cdot{\color{red}\mathbf{4}})^2 = (2\cdot{\color{red}\mathbf{5}})^2 \qquad \mathrm{is}\;\mathrm{the}\;\mathrm{same}\;\mathrm{as}\qquad 6^2+8^2 =10^2.

Similarly, multiplying the triplet in (i) by 3 yields the triplet in (v), and this might make sense. If (a,b,c)(a,b,c) is a Pythagorean triple, then so is (na,nb,nc)(na,\,nb,\,nc) because we can factor out an n2n^2 from each term in the Pythagorean theorem (because each term in the Pythagorean theorem is being squared).2

(na)2+(nb)2=(nc)2,⟹n2a2+n2b2=n2c2,⟹n2(a2+b2)=n2c2,⟹(a2+b2)=c2.\;\;\;\;\;\;\;\;\;(na)^2 +(n b)^2 = (nc)^2,\\\implies \;\;n^2a^2 +n^2 b^2 \;\,= n^2c^2, \\ \implies \,{n^2}(a^2+b^2)\;\;\;\,= n^2c^2, \\ \implies\;\;\;\; (a^2+b^2)\;\;\;\;=c^2.

This motivates us to focus more on Pythagorean triples where none of the integers share a common factor, such as (3,4,5)(3,\,4,\,5) or (5,12,13).(5,\,12,\,13). We even have a special name for such Pythagorean triples:

Definition (Primitive Triples): Let (a,b,c)(a,b,c) be a triple of integers. If gcd⁡(a,b,c)=1,\gcd{(a,b,c)}=1, then we call (a,b,c)(a,b,c) a primitive triple.

Remark: Note that gcd⁡(a,b,c)=1\gcd{(a,b,c)}=1 means that there is no number d∈ℕd\in \N such that d|a,d|b,andd|cd\mid a,\;d\mid b,\;\mathrm{and}\;d\mid c other than 1. This is, in general, different than being pairwise relatively prime or pairwise primitive.3 Pairwise primitive means that gcd⁡(a,b)=1,\gcd{(a,b)}=1, gcd⁡(a,c)=1,\gcd{(a,c)}=1, and gcd⁡(b,c)=1.\gcd{(b,c)}=1. In general, a triple being pairwise primitive is a stronger statement about common factors between the three integers than being primitive is. To highlight the distinction, consider the triple of integers (6,10,15).(6,10,15). Taking stock of each greatest common divisors, we have

{gcd⁡(6,10,15)=1}⟹(6,10,15)isprimitive, {gcd⁡(6,10)=2,gcd⁡(6,15)=3,gcd⁡(10,15)=5.}⟹(6,10,15)isNOTpairwiseprimitive\;\big\{\gcd{(6,10,15)}=1\big\} \implies (6,10,15)\;\mathrm{is}\;\mathrm{primitive},\\\ \\ \;\,\begin{Bmatrix}\gcd{(6,10)}=2, \\\gcd{(6,15)}=3, \\ \gcd{(10,15)}=5.\end{Bmatrix}\;\implies (6,10,15)\;\mathrm{is}\;\mathrm{NOT}\;\mathrm{pairwise}\;\mathrm{primitive}

We can see from this example that (6,10,15)(6,10,15) is a primitive triple; however, (6,10,15)(6,10,15) is not pairwise primitive. So, primitive-ness does not imply pair-wise primitive-ness. However, we might see that if (a,b,c)(a,b,c) is pairwise primitive, then (a,b,c)(a,b,c) is primitive. In shorthand:

Pairwise Primitive⟹\impliesPrimitive.

As it turns out, for Pythagorean triples, we have both implications. That is, (a,b,c)(a,b,c) is pairwise primitive if and only if (a,b,c)(a,b,c) is primitive! How nice!

Proposition 1: Let (a,b,c)(a,b,c) be a Pythagorean triple. Then, (a,b,c)(a,b,c) is a primitive triple if and only if (a,b,c)(a,b,c) is pairwise primitive.

Click for the Proof:

Let (a,b,c)(a,b,c) be a Pythagorean triple.

Forward: Primitive implies pairwise primitive.

Let (a,b,c)(a,b,c) be a primitive triple. Since we are trying to prove a statement about the greatest common divisor between pairs of numbers in our triple, let

gcd⁡(a,b)=d1gcd⁡(a,c)=d2gcd⁡(b,c)=d3.\begin{align} \gcd{({a},{b})} = d_1\\ \gcd({a},{c}) = d_2\\ \gcd({b},{c}) = d_3. \end{align}

For d1,d2,d3∈ℕ.d_1,d_2,d_3\in \N. We will proceed by contradiction.

Assume for the hope of a contradiction that d1>1d_1>1. By the fundamental theorem of arithmetic, there is some prime pp that divides d1.d_1. Hence p|ap\mid a and p|b.p\mid b. It follows p|a2p\mid a^2 and p|b2p\mid b^2 and thus we conclude that p|(a2+b2).p\mid (a^2+b^2) . However, a2+b2=c2,a^2 + b^2 = c^2, so we have just concluded that p|c2.p\mid c^2. This can only happen if p|c.p\mid c. (To rigorously prove that: p|c2⟹p|c,p\mid c^2 \implies p\mid c, see Euclid’s lemma on page 90 in Chapter 7 of Newbie at Number Theory). Moral of the story is that pp divides every number in our triple: p|a,p|b,andp|c.p\mid a, \;p\mid b,\mathrm{and}\;p\mid c. However, this means gcd⁡(a,b,c)≥p\gcd{(a,b,c)}\geq p which contradicts our assumption that (a,b,c)(a,b,c) is primitive. Thus, there cannot be any prime numbers that divide d1.d_1. This can only happen when d1=1.d_1=1.

A similar argument can be used to deduce d2=d3=1.d_2=d_3=1.

Backward: Pairwise primitive implies primitive.

Let (a,b,c)(a,b,c) be pairwise primitive, that is, gcd⁡(a,b)=1,\gcd{(a,b)}=1, gcd⁡(a,c)=1,\gcd{(a,c)}=1, and gcd⁡(b,c)=1.\gcd{(b,c)}=1. It follows that gcd⁡(a,b,c)=1.\gcd{(a,b,c)}=1. (Why?) Once you figure out why, we have concluded the proof.

Okay, let’s modify our goal for today to: Deduce a formula that determines all primitive Pythagorean triples.

Now that we have some information about a,a, b,b, and cc (they share no factors) let’s move on and see what we can deduce about a,b,andca,\;b,\;\mathrm{and}\;c from this information.

Parity Problems

Now that we are after the triple a,a, b,b, and cc that share no factors, the next question we might ask is whether or not a,a, b,b, or cc can be even. Let’s experiment a little with the equation a2+b2=c2a^2 + b^2 = c^2 to see if we can say anything about the parity (even/odd-ness) of a,b,a,b, and c.c.

We have 23=82^3 = 8 possible ways to have a2+b2=c2a^2 + b^2 = c^2 when we are only focusing on the even/odd-ness of a,a, b,b, and c.c. However, we can rule out some of them because they are not possible. I challenge you to fill in the right-most column of the table with a YES/MAYBE or a NO in the rightmost column.

aabbccIs it possible to satisfy
a2+b2=c2a^2 + b^2 = c^2?
eveneveneven?
evenevenodd?
evenoddeven?
evenoddodd?
oddeveneven?
oddevenodd?
oddoddeven?
oddoddodd?

Seriously, give it a try and fill out as much as you can!

Filled in Table:

Here’s what I got:

aabbccIs it possible to satisfy
a2+b2=c2a^2 + b^2 = c^2?
evenevenevenYes, but not primitive.
evenevenoddNO!
evenoddevenNO!
𝐞𝐯𝐞𝐧\Large\color{Green}\mathbf{even}𝐨𝐝𝐝\Large\color{Green}\mathbf{odd}𝐨𝐝𝐝\Large\color{Green}\mathbf{odd}𝐌𝐚𝐲𝐛𝐞\Large\color{Green}\mathbf{Maybe}
oddevenevenNO!
𝐨𝐝𝐝\Large\color{Green}\mathbf{odd}𝐞𝐯𝐞𝐧\Large\color{Green}\mathbf{even}𝐨𝐝𝐝\Large\color{Green}\mathbf{odd}𝐌𝐚𝐲𝐛𝐞\Large\color{Green}\mathbf{Maybe}
𝐨𝐝𝐝\Large\color{Green}\mathbf{odd}𝐨𝐝𝐝\Large\color{Green}\mathbf{odd}𝐞𝐯𝐞𝐧\Large\color{Green}\mathbf{even}𝐌𝐚𝐲𝐛𝐞\Large\color{Green}\mathbf{Maybe}
oddoddoddNO!

The way we filled this out was by noting that (even)2=even(\mathrm{even})^2 =\mathrm{even} and (odd)2=odd(\mathrm{odd})^2 =\mathrm{odd} together with the facts that

even+even=eveneven+odd=oddodd+even=oddodd+odd=even.\mathrm{even}+ \mathrm{even}=\mathrm{even}\\ \mathrm{even}+ \mathrm{odd} \;=\mathrm{odd}\\\mathrm{odd}\;+ \mathrm{even}=\mathrm{odd}\\\mathrm{odd}\;+ \mathrm{odd}\;=\mathrm{even}.

I encourage you to verify these facts if you are unfamiliar with them.


Ignoring the first situation that is not primitive and all the impossible situations, we only have the three green possibilities left:

  • (even)2+(odd)2=?(odd)2,(\mathrm{even})^2+ (\mathrm{odd})^2\overset{?}{=}(\mathrm{odd})^2,
  • (odd)2+(even)2=?(odd)2,(\mathrm{odd})^2+ (\mathrm{even})^2\overset{?}{=}(\mathrm{odd})^2,
  • (odd)2+(odd)2=?(even)2.(\mathrm{odd})^2+ (\mathrm{odd})^2\overset{?}{=}(\mathrm{even})^2.

Since there isn’t really anything different between aa and bb in the equation a2+b2=c2,a^2 + b^2 = c^2 , we can consider the first two situations to be equivalent. With this, we have only two distinct situations to focus on:

  • (odd)2+(even)2=?(odd)2(\mathrm{odd})^2+ (\mathrm{even})^2\overset{?}{=}(\mathrm{odd})^2,
  • (odd)2+(odd)2=?(even)2.(\mathrm{odd})^2+ (\mathrm{odd})^2\overset{?}{=}(\mathrm{even})^2.

However, we claim that we can never have the second situation: (odd)2+(odd)2≠(even)2,(\mathrm{odd})^2+ (\mathrm{odd})^2\neq(\mathrm{even})^2, leaving only one situation left (odd)2+(even)2=✓(odd)2,(\mathrm{odd})^2+ (\mathrm{even})^2\overset{\checkmark}{=}(\mathrm{odd})^2, such as 32+42=52.3^2+4^2 = 5^2. We cannot see why (odd)2+(odd)2≠(even)2(\mathrm{odd})^2+ (\mathrm{odd})^2\neq(\mathrm{even})^2 using our table, we need something more…

Going Beyond Parity

Our goal for this section is to show that we can’t have: (odd)2+(odd)2=(even)2.(\mathrm{odd})^2+ (\mathrm{odd})^2=(\mathrm{even})^2. Let’s see if we can discover why together.

A good tip is to try out some examples, see what happens, and try to spot patterns. In this case, let’s choose two random odd numbers and see what we get when we calculate (odd)2+(odd)2.(\mathrm{odd})^2+ (\mathrm{odd})^2.

aabba2+b2a^2 + b^2
112
1310
5774
59106

Notice anything yet? No? Why don’t you take a moment and compute some more examples? I’ll give you a hint: see how many powers of 2 divide a2+b2.a^2 + b^2.


Go on… you got it!


Okay, did you notice that 2 divides a2+b2a^2 + b^2 only once? In other words, 4 does not divide a2+b2a^2 + b^2 when aa and bb are odd. Let’s see why.

The long way to see why 4 cannot divide a2+b2a^2 + b^2 is by noting that odd numbers are of the form: odd=2m+1\mathrm{odd}=2m+1 for some m∈ℤ.m\in \Z. Thus, a=2k+1a = 2k+1 and b=2t+1b = 2t+1 for some k,t∈ℤ.k,t\in \Z. Plugging these into a2+b2a^2 + b^2 gives

a2+b2=(2k+1)2+(2t+1)2=(4k2+4k+1)+(4t2+4t+1)=4(k2+t2+k+t)+2=4q+2.a^2 + b^2 = (2k+1)^2 + (2t+1)^2 \\\qquad\;\;\;\;= (4k^2+4k+1)+(4t^2+4t+1)\\\qquad\;\;\;\;= 4(k^2 + t^2 + k+t) + 2\\\qquad\;\;\;\;=4q + 2.

Where q=k2+t2+k+t.q=k^2+t^2 +k+t. Note that a2+b2a^2 + b^2 isn’t a multiple of 4. In fact, a2+b2a^2 + b^2 is two more than a multiple of 4. We can now see that 4 cannot divide a2+b2.a^2 + b^2. (There is a quicker way to see that 4∤a2+b2,4\nmid a^2 + b^2, see the footnote)4 In summary, we have the lemma:

Lemma 1 (An impossibility): It is impossible for (odd)2+(odd)2=(even)2.(\mathrm{odd})^2+ (\mathrm{odd})^2=(\mathrm{even})^2. Or,

(odd)2+(odd)2≠(even)2(\mathrm{odd})^2+ (\mathrm{odd})^2\neq(\mathrm{even})^2

for all odd and even integers.

Taking the Next Step

So we have seen that any primitive triple (a,b,c)(a,b,c) that solves a2+b2=c2a^2 + b^2 = c^2 must be of the form: (odd)2+(even)2=(odd)2.(\mathrm{odd})^2+ (\mathrm{even})^2=(\mathrm{odd})^2. The next step is to start playing around with a2+b2=c2a^2 + b^2 = c^2 using these facts.

Playing around with Pythagoras…

Let’s suppose that we have found a solution a2+b2=c2,a^2 + b^2 = c^2, where aa and cc are odd, bb is even, and (a,b,c)(a,b,c) is a primitive triple. Remembering that we can factor a difference of squares, let’s move a2a^2 to the other side of the equation and then factor:

b2=c2−a2=(c−a)(c+a).b^2 = c^2 – a^2 = (c-a)(c+a).

Okay, nothing really stands out, but at least it’s a start. We’ve had a lot of luck by considering what factors different terms have in common, so let’s try to take a look at the question: do (c+a)(c+a) and (c−a)(c-a) have any common factors? Let’s see.

Suppose gcd⁡((c+a),(c−a))=d.\gcd{\Big( (c+a)\,,\,(c-a)\Big) } = d. It follows that (c+a)=dm(c+a) = dm and (c−a)=dn(c-a) = dn for n,m∈ℕ.n,m \in \N. Adding and subtracting these, we get 2a=d(m−n)2a = d(m-n) and 2c=d(m+n).2c = d(m+n). In other words (or symbols), d|2ad\mid 2a and d|2c.d\mid 2c. However, we know that gcd⁡(a,c)=1\gcd{(a,c)} = 1 since (a,b,c)(a,b,c) is a primitive Pythagorean triple. Therefore, d=2d = 2 and (c+a)=2m(c+a) = 2m and (c−a)=2n(c-a) = 2n where gcd⁡(m,n)=1.\gcd{(m,n) } = 1. (Can you prove that?5) Furthermore, since b2=(c−a)(c+a),b^2 = (c-a)(c+a), with b,(c−a),and,(c+a)b,\,(c-a),\,\mathrm{and},\,(c+a) all being even we can write,

β2=(c−a)2⋅(c+a)2=mn.\beta^2 = \frac{(c-a)}{2}\cdot\frac{(c+a)}{2} = mn.

where b=2β.b = 2 \beta. We now have two relatively prime numbers mandnm\;\mathrm{and}\; n multiplying together to equal a square number (β2).\big(\beta^2\big). Is there anything we can deduce from these facts? As it turns out, it must be that nandmn \;\mathrm{and}\; m are themselves square numbers. That is, m=(c+a)/2=x2m=(c+a)/2 = x^2 and n=(c−a)/2=y2n=(c-a)/2 = y^2 for some x,y∈ℕ.x,y\in \N. And since gcd⁡(m,n)=1\gcd{(m,n) } = 1 we also have gcd⁡(x,y)=1.\gcd{(x,y)} = 1. We now have

β2=x2y2.\begin{align} \beta^2 = x^2 y^2. \end{align}

The reason that nn and mm are square numbers can be seen by focusing on the prime divisors of β.\beta. If some prime number p|β,p\mid \beta, then p|np\mid n or p|m,p\mid m, but pp cannot divide both because gcd⁡(m,n)=1.\gcd{( m,n) } = 1. Therefore, all the primes that divide β2\beta^2 must get partitioned between the factors of nandm.n\;\mathrm{and}\; m. More precisely, letting

β2=p12e1p22e2⋯pr2er,\beta^2 = p_1^{2e_1} p_2^{2e_2} \cdots p_r^{2e_r},

then, p1|mp_1\mid m implies p1∤np_1\nmid n and p12e1|m.p_1^{2e_1}\mid m. Therefore, every prime shows up in the prime factorizations of nn and mm will show up with an even exponent,

m=(c+a)2=pi12ei1pi22ei2⋯piu2eiuandn=(c−a)2=pj12ej1pj22ej2⋯pjv2ejv.m=\frac{(c+a)}{2} = p_{i_1}^{2e_{i_1}} p_{i_2}^{2e_{i_2}} \cdots p_{i_{u}}^{2e_{i_{u}}} \qquad \mathrm{and}\qquad n=\frac{(c-a)}{2} = p_{j_1}^{2e_{j_1}} p_{j_2}^{2e_{j_2}} \cdots p_{j_{v}}^{2e_{j_v}} .

Thus,

m=(pi1ei1pi2ei2⋯piueiu)2andn=(pj1ej1pj2ej2⋯pjvejv)2.m = \Big(p_{i_1}^{e_{i_1}} p_{i_2}^{e_{i_2}} \cdots p_{i_{u}}^{e_{i_{u}}}\Big)\,^2 \qquad \mathrm{and}\qquad n = \Big(p_{j_1}^{e_{j_1}} p_{j_2}^{e_{j_2}} \cdots p_{j_{v}}^{e_{j_v}} \Big)\,^2 .

Of course, this wasn’t a rigorous proof of this fact, so I challenge you to fill in some of the details of the following “proof”.

Lemma 2: Let mn=Bkmn = B^k with gcd⁡(m,n)=1\gcd{(m,n)} = 1. Then, there are natural numbers q,r∈ℕq,r\in \N such that

m=qkandn=rk.m = q^k \qquad \mathrm{and}\qquad n = r^k.

Moreover, gcd⁡(q,r)=1.\gcd{(q,r)} = 1.

In other words, mm and nn are themselves kthk^{th} powers.

Click for the Proof

Let mn=Bkmn = B^k with gcd⁡(m,n)=1\gcd{(m,n)} = 1. Also, let B=∏i=1spiei=p1e1⋯pses.B= \prod_{i=1}^sp_i^{e_i} =p_1^{e_1} \cdots p_s^{e_s}. It follows,

Bk=∏i=1spikei=p1ke1⋯pskes.B^k = \prod_{i=1}^sp_i^{ke_i} =p_1^{ke_1} \cdots p_s^{ke_s}.

Since p1k1e1|mnp_1^{k_1e_1} \mid mn and gcd⁡(m,n)=1,\gcd{(m,n)} = 1, we deduce p1k1e1|mp_1^{k_1e_1} \mid m or p1k1e1|np_1^{k_1e_1} \mid n using Euclid’s lemma (see on page 90 in Chapter 7 of Newbie at Number Theory). However, p1k1e1p_1^{k_1e_1} cannot divide both mm and nn because gcd⁡(m,n)=1\gcd{(m,n)} = 1. A similar argument can be made regarding all the prime powers pikieip_i^{k_ie_i} . It follows,

m=pi1kei1⋅pi2kei2⋯piukeiu=(pi1ei1pi2ei2⋯piueiu)km= p_{i_1}^{ke_{i_1}}\cdot p_{i_2}^{ke_{i_2}}\cdots p_{i_u}^{ke_{i_u}} = (p_{i_1}^{e_{i_1}}p_{i_2}^{e_{i_2}}\cdots p_{i_u}^{e_{i_u}})^k

and

n=pj1kej1⋅pj2kej2⋯pjvkejv=(pj1ej1pj2ej2⋯pjvtjv)k.n= p_{j_1}^{ke_{j_1}}\cdot p_{j_2}^{ke_{j_2}}\cdots p_{j_v}^{ke_{j_v}} = (p_{j_1}^{e_{j_1}}p_{j_2}^{e_{j_2}}\cdots p_{j_v}^{t_{j_v}})^k.

(Can you fill in the steps to make this fully rigorous?)

Using Lemma 2, we can properly say m=(c+a)/2=x2m=(c+a)/2 = x^2 and n=(c−a)/2=y2n=(c-a)/2 = y^2 for some x,y∈ℕx,y\in \N such that gcd⁡(x,y)=1.\gcd{(x,y)} = 1.

In summary, we have just determined that b2=4β2=4x2y2b^2 = 4\beta^2 = 4x^2y^2 where,

x2=(c+a)2,andy2=(c−a)2.x^2 =\frac{(c+a)}{2},\qquad\mathrm{and}\qquad y^2 =\frac{(c-a)}{2}.

We can solve for both aa and cc using the equations above for xx and y.y. Doing so yields,

a=x2−y2,andc=x2+y2.a =x^2 – y^2,\qquad\mathrm{and}\qquad c =x^2+ y^2 .

From these, we determine b.b.

Plugging our equations for aa and cc back into a2+b2=c2a^2 + b^2 = c^2 and then solving for bb gives b=2xy.b = 2xy. ***Or, we could have simply used b2=4β2=4x2y2.b^2 = 4\beta^2 = 4x^2y^2.***

Wait just a gosh darn minute! We have what we wanted, a way to find Pythagorean triples! All we do is choose some x,y∈ℕx,y\in \N with gcd⁡(x,y)=1\gcd{(x,y)} = 1 and then plug those into the following:

a=x2−y2,andb=2xyandc=x2+y2.a =x^2 – y^2,\qquad\mathrm{and}\qquad b = 2xy\qquad\mathrm{and}\qquad c =x^2+ y^2 .

How awesome is this? Answer: Very awesome!

Before we find some triples, let prove the following theorem we were led to :

Theorem (Primitive Pythagorean Triples): A triple (a,b,c)(a,b,c) is a primitive pythagorean triple with aa odd and bb even if and only if

a=x2−y2,andb=2xyandc=x2+y2,a =x^2 – y^2,\qquad\mathrm{and}\qquad b = 2xy\qquad\mathrm{and}\qquad c =x^2+ y^2 ,

for some for x,y∈ℕx,y\in \N such that gcd⁡(x,y)=1\gcd{(x,y)} = 1 and either xx or yy is even (but not both!).

We pretty much went through the proof in our discovery process; however, just in case you found that portion confusing, here is an organized formal proof. Also, we have a condition that was not immediately obvious from our discovery process: either xx or yy is even (but not both!). As we will see, this is not hard to prove.

Click for the Proof:

Forward: If (a,b,c)(a,b,c) is a primitive Pythagorean triple then a=x2−y2,a =x^2 – y^2, b=2xy,b = 2xy, and c=x2+y2,c =x^2+ y^2 , for some for x,y∈ℕx,y\in \N such that gcd⁡(x,y)=1\gcd{(x,y)} = 1 and either xx or yy is even.

Let (a,b,c)(a,b,c) be a primitive Pythagorean triple. Using Lemma 1, we know that aa or bb is even (but not both) and cc is odd. So, let’s let bb be even. With some algebra, we deduce

b2=c2−a2=(c−a)(c+a).b^2 = c^2 – a^2 = (c-a)(c+a).

Since both aa and cc are odd, (c+a)(c+a) and (c−a)(c-a) are even and hence (c+a)/2=m(c+a)/2 = m and (c+a)/2=n(c+a)/2 = n for m,n∈ℕ.m,n\in \N. Furthermore,

(b2)2=mn.\Big(\frac{b}{2} \Big)\,^2 = mn.

By Lemma 2,

x2=m=(c+a)2,andy2=n=(c−a)2x^2 =m=\frac{(c+a)}{2},\qquad\mathrm{and}\qquad y^2 =n=\frac{(c-a)}{2}

for and x,y∈ℕx,y\in \N such that gcd⁡(x,y)=1.\gcd{(x,y)} = 1.

We can now solve for aa, b,b, and cc. Doing so gives (part of) our desired results:

a=x2−y2,andb=2xyandc=x2+y2.a =x^2 – y^2,\qquad\mathrm{and}\qquad b = 2xy\qquad\mathrm{and}\qquad c =x^2+ y^2 .

All we need to show is that either xx or yy is even (not not both!). Since gcd⁡(x,y)=1\gcd{(x,y)} = 1 we can’t have both xx and yy being even. Also, if xx and yy were both odd, then aa and cc would both be even, contradicting that (a,b,c)(a,b,c) be a primitive Pythagorean triple.

Backward: Left for your enjoyment. (You’re welcome)

Let’s Find a Large Pythagorean Triple!

Now that we have a formula that gives us a primitive Pythagorean triple, let’s use it!

First, let’s do a quick, small example. Maybe x=2x=2 and y=1y=1. In this case: a=4−1=3,b=2⋅2⋅1=4,a = 4-1 = 3,\;\;b = 2\cdot2\cdot1 = 4,\;\;and c=4+1=5.c = 4+1 =5. We have just found one of the triples we found before! Okay, okay, let’s compute a large one!

Let’s let x=12345=3⋅5⋅823x=12345 = 3\cdot 5 \cdot 823 and y=314=2⋅157y=314 =2\cdot 157. (Note that gcd⁡(x,y)=1\gcd{(x,y)} = 1 and xx is odd and yy is even) Then,

a=123452−3142=152,300,429a = 12345^{2} – 314^{2} = 152,300,429
b=2(12345⋅314)=7,752,660b = 2(12345 \cdot 314) = 7,752,660
c=123452+3142=152,497,621.c = 12345^{2} + 314^{2} = 152,497,621.

And as a check,

a2+b2=23,195,420,673,584,041+60,103,737,075,600=23,255,524,410,659,641a^2 + b^2 = 23,195,420,673,584,041 + 60,103,737,075,600 = 23,255,524,410,659,641
c2=23,255,524,410,659,641.c^2 = 23,255,524,410,659,641.

Do you think you could have found these without our theorem?

That reminds me! Way back in the beginning, we mentioned,

“… Is it trial and error? But that can’t be, since back 3,700 years ago people figured out that (3367,3456,4825)(3367, 3456, 4825) is a Pythagorean triple! There is no way someone found this simply by guessing! …”

Now that we have our formula to generate triples, can you determine what values of xx and yy give us the triple: (3367,3456,4825)?(3367, 3456, 4825)? Give it a go!

There’s More Fun to be Had!

It’s amazing that we have found a way to generate all Pythagorean triples. But, in the process, we took it for granted that there are integer solutions to a2+b2=c2a^2 + b^2 = c^2 in the first place. Something that becomes more striking when we learn about Fermat’s last theorem! One interesting fact is that we can use our results today to show that there are no integer solutions to a4+b4=c4.a^4 + b^4 = c^4. This is one case of Fermat’s last theorem that Fermat really proved. There is a plan to write an article about his proof using infinite descent in the (hopefully soon) future!

There are many more questions we can ask that are tangential to our work today that are not about Fermat’s last theorem and that don’t require proofs over 100 pages long! For instance, take a look back at our main theorem. We showed that the hypotenuse cc is a sum of squares, c=x2+y2.c = x^2 + y^2. This begs the question, “Which numbers can be hypotenuses?” Equivalently, “Which numbers can be expressed as the sum of two squares?” Or, more mathy with symbols, for what n∈ℕ,n\in \N, is there an integer solution to x2+y2=n?x^2 + y^2 = n? After playing around with this problem for a while, you might notice that if you can determine which primes pp can be expressed as x2+y2=px^2 + y^2 = p you can then answer the question for all n.n. In fact, this question can be answered in far fewer than 100 pages. It can be answered and proved in one line! (See The One Sentence Proof (in multiple sentences) – Numberphile)

If you don’t find the previous question intriguing, here’s another fun problem. On Professor Alvaro Lozano-Robledo’s YouTube channel (highly recommend subscribing and checking out his website, https://afieldguidetomath.wordpress.com, because it’s great too), he discusses the wonderful fact that the largest circle that fits inside the 3-4-5 right triangle has an area of π.\pi. (Isn’t that delightful?) We will call this circle the 3-4-5 triangle’s ‘maximal circle’. Since the 3-4-5 triangle’s maximal circle has an area equal to π,\pi, the radius of the maximal circle is equal to 1. Here’s the question he then asks (using our terminology): For any natural number n,n, is it possible to find a Pythagorean triple triangle whose maximal circle has a radius equal to n?n? Here is the link to his video where he asks that question: “Beautiful math facts do not need an application to real life.” He answers this question in another video on his channel.

The questions are endless! But this article is already long (WordPress thinks it will take 18-27 minutes to read this, but since this is mathematical, we can bump that up to about 5-6 hours), so I will have to leave you to ponder and problem-solve! Remember to have fun!

P.S. One final comment. Since knowing aa and bb determines c,c, we could write our solution as the pair: (a,b)=(x2−y2,2xy).(a,b) =(x^2 – y^2,\, 2xy). Hmm… this way of looking at the solution set seems a little… complex… no?


Footnotes:

  1. Natural numbers, denoted ℕ\N, are positive whole numbers: ℕ={1,2,3,4,⋯}.\N = \{1,2,3,4,\cdots\}. ↩︎
  2. When every term has the same order, in our case, each term is of order 2, we call such equations homogeneous. ↩︎
  3. Relatively prime (or coprime) integers are pairs of integers that have gcd⁡(a,b)=1.\gcd{(a,b)} = 1. ↩︎
  4. The slick way to prove that (odd)2+(odd)2(\mathrm{odd})^2+ (\mathrm{odd})^2 is not divisible by 4 is to use modular arithmetic. The proof would be something like this:
    For any a∈ℤa\in \Z we have (odd)2+(odd)2≡1+1=2(mod4).(\mathrm{odd})^2+ (\mathrm{odd})^2 \equiv 1+1 = 2 \;(\mathrm{mod}\;4). (why?) Which is not zero mod 4. ↩︎
  5. Let gcd⁡(m,n)=d.\gcd{(m,n)}=d. Our goal is to prove gcd⁡(md,nd)=1.\gcd{(\frac{m}{d},\frac{n}{d})}=1.
    Suppose, on the contrary, that gcd⁡(md,nd)=D>1;\gcd{(\frac{m}{d},\frac{n}{d})}=D>1; it follows that D|mdD\mid \frac{m}{d} and D|nd.D\mid \frac{n}{d}. Equivalently, md=Dk\frac{m}{d} =Dk and nd=Dt\frac{n}{d} =Dt for some k,t∈ℕ.k,t\in \N. Rearranging these equations, we get
    m=Ddkandn=Ddt.m = Ddk \qquad \mathrm{and}\qquad n = Ddt.Therefore, DdDd is a common divisor of both mm and nn with the property that Dd>d.Dd>d. This contradicts that gcd⁡(m,n)=d.\gcd{(m,n)}=d. ↩︎

Posted in

Leave a Reply

Discover more from billy-wehring.com

Subscribe now to keep reading and get access to the full archive.

Continue reading