Showing posts with label Pythagorean triples. Show all posts
Showing posts with label Pythagorean triples. Show all posts

Saturday, August 17, 2013

One more rule about Pythagorean triples

Yet again, let's consider Pythagorean triples, sets of three positive integers a, b and c such that a² + b² = c².  Here are several examples where all three numbers are less than 100.

3² + 4² = 5²
12² + 5² = 13²
15² + 8² = 17²
7² + 24² = 25²
9² + 40² = 41²
20² + 21² = 29²
48² + 55² = 73²

We know that we can generate Pythagorean triples using any two positive integers j and k with the formulas, where j > k with

a = j² - k²    b = 2jk and   c = j² + k²

This means there must be infinitely many different Pythagorean triples. If you aren't sure, consider k=1 and we get

a = j² - 1   b = 2j and  c = j² + 1

For any j > 1, we will get a unique Pythagorean triple.

Here's a pattern I noticed. Every triple on our list above has one number that is divisible by 5. Let us start with a speculation.

Speculation: Every Pythagorean triple has at least one number that is divisible by 5.

We could create a triple where all three numbers are divisible by 5 just by taking any Pythagorean triple and multiplying all the numbers by 5.

Example: Because  3² + 4² = 5², 15² + 20² = 25², The original numbers are 9 +16 = 25, and if we multiply all the numbers by 5, all the squares are multiplied by 25 and we get 225 + 400 = 625.

That explains why the modifier "at least" is used in the speculation.

Let's find facts that will help us prove the speculation.

Fact: The last digit of a square is determined by the last digit of the original number.

Think about multiplying two numbers that have two digits together, like 72 × 72. 

__72
_×72
_144
504 
5184

The ones place is just 2 × 2 and the 70 isn't involved. This would be true no matter how many digits in a number.

Fact: The last digit of a perfect square can only be 0, 1, 4, 9 or 6.

We can prove this by looking at the list of perfect squares of the numbers 0 through 9 (0, 1, 4, 16, 25, 36, 49, 64, 81) and using the first fact from above that the last digit of a number determines the last digit of the square.

Fact: The remainder of a perfect square when divided by 5 can only be 0, 1 or 4.

Because 10 = 2 × 5, the remainder upon division by 5 will look a lot like the last digit, except 6 becomes 1, and 9 becomes 4.

Fact: If you want to make a sum of two numbers from the set {0, 1, 4} to add up to 0, 1 or 4, there are only a finite number of patterns and not all of them work.

0 + 0 = 0 works
0 + 1 = 1 works
0 + 4 = 4 works
1 + 0 = 1 works
1 + 1 = 2 doesn't work
1 + 4 = 5 doesn't work, except when we divide 5 by 5 we get remainder 0, so it does work for us.
4 + 0 = 4 works
4 + 1 = 5  doesn't work, except when we divide 5 by 5 we get remainder 0, so it does work for us.
4 + 4 = 8 doesn't

Fact: Every pattern that works has a 0 or 5 in it.

Fact: A remainder of 0 when dividing by five means the number is divisible by 5.

Fact: Because 5 is prime, getting a perfect square that is divisible by 5 means the original number is divisible by 5.

This means our speculation about the Pythagorean triples is in fact a pattern that is always true. We could call it a "theorem", but I'm going to save that word for

Fact: Every Pythagorean triple has at least one number that is divisible by 5.

Here are two other facts that can be proved using similar methods, which the reader can try to prove if interested.

Fact: Every Pythagorean triple has at least one number that is divisible by 3.

Fact: Every Pythagorean triple has at least one number that is divisible by 2 and one number  divisible by 4.

We don't have any other primes for which this is true. That is proved simply by the triple 3, 4, 5. All the primes greater than 5 (7, 11, 13, 19, ...) do not divide any of these numbers evenly, so we have a single counter-example that works for an infinite number of cases, a situation a lazy mathematician is always happy to find.



Thursday, August 15, 2013

Another rule about Pythagorean triples.


Last January, I wrote several posts about Pythagorean Triples, a set of three whole numbers a, b and c that follows the rule of the Pythagorean Theorem a² + b² = c². Here are some examples.

