Right-angled triangles with whole number sides have fascinated both professional mathematicians
and number enthusiasts since well before 300 BC when Pythagoras wrote about his famous "theorem".
The oldest mathematical document in the world, a little slab of clay that would fit in your hand,
is a list of such triangles. So what is so fascinating about them? This page starts from scratch
and has lots of facts and figures with several online calculators to help with your own
investigations.
What's on this page
indicates a link to an interactive Calculator on this page links to the
Puzzles and Problems for that section.
Pythagoras was a mathematician born in Greece in about 570 BC. He was interested in
mathematics, science and philosophy. He is known to most people because of
the Pythagoras Theorem that is about a property of all
triangles with a right-angle (an angle of 90°):
a
h
b
If a triangle has one angle which is a right-angle (i.e. 90°)
then there is a special relationship between the lengths of its three sides:
If the longest side (called the hypotenuse) is h
and the other two sides (next to the
right angle) are called a and b, then: a2 + b2 = h2Pythagoras' Theorem
or,
the square of the longest side is the same as the sum of the squares of
the other two sides.
h2 = a2 + b2
is only true for right-angled triangles.
If all the angles of a triangle are less than 90° then
h2 < a2 + b2
For example, in an equilateral triangle with sides 1 1 1 and all angles 60°
12 = 1 < 12 + 12 = 2
If one the angles of a triangle is greater than 90° then
h2 > a2 + b2
Note that in any triangle, the longest side h cannot be longer than the sum of the other two sides.
so h < a + b.
If it equalled the sum of the other two then the triangle is just a line of length a + b = h!
For example, if the two shorter sides of a right-angled triangle are 2 cm and 3 cm, what is
the length of the longest side?
If the longest side is h, then, by Pythagoras' Theorem, we have:
h2
=
22 + 32 = 13
h
=
√13 = 3·60555
Some visual proofs of Pythagoras' Theorem
My favourite proof of the look-and-see variety is on the right.
Both diagrams are of the same size square of side a + b.
Both squares contain the same four identical right-angled triangles in white
(so it is white-angled )
with sides a, b, c.
The left square also has two blue squares
with areas a2 and b2
whereas the right hand one replaces them with one red square of area c2.
This does not depend on the lengths a, b, c; only that they are the sides of a right-angled triangle.
So the two blue squares
are equal in area to the red square, for any right-angled triangle:
a2 + b2 = c2
This makes an effective visual aid by pushing the squares from their locations on the left to
where they are shown on the right. Don't turn them or flip them, just move them
to their respective corners.
There is a very nice illustration of A Device That Illustrates Pythagoras' Theorem
that is a Mathematica Demonstration.
Click on the image on the right here to see an animation in a new window
or to download the active controls version usable with the free Mathematica player.
Bill Richardson has a nice animation of Bhaskara's proof
The 3-4-5 Triangle
In the example above, we chose two whole-number sides and found the longest
side, which was not a whole number.
It is perhaps surprising that there are some right-angled triangles where
all three sides are whole numbers called Pythagorean Triangles.
The three whole number side-lengths are called
a Pythagorean triple or triad.
An example is a = 3, b = 4 and
h = 5, called "the 3-4-5 triangle". We can check it as follows:
32+42 = 9 + 16 = 25 = 52 so
a2 + b2 = h2.
This triple was known to the Babylonians (who lived in the area of present-day Iraq and Iran)
even as long as 5000 years ago! Perhaps they used it to make a right-angled triangle so they could
make true right-angles when constructing buildings - we do not know for certain.
It is very easy to use this to get a right-angle using equally-spaced knots
in a piece of rope, with the help of two friends.
If you hold the ends of the rope together together and one friend holds the fourth knot and
and the other the seventh knot and you all then tug to stretch the rope into a triangle,
you will have the 3-4-5 triangle
that has a true right-angle in it.
The rope can be as long as you like
so you could lay out an accurate right-angle of any size.
The sum of the sides of a triangle is called its perimeter.
We can also easily draw a 3 4 5 triangle as follows:
The
is a 3 4 5 triangle
But all Pythagorean triangles are even easier to draw on squared paper because all their sides are
whole number lengths.
Measure the lengths
of the two smaller sides (those around the right-angle) as lengths along and up
from the same point and then join the two
end-points together.
So Pythagorean triangles also tell us which pairs of points with whole-number coordinates
are a whole-number distance apart not
in a horizontal or vertical direction.
Test a Triangle - is it Pythagorean?
a
h
b
Here is a little calculator that, given any two sides of a right-angled triangle
will compute the third. Or you can give it all three sides to check.
It will check that it is right-angled and, if so, if it is Pythagorean
(all the sides are integers).
Here a and b are the
two legs, the sides surrounding the right-angle, and h is the longest side,
the hypotenuse:
C A L C U L A T O R
More Pythagorean Triples
Is the 3-4-5 the only Pythagorean Triple?
No, because we can double the length of the sides of the 3-4-5 triangle
and still have a right-angled triangle:
its sides will be 6-8-10 and we can check that
102 = 62 + 82.
Continuing this process by tripling 3-4-5 and quadrupling
and so on we have an infinite number of Pythagorean triples:
3
4
5
6
8
10
12
16
20
15
20
25
18
24
30
...
or we can take the series of multiples 1, 11, 111, 1111, etc. and get a pattern:
3
4
5
33
44
55
333
444
555
3333
4444
5555
...
All of these will have the same shape (have the same angles)
but differ in size - the mathematical term is that they are all
similar triangles. If they were the same size but in different positions
or orientations, the triangles are called congruent.
Are there any other differently-shaped right-angled triangles with whole
number sides?
Yes; one is 5, 12, 13 and another is 7, 24, 25.
We can check that they have right angles by using Pythagoras's Theorem that the squares of the two smaller sides sum to the square
of the longest side. For example 52 + 122 = 25 + 144 = 169 =
132 72 + 242 = 49 + 576 = 625 =
252
Graphs of the numbers of Pythagorean Triangles
The number of Pythagorean Triangles with a hypotenuse up to a given limit is remarkable consistent as the limit increases
as is shown by these graphs:
Graphs of the number of Pythagorean Triangles with Hypotenuse<H:
H
Only Primitives
All
Primitives+All
100
300
1000
5000
H
Later we will look more closely at these graphs and find a surprising number appears in connection
with these straight lines.
But for now, how do we find these Pythagorean triangles? Is there a systematic method?
Methods of Generating Pythagorean Triangles
The Two-Fractions method of generating Pythagorean Triples
Here is a very simple way of generating as many Pythagorean triangle as you want:
Method:
Example 1:
Example 2:
Take any two fractions (or whole numbers) whose product is 2
Notice that the fractions do not have to be in their lowest form:
1/3
6
4/2
2/2
Add 2 to each fraction:
7/3
8
8/2
6/2
Cross multiply to turn both into whole numbers
7
24
16
12
These are two sides of a Pythagorean triangle:
7
24
16
12
To find the third, add the squares of these two numbers:
72+242 = 49 + 576 = 625
162+122 = 256 + 144 = 400
... and take the square-root to find the hypotenuse:
√625 = 25
√400 = 20
to get the Pythagorean triangle:
7 24 25
16 12 20
This works for any two fractions whose product is
2 and always generates a Pythagorean triangle:
Start with:
To get triple:
1
2
3 4 5
2/2 1
2 4/2
6 8 10
1/2 2/4
8/2 4
5 12 13
3/3 1
2 6/3
9 12 15
2/3
3
8 15 17
4/4 2/2 1
2 4/2 8/4
12 16 20
1/3
6
7 24 25
3/2
4/3
20 21 29
1/4
8
9 40 41
In fact, all primitive Pythagorean triples are generated from two fractions in lowest form and
all non-primitive Pythagorean triples are generated when at least one of the fractions is not in its
lowest form.
(See later on this page).
Here is a calculator for your experiments and some questions to investigate below it.
C A L C U L A T O R
Puzzles and Problems
Find starting fractions that generate the multiples of 3 4 5:
6 8 10, 9 12 15, 12 16,20, ...
Are some multiples impossible to generate by this method?
Which multiples of 5 12 13 can you generate from two fractions?
10 24 26, 15 36 39, 20 48 52, ...?
Use algebra to prove the two-fractions method always produces a Pythagorean triangle from any two
initial numbers, as follows,
starting with a/b and (2bc)/(ac)
where a, b and c are whole numbers.
Hint: expand ( a2 + 2ab + 2 b2 )2
Find a triple that needs two fractions (not a fraction and a whole number) to generate it.
How many pairs of numbers generate 6 8 10?
I do not have a reference for this method, so if anyone can help, please do email me (details on the link that is my name
the foot of this page). Thanks!
But rather than a method ....
... is there is a formula for generating Pythagorean triples?
The m,n formula for generating Pythagorean Triples
2mn
m2 + n2
m2 – n2
Yes - we can generate Pythagorean Triples by supplying two different positive integer
values for m and n in this diagram.
You can multiply out these terms and check that
( m2 – n2 )2 + (2 m n)2 = ( m2 + n2 )2
Once we have found one triple, we have seen that we can generate many others by just
scaling up all the sides by the same factor.
A Pythagorean triple which is not a multiple of another is called a primitive Pythagorean triple.
So 3,4,5 and 5,12,13 are primitive Pythagorean triples
but 6,8,10 and 333,444,555
and 50,120,130 are not.
Are all the Pythagorean triples generated by this formula?
The bad news is that the answer is "No", but the good news is
that all primitive Pythagorean triples are generated by some m and n values
in the formula above!
The formula using m and n will not give
all triples since it misses some of the non-primitive ones, such as 9,12,15. This is a
Pythagorean triple since, as a triangle, is it just three times the 3,4,5
triangle (by which we mean
that we just MULTIPLY the lengths of each side of a 3,4,5 triangle by 3,
which we already know is right-angled).
But 9, 12, 15 is missed by our m,n formula because:
Our formula said m and n were positive whole numbers
and the Pythagorean triple was
m2 – n2 , 2mn , m2 + n2
and, since we want (positive) whole number values in our triple, then m > n
(otherwise the first number in the triple is negative).
The 2mn value is one of the sides and the only even side in 9, 12, 15 is 12,
so 12 = 2mn.
Hence mn = 6. But m > n, so we can only have two cases:
m = 6 with n = 1 OR
m = 3 and n = 2
The first case gives the triple 35, 12, 37 and the second case
gives 5, 12, 13, neither of which is
the 9, 12, 15 triple.
Here is a table of Pythagorean triangles with a smaller side up to 40: (PPT? means Primitive Pythagorean Triangle?)
Triple
PPT?
m,n
3, 4, 5
primitive
2,1
5, 12, 13
primitive
3,2
6, 8, 10
2× 3, 4, 5
3,1
7, 24, 25
primitive
4,3
8, 15, 17
primitive
4,1
9, 12, 15
3× 3, 4, 5
-,-
9, 40, 41
primitive
5,4
10, 24, 26
2× 5, 12, 13
5,1
11, 60, 61
primitive
6,5
12, 16, 20
4× 3, 4, 5
4,2
12, 35, 37
primitive
6,1
13, 84, 85
primitive
7,6
14, 48, 50
2× 7, 24, 25
7,1
15, 20, 25
5× 3, 4, 5
-,-
15, 36, 39
3× 5, 12, 13
-,-
15, 112, 113
primitive
8,7
16, 30, 34
2× 8, 15, 17
5,3
16, 63, 65
primitive
8,1
17, 144, 145
primitive
9,8
18, 24, 30
6× 3, 4, 5
-,-
18, 80, 82
2× 9, 40, 41
9,1
19, 180, 181
primitive
10,9
20, 48, 52
4× 5, 12, 13
6,4
20, 99, 101
primitive
10,1
20, 21, 29
primitive
5,2
21, 28, 35
7× 3, 4, 5
-,-
21, 72, 75
3× 7, 24, 25
-,-
21, 220, 221
primitive
11,10
22, 120, 122
2× 11, 60, 61
11,1
23, 264, 265
primitive
12,11
24, 32, 40
8× 3, 4, 5
6,2
24, 45, 51
3× 8, 15, 17
-,-
24, 70, 74
2× 12, 35, 37
7,5
24, 143, 145
primitive
12,1
25, 60, 65
5× 5, 12, 13
-,-
25, 312, 313
primitive
13,12
26, 168, 170
2× 13, 84, 85
13,1
27, 36, 45
9× 3, 4, 5
6,3
27, 120, 123
3× 9, 40, 41
-,-
27, 364, 365
primitive
14,13
28, 96, 100
4× 7, 24, 25
8,6
28, 45, 53
primitive
7,2
28, 195, 197
primitive
14,1
29, 420, 421
primitive
15,14
30, 40, 50
10× 3, 4, 5
-,-
30, 72, 78
6× 5, 12, 13
-,-
30, 224, 226
2× 15, 112, 113
15,1
31, 480, 481
primitive
16,15
32, 60, 68
4× 8, 15, 17
8,2
32, 126, 130
2× 16, 63, 65
9,7
32, 255, 257
primitive
16,1
33, 44, 55
11× 3, 4, 5
-,-
33, 180, 183
3× 11, 60, 61
-,-
33, 544, 545
primitive
17,16
33, 56, 65
primitive
7,4
34, 288, 290
2× 17, 144, 145
17,1
35, 84, 91
7× 5, 12, 13
-,-
35, 120, 125
5× 7, 24, 25
-,-
35, 612, 613
primitive
18,17
36, 48, 60
12× 3, 4, 5
-,-
36, 160, 164
4× 9, 40, 41
10,8
36, 105, 111
3× 12, 35, 37
-,-
36, 323, 325
primitive
18,1
36, 77, 85
primitive
9,2
37, 684, 685
primitive
19,18
38, 360, 362
2× 19, 180, 181
19,1
39, 52, 65
13× 3, 4, 5
-,-
39, 252, 255
3× 13, 84, 85
-,-
39, 760, 761
primitive
20,19
39, 80, 89
primitive
8,5
40, 96, 104
8× 5, 12, 13
10,2
40, 75, 85
5× 8, 15, 17
-,-
40, 198, 202
2× 20, 99, 101
11,9
40, 399, 401
primitive
20,1
40, 42, 58
2× 20, 21, 29
7,3
A Pythagorean Triple generator
Here is a calculator to compute the sides of a triangle using the formula above - just type
in the values for m and n.
Remember that the formula will find all the Primitive Triples but it will not
find all the non-primitives. The calculator will tell you if your values of
m and n generate a Primitive
triple or a multiple of a primitive.
Alternatively, you can give it a single m value or a range of
m values and it will show you all the triangles it can generate.
Finally, give it a Pythagorean triangle and it will
test if it has generators m and n or not.
C A L C U L A T O R
The two-fraction method and the m,n generators method
We can now show that the two-fractions method that we saw earlier on the page
generates all primitive Pythagorean triples by identifying n with b
and m with a + b
to find two starting fractions.
This is equivalent to choosing a = m – n and
b = n for fractions
a
2b
b
a
to get the primitive triple with m,n generators.
If the triangle is non-primitive, say it is k times a primitive triangle, then the
substitutions above give the primitive triangle and we need only multiply one of the
fractions by k on the top and on the bottom to get the non-primitive one.
Angling for Pythagorean Triples Dan Kalman
The College Mathematics Journal 17 (1986), pages 167-168.
Introduction to the Theory of numbers, G H Hardy and E M Wright,
Oxford University Press, (6th edition, paperback, 2008)
The m n formula and a proof are given as Theorem 225.
This is a classic book, revised and updated in the sixth edition, that is well worth studying but it
does tend to be at university undergraduate level some of the time.
An easy method of writing down a series of Triples
Look at the following series of Pythagorean triples. It is easy to spot the pattern and to
remember it. If you then write it down to show your friends it will
look as if you have impressive calculating skills!
21
220
221
201
20200
20201
2001
2002000
2002001
20001
200020000
200020001
It uses n+1 for m
in the formula and then lets n be powers of 10. This simplifies the triples
to be 2n+1, 2n(n+1), 2n2+2n+1.
Can you find another simple method like this that always produces Pythagorean Triangles (not necessarily with consecutive sides)?
Solution to Problem: Find a Scheme for writing mechanically an unlimited number of Pythagorean Triangles
M Willey, E C Kennedy, American Mathematical Monthly vol 41 (1934) page 330.
There is a Calculator below that you can use to generate
many more simple patterns like this one.
Patterns in Pythagorean Triples
Let's call the two sides of the triangle that form the right-angle, its legs and use the letters
a and b. The hypotenuse is the longest side opposite the right-angle and we will often use
h for it. The two legs and the hypotenuse are the three sides of the triangle,
triple or triad a ,b, h.
Different authors use different ways of writing triads such as a-b-h but we will use
a, b, h on this page.
The series of lengths of the hypotenuse of primitive Pythagorean triangles begins 5, 13, 17, 25, 29, 37, 41 and is
A020882 in Sloane's
Online Encyclopedia of Integer Sequences. It will
contain 65 twice - the smallest number that can be the hypotenuse of more than one primitive Pythagorean triangle.
The series of numbers that are the hypotenuse of more than one primitive Pythagorean triangle is
65, 85, 145, 185, 205, 221, 265, 305,... A024409
There are lots of patterns in the list of Pythagorean Triples above. To start off your investigations here are
a few.
Hypotenuse and Longest side are consecutive
3,
4,
5
5,
12,
13
7,
24,
25
9,
40,
41
11,
60,
61
The first and simplest Pythagorean triangle is the 3, 4, 5
triangle. Also near the top of the list is 5, 12, 13.
In both of these the longest side and the hypotenuse are consecutive integers.
The list here shows there are more.
Can you spot the pattern?
Chris Evans when a student of Diss High School found the following pattern:
1
1
3
=
4
3
→
3
4
(5)
2
2
5
=
12
5
→
5
12
(13)
3
3
7
=
24
7
→
7
24
(25)
4
4
9
=
40
9
→
9
40
(41)
where the fractions give the two sides and the hypotenuse is the numerator + 1
You will have noticed that the smallest sides
are the odd numbers 3, 5, 7, 9,... So the smallest sides are of the form 2i+1.
The other sides, as a series are 4, 12, 24, 40, 60... Can we find a formula here?
We notice they are all multiples of 4: 4×1, 4×3, 4×6, 4×10, 4×15,.. . The series of multiples:
1, 3, 6, 10, 15,... are the
Triangle Numbers
with a formula i(i+1)/2.
So our second sides are 4 times each of these, or, simply, just 2i(i+1).
The third side is just one more than the second side: 2i(i+1)+1,
so our formula is as follows:
shortest side = 2i+1;
longest side = 2i(i+1);
hypotenuse = 1+2i(i+1)
Check now that the sum of the squares of the two sides is the same as the square of the hypotenuse (Pythagoras's Theorem).
i
a:2i+1
b:2i(i+1)
h=b+1
1
3
2×1×2=4
5
2
5
2×2×3=12
13
3
7
2×3×4=24
25
4
9
2×4×5=40
41
5
11
2×5×6=60
61
6
13
2×6×7=84
85
7
15
2×7×8=112
113
Bill Batchelor points out that the sum of the two consecutive sides is 4 i2 + 4 i + 1
which is just the square of the smallest side.
This gives us an alternative method of generating these triples:
Take an odd number as the smallest side: e.g. 9
square it (81) - which will be another odd number
split the square into two halves (40·5),
rounding one down (40)
and the other rounded up (41), to form the other two sides (9, 40, 41)
Alternatively, let's look at the m,n values for each of these triples. Since the
hypotenuse is one more than a leg, the 3 sides have no common factor so are primitive and therefore
all of them do have m,n values:
Triple
m
n
3, 4, 5
2
1
5, 12, 13
3
2
7, 24, 25
4
3
9, 40, 41
5
4
11, 60, 61
6
5
It is easy to see that m = n + 1.
The m,n formula in this case gives
a = m2 – n2 = (n+1)2 – n2 = 2 n + 1
b = 2 m n = 2 (n+1) n = 2 n2 + 2 n
h = m2 + n2 = (n+1)2 + n2 = 2 n2 + 2 n + 1
So h is b+1 and the pattern is always true:
if m = n+1 in the m,n formula
then it generates a (primitive) triple with hypotenuse = 1 + the longest leg.
Are these all there are? Perhaps there are other m,n values with a leg and hypotenuse consecutive numbers.
In fact, they are all given by the formula above because:
The triangles must be primitive so we know they have an m,n form. h = m2 + n2 could be either one more than
either m2 – n2
or 2 m n:
If h = m2 + n2 = (m2 – n2) + 1
then, taking m2 from both sides:
n2 = – n2 + 1
2 n2 = 1 or n2 = 1/2
and this is not possible for a whole number n
So h is never a + 1.
If h = m2 + n2 = 2 m n + 1 then m2 – 2 m n + n2 = 1 which is the same as (m – n)2 = 1. Therefore m – n = 1 or m – n = –1
But the hypotenuse is a positive number and is m2 – n2
so we must have so m>n and so m – n cannot be –1
The only condition we can have is that m – n = 1 or m = n + 1
- there are no other triangles with hypotenuse one more than a leg except those generated by consecutive
m n values in the m,n formula.
The series 4, 12, 24, 40, 60,... of longest legs [ numbers given by the formula 2 n(n+1) ]
and 5, 13, 25, 41, 61, ... [ numbers of the form 2 n(n+1) + 1 ] are also
connected by this unusual pattern of square number sums:
Proof without Words: Pythagorean Runs Michael Boardman
Mathematics Magazine 73 (2000) page 59.
The two legs are consecutive
Also in the 3, 4, 5 triple, the two legs of the triangle a and
b are
consecutive, b = a+1. Are there any more like this?
Yes! 20, 21, 29.
Although the list above does not contain any more, there are larger examples:
3, 4, 5 20, 21, 29 119, 120, 169 696, 697, 985
Because the two legs are consecutive numbers, they will have no common factor so all of these will be
primitive. We can therefore find certain special values for m and n
in the m,n formula above. Here is the same list with their m,n values:
m
n
a=m2-n2
b=a+1=2mn
h=m2+n2
2
1
3
4
5
5
2
21
20
29
12
5
119
120
169
29
12
697
696
985
This already suggests a way that we can use the generators
m and n
for one triple to find generators for the next.
See if you can find how and also find a formula for this pattern of triples.
Kayne Johnston aged 13 has also found the neat pattern to compute this table without using
the m and n generators, each row being computed simply from the two rows before:
the next row in the table has a smallest side
that is
6 times the previous smallest side
minus the smallest side before that (the penultimate in the list)
plus 2.
For instance, after the first two rows, where the smallest sides are 3 and 20,
the next is 6 20 – 3
+ 2 = 120 –3 + 2 = 119.
The other side is just one more than the smallest, so here is it 120.
If the smallest side of the nth triple is s(n)
then a formula for s(n) is:
Can you find a similar method to compute the hypotenuse but without using Pythagoras Theorem on the
two sides?
The series here are:
The shortest sides are 3, 20, 119, 696,... A001652 formula: 6×last – penultimate + 2
The second legs are 4, 21, 120, 697,... A046090 formula: 6×last – penultimate – 2
The hypotenuses are 5, 29, 169, 985,... A001653 formula: 6×last – penultimate
Beiler (see reference at the foot of this page) gives a formula for these triples
so that the rth triple in
this list is given directly in terms of r.
Dan Sikorski points out that the ratio of successive hypotenuses tends to 3 + 2 √2.
This is also borne out by the continued fraction
for this value, which is 5, [1,4] = 5.82842712474619
and its convergents are
5
,
6
,
29
,
35
,
169
,
204
,
985
, ...
1
1
5
6
29
35
169
The m,n values for consecutive-legs triangles
m
n
a=m2-n2
b=a+1=2mn
h=m2+n2
2
1
3
4
5
5
2
21
20
29
12
5
119
120
169
29
12
697
696
985
In the previous section we found a recursion pattern in the series of smallest sides in the consecutive leg triangles.
Now let's look again at these triangles but concentrate on their m,n values
as shown in the table here:
The m,n values are successive terms of a single series: 1, 2, 5, 12, 29, ....
Can you guess the next number in this series?
It is a similar kind of series to the smallest sides, where only the previous two numbers are needed to compute the next.
This time the rule is
2 times the previous one plus the one before that
For example, after 1, 2 the next would be
2×2 + 1 = 5.
and after 1, 2, 5 the next would be
2×5 + 2 = 12,
and so on. Extending the series beyond 29
we have 1, 2, 5, 12, 29, 70, 169, 408, 985, ... .
This series of numbers is called the Pell numbers
(A000129).
Any pair of neighbouring numbers used as m,nvalues generates all of the
Pythagorean triangles with consecutive sides and only those triangles.
Puzzles and Problems
With the Fibonacci numbers, the ratio of one Fibonacci number to the previous (smaller) one
got closer and closer to Phi. What value does this ratio approach for the Pell Numbers:
?
If you have looked at the page on An Introduction to Continued Fractions
then how are the Pell numbers related to the convergents to √2 = 1.414213562373095..?
More patterns
There are many more patterns in the Pythagorean Triples!
For instance
there are primitive triangles whose longest side and hypotenuse
differ by 2, such as 8, 15, 17 and 12, 35, 37
and many more.
What is the mathematical pattern in these triples?
Another idea is to take the formula and find special cases,
remembering that the formula does not generate all
Pythagorean triples.
For instance, let n=1. We then have triples
m2–1, 2m, m2+1, although we have
to make the restriction that m>1 for the hypotenuse to be a positive number:
m
m2–1
2m
m2+1
2
3
4
5
3
8
6
10
4
15
8
17
5
24
10
26
6
35
12
37
Notice that not all of these are primitive and also that there are other triples with a side two less than the hypotenuse that
are not in this list.
Can any number be a side in some Pythagorean Triangle?
Note that here we use the terms leg, side, hypotenuse as follows:
there are two legs and a hypotenuse making the 3 sides of each
Pythagorean triangle.
The Number of Pythagorean Triangles having a side n
These sequences are the counts for n=1, 2, 3,... in each of the 6 categories:
so that 0, 0, 1, 1, 2,.. means
0 triangles for n=1, 0 for n=2, 1 for n=3, 1 for n=4, 2 for n=5 etc.
It looks like every fourth number after 2, namely 6, 10, 14, 28,... cannot be the side of a primitive triangle.
Also you might guess that there are no gaps in the list of numbers that can be a side of at least one triple.
These are indeed true but not proved here.
So the answer to our question Can any number be a side in some Pythagorean Triangle? is Yes!
From the table above, we can make an ordered list of the numbers themselves that can appear as sides in each category.
If we look for triples with a side that is a power of 2, we find:
for side 21=2 there are none
for side 22=4: 3 4 5 there is only 1
for side 23=8: 6 8 10, 8 15 17 so there are 2
for side 24=16: 12 16 20, 16 30 34, 16 63 64 so there are 3
...
for side 2n+1 there are exactly n
E2460
D Meyers, C F Pinzka, W R Westphal, H M Marston, R B Eggleton
The American Mathematical Monthly vol 82 (1975) pages 303-304.
The Possible Sides of Pythagorean Triangles
Here the actual sides are listed.
If there is more than one possible Pythagorean triangle with a given side, the side is repeated in these sequences.
The sequence of possible side lengths without repetitions is given in brackets.
Primitive
All
Legs
3, 4, 5, 7, 8, 9, 11, 12, 12, 13, 15, 15, 16,... A024355
(A042965)
these are all the numbers except those
of the form 4n + 2 = 6, 10, 14, ...
5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 65,... A020882
(A008846=A002144)
these are the integers that have all their prime factors
of the form 4n + 1
5, 10, 13, 15, 17, 20, 25, 25, 26,... A009000
(A009003)
these are the integers that have at least one prime factor
of the form 4n + 1
Sides
3, 4, 5, 5, 7, 8, 9, 11, 12, 12, 13, 13,... A024357
(A042965)
this is every number>2 except those of the form 4n + 2 = 6, 10, 14, ...
3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, 12, 13, 13,... A009070
this series includes every integer>2
Number Series in Pythagorean Triangles
Other series of interest here are:
A020883Longest legs in primitive triples:
4, 12, 15, 21, 24, 35, 40, 45, 55, 56,... (or
A024354 without duplicates or
A024360
as a count of the number of triangles with longest side n or
A0244410
longest legs in more than one primitive triangle)
A020884Shortest legs in primitive triples:
3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 20,...
(A024352 without repetitions
or A024359
as a list of counts of the number of triangles with each shortest side n or
A0244411
shortest legs in more than one primitive triangle)
Except for 0 and 1, these are all the numbers that are the difference of two squares or,
equivalently, every number that when divided by 4 has a remainder of 0, 1 or 3
A042965).
A024409Hypotenuse of more than one primitive triangle.
A002144 Prime Hypotenuse: 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97,...
or primes whose square is the sum of two non-zero squares.
A024406Area of primitive triangles:
6, 30, 60, 84, 180, 210, 210, 330,... (
A020885 is areas divided by 6,
A024407
areas of more than one primitive triangle
since all such areas are a multiple of 6)
A024364 The perimeters of primitive triangles:
12, 30, 40, 56, 70, 84, 90,... (A024408
perimeters of more than one primitive triangle); also
A099829 Smallest perimeter of n Pythagorean triangles.
A120090 12, 30, 56, 90, 132, 154, 182, ...
are numbers whose squares are perimeters of primitive Pythagorean triangles.
A006593 the smallest number that
is as a side in n triads: 3, 5, 16, 12, 15, 125, 24,... (so 3 is the smallest side in just 1 triad,
5 is the smallest that occurs in exactly 2 triads, 16 in 3 triads, etc.)
Pythagorean Triangles with Equal Perimeters
If I have a piece of string of length n, how many right-angled triangles can I make from it if the sides have integer lengths?
The diagram here shows the only configuration if the rope has length 3+4+5=12. The length of the rope is the perimeter of the
triangle.
A009096 lists the perimeters of all Pythagorean
triangles in order: 12, 24, 30, 36, 40, 48, 56, 60, 60, 70,...
(A010814 without repetitions)
The same problem but this time we want the smallest length of string that makes exactly n different right-angled triangles.
It is 12 for a unique triangle: 3, 4, 5 whereas a length of 60 can make 2 different triangles:
5x 3, 4, 5 and 2x 5, 12, 13
but it has to be 120 for 3 triangles: 10x 3, 4, 5, 4x 5, 12, 13,
24, 45, 5, so the series is 12, 60, 120,...
A099830
A099831 Perimeters of exactly 2 Pythagorean triangles: the
length of the rope if we can form exactly 2 different Pythagorean triangles using it. We saw in the previous problem that the smallest is 60,
so what are the other values? They are
60, 84, 90, 132, 144, 210,..
since 84=7x 3, 4, 5 and 12, 35, 37, the next is 90 and so on.
A099832 Perimeters of exactly 3 Pythagorean triangles: 120 is the smallest
and also,in order, we have 120, 168, 180, 252, 280, ...
When is n a member of a Pythagorean triple? Dominic and Alfred Vella,
Mathematical Gazette Note 87.04, pages 102-105, vol 87 (2003). This article
and others on Pythagorean triples
are available in PDF format from Dominic Vella's
mathematics page.
Graphs of the Primitive Triples
We can plot the Pythagorean triangles on a graph in a natural way
as x-y coordinates
if we use the two legs are the coordinates.
The hypotenuse is then the distance of the point from the origin.
Plotting all Pythagorean Triangles
If we plot all Pythagorean triangles with a leg up to size 100
we get the graph shown here:
Since each triple a b h is the same triple as its 'reflection'
b a h, each triple is plotted twice,
the reflections of the black points being in red.
The prominent straight lines are the multiples of the smaller Pythagorean triangles 3 4 5
in black and 4 3 5 in red.
There are more straight lines through the origin if we plot more triples:
The lines of points are densest for the multiples of the smaller (primitive) Pythagorean triples, so next we see
5 12 13 and so on:
Plotting the Primitive Pythagorean triangles
If we plot just the primitive Pythagorean triangles, the straight lines disappear and something else interesting appears.
The curved lines are even clearer on this
The UAD Tree of Primitive Pythagorean Triangles
The UAD Tree growing to the right!
3 4 5
U 5 12 13
U 7 24 25
A 55 48 73
D 45 28 53
A 21 20 29
U 39 80 89
A 119 120 169
D 77 36 85
D 15 8 17
U 33 56 65
A 65 72 97
D 35 12 37
We can organise all the primitive triangles into a kind of genealogical tree starting from 3 4 5.
The "tree" grows to the right and each node in the tree has exactly 3 descendants, called Up, Along and Down,
or U,A and D for short.
Each "descendant" triple is generated by a different transformation of
the "parent" triple a b h on its left
as follows:
E.g: 3 4 5
Starting from a, b, h
go
Up
to:
a – 2b + 2h,
2a – b + 2h,
2a – 2b + 3h
5 12 13
go
Along
to:
a + 2b + 2h,
2a + b + 2h,
2a + 2b + 3h
21 20 29
go
Down
to:
–a + 2b + 2h,
–2a + b + 2h,
–2a + 2b + 3h
15 8 17
The article by Hall (see end of this section) proves that every primitive triple is in this tree and that the tree contains
only primitive triples.
4 3 5
U 8 15 17
A 20 21 29
D 12 5 13
If we swop a and b in any triple
then the three U, A and D transformations still produce the same three triples
but the Up and Down triples have swopped places and in all three
the two legs a and b have swopped places too.
The m,n generators in the UAD tree
The m,n values
2,1
U 3,2
U 4,3
A 8,3
D 7,2
A 5,2
U 8,5
A 12,5
D 9,2
D 4,1
U 7,4
A 9,4
D 6,1
Twenty years after Hall's article about the UAD tree, other investigators
found there is a set of simpler transformations
that produces the same tree as Hall's but using the m,n generators for each triple
as follows:
Starting from the triple with generators m,n on the left we have:
m,n
go
Up
to
2m – n,
m
go
Along
to
2m + n,
m
go
Down
to
m + 2n,
n
The UAD tree Calculator
For any primitive triple, this calculator will
show the three primitive U, A and D triples following it
the UAD path to a triple from 3,4,5
find the triple at the end of given a path in the tree as a string of U, A and D directions
for example AU is the path to the triple 39 80 89
the [m,n] generators are shown for each triple
C A L C U L A T O R
Puzzles and Problems
Find the paths to the triples with consecutive legs:
20 21 29, 119 120 169
, ...
What paths take us to the triples with hypotenuse one greater than a leg:
3 4 5, 5 12 13, 7 24 25, ...?
What property have all the triples with paths D, DD, DDD, DDDD, ....?
From any triple in the tree, on which branch is another
with the same difference between
hypotenuse h and the side b?
hypotenuse h and side a?
sides a and b?
Classroom Note 232. Genealogy of Pythagorean Triads A Hall
The Mathematical Gazette vol 54 (1970) pages 377-379. The family tree of Pythagorean triples A R Kanga IMA Bulletin vol 26 (1990) pages 15-27.
78.12 The family tree of Pythagorean triplets revisited R Saunders, T Randall
Mathematical Gazette vol 78 (1994) pages 190-193.
Barning preceded Hall in the discovery of these matrices, seemingly independently discovering the same tree: On Pythagorean and quasi-Pythagorean triangles and a generation process with the help of unimodular matrices
F J M Barning Math. Centrum Amsterdam Afd Zuivere Wisk ZW-001 (1963)
in Dutch,
so you may see them referred to as Hall Matrices or Barning's Pythagorean Tree or the Barning-Hall method.
(Cited in:
Matrix Generation of Pythagorean n-Tuples D Cass, P J Arpaia
Proc. American Math Soc. Vol 109 (1990) page 70.)
Other triangle properties
Perimeter and Area
The perimeter of a triangle a b h
is the sum of the lengths of the sides a+b+h.
Since the sides of Pythagorean triangles are integers, so is the perimeter.
the perimeter is the distance your pencil has to travel to draw it accurately
if it was a triangular field, it is the length of the fencing needed to enclose the field
The area of Pythagorean triangle a b h is just half the product of the two legs
(the sides that make the right-angle) ab/2.
The area of the triangle is the amount of paint you would need to colour it in
The area determines how much grass seed you would need to fill a triangular field
Is the area always an integer for Pythagorean triangles?
Yes! From the m,n formula above, one side is 2mn so is even.
The product of the two legs will be 2 m n (m2 – n2)
so the area, which is just half of the product of the legs, is m n (m2 – n2)
and this is always a whole number because m and n are.
You can use the Calculator web Calculator (opens in a new window)
to find all Pythagorean triangles with longest side up to 100, together with
the length of the perimeter P and its area A:
All Pythagorean Triples with sides up to 100
arranged in order of hypotenuse (longest side):
with Perimeter (a+b+h) and Area ab/2
Triad
Primitive?
P
A
3, 4, 5
primitive
12
6
6, 8, 10
2× 3, 4, 5
24
24
5, 12, 13
primitive
30
30
9, 12, 15
3× 3, 4, 5
36
54
8, 15, 17
primitive
40
60
12, 16, 20
4× 3, 4, 5
48
96
15, 20, 25
5× 3, 4, 5
60
150
7, 24, 25
primitive
56
84
10, 24, 26
2× 5, 12, 13
60
120
20, 21, 29
primitive
70
210
18, 24, 30
6× 3, 4, 5
72
216
16, 30, 34
2× 8, 15, 17
80
240
21, 28, 35
7× 3, 4, 5
84
294
12, 35, 37
primitive
84
210
15, 36, 39
3× 5, 12, 13
90
270
24, 32, 40
8× 3, 4, 5
96
384
9, 40, 41
primitive
90
180
27, 36, 45
9× 3, 4, 5
108
486
30, 40, 50
10× 3, 4, 5
120
600
14, 48, 50
2× 7, 24, 25
112
336
24, 45, 51
3× 8, 15, 17
120
540
20, 48, 52
4× 5, 12, 13
120
480
28, 45, 53
primitive
126
630
33, 44, 55
11× 3, 4, 5
132
726
40, 42, 58
2× 20, 21, 29
140
840
36, 48, 60
12× 3, 4, 5
144
864
11, 60, 61
primitive
132
330
39, 52, 65
13× 3, 4, 5
156
1014
25, 60, 65
5× 5, 12, 13
150
750
33, 56, 65
primitive
154
924
16, 63, 65
primitive
144
504
32, 60, 68
4× 8, 15, 17
160
960
42, 56, 70
14× 3, 4, 5
168
1176
48, 55, 73
primitive
176
1320
24, 70, 74
2× 12, 35, 37
168
840
45, 60, 75
15× 3, 4, 5
180
1350
21, 72, 75
3× 7, 24, 25
168
756
30, 72, 78
6× 5, 12, 13
180
1080
48, 64, 80
16× 3, 4, 5
192
1536
18, 80, 82
2× 9, 40, 41
180
720
51, 68, 85
17× 3, 4, 5
204
1734
40, 75, 85
5× 8, 15, 17
200
1500
36, 77, 85
primitive
198
1386
13, 84, 85
primitive
182
546
60, 63, 87
3× 20, 21, 29
210
1890
39, 80, 89
primitive
208
1560
54, 72, 90
18× 3, 4, 5
216
1944
35, 84, 91
7× 5, 12, 13
210
1470
57, 76, 95
19× 3, 4, 5
228
2166
65, 72, 97
primitive
234
2340
60, 80, 100
20× 3, 4, 5
240
2400
28, 96, 100
4× 7, 24, 25
224
1344
See also Douglas Butler's web page
with a list of 2098 triples
with hypotenuse up to 2100.
In the table above 3 4 5 is the only triangle with an area smaller than its perimeter.
We can find two triples with a perimeter equal to its area: 6 8 10 has P=A=24 and
5 12 13 has P=A=30 (primitive)
Triangles with an area twice their perimeter are: 12 16 20 has P=48 and A=2P=96 10 24 36 has P=60 and A=2P=120 9 40 41 has P=90 and A=2P=180 (primitive)
The possible areas of a Pythagorean triangle are
6,24,30,54,60,84,96,... A009112)
and for primitive triangles they are
6,30,60,84,180,... (A024365)
The possible perimeters
12,24,30,36,40,48,56,60,... (A009096)
and primitive triangle's perimeters
are 12,30,40,56,70,84,90,126,... (A024364)
The first number that is a perimeter of two triangles is 60 (followed by 90, 132, 312, 330 ..)
and the smallest perimeter common to three triangles is 120 (followed by 336,396 )
and the smallest common to 4 is 360
and common to 5 is 420.
* For which n is there always a Pythagorean triangle with an area n times its perimeter?
* For which n is there always a primitive Pythagorean triangle with an area n times its perimeter?
Find two Pythagorean triangles with the same area.
[Check your answers with A009127.]
Find the first few areas that are common to exactly two Pythagorean triangles.
[Hint: The numbers in A009127
will help with this and the next two Problems.]
Find three Pythagorean triangles with the same area.
What about four?
What is the smallest area common to 2, 3, 4, ... Pythagorean triangles?
[ Check your answer with A094805 ]
If I have a piece of string of length 12 I can only make one Pythagorean triangle from it, namely 3,4,5.
The same is true if the string was of length 24.
How does the series of string lengths that begins 12, 24, continue if there
is a unique Pythagorean triangle with that perimeter?
A string of length 60 gives me two
possible triangles with perimeter 60. What are they?
The smallest lengths of string that can be the perimeter of just one Pythagorean triangle is 12.
What is the smallest length that makes just two triangles? What about three? And if four?
[Check your answer with A098714]
* The answers to 1 and 2 are found in: Right Triangles with Perimeter and Area Equal W Parsons
The College Mathematics Journal vol 15 (1984) page 429.
The product of the 3 sides
The perimeter is the sum of the three sides. What about their product? This number does not seem to have any geometrical or practical significance in terms of the triangle but is of interest to us mathematically.
The products of the three sides of some small Pythagorean triangles are:
3 4 5 has product 60
6 8 10 has product 480
5 12 13 has product 780
9 12 15 has product 1620
8 15 17 has product 2040
7 24 25 has product 4200
20 21 29 has product 12180
The list of side-products in order begins as follows:
60, 480, 780, 1620, 2040, 3840, 4200, ...
(A057096).
In every Pythagorean triangle the following six facts are always true:
one side is a multiple of 3
one side is a multiple of 4
so the product of the two legs is always a multiple of 12
and the area is therefore always a multiple of 6
one side is a multiple of 5
so the product of all three sides is always a multiple of 3×4×5=60
So if we divide the sides-products by 60 we have
1,8,13,27,34,64,70,104,125,...(A057097).
This series contains all the cubes 13=1,
23=8, 33=27, ...
If we restrict ourselves to only primitive triangles, the ordered list of side-products is:
60, 780, 2040, 4200, 12180, 14760, 15540,... (A063011)
and the series as multiples of 60 is
1, 13, 34, 70, 203, 246, ... (A081752)
It is an "open question" whether the ordered series of products for all Pythagorean triangles has a repeated item in it or if all the products are in fact unique:-
Unsolved Problems in Number Theory, R K Guy (2nd ed.) Springer-Verlag
(1994),
Problem D21 "Triangles with Integer Sides, Medians, and Area" pages 188-190.
The Incircle and Inradius
First we find three simple formula for the inradius, r, of a right-angled triangle. Then we will
see how to find Pythagorean triangles with a given inradius and to count the number of triangles too.
Three formulae for the Inradius
We can draw a circle touching all 3 sides of any triangle, called the incircle
with radius the inradius usually denoted by r and centre the incentre.
From the symmetry of the circle, a line from its centre to each vertex of the triangle will halve each of the
angles in the triangle.
Lines from the incentre to the vertices (shown in
gray here) divide the triangle into three smaller ones, each having the same
height, r on a base of one side of the whole triangle.
The area of a triangle is one half of the base of the triangle times its height.
So the three separate areas sum to the whole area:
area =
a r
+
b r
+
c r
= r
a + b + c
2
2
2
2
The sum of the sides of a triangle is the length of its perimeter and,
since we have the perimeter halved in the formula
we often find this expressed using the semiperimeter s:
area = inradius × semiperimeter = r s
We now have a simple formula for the inradius, r, of any triangle:
r =
2 area
=
area
perimeter
semiperimeter
In a right-angled triangle, the area is just half the product of the two legs,
a b / 2 or
2 area = a b so the formula for r is even simpler:
r =
a b
a + b + h
Since all primitive right-angled Pythagorean triangles can be derived using the m,n
formula above, then, in terms of m and n we have
r =
(m2–n2) 2mn
=
(m2–n2) 2mn
=
(m–n)(m+n)2mn
= (m–n)n
m2–n2 + 2mn + m2+n2
2m2 + 2mn
2m(m+n)
r = (m – n) n
So we have, in primitive right-angled triangles, the inradius, r
is therefore always an integer because m and n are.
Non-primitive triangles are just multiples of primitives, so their inradius is an integer too.
Therefore:
In all Pythagorean triangles, the inradius is a whole number
There is an even simpler formula for r:
Since we have a right-angled triangle, we can split the two legs
into a – r and r on HB and b – r and r on HA.
These lengths a – r and b – r
are duplicated on the two sections of the hypotenuse AB and indeed together make up the whole
of AB. So we have
h = (a – r) + (b – r)
which we can rearrange to find a new expression for r:
r =
a + b – h
2
It is a simple exercise now to check that r = (m – n) n by substituting the values for
a, b, h from the m,n generator formula in the formula just found for r.
The two formulae for r in terms of a, b and h were known to the Chinese mathematician,
Liu Hui
(approx dates: 220 - 280) and he writes about them in his commentary of the year 263
on an even older mathematical work called
Nine Chapters on the Mathematical Arts
which may even date back to 1000 BC!
Putting Pythagoras in the frame D G Rogers,
Mathematics Today vol 44 (June 2008), pages 123-125.
Finding Pythagorean Triangles with a given Inradius
Here are a few Pythagorean triangles with small inradii:
Primitive
Triple
Perimeter
Area
r
3,4,5
12
6
1
5,12,13
30
30
2
7,24,25
56
84
3
8,15,17
40
60
3
9,40,41
90
180
4
11,60,61
132
330
5
12,35,37
84
210
5
13,84,85
182
546
6
20,21,29
70
210
6
Non-primitive
Triple
multiple of
Perimeter
Area
r
6,8,10
2× 3,4,5
24
24
2
9,12,15
3× 3,4,5
36
54
3
12,16,20
4× 3,4,5
48
96
4
10,24,26
2× 5,12,13
60
120
4
15,20,25
5× 3,4,5
60
150
5
18,24,30
6× 3,4,5
72
216
6
15,36,39
3× 5,12,13
90
270
6
14,48,50
2× 7,24,25
112
336
6
16,30,34
2× 15,8,17
80
240
6
From the table you can see that the number of Pythagorean triangles having an inradius of r=1 is 1, for r=2 it is 2,
r=3 has 3 as do r=4 and r=5 but r=6 has 6 triples, and so on. This series of counts:
1, 2, 3, 3, 3, 6, ... is A078644.
For just the primitive triangles we have counts
1, 1, 2, 1, 2, 2, ... and the whole series is A068068.
The 3 4 5 triangle has an inradius of 1. So if we scale it up
by a factor r,
its inradius will become r also.
We have just shown that there is a non-primitive Pythagorean triangle with
inradius r
for all whole numbers
r ≥ 2.
It is less obvious that there is a primitive Pythagorean triangle for each
inradius r.
However, if you look carefully at the table above, you will find there is a particular
primitive Pythagorean triangle
with a specific pattern for each inradius from 1 to 6, and this should give you the clue you need to prove
that one always exists for every whole number k.
[Hint: you have already seen the pattern]
So we have our answer:
There is both a primitive and a non-primitive Pythagorean triangle with inradius r for any
whole number r ≥ 2
On the Number of Primitive Pythagorean Triangles with a Given Inradius Neville Robbins, Fibonacci Quarterly
(2006) 44, pages 368-369.
Another curious fact is that there are exactly two
primitive
Pythagorean triangles with an inradius which is a prime number >2.
For instance, and here the odd numbers have been included to help point out the pattern...
Can you spot the two patterns here? What is the formula for each column of triples?
You have therefore shown that there at least two Pythagorean triples
for each odd r.
Find the m,n generators for each of the two primitive triangles in the table above
Can you show that the two triangles above for each prime r are both primitive?
Find odd numbers of inradius for which there are more than 2 primitive triangles
For which odd numbers r are primitive Pythagorean triangles above the only two?
Do both patterns apply for even inradius r?
The full answer to all these questions is revealed in the next section but some of the
fun of maths is trying to prove these things for yourself.
E380 W F Cheney, C W Trigg
The American Mathematical Monthly vol 47 (1940) pages 240-241.
How many Primitive Pythagorean Triangles are there with a given Inradius?
We have seen in the Puzzles section above,
that for an odd number as inradius, there are always at least two primitive Pythagorean triangles.
The number of primitive Pythagorean triangles with inradius from 1 to 100 is as follows, where the odd numbers
are in red and the primes are in blue:
We see all the prime inradii have just 2 primitive triangles and all the odds after 1 have at least 2.
Are they all just 1, 2 or 4? Further investigation shows that
there are 8 with inradius 105 and 165 and the next new value is 16.
Neville Robbins gives the exact formula T(r) for the number of
primitive Pythagorean triangles
with inradius r ≥ 2 as:
T(r) = 2 (number of distinct prime factors of r), if r is odd T(r) = 2 (number of distinct prime factors of r) – 1, if r is even
For even numbers, we merely ignore the factor of 2 and count only the other prime factors.
Example: r = 105
105 = 3 × 5 × 7 and three distinct prime factors tells us there are
23=8 primitive Pythagorean triangles
with inradius 105.
Example: r = 45
45 = 3 × 3 × 5 so it has
2
prime factors: 3 and 5.
The number
of primitive Pythagorean triangles with inradius 45 is
T(45) = 22 = 4.
They are 91, 4140, 4141; 140, 171, 221;
92, 2115, 2117 and
115, 252, 277.
Example: r = 32
32 = 2 × 2 × 2 × 2 × 2,
so 32 has no odd prime factors and
T(32) = 20 = 1.
What is the smallest number that is the inradius of 16 primitive Pythagorean triangles?
The only numbers r
where T(r) = 1
(numbers r which are the inradii
of just one primitive Pythagorean triangle) are the numbers r = a power of two.
Which primitive Pythagorean triangles are they?
The smallest r which occurs in n primitive Pythagorean triangles
is 1 (1 triangle), 3 (2 triangles), 15 (3 triangles) and the complete series starts 1, 3, 15, 105, 1155, ...
A070826.
If we factorize these numbers we have 1, 3, 3×5, 3×5×7, 3×5×7×11, ...
which, after 1, is just the product of the first n – 1 consecutive odd prime numbers.
Whenever we see a count of things which are powers of two, we generally find that the things counted are
sets where each item may independently be in the set or not.
For instance, there are 8 baskets (sets)
of fruit we can make if we can optionally include 3 pieces of fruit: an apple, an orange and a pear say.
23 gives 8 possible sets (baskets) which includes the empty set too:
{}, {apple}, {orange}, {pear}, {apple, pear}, {apple, orange}, {orange, pear}, {apple, orange, pear}
The number of Pythagorean triangles with a given inradius r
depends on the prime numbers that are the factors of r.
On the Number of Primitive Pythagorean Triangles with a Given Inradius
Neville Robbins, Fibonacci Quarterly
(2006) 44, pages 368-369.
The circumcircle joining the vertices
If the incircle touches all three sides, then the circumcircle touches all three vertices. Its
centre is equidistant from all three vertices and, in a right-angled triangle,
is found at the mid-point of the hypotenuse
since that point is equidistant from the two ends of the hypotenuse and,
by symmetry or geometrical arguments,
that point is also the same distance from the other vertex at the right-angle.
The radius of the incircle is called the inradius and denoted r (as we saw above);
the radius of the circumcircle is called the circumradius and denoted R.
So Pythagorean triangles will have whole number circumradii only if the hypotenuse is an even number
Lines from the centre of the incircle to the vertices divide each angle into two.
Lines from the centre of the circumcircle perpendicular to each side divide those sides into two.
This calculator will find Pythagorean triples for you, either primitive or all with
any combination of sides with a fixed value or in a given range of values.
You can find the actual triples or else just count
the number found.
If you give a range of values, the total in that range can be counted (Total count of).
A separate count, with one count for each value in the range, is given if you select
Separately count. Sizes gives a list of those values in the range for which
the requested type of triangle (all or primitive) exist. Values are
repeated where there are different triples of the same size.
For example all (primitive and non-primitive)
triangles with hypotenuse
= 20 up to 30:
The Total count of all Pythagorean triangles with a hypotenuse in the range 20-30 is 6
Fine each count shows the individual counts for each value in the range.
There is 1 of size 20, 0 of size 21 to 24, 2 of size 25, and 1 each of sizes 26, 29 and 30
so the separate counts are reported as
1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1: a count for each of the values from 20 to 30.
The sizes of the 6 hypotenuses are 20, 25, 25, 26, 29, 30.
(*) There are very fast algorithms for counting the number of
triangles (primitive or all) given the size of a leg, or a hypotenuse or a side, marked (*) in the list in the Calculator here.
Otherwise, the
triangles are generated and then counted, a process that takes some time for large sides.
Sizes reports the sizes (of the side|perimeter|area|inradius requested) in the
given range, so that if a side|perimeter|area|inradius is found in
more than one triple, it is reported once for each separate triple. Show all lists all the triples found but if you want just one example
use Show one.
The results
are printed in the Results box, triples being given with their area,
perimeter and inradius. Select and copy from this area to use the output
as text or in other applications.
Here is the triple generator which can search for various conditions on its sides and has some
very fast counting algorithms for some cases.
C A L C U L A T O R Input can be an expression
such as 3+5 or 7*7 as well as whole numbers. (*) = fast Count
Pythagorean Angles
We now turn our attention from the sides to the angles in a Pythagorean triangle.
We can call an angle (not a right-angle) in a Pythagorean triangle a Pythagorean angle.
Since the triangle has integer sides, such angles have sine, cosine and tangent that are
pure fractions ("rational").
We can start with any fraction, say 2/3, as the tangent of an angle α
and use it to generate a Pythagorean triangle which has 2α as an angle
using the formula
tan 2α
=
2 tan α
1 – tan2 α
So tan α = 2/3 gives tan 2α = 5/12
so the Pythagorean triangle generated has legs 5 and 12 and hypotenuse 13.
If tan α = n/m then
tan 2α = 2mn/(m2–n2).
tan α = n/m if and only if
tan 2α = 2mn/(m2–n2).
Also, if α and β
are Pythagorean angles, then so are α + β and
α – β.
1809. On Note 1719 A G Walker, The Mathematical Gazette vol 29 (1945), page 26.
59.11 More Properties of Pythagorean Triplets L E Ellis
The Mathematical Gazette vol 59 (1975) pages 186-189.
Finding a Pythagorean Triangle approximating a given Angle
Can we find a Pythagorean triangle with a given angle? Sometimes this may not be possible with small numbers
but we will always be able to find some Pythagorean triangles with an angle almost equal to
any angle you require.
Here is a Calculator to find a primitive triangle with better and better approximations to a given angle.
It only generates primitive triangles since all its multiples have identical angles but bigger sides.
You can use Pi in the input box e.g. for the angle π/3 (radians).
If you want Pythagorean triangles
with a specific ratio of sides, e.g. 1/3, then use a function to
find angle with a given sine or cosine or tangent which are called the inverse trig. functions
arcsine, arccosine and arctangent often abbreviated to asin, acos and atan
buttons for which are found on all but the most basic of calculators:
3
5
4
e.g. all of these describe the 3 4 5 triangle but don't forget they all find the angle in radians
not degrees:
Remember that sines and cosines are in the
range -1 to 1
so asin(15/8) gives an error
asin( 3/5 ) is the angle (radians) whose sine is 3/5,
i.e. the ratio of the leg opposite the angle, 3, to the hypotenuse, 5;
acos( 4/5 ) for the ratio of the leg next to the angle, 4, to the hypotenuse, 5;
atan( 3/4 ) for the ratio of the leg opposite, 3, to the leg next to the angle, 4.
All of the above will find the 3, 4, 5 triple as will asin(4/5), acos(3/5), atan(4/3).
Calculations are slightly more accurate if radian measure is used.
C A L C U L A T O R
The Shapes and Sizes of Pythagorean Triangles P Shiu, Mathematical Gazette
vol. 67 (1983) pages 33-38. This describes the algorithm behind the angle-finder calculator above. To find a
Pythagorean triangle with angles close to θ let
u = tan(θ)+ sec(θ) and find its
continued fraction. If the
successive convergents to it are mk / nk then
a suitable Pythagorean triangle is
x = 2 mk nk ,
y = mk2 – nk2,
z = mk2 + nk2.
Using Pythagorean Triangles to Approximate Angles W S Anglin
The American Mathematical Monthly vol 95 (1988) pages 540-541.
Further Triple Patterns
The Pythagorean Triangle Angle Calculator above finds some interesting number patterns too.
For instance, there is
no Pythagorean triangle with an angle of 45° (type in 45 into the "angle of..." box,
make sure degrees is on and then click on the Find button)
and if we ask the Calculator to find approximations
it finds the sequence with legs differing by one that we
found above.
If we try it on a series of angles such as 0.1, 0.01 and 0.001 radians,
we discover two series
of easily-remembered and visually striking patterns
as in An easy method of writing down a
series of triples above:
399
40
401
180
19
181
39999
400
40001
19800
199
19801
3999999
4000
4000001
1998000
1999
1998001
399999999
40000
400000001
199980000
19999
199980001
Try it with 0.2, 0.02, 0.002 radians and you'll find at least two more
patterns like this!
40
9
41
99
20
101
4900
99
4901
9999
200
10001
499000
999
499001
999999
2000
1000001
49990000
9999
49990001
99999999
20000
100000001
There are more complex patterns here too:
88501
17940
90301
-
899850001
17999400
900030001
446930400
8939801
447019801
8999985000001
17999994000
9000003000001
4496993004000
8993998001
4497001998001
With 0.3, 0.03 and 0.003 there are patterns in the first four approximations:
12
5
13
24
7
25
2112
65
2113
2244
67
2245
221112
665
221113
222444
667
222445
22211112
6665
22211113
22224444
6667
22224445
532
165
557
391
120
409
55432
1665
55457
39991
1200
40009
5554432
16665
5554457
3999991
12000
4000009
555544432
166665
555544457
399999991
120000
400000009
The first triple in the final series is the one suggested by the rest of the pattern. It is indeed
a Pythagorean triple -- check it with the Test a Triangle - is it Pythagorean?
calculator above.
The series of angles 0.4, 0.04, 0.004 and 0.0004 radians generates:
12
5
13
24
10
26
1200
49
1201
2499
100
2501
124500
499
124501
249999
1000
250001
12495000
4999
12495001
24999999
10000
25000001
The 0.5 radians sequence gives:
-
15
8
17
760
39
761
1599
80
1601
79600
399
79601
159999
800
160001
7996000
3999
7996001
15999999
8000
16000001
and with 0.6 radians and its tenths:
4
3
5
91
60
109
544
33
545
9991
600
10009
55444
333
55445
999991
6000
1000009
5554444
3333
5554445
99999991
60000
100000009
380
261
461
5436800
326601
5446601
55443668000
332666001
55444666001
555444366680000
333266660001
555444466660001
0.7 radians seems to give only one simple pattern:
351
280
449
39951
2800
40049
3999951
28000
4000049
399999951
280000
400000049
but 0.8 gives two:
-
624
50
626
31000
249
31001
62499
500
62501
3122500
2499
3122501
6249999
5000
6250001
312475000
24999
312475001
624999999
50000
625000001
and 0.9 gives several:
4
3
5
3
4
5
220
21
221
264
23
265
483
44
485
24420
221
24421
24864
223
24865
49283
444
49285
2466420
2221
2466421
2470864
2223
2470865
4937283
4444
4937285
246886420
22221
246886421
246930864
22223
246930865
493817283
44444
493817285
20
21
29
48
55
73
319
360
481
2240
201
2249
6148
555
6173
39919
3600
40081
222440
2001
222449
617148
5555
617173
3999919
36000
4000081
22224440
20001
22224449
61727148
55555
61727173
399999919
360000
400000081
2222244440
200001
2222244449
6172827148
555555
6172827173
39999999919
3600000
40000000081
0.010 will again give the first example above for 0.1.
However, do use the Calculator above and repeat the experiment. This time you will probably notice at least
two more pattern series to add to your collection!
How about 0.11, 0.011, 0.0011, ...
and then 0.12, 0.012, 0.0012, ...
and so on?
Also try 2/3, 2/30, 2/300, etc. (the Calculator handles expressions as input)
or you can input it as 0.6666, 0.06666, 0.006666, etc.
which has a one very simple pattern in particular.
You can also do this with any other (small) sequence of numbers making a decimal.
Remember though that the biggest angle is 90° which is 1.57079632679489 radians.
The reason the patterns are so "obvious" above is that our numbers are written in base 10 and we are taking
angles one-tenth as large each time.
An interesting mathematical Project is to find formulae for each of these series.
It will then be easy to verify that
all the triples in the series are Pythagorean by
summing squares of the two legs and checking it equals the square on the hypotenuse.
You might even be able to find a formula that encompasses several of the series above.
What else can you find?
Email me at the address at the foot of this page
and I'll add any interesting series of triples that you find, with your name.
Curious Connections
This section explores some of the curious connections between Pythagorean triangles and
other mathematical topics. The places where they turn up is sometimes very surprising!
The 3 4 5 triple in an unusual guise
Here is a circle and a ring all with the same circle centres. The disc has radius 3 and the ring is between circles of radius 4 and 5.
Which is bigger (in area, that is, which would take more paint to colour it) - the disc or the ring?
A little algebra on the area of a circle (π r2 for a circle of radius r) and knowledge of the
3 4 5 triple will give you the perhaps surprising result that they are the same!
Try this variation:
which is bigger this time - the disc or the ring?
Special Digit Triples
Side Reversals
The Pythagorean triple 88209, 90288, 126225 has two legs which are integers in reverse order.
An Interesting Pythagorean TriangleAmerican Math Monthly 66 (1959) page 65.
Puzzles and Problems
Find two more triples with each leg being the reverse of the other leg ("legs" are the sides forming the right-angle).
[Their hypotenuses have 6 and 7 digits.]
33 56 65 and 3333 5656 6565 have a hypotenuse which when reversed
becomes a side.
By multiplying the first triple by various values, write down several more.
1980 5265 5625 is a different example.
Find 4 more with a hypotenuse less than 99999.
Prefix Triples
If we insert a "1" before the numbers in the triple 5 12 13 we get
15 112 113 which is also Pythagorean. The problem was posed and solved
for a triangle with all sides less than 100
in ... E472 V Thebault, W E Buker
The American Mathematical Monthly vol 49 (1942) page 196.
Both 5 12 13 and
15 112 113 are primitive too! Is this the only case?
There are other non-primitive solutions:
We can multiply these two triples by 10 or 100 or any power of 10 and still get a valid solution:
1 before 50,120,130 = 10 ×5,12,13 → 150,1120,1130 = 10 ×15,112,113,
1 before 500,1200,1300 = 100 ×5,12,13 → 1500,11200,11300 = 100 ×15,112,113,
...
This applies to the following too:
1 before
500,12495,12505
=
5×[100,2499,2501]
→
1500,112495,112505
=
5×[300,22499,22501]
1 before
7500,21875,23125
=
625×[12,35,37]
→
17500,121875,123125
=
625×[28,195,197]
2 before
600,1045,1205
=
15×[120,209,241]
→
2600,21045,21205
=
5×[520,4209,4241]
2 before
600,11242,11258
=
2×[300,5621,5629]
→
2600,211242,212258
=
2×[1300,105621,105629]
3 before
7500,11375,13625
=
125×[60,91,109]
→
37500,311375,313625
=
125×[300,2491,2509]
3 before
9000,15675,18075
=
75×[120,209,241]
→
39000,315675,318075
=
30×[1300,105621,105629]
3 before
900,16863,16887
=
3×[300,5621,5629]
→
3900,316863,316887
=
3×[1300,105621,105629]
Are there any Pythagorean triples formed by prefixing a number larger than 3 at the front of all sides?
Pythagorean Triangles and Egyptian Fractions
Egyptian Fractions
are a different way of writing fractions as
used by the ancient Egyptians who built the Pyramids and before them the ancient Babylonians.
They did not use
the ratio of two whole numbers as we do, e.g. "four-fifths" or
4/5 which is
the ratio of 4 to 5 and
also the result of 4 divided by 5, of 4 things divided into 5 equal parts.
Instead they wrote fractions as a sum of unit fractions.
For example 3/4
would be 1/2 + 1/4, a
sum of two different fractions each with a
numerator (top number) of 1.
Fractions which are the reciprocal of an integer (i.e. have a numerator of 1)
are called unit fractions.
Every fraction a/b
can indeed be written as a sum of distinct unit fractions and in many ways
and these are called Egyptian Fractions.
The simplest kinds of fractions are those that can be written as a sum of two unit fractions.
For n=3
the number of ways is one since
2/3 = 1/2 + 1/6
is the only way to write 2/3 as the sum of two unit fractions.
For n=8
we have 2/8 which is, of course,
1/4
and we have two pairs of different unit fractions with this sum:
1/4 = 1/12 + 1/6 = 1/20 + 1/5.
Surprisingly this number of ways to write 2/n as a sum of two different unit fractions
is exactly the same as the number of Pythagorean triangles having n as a leg:
For n=3 we have just one Pythagorean triangle having 3 as a leg: 3, 4, 5
For n=8 there are two Pythagorean triangles having 8 as a leg: 6, 8, 10 and
8, 15, 17
The number of ways we can write 2/n as a sum of two different unit fractions gives the series
I have another page at this site to help you explore more about
Egyptian Fractions.
Pythagorean Triples and Fibonacci Numbers
The Fibonacci Numbers
are a simple series of numbers that appear in lots of places in nature:
1, 2, 3, 5, 8, ... where each number is the sum of the previous two in the series.
Often mathematicians start this series with 0 and 1 and we get the series:
0, 1, 1, 2, 3, 5, 8, 13, 21, ... .
It is easy to see that
there is no triangle with all 3 sides being different Fibonacci numbers:
If the sides are a<b<c
then c is at least a + b by the Fibonacci rule. However,
in any triangle the two shorter sides must add to more than the longest side or else the sides will not meet
(think of the longest side as the base and the two shorter sides hinged at the ends of the base).
We know of two Pythagorean triangles with 2 Fibonacci numbers as sides:
3 4 5 5 12 13
It is thought that there are no more but this remains an open question.
Pythagorean Triples Containing Fibonacci Numbers: Solutions for
Fn2 ± Fk2 = K2 by M Bicknell-Johnson,
Fibonacci Quarterly17 (1979) pages 1-12, (Addenda: page 293).
Pythagorean Triples and Generalised Fibonacci Numbers
To make a Pythagorean Triangle, take any 2 numbers such as 1 and 3.
In a Fibonacci-like way, add them to produce the next: 1, 3, 4 and extend your series once more by
the same rule: 1, 3, 4, 7.
Now you can make a Pythagorean Triple as follows:
Using the Fibonacci-type series of 4 numbers: 1, 3, 4, 7:
Multiply the middle two numbers and double the result, here 3 and 4
multiply to give a product of 12 and this doubles to give 24 : the first side of our Pythagorean Triangle
Multiply the two outer numbers (1 and 7 )
giving 7 : the second side of the Pythagorean triangle
Add the squares of the middle two numbers (3 and 4)
to get the third side: here 32 + 42 gives 25 : the hypotenuse of the Pythagorean triangle
So we have found the 24, 7, 25 triangle.
You can start with any two numbers and use the
Fibonacci Rule: add the latest two to get the next to generate two more.
The four numbers will always generate a Pythagorean Triangle. Try it!
C A L C U L A T O R
The explanation of why this works is simple: The two middle values are the m and
n values for the m,n formula for generating Pythagorean Triples
that we looked at earlier on this page:
m – n, n, m, m + n
Using the method above for this Fibonacci-type series of 4 numbers, the sides of the Pythagorean triangle are :
twice the product of the middle two: 2 m n
the product of the outer two values: (m – n) (m + n) = m2 – n2
the sum of squares of the inner two values: m2 + n2
Pythagorean triangles from the Fibonacci Series C W Raine Scripta Mathematica
vol 14 (1948) page 164
seems to be the earliest reference to this method but only for the Fibonacci numbers.
Fibonacci Number Triples A F Horodam American Mathematical Monthly vol 68 (1961) pages 751-753
gives the generalisation to any two starting numbers.
Pythagorean Triples and Pi
Use the buttons in this section to change the graph
Earlier we saw that
of the number of primitive Pythagorean triangles with a hypotenuse less than N was virtually a
straight line when plotted against N:
Since the "straight line" of the graph goes through the origin,
we can also
of (the number of primitive Pythagorean triangles with hypotenuse less than N) / N.
This ratio seems to be settling down to a particular value as N gets larger: what is this value?
Discovered by D N Lehmer in 1900 it is
1
=
1
=
1
= 0.1591549..
2π
2×3.1415926..
6.283185..
The number of primitive Pythagorean triangles with hypotenuse less that N is approximately
N
= 0.1591549 N
2 π
For example, for N = 100, this approximation formula gives
0.1591549 × 100 = 15·92 primitive Pythagorean triangles
with hypotenuse less than 100 whereas
the exact value is 16.
But this is not the only relationship between Pythagorean triangles and π!
of the number of primitive Pythagorean triangles with a perimeter less than N
is also a "straight line".
What is the ratio this time? Have a look at
.
Again it was D N Lehmer who proved that the limit of this ratio also involved π:
The number of primitive Pythagorean triangles with perimeter less than N is
approximately
ln(2) N
= 0.07023 N
π2
ln(2) means loge(2), the natural log of 2,
i.e. the number which, when e is raised to that power, gives 2.
Since e 0·693147... = 2 then
ln(2) = 0·693147...
So
ln(2)
=
0·693147
=
0·693147
= 0·07023
π2
3·1415922
9·869604
For example, Lehmer's formula for N = 1000
gives the value of 0·07023 × 1000 = 70.23
as the approximate number of primitive Pythagorean triangles with a perimeter less than 1000 whereas
the exact value is 70: so it is not bad as an estimate!
It seems remarkable that π should appear in this context, but it does
have an amazing tendency to appear in many formulae for approximations in different areas of mathematics.
C A L C U L A T O R
Asymptotic Evaluation of Certain Totient Sums
D N Lehmer American Journal of Mathematics vol 22 (1900) pages 293-335.
Pythagorean Triples or Babylonian?
A tiny block of clay, about the size of a postcard (5 inches x 3.5 inches or 12cm x 9cm) with 15 rows
of 4 columns of "numbers" is dated to about 1800 BC and so is probably the world's oldest surviving mathematical artefact.
Plimpton 322 is one of 600 such tablets
donated to Columbia University's Rare Book and Manuscript
Library by George Plimpton and was item 322 in his catalogue, hence its name.
(Have a look at their other treasures too.)
Bill Casselman's page on
The Babylonian tablet Plimpton 322 from University of British Columbia has the best image of the tablet and
an excellent explanation of how to read Babylonian numbers and what the tablet contains.
And what does it contain? A list of Pythagorean Triangles arranged in order of triangles which are
approximately 1 degree apart! They are written in their base 60 scale, and involve base 60 "fractions"
and they were probably used in surveying.
Words and Pictures: New Light on Plimpton 322
by Eleanor Robson in American Mathematical Monthly vol. 109 (2002), pages 105-120 explores three theories as to the
meaning of the numbers on Plimpton 322, one of which is that it is a trigonometric table.
The Exact Sciences in Antiquity
by Otto Neugebauer, Dover, (1969) 240 pages argues that the Plimpton 322 tablet contains Pythagorean triples for
triangles for each degree from 30 to 45 and so detects several simple errors in the tablet's table.
Pythagorean Jigsaws
Pythagorean Triangles in a Square
Can we divide a square into Pythagorean triangles?
Charles Jepsen and Roc Yang showed that we could, with a minimum of 5 such triangles.
The smallest square with just 5 Pythagorean triangles that they found is shown here.
They prove also that there is no dissection of a square into just 4 Pythagorean triangles.
So they then ask the question
Is this the smallest square that can be dissected into five Pythagorean triangles?
It seems this question is still "open". Can you find the answer?
Amazingly, Penny Drastik, a primary student at The Illawarra Grammar School in Australia, aged 10,
found 12 smaller solutions for squares of side less than 9000 including
one which she thinks is the smallest square
with this pattern of triangles [April 2008].
Penny also found one square (of side less than 9000) that can be dissected in two different
ways with this pattern of triangles.
I leave you with the challenge of finding the sides of the triangles and the square.
Can you find a smaller square, perhaps with a different arrangement of 5 triangles?
Making Squares from Pythagorean Triangles C Jepsen, R Yang The College Mathematics Journal vol 29 (1998), pages 284-288.
Squares with more than 5 Pythagorean Triangles?
Jepsen and Yang's articles (above) gives a beautifully simple argument that it is possible to dissect a square into
any number of Pythagorean triangles, from 5 upwards.
We have the solution for 5 triangles (which they prove is the smallest number of Pythagorean triangles
that we need to fill a square).
So take any one the Pythagorean triangles in any square's dissection
and find the altitude from the right angle to the hypotenuse:
We have thus divided that Pythagorean triangle into two right angled triangles but these will only be Pythagorean if
the new side's lengths h and w are integers. What are these two lengths in term of
a, b, c?
Since the area of the triangle is ab/2 and also ch/2
then h = ab/c.
A small amount of algebra (left to the reader) shows that w = a2/c.
By symmetry, we also have c – w = b2/c
So h and w might not be integers unless c divides exactly into
both a2, ab andb2. But we can make them integers by expanding
the whole square dissection containing the triangle by factor c!
Thus we obtain another square, c times larger, with an
one Pythagorean triangle replaced by two.
Interestingly, if we try this on the 5-triangle dissection above, we find the top triangle neatly divides into two with no expansion needed:
Clearly we can do this as often as we like to get squares with an ever increasing number of Pythagorean triangles in them.
There is always a square that can be dissected into n Pythagorean triangles for every n from 5 upwards
However, the triangle that is divided into two makes two smaller Pythagorean triangles both of exactly the same shape
as the original, that is, the angles in the two new triangles are equal to those in the triangle that was split.
So we are guaranteed to have two or more Pythagorean triangles of the same shape in our jigsaw
if we use this method.
Triangles with the same angles in each are called similar triangles; they need not be the same size but they do have the same shape.
Triangles with matching sides and angles are identical in both size and shape and are called congruent triangles.
Is it always possible to dissect a square into any number (≥ 5) of different (i.e. not similar) Pythagorean triangles?
Another proof of the Pythagoras Theorem
Using the diagram above with the altitude (height) h marked in triangle a b c,
we can find another proof of the Pythagoras Theorem a2 + b2 = c2:
Show that the triangles ABC, CDB and ACD are all similar (that is, the same three angles occur in each)
Identify the other two angles equal to the angle at A and the other two angles equal to the angle at B
Find the sine of angle B in triangle BCD and the equivalent angle in ABC and its sine.
Connect them with an equation involving
b, c and c–w, b
Find the cosine of angle B in triangle ABC and the equivalent angle in the third triangle, ADC, and its cosine.
Connect them with an equation involving
w, a, and a, c
Rewrite your two equations so that there are no fractions by cross-multiplying if necessary
Add the two equations so that one side is a2 + b2
Can you show that the other side of the equation is now c2?
Pythagorean Triangles in a Circle
We can always draw a circle through any set of 3 points. There is a very nice animation of how to do this at
Math Open Reference site. The method is easy and was given
by Euclid's Elements Book 3, Proposition 1.
However, something special happens for Pythagorean triangles because of the right-angle.
The circle through the three points of a right-angled triangle has its centre at the mid-point of
the hypotenuse
In other words, pick a point on a circle and connect it to two ends of any diameter and the angle you have just made is always a right
angle.
So if we can find several Pythagorean triangles with the same hypotenuse we can place them on the same diameter of a circle
so that their right-angles will lie on the circle.
By orienting the triangles so that the smallest angles are all at one end of the diameter, the right-angles will lie on a quarter circle.
By duplicating each triangle with each non-right-angle at each end of the diagonal, the right-angles will all lie on a semi-circle.
By including the triangles twice on each side of the diagonal, the right-angles will lie on a circle.
And, because they are all Pythagorean triangles, the points on the circle will all have integer coordinates.
The simplest example is 7 24 25 and 15 20 25 which have a common hypotenuse of 25.
Clearly we can double all the lengths and treble them and get many more examples.
Here is a set of 4 with a common hypotenuse of 65: 16 63 65, 25 60 65, 33 56 65, 39 52 65
Can you find another set of 4 having a hypotenuse of 85?
There is a set of 3 all having a hypotenuse of 125 - which are they?
Can you find the surprising 7 having a hypotenuse of 325?
There are 13 with a hypotenuse of 1105
and 22 for 5525!
are the hypotenuses of Pythagorean triangles. So all integers are in the sequence A004144 or this one.
This series can be further split into the following classes.....
are the only possible counts of the number of Pythagorean triangles with the same hypotenuse for hypotenuses up to 200,000.
There are many numbers that are the hypotenuses of exactly 4 triangles, the next most frequent count being 2,
then 13 and so on, with 160225 being the hypotenuse of 67 Pythagorean triangles. Up to a hypotenuse of 200,000 we cannot find a number
that is the hypotenuse of exactly 8, 9 or 11 triangles. If we do not limit the size of triangles,
then all numbers are possible as counts of Pythagorean triangles with the same hypotenuse according to
A097756
these are the smallest hypotenuses of exactly 1, 2, 3, ... Pythagorean triangles in order of number of triangles (so the nth
number in this list is the smallest hypotenuse of exactly n Pythagorean triangles).
Pythagorean Triangles in a Triangle
Earlier we saw how to split any Pythagorean triangle
into two Pythagorean triangles which are similar to each other and also to the original
(that is, the 3 angles in each triangle are the same: the triangles
are called similar).
Here is a right-angled triangle split into 3 similar triangles. All have the 3 4 5 shape.
You can check this by dividing the sides by each of the factors shown in red in each right-angled triangle.
We can make a diagram just like this containing three similar triangles derived from any Pythagorean triangle.
To show this, first in this diagram;
Label the sides of one triangle a, b and h;
Keeping the sides in the same proportions, and using the angles identified as being equal, label the other sides;
If you have any divisions, multiply the whole diagram by the divisors to make every side a product of a, b and h
Puzzles and Problems
The investigations here would make an excellent topic for a Science Fair or Maths Project
Can you make a right-angled triangle jigsaw with more than one shape of Pythagorean triangle?
What about a jigsaw for a non-right-angled triangle?
What is the largest number of right-angled triangle pieces you can fit into a triangular jigsaw?
By looking at the earlier method we used to split one right-angled triangle into two, and comparing it with the
diagram with three here, we can split a right-angled triangle into 4 right-angled pieces, all similar as shown here.
Can you extend it again to five triangles? to six? and to as many as we like?
Make you own patterns using one Pythagorean triangle in a range of sizes to make a nice tiling pattern as in the previous investigation question.
Send some to me at the email address at the foot of this page and I will include them here.
Pythagorean Triangles in a Kite
A kite is a quadrilateral with two pairs of touching sides equal in length.
If we have right-angles where the unequal sides meet, we can
make any Pythagorean triangle into a kite using three differently-sized copies of it
as shown here.
What is the formula for the sides of the kite in terms of the Pythagorean triangle a b h?
What is special about the hypotenuse of the largest triangle (the vertical strut of the kite)?
The kite with 3 Pythagorean triangles can easily be transformed into a rectangle:
First reflect the red and yellow triangles in a horizontal mirror
then move them across to fit on the two legs of the green triangle
Pythagorean Triangles in a Rectangle
So now how about rectangles dissected into Pythagorean triangles?
The simplest method is to put two identical triangles together along their hypotenuses to make a rectangle:
So a rectangle can be dissected into two Pythagorean triangles if its sides are the two legs of a Pythagorean triangle.
But both the triangles in this dissection are identical (congruent).
Here are two rectangles each containing three right-angled triangles. Show that in each diagram
all the triangles are similar.
In each of these two 4-triangle rectangle dissections find two similar triangles.
In one of these diagrams simple geometry will show there can be no solutions with Pythagorean triangles.
For the other:
Can you find two more rectangular dissections into 4 right-angled triangles each with
4 similar triangles?
move your mouse here for a hint
Can you find a rectangle that dissects into different (non-similar) Pythagorean triangles?
Pythagorean Triangles round a point
This section investigates putting 4 Pythagorean triangles round a point with their right-angles meeting at the point
and other variations.
Four triangles with their right-angles meeting
Can we fit four Pythagorean triangles together round a point at which all the right-angles meet?
You should find it easy to answer the question if you use these two diagrams on the left as guides.
However, what if the four triangles are all different as shown here on the right?
These shapes are quadrilaterals since none of their sides are equal in general.
The smallest perimeter is 176 and has two pairs of similar Pythagorean triangles
if you want to find it for yourself and check your answer with this button:
The smallest solution (smallest perimeter) with 4 different Pythagorean triangles (that is, no two triangles are similar)
has a perimeter of 950:
Three triangles with their right-angles meeting
If we try just three triangles meeting at their right-angles, we have to go into 3 dimensions.
The three triangles will meet as if in the corner of a room as shown here.
Again this is possible and the smallest perimeter is 636 so it is harder to find than the 4 different triangles meeting at a point of the
previous section.
There is another interesting connection here:
The square of the area of the triangle formed from the 3 hypotenuses = the sum of the squares of areas of the three Pythagorean triangles
This theorem applies even if the 3 right-angled triangles were not Pythagorean.
More than 4 triangles with their right-angles meeting
We can fit more than 4 Pythagorean triangles together with their right-angles meeting at a point if we allow three to be flat
"on the floor" and the other two to be perpendicular as if on two "walls".
Imagine looking at the corner of a building from outside and concentrate on the point where the two vertical
walls meet the ground. The diagram shows a blue and green vertical wall at the corner on the red ground.
Three triangles meet and lie flat on the ground; a fourth triangle is on the green vertical wall and the fifth is on the
blue vertical wall, all 5 right-angles touching at the corner point where the three surfaces meet.
Can you imagine 6 meeting at a "corner"? What about 7 or 8? Are more possible?
Find the only two Pythagorean triangles with an area equal to their perimeter.
Which are the only 3 numbers that cannot be the shortest side of any Pythagorean triangle?
[Check your answer with A009005.]
Find three consecutive numbers which can be the hypotenuses of
Pythagorean triangles.
Can you find four consecutive numbers which are hypotenuses?
What about five?
and how about a set of nine?
[Check your answers with A099799.]
Find a few Pythagorean triangles whose shortest side is a square number e.g.
9=32, 12, 15, and 25=52, 312, 313.
Of the primitive ones in your list, what is special about their m
and n values?
A remarkable property of the m,n formula for triples:
( m2 – n2 )2 + (2 m n)2 = ( m2 + n2 )2
is illustrated in this puzzle:
Find triples with a hypotenuse that is a square numberH2.
There are two triangles with a hypotenuse of 52=25 for instance: 15 20 25 and
7 24 25.
List the values H that are squared to make these hypotenuses:
where have you seen this series before on this page?
It seems there are two triples for each and every hypotenuse that is a square numberH2.
One is easily explained as it has a simple relationship with the triple with hypotenuse H:
what is that relationship?
For the second, look at its generators to find a
proof that it always exists.
Can you guess how many triples there will be with a hypotenuse that is a fourth power: H4?
Following on from the previous Puzzle, what can you find out about triples with a hypotenuse of the form
H3?
What about Pythagorean triples having a smallest side which is a cube? e.g.
27=33, 36, 45. What is special about their m
and n values?
How many Pythagorean triangles have a side of length 48?
Find a number that can be the side of even more Pythagorean triangles.
(Hint: there are 5 answers less than 100)
What is the highest number of triples you can find with the same side in each?
Which number less than 250 occurs in 32 triples?
What is the smallest number that is the hypotenuse of more than one triple?
What is the greatest number of triples you can find with the same hypotenuse?
Is there one that is not a multiple of 5?
Find some numbers which are the odd sides of more than one primitive Pythagorean triangle.
The first two are
15: which is a side in both 8 15 17 and 15 112 113 and
21: which is a side of both 20 21 29 and 21 220 221.
Can you find a property to describe the factorizations into primes of each number in this series?
[Check your answer with A061346.]
33,44,55 is a triple where all the numbers are palindromes, that is,
they are the same when written backwards.
We can find a whole series of Pythagorean triples where all the numbers are palindromes:
3,4,5
33,44,55
333,444,555
...
Also we have the triple 303,404,505.
What is the series of factors that has been used to generate these from 3 4 5?
Another is 66,88,110 if we include an initial 0 in front of the hypotenuse:
66,88,0110.
What about the Pythagorean triples 606,808,01010 and 666,888,01110?
Can you find any more infinite series of palindromic Pythagorean triples?
[Hint: You might find A057148 useful here.]
4/3/05 is a date and also a Pythagorean triple.
There was another one that year ('05) - when was it?
Assuming that the years are in this century and are just two digits long,
when is the next Pythagorean Triple Date?
How many other such days are there in this century?
If the date is any set of 3 numbers that are a Pythagorean triple (that is, the numbers need not be in order),
how many dates are there in one century? [Why not organise a 'Pythagoras Day' at your school/college/maths department on the next such date?]
How about a special Pythagorean Triple Time in hours:minutes:seconds? How many are there in a
whole day if we use a 24-hour clock with hours from 0 to 23?
In the Easy method of writing down a series of Triples section, we found a formula for the
pattern given there and used it with n = 10, 100, 1000, ....
What pattern do you get with n = 20, 200, 2000, ...?
... and with n = 30, 300, 3000, ...?
Find your own Pythagorean Triple Pattern not already mentioned in Further Triple Patterns
above.
Here is another way to do this.
Think of a series of numbers that are like those in the lists above, e.g.
from the 399, 40, 401 pattern we might think of hypotenuses that are in the series
901, 90001, 900001, ... . Plug these numbers into the Triples generator and see if any patterns
emerge. The hypotenuse searches on 901 and 90001 give:
[from Ken Sullins]
Can you find a formula for each of the sets of triples in the columns below?
A
B
C
D
E
F
G
H
I
3, 4, 5
4, 3, 5
12, 5, 13
15, 8, 17
35, 12, 37
40, 9, 41
60, 11, 61
24, 7, 25
63, 16, 65
5, 12, 13
8, 15, 17
20, 21, 29
21, 20, 29
45, 28, 53
56, 33, 65
80, 39, 89
36, 27, 45
77, 36, 85
7, 24, 25
12, 35, 37
28, 45, 53
27, 36, 45
55, 48, 73
72, 65, 97
100, 75, 125
48, 55, 73
91, 60, 109
9, 40, 41
16, 63, 65
36, 77, 85
33, 56, 65
65, 72, 97
88, 105, 137
120, 119, 169
60, 91, 109
105, 88, 137
11, 60, 61
20, 99, 101
44, 117, 125
39, 80, 89
75, 100, 125
104, 153, 185
140, 171, 221
72, 135, 153
119, 120, 169
A farmer uses fencing panels all of the same size
to cut off a right-angled corner of a field to form a triangular enclosure.
Each side used a whole number of panels.
When she dismantled the fence she found she could reuse it all to surround a square area exactly.
What was the shortest length of the fence for which this is possible?
If in addition to (a) she could also reuse all the panels to surround another cut-off corner
but which had a different shape to the original,
what is the smallest number of panels she would need now?
Find the smallest ten numbers in the series of perimeters which are all answers to puzzle (a).
A farmer had a right-angled triangular field that he sowed with grass seed.
The next year he sowed a differently shaped right-angled triangular field with exactly the same amount of seed.
What shapes could the two fields have been and what was the area?
Is it possible to find yet a different shape for a third year with the same amount of seed?
If not, find another 3 field shapes with the same area.
In the Pythagorean Triangles in a Rectangle section
above we found a dissection of a rectangle into
3 similar triangles (they all contained the same 3 angles) and one with 4 similar triangles.
Find a dissection of rectangle into 5 similar triangles.
What about 6?
Is it possible to extend this to any number of similar triangles in a rectangle?
Links and References for Further Reading
a book
an article, usually in an academic periodical
a link to a web page
Recreations in
the Theory of Numbers - The Queen of Mathematics Entertains
by A H Beiler, Dover, 1964,
was the first book that opened my eyes to the wonderful fun and facts about simple numbers.
There is a whole chapter on Pythagorean triangles: The Eternal Triangle. This book has been in print now for
many years and is a real classic, being both readable and full of interesting facts and tables and certainly accessible
to anyone with an interest in "recreational" mathematics and numbers. The sub-title of the book is
The Queen of Mathematics Entertains
which comes from a quote of Karl Frederich Gauss:
Mathematics is the queen of the sciences and arithmetic the queen of mathematics.
Highly recommended!
Mathematical Recreations
(second revised edition) by Maurice Kraitchik, Dover, 1953,
is another very enjoyable book that will appeal to
anyone who likes "playing with numbers". Apart from a chapter on
the classic numerical pastimes and number puzzles, it has others on Magic Squares, Chess board problems,
Permutations, Geometrical recreations and puzzles and a chapter on the Calendar. But I list it here because of
chapter 4 devoted completely to the Pythagorean Triangles called Arithmetico-Geometrical Questions. It has
the details of the algorithms used in the Calculators on this page.
This continues to be one of my favourite recreational mathematics books, of interest to anyone with
just a basic mathematical knowledge and a love of numbers.
It is available second-hand from as little as less than two US dollars at Amazon.com!
Mathematical Recreations and
Essays W W Rouse Ball, H S M Coxeter, Dover (13th edition 1987), paperback, 428 pages.
This is another
of the few great classics on mathematical recreations many of a geometrical nature. There is a fascinating chapter on
people with the most amazing ability to do arithmetic calculations in their heads. For us here, there is only a short section on
Pythagorean triangles, but, if you have found this web page of interest, I am sure that you
will find much to stimulate your own investigations in this book. It rarely uses mathematics
taught beyond age 16. It really is a book packed full of so many interesting and tantalising tit-bits of mathematics
that it makes you want to get out a pencil and paper and play with the numbers for yourself.
The Book of Numbers
by John Horton Conway and Richard K. Guy, Copernicus Books (1996), 311 pages, hardback.
This is nothing to do with a book of the Old Testament
as they quip in their introduction, but a collection of interesting mathematics
looking at our attempts to get to grips with the idea of number:
number words in many languages and the many different ways to write numbers as well as
numbers in mathematics. Much of it is at school-maths level but some of it goes beyond that
(imaginary, transcendental and infinite numbers). However, don't let that put you off as the book is full of diagrams
and pictures and explanations making it all readily accessible. The chapter on Further Fruitfulness of Fractions
shows how Pythagorean triangles were used by the Babylonians of 1500BC, well before the time of Pythagoras around 600BC
as discovered in a little clay tablet called Plimpton Tablet 322 (now in the Columbia University Library).
Number Theory and Its History
Oystein Ore, Dover (1988), 380 pages, paperback
is a great book if you want to look more seriously at the mathematics of primes and factors, congruences (the arithmetic
of remainders on division) - a topic called Number Theory - all in the context of their history by an excellent writer.
There is a section on the Plimpton Tablet 322 (not 332 as he mistakenly labels his picture of it),
a Babylonian list of Pythagorean triples and how it might have been used by the Babylonians.
The Penguin Dictionary of
Curious and Interesting Numbers David Wells, Penguin (Revised edition 1998), will help
answer some of the puzzle questions above but is a curious and interesting book in its own right! Take a number such as
3.14159.. . No doubt you will recognise it but what about 1634
or 364.2422? (Let your mouse rest on the numbers for the answers!)
And how many number facts do you know about
28? This book is full of wonderful facts about your favourite numbers.
A new algorithm for generating Pythagorean triples
(PDF file) by R. H. Dye and R. W. D. Nickalls in The Mathematical Gazette (1998), volume 82, pages 86-91.
The link is to an online PDF file of the article.
Height and Excess of Pythagorean Triples
(PDF file)
Darryl McCullough,Mathematics Magazine, (2005), vol 78, pages 26-44.
This downloadable PDF file deals with some other aspects of Pythagorean triples apart from those in its title,
and in particular with the
Barning tree which generates all primitive Pythagorean triangles uniquely in a "tree".
Online Encyclopedia of Integer Sequences
is Neil Sloane's excellent resource for both checking series of integers and also finding out more about each one. It is the
world-wide resource for such information and Neil welcomes any additional new series as well as more information on the
individual sequences.
All the primitive triads
for hypotenuse up to 10000. Michael Samos has produced this text file table together with
the perimeter and area of all the triangles (and other information on the angles too) if you want a complete list to print.
Pythagorean Triples Projects
is Eric Rowland's useful page of further ideas for your own investigations
together with some hints and solutions.