avatarSundip Tailor

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1296

Abstract

ate a formula for generating Pythagorean Triples.</p><p id="36d2">Here is Euclid’s Formula, where m and n can be any integers of our choice (providing m>n>0) and x, y and z will yield a Pythagorean Triple.</p><ul><li>x=2mn</li><li>y=m²-n²</li><li>z=m²+n²</li></ul><p id="51bd">Example: If m=5 and n=1 then we get the Pythagorean Triple (10, 24, 26). Observe 10²+24²=100+576=676=26².</p><p id="a759">The following quick check shows that Euclid’s Formula will always work:</p><p id="8d82">x²+y²=4m²n²+(m²-n²)²=4m²n²+m⁴+n⁴-2m²n²=m⁴+n⁴+2m²n²=(m²+n²)²=z²</p><p id="214b">However, it’s unsatisfying to be given this without understanding where it comes from. Below we will go through a method for deriving Euclid’s Formula from scratch:</p><p id="8476">Let’s rewrite x²+y²=z² as x²=z²-y²=(z-y)(z+y). This implies x/(z-y)=(z+y)/x.</p><p id="b2d9">Note: Division by zero is not an issue because if z=y then this would imply x=0 which is not allowed for a Pythagorean Triple.</p><p id="0c52">However, given x, y and z are positive integers, x/(z-y) is some rational number. Recall the definition of a rational number is any number that can be expressed as m/n where m and n≠0 are integers e.g. 0.5 is a rational number since it’s equal to 1/2.</p><p id="6e2d">We can then set x/(z-y)=(z+y)/x=m/n for

Options

some integers m and n≠0. We then have the following two equations:</p><ol><li>(z-y)/x=n/m — here we took the reciprocal</li><li>(z+y)/x=m/n</li></ol><p id="8b37">If we add equations 1 and 2 we get 2z/x=n/m+m/n=(n²+m²)/mn which means we can set x=2mn and z=n²+m².</p><p id="e935">Similarly, if we subtract equation 2 from 1 then we get 2y/x=m/n-n/m=(m²-n²)/mn which means we can set y=m²-n².</p><p id="11bc">We have then arrived at Euclid’s formula for generating Pythagorean Triples (where m>n>0):</p><ul><li>x=2mn</li><li>y=m²-n²</li><li>z=m²+n²</li></ul><h2 id="252d">Closing Remarks</h2><p id="44a3">Euclid’s Formula can be used to show x⁴+y⁴=z⁴ has no solutions in natural numbers. This is a specific case of Fermat’s Last Theorem which is discussed <a href="https://readmedium.com/how-to-prove-fermats-last-theorem-for-cases-n-4-8-12-16-8549b9dcaef7">here</a>.</p><p id="3e06">Consider a Medium membership with my referral link <a href="https://sundip-tailor.medium.com/membership">here</a>. You will be supporting my writing and there is no extra cost to you. Alternatively, you can buy me a coffee below. Many thanks!*</p><figure id="7b38"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*kDrWdq2ACa_LiN56.png"><figcaption></figcaption></figure></article></body>

How To Generate Pythagorean Triples

Create Positive Integer Solutions To The Equation x²+y²=z²

The Pythagorean Triple (3, 4, 5) written on my whiteboard

Recall the equation x²+y²=z² from your school days. We associate this with Pythagoras’ theorem for calculating the sides of a right-angled triangle.

Mathematicians are also interested in natural number (positive integer) solutions to this equation. Such solutions are called Pythagorean Triples.

An example of a Pythagorean Triple is x=3, y=4, z=5 since 3²+4²=5². We can write it more conveniently as (3, 4, 5).

From any Pythagorean Triple, we can construct infinitely many Pythagorean Triples by multiplying through by a number e.g. multiplying (3, 4, 5) by 2 we get (6, 8, 10) which is also a Pythagorean Triple. An exercise for the reader is to show why this always works.

A primitive Pythagorean Triple (x, y, z) is one where x, y, and z are coprime, that is, they have no common factor greater than 1. (3, 4, 5) is primitive.

One challenge is to create a formula for generating Pythagorean Triples.

Here is Euclid’s Formula, where m and n can be any integers of our choice (providing m>n>0) and x, y and z will yield a Pythagorean Triple.

  • x=2mn
  • y=m²-n²
  • z=m²+n²

Example: If m=5 and n=1 then we get the Pythagorean Triple (10, 24, 26). Observe 10²+24²=100+576=676=26².

The following quick check shows that Euclid’s Formula will always work:

x²+y²=4m²n²+(m²-n²)²=4m²n²+m⁴+n⁴-2m²n²=m⁴+n⁴+2m²n²=(m²+n²)²=z²

However, it’s unsatisfying to be given this without understanding where it comes from. Below we will go through a method for deriving Euclid’s Formula from scratch:

Let’s rewrite x²+y²=z² as x²=z²-y²=(z-y)(z+y). This implies x/(z-y)=(z+y)/x.

Note: Division by zero is not an issue because if z=y then this would imply x=0 which is not allowed for a Pythagorean Triple.

However, given x, y and z are positive integers, x/(z-y) is some rational number. Recall the definition of a rational number is any number that can be expressed as m/n where m and n≠0 are integers e.g. 0.5 is a rational number since it’s equal to 1/2.

We can then set x/(z-y)=(z+y)/x=m/n for some integers m and n≠0. We then have the following two equations:

  1. (z-y)/x=n/m — here we took the reciprocal
  2. (z+y)/x=m/n

If we add equations 1 and 2 we get 2z/x=n/m+m/n=(n²+m²)/mn which means we can set x=2mn and z=n²+m².

Similarly, if we subtract equation 2 from 1 then we get 2y/x=m/n-n/m=(m²-n²)/mn which means we can set y=m²-n².

We have then arrived at Euclid’s formula for generating Pythagorean Triples (where m>n>0):

  • x=2mn
  • y=m²-n²
  • z=m²+n²

Closing Remarks

Euclid’s Formula can be used to show x⁴+y⁴=z⁴ has no solutions in natural numbers. This is a specific case of Fermat’s Last Theorem which is discussed here.

**Consider a Medium membership with my referral link here. You will be supporting my writing and there is no extra cost to you. Alternatively, you can buy me a coffee below. Many thanks!***

Math
Science
Education
Mathematics
University
Recommended from ReadMedium