3² +4² = 5²
8² + 15² = 17²
24² + 7² = 25²

If we think about these numbers as sides of a triangle, the area will be ½ab. In the cases from above, the areas as 6, 60 and 84, respectively.

There is a way to generate all such whole number triples, using two positive integers j and k, with j>k.

a = j² - k²
b = 2jk
c = j² + k²

Our first rule is that we should stipulate that j does not equal k, because in the that case a = 0. Re-writing a and b in the area formula into multiples of j and k, we get this.

Area = ½ab = ½(j² - k²)2jk = (j² - k²)jk

Since j and k are whole numbers, the area must be a whole number. But more than that the number must be divisible by 6. The proof is split into two parts, first that the area is divisible by 2 and secondly that the area is divisible by 3.

Proof of the area is divisible by 2. If j or k is even, then (j² - k²)jk is even, since if you have a product of whole numbers and one is even, the product is even. The only other option is that both j and k is odd, and if that is the case then j² - k² = odd - odd = even.

Proof of the area is divisible by 3. If j or k is a multiple of 3, then (j² - k²)jk is a multiple of 3. The only other option is that neither j and k is a mulitple of 3. For any number n that isn't a multiple of 3,  n² will be of the form 3p + 1, which is to say one more than some multiple of 3. If that is the case then j² - k² = (3p + 1) - (3q + 1) = 3(p- q), which is a multiple of 3 as well.

Wednesday, January 30, 2013

Rational points on the unit circle and the Pythagorean triples.


Trigonometry translated from it Greek roots means "the measure of triangles", most notably right triangles. The most important aspect of right triangles is the Pythagorean Theorem, usually stated as a² + b² = c².

The unit circle on the xy plane is given by the formula  x² + y² = 1. There are infinitely many points on the circle and if you pick one truly at random, it will very likely be irrational, which means neither the x or the y be written as p/q, where p and q are whole numbers. The only way it is possible for a point on the unit circle to be rational is to have two fractions of the form a/c and b/c where a² + b² = c². For example,

(3/5)² + (4/5)² = (5/5)² = 1.

In Excel, I generated 26 rational points on the unit circle, the largest denominator being 1,105. As you can see, there are a lot of gaps, but you can make out the general shape of a quarter circle.


Here's what it looks like with 662 rational points plotted. You can still see some gaps, notably near the horizontal lines at 0.8 and 0.6. If all the rational points were plotted, and there are infinitely many, you would not be able to see any gaps with the naked eye or at any magnification. In math, we say that the set of rational points is dense on the unit circle.

But here's one of the goofy things about infinity. There are also infinitely many points on the unit circle where both values are irrational AND infinitely many points where x is rational and y irrational AND infinitely many points where x is irrational and y rational. Let me write those sets out.


Set #1: { the set of points on the unit circle where both x and y are irrational}
Set #2: { the set of points on the unit circle where both x and y are rational}
Set #3: { the set of points on the unit circle where x is rational and y irrational}
Set #4: { the set of points on the unit circle where x is irrational and y rational}

All four of those sets are dense on the circle, meaning that in any segment of the circle no matter how small, there will be elements from all four of the sets.

Here's something even weirder about infinity. Sets #2, #3 and #4 are all the same size of infinity, but Set #1 is a bigger size of infinity, bigger than the other three combined.

Tomorrow, we move from goofy facts about infinity to more practical math aimed at answering the question "Is climate change or global warming real?"

Tuesday, January 29, 2013

Using the generating function for relatively prime Pythagorean triples.

Yesterday's post ended with the statement of the generating function for Pythagorean triples. Take any two distinct whole numbers j and k and let j be the larger. Here are the formulas for a, b and c.

a = j² - k²
b = 2jk
c = j² + k²


Example #1: j = 2, k = 1
a = 4-1 = 3
b = 2 × 2 × 1 = 4
c = 4+1 = 5


Example #2: j = 3, k = 1
a = 9-1 = 8
b = 2 × 3 × 1 = 6
c = 9+1 = 10

