Math 560
Spring, 2006
hw5
Solutions

  1. Pythogorean triples. When three numbers (a,b,c) satisfy
    	a2 + b2 = c2
    
    we say they form a Pythagorean triple. If in addition a, b, c have no common factor we say the triple is primitive

    1. Show that in any ring the formulas
      	a = (u2 - v2)r
      	b = 2uvr					(PT)
      	c = (u2 + v2)r
      
      produce a Pythagorean triple (a,b,c) for any choice of ring elements u, v and r.

      This is straightforward algebra. Just be sure to write the steps in the right logical order: this way

      	a2 + b2 = ...
      		= ...
      		= ...
      		= c2
      
      without putting c2 on the first line, since it's what you're trying to prove!

    2. Prove that in the positive integers the Pythagorean triple is primitive just when r=1, u > v, and u and v are relatively prime and not both odd. (To prove this you might first want to see what happens when you systematically try examples in which each of the conditions fails. But remember that no examples can prove the theorem - they can just suggest a way to prove it.)

      Most of you successfully proved that the triple is not primitive when any of the conditions fails: when r > 1 or when u and v are not relatively prime or when they are both odd. I won't repeat the argument here.

      I haven't read all the papers, but so far no one has proved the converse: the when part. To do that you need to prove that when the conditions are all true, (a,b,c) is primitive. So suppose that they are true and that (a,b,c) is not primitive - and look for a contradiction. If you solve the first and third equations in (PT) for u2 and v2 simultaneously you get

      	u2 = (1/2)(c + a)
      	v2 = (1/2)(c - a)
      
      Since (a,b,c) is not primitive, a and c have some common factor d > 1. If d > 2 then d divides (c+a)/2 and (c-a)/2 and thus divides both u2 and v2 and thus divides both u and v, so u and v are not relatively prime. The only case left is d=2. In that case we write a=2k, c=2j and conclude that
      	u2 = j + k
      	v2 = j - k
      
      But j+k and j-k have the same parity, so this tells us that u and v are either both even (in which case they are not relatively prime) or both odd 0, which is the final contradiction.

    3. Show that every odd number can appear as a in a primitive Pythagorean triple (a,b,c) . Hint 1: consider (3,4,5), (5,12,13) and (7,24,25) and look for a pattern. Hint 2: Compute (n+1)2 - n2 and study (PT).

      The hint tells you to look at

      	(n+1)2 - n2 = 2n+1
      
      which is a typical odd number. So if you use u=n+1 and v=n and r=1 in (PT) you will have a=2n+1 . That's all that's required. Lots of you went on at great length in this problem - some of you got to the right conclusion at the end. It's worth pointing out that in this case c=b+1 as well. Some of you noticed that too.

    4. Try to prove that the formulas (PT) generate all the Pythagorean triples in the integers. This may well be too hard for you. Here's a way for you to learn something from this problem anyway. Find a proof somewhere (on the internet, in a book, perhaps in Courant and Robbins), read it, understand it and then rewrite it in your own words. Your rewrite should be a real one, not just a word for word paraphrase. You need to add stuff that convinces me that you really understand what you have read. Submit both your rewrite and a copy (xerox or otherwise) of the original.

      No one came close on this - so I spent more than half of the Feb 28 class doing it. I've asked it again on the next homework.

    5. How many Pythagorean triples are there in Zn? This is a question I've never seen asked before. Although it's likely that someone has asked and answered it, I don't know the answer. I don't know whether the problem is easy or hard. I don't know whether the answer is interesting. Let's do some research.

      This problem turned out to be tedious and not particularly fruitful or interesting. That happens in mathematical research sometimes ...

      The web page http://www.math.rutgers.edu/~erowland/triplesmodp.html will compute all the Pythagorean triples module any prime you are interested in.

      When n=2 there are three solutions: (0,0,0), (1,0,1) and (0,1,0). These three will work in any ring. So will (0,x,x) and (x,0,x), so we probably should not count any of the triples for which a=0 or b=0.

      In Z3 there seem to be a few more: (2,0,1) is one of them. But that's really "the same" as (1,0,1) since in Z3 2 = -1 and we might not want to count (a,b,c) and (-a,b,c) as different Pythagorean triples (but then again we might want to count them as different if that helps a pattern emerge). When counting that way there are no more new triples in Z3.

      To carry out more experiments we should be more systematic: list all the squares in Zn, add each pair and see when squares result. For example, for Z7 the squares are

      	02 = 0
      	12 = (-1)2 = 1
      	22 = (-2)2 = 4
      	32 = (-3)2 = 2
      
      so the Pythagorean triples are
      	(1,1,3)
      	(2,2,1)
      	(3,3,2)
      

      What next? Compute many more examples: certainly n=4,5,6, then maybe 11 and 13, in hopes that the primes may be more informative. But I don't know. You might want to work collectively as a class, with different people working out different examples so that together you have more data than any one of you could find on his or her own.