Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Reciprocal links
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Pythagorean Triples

Three integers a, b, and c that satisfy a2 + b2 = c2 are called Pythagorean Triples. There are infinitely many such numbers and there also exists a way to generate all the triples. Let n and m be integers, n>m. Then define

(*) a = n2 - m2, b = 2nm, c = n2 + m2.

The three number a, b, and c always form a Pythagorean triple. The proof is simple:

 
(n2 - m2)2 + (2mn)2 = n4 - 2n2m2 + m4 + 4n2m2
  = n4 + 2n2m2 + m4
  = (n2 + m2)2.

The formulas were known to Euclid and used by Diophantus to obtain Pythagorean triples with special properties. However, he never raised the question whether in this way one can obtain all possible triples.

The fact is that for m and n coprime of different parities, (*) yields coprime numbers a, b, and c. Conversely, all coprime triples can indeed be obtained in this manner. All others are multiples of coprime triples: ka, kb, kc.

As an aside, those who mastered the arithmetic of complex numbers might have noticed that

  (n + im)2 = (n2 - m2) + i2mn.

Which probably indicates that (*) has a source in trigonometry. But the proof below only uses simple geometry and algebra.

First of all, note that if a2 + b2 = c2, then (a/c)2 + (b/c)2 = 1. With x = a/c and y = b/c we get x2 + y2 = 1. This is the well known equation of the unit circle with center at the origin. Finding Pythagorean triples is therefore equivalent to locating rational points (i.e., points (x,y) for which both x and y are rational) on the unit circle. For if (p/q)2 + (r/s)2 = 1, multiplication by a common denominator leads to an identity between integers.

Rational numbers approximate irrational to any degree of accuracy. Therefore, the set of rational pairs is dense in the whole plane. So, perhaps, one might expect that any curve should contain a lot of rational pairs or meander wildly to avoid them. But this is not the case. The recent proof of Fermat's Last Theorem lets us claim that the curves xN + yN = 1 with N>2 contain no rational points (except of course for the trivial ones - (0, 1) and (1, 0).) But there are simpler examples. From Lindemann's theorem, we conclude that the graph of a perfectly smooth function y = ex contains a single rational point, (0,1). Moreover, pulling the unit circle even a little aside may change the picture drastically. Let (xk, yk) = (2/k, 3/k), and consider a unit circle with center at (xk, yk). As k grows, the point approaches the origin, but for no k, such a circle contains a rational point.

Let t be defined by

(1) t = y/(x+1).

Then t(x+1) = y and

  t2(x + 1)2 = y2 = 1 - x2 = (1 + x)(1 - x).

We are not interested in negative x. So let's cancel (1+x) on both sides. The result is

  t2(x + 1) = (1 - x).

Solving for x we get

(2) x = (1 - t2)/(1 + t2)

From y = t(1+x) we also obtain

(3) y = 2t/(1 + t2)

Formulas (1)-(3) show that t is rational iff both x and y are rational.

There is another way to look at the just described configuration.

The configuration consists of the unit circle centered at the origin and a straight line passing through the point (-1,0) which lies on the circle. Unless the line is tangent to the circle, the two have a second common point. In order to find this point, we have to solve simultaneously two equations: the quadratic equation of the circle x2 + y2 = 1 and the linear equation of the line. By eliminating either x or y from the latter, and substituting the result into the former, we get a quadratic equation in one variable with integer coefficients. One solution of this equation is immediate - it is related to the point (-1,0), and is rational. Therefore, the second solution of the equation is also rational and gives either x- or y-coordinate of the second point of intersection.

The applet below illustrates this concept. Several attributes are modifiable:

  1. Drag the hollow circle on the slanted line to change its slope.
  2. The line may or may not be snapped to the grid.
  3. Change the scale by dragging point (1,0).
  4. Drag the center of the coordinates to any desired position.
  5. Drag the text box when it gets in the way.

This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Remark

When the dot on the line is not confined to the grid, the dot appears to move freely. However, its center's location is naturally restricted to the pixels of your screen. The pixels may be many but, nonetheless, they are arranged into a rectangular grid. Relative to the grid of the applet's coordinate axes, pixels are located at the points with rational coordinates with the denominator always equal to the number of pixels between two ticks on either axis. The slope t is then also rational and leads to a Pythagorean Triple as above.

References

  1. K. Devlin, Mathematics: The Science of Patterns, Scientific American Library, 1997
  2. S. Lang, The Beauty of Doing Mathematics, Springer-Verlag, 1985
  3. W. Sierpinski, Pythagorean Triangles, Dover, 2003

Pythagorean triples

Copyright © 1996-2008 Alexander Bogomolny

28733132Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
Math
Posted by Laura
2 messages
06:56 AM, Apr-15-08

Divisibility rules - Jargon buste ...
Posted by Carolyn
2 messages
08:35 AM, Apr-04-08

drawing puzzle
Posted by martin gran
31 messages
06:53 PM, May-09-08

conway's game of life
Posted by frequency
0 messages
11:52 PM, May-12-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

Deriving functions based on diffe ...
Posted by ke_45
1 messages
12:47 PM, May-10-08

A typo in
Posted by alexwajn
1 messages
11:36 PM, Apr-19-08