Example #3: j = 3, k =2
a = 9-4 = 5
b = 2 × 3 × 2 =12
c = 9+4 = 13

Not surprisingly, using the three smallest pairs around (2, 1) (3, 1) and (3, 2), we get the three smallest Pythagorean triples. But notice that (3, 1) generates 8-6-10 which is not a relatively prime triple, since all the numbers are even. Looking at this carefully, we see that if both j and k are odd, this will make a, b and c even.

a = odd² - odd² = even
b = 2×odd×odd = even
c = odd² + odd² = even

To generate a relatively prime Pythagorean triple, we need two things to be true about j and k.

1. j and k must be relatively prime.
2. j - k must be odd. (Another way to state this is one is odd and the other even.)

Tomorrow, a few more rules about the relatively prime Pythagorean triples.
 

Monday, January 28, 2013

Generating Pythagorean triples.


The Pythagorean Theorem is usually stated as a² + b² = c². If all three numbers are whole numbers, it is called a Pythagorean triple. Here are some examples with small numbers as the entries.

3² + 4² = 5²
12² + 5² = 13²
15² + 8² = 17²
24² + 7² = 25²
21² + 20² = 29²
35² + 12² = 37²

In these examples, no number bigger than 1 divides all three numbers in the set, so these are the relatively prime Pythagorean triples. It is true that 6² + 8² = 10² (36+64=100), but this is just taking the 3-4-5 triangle and multiply each number by two.

Here are a few rules about the relatively prime Pythagorean triples.

They are always of the form odd² + even² = odd². We can have even² + even² = even², like 6-8-10, but all the numbers are divisible by two, so they aren't relatively prime. It turns out that odd² + odd² will be even, of course, but it can never be the square of an even number. All the even squares are divisible by 4 and the sum of two odd perfect squares will always have remainder 2 when divided by 4.

There is a generating function. Take any two distinct whole numbers j and k and let j be the larger. Here are the formulas for a, b and c.

a = j² - k²
b = 2jk
c = j² + k²

Tomorrow, we will look at what choices for j and k will produce the relatively prime Pythagorean triples.


Sunday, January 27, 2013

The 3-4-5 triangle


The Pythagorean Theorem is often stated as


a² + b² = c²

means that the sum of the squares of the lengths of the two short sides (the ones that meet to create the right angle) is equal to the square of the length of the long side opposite the 90°, the side known as the hypotenuse.

If you pick two whole numbers at random to be the short sides, also known as the legs, the hypotenuse will be a square root of a whole number.

For example: If a = 1 and b = 3, 1² + 3² = 10, which means c² = 10. 10 is not a perfect square, so c is equal to the irrational number the square root of 10, which I will write as sqrt(10).

If we are looking at one digit numbers only, we have just one pair of legs that will add up to a perfect square. 3² + 4² = 9 + 16 = 25 = 5².

Three whole numbers that satisfy a² + b² = c² are called a Pythagorean triple. If we find such a triple, we can create infinitely more by multiplying all the sides by the same whole number.  Here are some examples.

Multiply 3-4-5 by 2: 6² + 8² = 10²
Multiply 3-4-5 by 3: 9² + 12² = 15²
Multiply 3-4-5 by 4: 12² + 16² = 20²
...

All of these triangles are similar and when discussing Pythagorean triples, the ones that are relatively prime are a special case.

The Pythagorean Theorem is named for the ancient Greek mathematician Pythagoras (570-495 BCE), but as often happens in math, this does not mean he was the first person ever to notice the pattern. There is strong evidence that the ancient Egyptians who built the pyramids understood the 3-4-5 triangle at the very least, and they lived thousands of years before Pythagoras. In many archeological digs, among the building tools are three sticks of lengths with the ratio 3:4:5. It is assumed that the builders used these when constructing walls to make sure the walls and the floors met at 90° angles.

There are other relatively prime Pythagorean triples; in fact, there are infinitely many. The next two smallest ones are 5² + 12² = 13² and 8² + 15² = 17².

Tomorrow, we will discuss how to create all the Pythagorean triples, both those that are relatively prime and those that aren't.