Solving Triangles and Integer sided triangles

The calculators and other effects on this page require JavaScript but you appear to have switched JavaScript off (it is disabled) in this browser.
Please go to the Preferences or Properties menu item for this browser and enable it and then Reload this page.
"Solving a triangle" means finding its properties when given some or all of it angles and side lengths. This page has a Calculator which does this for you, complete with proofs of the steps if you want to see them.
Also we look at triangles whose sides are whole numbers. These include Pythagorean triangles but there are others which are not right-angled:
The presentation is aimed at school students, teachers and other maths enthusiasts but it uses no maths beyond (UK) school level. Optional fold-out sections provide full information so no prior knowledge is needed,
The Calculator can not only "solve a triangle", that is find all the sides and angles given just some of them but can also draw a triangle with many of its more important circles, lines and points as well as generate integer-sided triangles of various kinds.
Contents of this page
The Things To Do icon means there is a Things to do section of questions to start your own investigations.
The calculator calculator icon indicates that there is a live interactive calculator in that section.

Triangles and their properties

Names and Lines on the Triangle

tri shapes tri We usually refer to the sides as a, b and c and the angles opposite them as A, B and C respectively.
Angles are measured in So a quarter turn is ¼ turns = ¼ 360° = 90° or ¼(2 π) = ½ π radians.


More on the meanings of Acute, Right-angled, Obtuse triangles, Scalene, Isoceles, Equilateral triangles;
Perimeter, Area, Altitudes, Orthocentre, Medians, Centroid, Angle Bisector Theorem

Triangle shapes:
By angles:
Acute
all angles are less than a right-angle
Right-angled
One angle is a right-angle
Obtuse
One angle is bigger than a right-angle
By side lengths:
Scalene
The sides are of different lengths
All the angles are different too.
Isoceles
Two sides have the same length and
the angles opposite these two sides are equal
Equilateral
All sides are the same and
all angles also

Perimeter
The perimeter is the distance around the triangle, the sum of the three sides.
Area
The area is half of the product of one side and its "height" with that side as the base.
Altitudes and Orthocentre
The heights are more properly called altitudes and there are three of them, one from each vertex to the side opposite it perpendicularly.
The 3 altitudes all meet at one point called the orthocentre.
Medians and Centroid
medians meet at centroid A median joins a vertex to the mid-point of the opposite side. The three medians meet at a single point called the centroid. A median divides a triangle into two halves of equal area.
The medians are usually not the same as the angle bisectors.
Angle Bisectors
bisector meet at incentre An angle bisector is not the same as the median.
The median joins a vertex to the midpoint of the opposite side, dividing that side into half.
The angle bisector divides an angle into half and will meet the opposite side at some point not necessarily in the middle.
median is not ang bisector The diagram here shows how the angle bisector and the median are distinct and compares them to the altitude h which joins a vertex to the opposite side meeting that side at 90°.
The position of the foot of the angle bisector, D in the diagram, on the side opposite A is determined by the ratio of the two other sides:
Angle Bisector Theorem
BD = BA = c or  b = c
DCACbDCBD
whereas for the median point M is in the middle of the side so that BM = MC.

The three medians meet at a common point: the centroid.
Because the sides are divided into half, each median will divide the whole triangle into two triangles with equal area. Think of the median side as the base. Both the triangles on either side have a common apex - the other end of the median, so their heights are identical and their bases are identical, so their areas are the same.
So, if we cut the triangle out of card, it would balance perfectly on a pivot point at the centroid. Other names for this point are the centre of mass, the centre of gravity, the barycentre.

altitudes meet at orthocentre The three altitudes meet at a common point: the orthocentre.
The incenter and the centroid are always inside the triangle ABC but the orthocentre may be outside the triangle if one angle is greater than 90° (the triangle is obtuse) as in the diagram here, where the green altitudes meet.

It is easy to confuse the following lines when learning about triangles:

A perpendicular bisector of a side
perp bi is not alt bisects the side so it goes through the mid-point of the side.
It is parallel to the altitude but the altitude on that side as base goes through the third point of the triangle. The altitude need not meet the base at the mid-point. The perpendicular bisector need not go through the third vertex of the triangle.
The three perpendicular bisectors of the sides all meet at the centre of a circle (the circumcircle) through the vertices ABC, called the circumcentre.
A perpendicular bisector is the set of points that are the same distance away from each of the end-points.
A median
also goes through the mid-point of a side but is not necessarily perpendicular to the side, in fact it usually is not. But a median always goes through the third vertex of the triangle.

Circles of the Triangle

More on Circumcircle, Incircle, Excircles and Euler line
Circumcircle (the vertex circle)
circle thru vertices There is a unique circle through all the vertices, the circumcircle. Its centre is the circumcentre and is the unique point that is equidistant from each vertex and lies on all three perpendicular bisectors of the sides, proved as Proposition 5 of Book 4 of Euclid's Elements.

excircles Incircle (inside the sides circle)
If the circumcircle is the unique circle joining all the vertices and lying inside the triangle, the interior circle or incircle is the unique circle touching all the triangle's sides.
Its centre is the incentre and its radius is the inradius.
The three angle bisectors meet in a single point which was proved as Proposition 4 of Book 4 of Euclid's Elements. It is the only point that is the same distance from each side and the point where they meet is the incentre, marked I on the diagram.
Excircles (outside the sides of the circle)
If we extend the sides of the triangle, we can fit three more circles between two sides extended and one side of the triangle. These are the exterior circles or excircles and there are 3, each touching one side but outside the triangle. Each has an exradius and an excentre. On the diagram the excentres are marked E. We can distinguish between them by adding a suffix which is the vertex whose angle-bisector the excentre lies on, i.e. EA, EB, EC.
What do you notice about the triangle formed from the three excentres?
The vertices A,B,C of the triangle lie on the sides of the triangle formed by joining the excentres EA, EB, EC.
Euler line
altitudes meet at orthocentre Three of the centre points above: the orthocentre, the centroid and the circumcentre all lie on a straight line called the Euler line and the centroid is one third of the way between the orthocentre and the circumcentre (proved by Euler in 1765).

Solving a triangle

More on how to Solve A Triangle...
We can often deduce the other sides and angles when we are only given some of them. triangle This is called "solving the triangle".
There are three rules or theorems that are useful for deducing the missing sides and angles:
The angles in a triangle add up to to 180°
A + B + C = half a turn = 180° = Pi radians
This finds the third angle when we know the other two angles.
Informal Proof:
Place your pen along one side of the triangle. Note which way it is pointing.
There are two angles of the triangle on that side.
Turn the pen through one of the angles of the triangle (not one of the angles outside it) so that it lies along another side.
Repeat with another of the angles and then the third so that the pen again lies on the original side of the triangle.
Note which way the pen points now. It has turned a complete half-turn.
The Sine Rule
This is useful if we know both an angle and two sides one of which is the side opposite the angle. It can find the angle opposite the other known side.
a = b = c
sin(A)sin(B)sin(C)

Proof: In the diagram, draw the line h as the height of vertex B above the base b.
It divides the triangle into two triangles.
In the left hand triangle sin(C) = h/a so that h = a sin(C)
In the right hand triangle, sin(A) = h/c so that h = c sin(A)
Putting these two together and eliminating h gives:
a = c
sin(A)sin(C)

By doing the same with another side as the base, we get the complete Sine Rule.
The Cosine Rule
This is useful if we know two sides and the angle between them
a2 = b2 + c2 − 2 b c cos(A)
If we know sides b and c and angle A - the angle between them - then we can deduce the length of the remaining side a.
By rearranging the equation above we can find angle A if we know all three sides a, b and c:
cos(A) = b2 + c2 − a2
2 b c

Proof:
Using the same diagram and Pythagoras' Theorem in the left hand triangle we have
a2 = h2 + (b−x)2
Pythagoras in the right hand triangle gives
c2 = h2 + x2
If we substitute h from the second into the first, we can eliminate it:
a2 = (c2 − x2) + (b−x)2
Now we expand (b−x)2 and find that the x2 terms cancel:
a2 = c2 + b2 − 2 b x
Finally, to remove x, we note that x/c = cos(A) in the right hand triangle so x = c cos (A):
substituting this in gives the Cosine Rule:
a2 = b2 + c2 − 2 b c cos(A)
We need at least 3 of the 6 measurements (3 sides and 3 angles)
We can code the different sets of given measurements using A for angle and S for side and proceed, for example as shown here:
  • Given 3 angles (AAA), the triangle can be any size so we need the length of one side too.
  • Given 3 sides (SSS), use the Cosine rule to work out the three angles
  • Given 2 sides and the angle between them (SAS), use the Cosine rule to find the third side and proceed as above
  • Given 2 sides and a non-included angle (SSA), use the Sine rule to find the missing side. Sometimes there can be two triangles possible - see below.
  • Given 2 angles and the side joining them (ASA), find the third angle (the angles sum to 180°) then use the Sine rule
  • Given 2 angles and a side not joining them (AAS), find the third angle (the angles sum to 180°) then use the Sine rule
The ambiguous case of SSA
There is one case when we might have two different solutions: If we are given two sides and an angle which is not the included angle, say b and c and angle C, then there could be two possible places for vertex B as shown in the diagram here.
This is the case of two sides and the non-included angle meaning that the angle is not the one between the two given sides.
We can find the two solutions by noting that when we apply the Sine Rule, there may be another solution because:
sin( α ) = sin( 180°−α )
Less than 3 of the six measurements is not enough.
  • two sides are not enough since they can "hinge" where they join and so can have any angle between them
  • two angles are not enough since we don't know how far apart they are
  • one side and one angle at one end of the side will define a second side but we can then take any point on it as another vertex to join to the other end of the given side.
  • one side and the angle opposite that side means the vertex with that angle can be anywhere on a circle segment.

About the Triangle Calculator

There are FOUR Calculators-in-one here. When a triangle is found you can select from many properties which you want to be shown in the RESULTS section:

A Triangle Calculator

Triangle C A L C U L A T O R   
Sides:
a=
b=
c=
Angles:
∠A= 
∠B= 
∠C= 
:show proofs
Output:
:sides :side2
:type

:perimeter
:area

:altitudes
:medians
:vertex circle radii
:vertex coords

:angles

:sines
:cosines
:tangents

:angle bisectors
:circumradius
:inradius
:exradii


Diagram

: altitudes 
: medians 
: incircle 
: circumcircle 
: angle bisectors 
: Euler line 

R E S U L T S
  :show numbers
Key (Type): P=Pythagorean H=Heronian L=Lattice
Integer sided:p=primitive or n=non-primitive
s=scalene or i=isoceles or e=equilateral
r=right angled or o=obtuse or a=acute

Counts of Lattice triangles on an n×n grid

The Calculator finds one example of each class of triangles that are either similar or else congruent.
Congruent
means the triangles are identical, so they have the same angles and side lengths, such as those with vertices (0,0) (1,0) (0,3) and (0,0) (0,1) (3,0).
These two are therefore in the same congruence class and count as the same solution.
Similar
means they are the same shape (same angles) but need not be the same size.
The triangle with vertices (0,0) (2,0) (0,4) is similar to that with vertices at (0,0) (1,0) (0,2) but they are not congruent (the former has sides twice as long as those of the latter).
These two are therefore in the same similarity class but are in different congruency classes.
The number of congruency classes for a square grid of size 1, 2, 3, 4, ... is
1, 8, 29, 79, 172, 333, 587, 963, 1494, 2228, 3195, 4455, 6050, ... A028419
The number of similarity classes for a squre grid of size 1, 2, 3, 4, ... is
1, 6, 20, 55, 119, 229, 402, 667, 1019, 1536, 2216, 3049, 4168, ... A028492
The congruency classes can be further split by counting those which are scalene, acute-angled, obtuse-angled, isoceles and right-angled for square grids of side 1, 2, 3, ...:
Number of scalene triangles, distinct up to congruence, on a (n X n)-grid:
0, 3, 18, 57, 137, 280, ... A190313
Number of acute triangles, distinct up to congruence, on a (n X n)-grid
0, 2, 8, 23, 51, 101, 179, 295, ... A190021
Number of obtuse triangles, distinct up to congruence, on a (n X n)-grid
0, 2, 12, 39, 95, 193, 355, 597, ... A190022
Number of isosceles triangles, distinct up to congruence, on a (n X n)-grid
1, 5, 11, 22, 35, 53, 70, 100, ... A189978
Number of right-angled triangles, distinct up to congruence, on an n X n grid
0, 1, 4, 9, 17, 26, 39, 53, 71, ... A189979
All right-angled triangles with sides a,b,h are clearly lattice triangles as we can have vertices are (0,0) (a,0) (0,b) or (0,0) (a,0) (a,b).
There are also right-angled triangles with the right angle not on the x or y axis, called oblique right-angled triangles such as
(0,0) (1,1) (2,0) with sides 2, √2, √2 and
(0,0) (3,3) (4,2) with sides 2, 2√5, 3√2

Integer-Sided Triangles

There is a separate page on Pythagorean Triangles.
This page introduces the other integer-sided triangles (or just integer triangles). These are not the same as those with integer-coordinates for the vertices though some can be.
We look at the integer-coordinate triangles (Lattice triangles) in the next section.

Perimeter

The smallest integer triangle has sides 1,1,1 and perimeter 3. It cannot be drawn with vertices on a lattice no matter how large we expand the sides.
The integer triangles are shown here colour-coded:
equilateral, isoceles and scalene
(3 sides equal, 2 sides equal or no sides equal respectively)
and a≤b≤c.
Integer triangles ordered by perimeter size:
a+b+cequilateral
isoceles
scalene
31,1,1
4
51,2,2
62,2,2
71,3,3  2,2,3
82,3,3
93,3,3  1,4,42,3,4 
103,3,4  2,4,4 
113,3,5  3,4,4  1,5,52,4,5
124,4,4  2,5,53,4,5 
134,4,5  3,5,5  1,6,6  2,5,6  3,4,6 
144,4,6  4,5,5  2,6,63,5,6
154,4,7  5,5,5  3,6,6  1,7,7  2,6,7  3,5,7  4,5,6 
165,5,6  4,6,6  2,7,7  3,6,7  4,5,7
This table has a row for each a, a column for each b and the possible longest sides c as entries:

a≤b≤c
possible longest sides c
\b
a\
123456...
1123456...
2.2,33,44,55,66,7...
3..3,4,54,5,65,6,76,7,8...
4...4,5,6,75,6,7,86,7,8,9...
5....5,6,7,8,96,7,8,9,10...
6.....6,7,8,9,10,11...
The entry for a and b has a range of values for c from b to a+b−1: there are exactly a possibilities for c.
We have to stop at a+b−1 because any larger and a and b would add to exactly c (or exceed c) and the "triangle" with sides a,b,c becomes a straight line. We call such a "triangle" a degenerate triangle.

The total number of integer triangles for each perimeter is:
(0, 0) 1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7, 5,... A005044 also called Alcuin's sequence.
It has a surprisingly simple formula involving the round function and the floor function where

The number of integer-sided triangles with perimeter p is
= Round( p2) if p is even
48

= Round( (p + 3)2 ) if p is odd
48
or use the following formula for all p:
Round(p2) − Floor(p)Floor(p+2)
1244
George Andrews has two simple and very nice proofs of these formulae in the reference below.
He relates T(n), the number of integer-sided triangles with perimeter n, to the number of partitions of a number n into 3 parts P3(n) and into two parts P2(n).
Show what a partition is
A partition of an integer n≥0 is any sum of positive integers>0 with n as the total.
The number of parts is the number of integers in the sum.
Thus these are the partitions of 4 into 2 parts: 1+3, 2+2 and into 3 parts: 1+1+2.
It should be fairly easy to see that P2(n) = Floor(n/2).

Note that we are interested in the collection of integers not in their order so that 1+1+2 is the same partition as 1+2+1 and 2+1+1 and is only counted once.
P2(4) is thus the number of sums with 4 as the total, that is P2(4)=2.
We will use P(n) without a subscript to mean the total number of partitions on n of any length (number of parts).
Thus P(5) is 7 because 5 = 4 + 1 = 3 + 2 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1.
Leibniz (1646 - 1716) was the first person who answered a question about the number of partitions of integers and later Euler (1707 - 1783) found methods to show that there are 522 partitions of 50 into 7 distinct parts.


He also shows that
T(2n) = P3(n)
T(2n − 3) = T(2n)
If we count only those with 3 unequal sides (scalene triangles) with a perimeter of 9 or larger we have
1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7, 5,...
Observant readers will notice that these seem to be the same counts as all integer triangles but for a perimeter of 6 less than the scalene triangle's perimeter. More...
If we take any integer triangle a≤b≤c, with equal sides or not, then by adding 1 to a, 2 to b and 3 to c we obtain another, still with a+1≤b+2≤c+3 and which also must have the triangle property:
a+b>c ... which becomes a+1+b+2>c+3
b+c>a ... which becomes b+2+c+3>a+1
c+a>b ... which becomes c+3+a+1>b+2
This shows that if the original a,b,c numbers have the Triangle property then so must a+1,b+2,c+3.
If a≤b≤c in the original then we must also have a+1<b+2<c+3 since two equal sides in a,b,c cannot be equal in the new larger triangle: the new triangle in a scalene integer triangle.
We can also reason the other way in that if a<b<c is a scalene integer triangle then so a-1≤b-2≤c-3 must be an integer triangle too, provided that a>2.
So the number of integer triangles of perimeter p is the same as the number of scalene triangles of perimeter p−6
The number of non-scalene integer triangles, that is those with at least 2 sides equal is 0,0,1,0,1,1,2,1,2,2,3,2,3,3,4,3,4...A059169

Area

Here are the smallest integer-sided triangles and their areas:
a,b,cPerimeterArea
1,1,131/4√3= 0.4330
1,2,251/4√15= 0.9682
2,2,26√3= 1.7321
1,3,371/4√35= 1.4790
2,2,373/4√7= 1.9843
1,4,493/4√7= 1.9843
1,5,5113/4√11= 2.4875
2,3,382√2= 2.8284
2,3,493/4√15= 2.9047
1,6,6131/4√35= 2.9896
The integer-sided triangles with smallest areas are shown here.

The first integer-sided triangle with an integer area is our old friend the 3,4,5 Pythagorean triangle.

Heron or Hero of Alexandria was a Greek inventor, a mathematician and astronomer ≈10-70 AD. Today his name is given to a formula for the area of a triangle that only uses the side lengths:
Hero's or Heron's Formula
A triangle with sides a, b, c has area (a+b+c) (a+b−c) (a−b+c) (−a+b+c)
2222
=
2 a2 (b2 + c2) − a4 − (b2 − c2)2
4
=
2 a2b2 + 2 b2c2 + 2 c2a2 − a4 − b4 − c4
4

His name is given to Heronian Triangles: integer triangles with an integer area, but first we look at those integer triangles whose area is not an integer.
The most studied (most interesting?) of the integer triangles are the Pythagorean ones (those with a right-angle) and those whose area is also an integer (Heronian triangles) which we will come to soon. First, let's have a brief look at those integer triangles with a non-integer area.

Non-integer area

The list of integer triangles above does not show much pattern in the area but a consequence of Heron's Formula is
16 times the square of the area of an integer-sided triangle is always an integer:
16 Area2 = (a+b+c)(a+b−c)(a−b+c)(−a+b+c) is an integer
Here are the smaller ones arranged in order of perimeter and of area. Note that they do not contain the same data since the perimeter-ordered integer triangle is complete up to perimeter 15 whereas the area-ordered table has all triangles up to area 675 only. The tables are scrollable within the blue border.
Perimeter order:
PeriSides16Area²
31,1,13
51,2,215
62,2,248
71,3,335
72,2,363
82,3,3128
91,4,463
92,3,4135
93,3,3243
102,4,4240
103,3,4320
111,5,599
112,4,5231
113,3,5275
113,4,4495
122,5,5384
123,4,5576
124,4,4768
131,6,6143
132,5,6351
133,4,6455
133,5,5819
134,4,5975
142,6,6560
143,5,6896
144,4,61008
144,5,51344
151,7,7195
152,6,7495
153,5,7675
153,6,61215
154,4,7735
154,5,61575
155,5,51875
Area order:
PeriSides16Area²Area
31,1,133/4 = 0.43301
51,2,21515/4 = 0.96825
71,3,33535/4 = 1.47902
62,2,2483 = 1.73205
72,2,3633 7/4 = 1.98431
91,4,4633 7/4 = 1.98431
111,5,5993 11/4 = 2.48747
82,3,31282 2 = 2.82843
92,3,41353 15/4 = 2.90474
131,6,6143143/4 = 2.98957
151,7,7195195/4 = 3.49106
112,4,5231231/4 = 3.79967
102,4,424015 = 3.87298
93,3,32439 3/4 = 3.89711
171,8,8255255/4 = 3.99218
113,3,52755 11/4 = 4.14578
103,3,43202 5 = 4.47214
191,9,9323323/4 = 4.49305
132,5,63513 39/4 = 4.68375
122,5,53842 6 = 4.89898
211,10,10399399/4 = 4.99375
133,4,6455455/4 = 5.33268
231,11,11483483/4 = 5.49432
113,4,44953 55/4 = 5.56215
152,6,74953 55/4 = 5.56215
142,6,656035 = 5.91608
251,12,12575(5 23)/4 = 5.99479
123,4,55766 = 6
172,7,8663663/4 = 6.4372
153,5,767515 3/4 = 6.49519
When ordered by perimeter, the 16 Area² values are 3, 15, 48, 35, 63, 128, 63, 135, 243, 240, 320, ... A135622 but the series of 16 Area² values in order is 3, 15, 35, 48, 63, 63, 99, 128, 135, 143, 195, ...
This is a subset of the integers of the form xyz(x+y+z) (equivalent to s(s−a)(s−b)(s−c)/16 where x=(s−a)/2, y=(s−b)/2 and z=(s−c)/2 so that x+y+z is 3s/2−(a+b+c)/2=s/2. There are other values of xyz(x+y+z) for integers x,y and z that cannot be 16 area² values of integer triangles, e.g. x=1,y=1,z=2 giving (x+y+z)xyz=8 but this would represent an integer triangle with sides a=1,b=1,c=2 which is impossible because a+b=c. Other impossible values for xyz(x+y+z) are 15 (a=1, b=1, c=3), 24 (a=1, b=1, c=4}, 36 (a=1, b=2, c=3) ... .

The first two integer triangles with integer area are:

The integer triangles with integer area are the subject of the next section.

Integer area

Integer-sided triangles with an integer area are called Heronian Triangles and include all the Pythagorean triangles.
A nice consequence of the two's in the denominators in the first of the Heron formulas for the area is that for Heronian triangles (those with integer area) we cannot have all sides of odd length. If we do, all the numerators are odd numbers, the 2's will not cancel and the area will not be an integer. If just one of a, b or c is even then all the numerators are even and we have an integer under the square-root sign, a necessary condition for an integer area. Therefore
At least one side in a Heronian Triangle is even
The same reasoning shows that there cannot be two even sides and an odd side. The only combinations left are either all sides even or one even and two odd sides.
A primitive Heronian triangle has one even side and two odd sides.
The other case is all sides even for a non-primitive Heronian triangle.
In both these cases:
the perimeter of a Heronian triangle is even
You might like to see if you can extend the argument to prove that
the area of a Heronian triangle is even
It is also true that the area of a Heronian triangle is a multiple of 3 and so, putting these two facts together, we have:
the area of a Heronian triangle is a multiple of 6
A further consequence is that if the sides are integers, then
The square of the area of an integer-sided triangle is an integer too as we saw above.
The Heronian triangles are those particular triangles for which this is a perfect square.
Since we have seen that one even side means the area is an integer (this is a necessary and sufficient test for an integer triangle to be Heronian), then the area of any integer triangle is a whole number or else of the form n/16 where n is odd.
The integer-sided triangles with smallest whole number areas
AreaHeronians
63,4,5
125,5,6; 5,5,8
246,8,10; 4,13,15
305,12,13
369,10,17; 3,24,25
427,15,20
The smallest Heronian triangles by perimeter
PeriHeronian
Triangles
12 3,4,5
16 5,5,6
18 5,5,8
24 6,8,10
30 5,12,13
32 4,13,15; 10,10,12
36 9,10,17; 9,12,15; 10,10,16; 10,13,13
40 8,15,17
42 7,15,20; 13,14,15
44 11,13,20
48 10,17,21; 12,16,20; 15,15,18
50 13,13,24; 16,17,17
The perimeters are
12, 16, 18, 24, 30, ... A051518
Primitive Isoceles Heronian triangles with the same area
Sides Area
5,5,65,5,812
13,13,1013,13,2460
17,17,1617,17,30120
25,25,1425,25,48168
37,37,2437,37,70420
41,41,1841,41,80360
29,29,4029,29,42420
Heronian Triangles with unique area:
AreaSidesType
6 3,4,5 Pythag prim
30 5,12,13 Pythag prim
42 7,15,20 prim
54 9,12,15 Pythag
66 11,13,20 prim
72 5,29,30 prim
114 19,20,37 prim
132 11,25,30 prim

The area of a Heronian triangle is not only an integer but also a multiple of 6.
The areas of primitive Heronian triangles are 6, 12, 24, 30, 36, 42, 48, 54, 60, 66 ... A188158
and we have seen that these are all multiples of 6: 6× {1,2,4,5,6,7,10,11,12,14,15,...} A083875
The repeated sides common to the pair of Heronians with the same area are:
5, 13, 17, 25, 29, 37, 41, 53, 61, 65, ... A020822.
The areas of the pairs (x,x,y) and (x,x,y+2d) sorted by x value (as shown above) are: 12, 60, 120, 168, 420, 420, 360, 1260, 660, ... A120644 but the sorted list of areas is 12, 60, 120, 168, 360, 420, 660, 1008, 1092, 1260, 1680 ... A094807. These series have much in common with Pythagorean triangles.
Show why...
This is because we have seen that there is only one even side in a Heronian triangle and, for an isoceles triangle, this must be the base. So we can split the isoceles triangle into two identical right-angled triangles using the line from the apex to the mid-point of the base.
For an isoceles Heronian triangle (x,x,2y) we have the two right-angled triangles (x,y,height). But the area is an integer (the isosceles triangle is Heronian) and so the height is an integer and the two triangles are Pythagorean! This means that any Pythagorean triangle can be joined to a duplicate along one leg to form an isoceles Heronian triangle.

There are triangles with integer area that are not Heronian (their sides are not integers) eg. multiply the Pythagorean 3-4-5 triangle by √3: the triangle with sides 33, 43, 53 has an area of 18.

Heronian Properties

the sine, cosine and tangents of all three angles are rational.
The cosine rule a² = b² + c² − 2 b c cos(A) means that cos(A) = (b² + c² − a²)/(2 b c) and proves that all the cosines are rational because all the sides are whole numbers.
Since the area of a Heronian triangle is a whole number by definition and a formula for the area of a triangle is Area = b c sin(A)/2 then sin(A) = 2 Area/(b c) and this is rational. The same argument applies to all the angles.
If we allow 0 and infinity to be rational numbers (for cosine and tangent of 90°) then all the tangents will be rational also.
all the altitudes of a Heronian triangle are rational
Since the sides and area are whole numbers then using Area = ½ side×altitude we deduce all the altitudes are rational numbers.
one altitude is a whole number only if the Heronian triangle is primitive;
note this does not say that all Heronians triangles have an integer altitude - see below
if two or three altitudes are whole numbers the Heronian triangle is Pythagorean or is not primitive
The integer altitude of a non-Pythagorean Heronian triangle will divide it into two Pythagorean triangles.
Note that this does not say that all Heronian triangles are made from two Pythagorean triangles because there are primitive Heronian triangles with no whole number altitudes such as 5,29,30 with area 72 and altitudes 144/5, 144/29, 24/5.
The altitudes of such triangles are necessarily rational numbers so by multiplying the sides by a denominator of one of the altitudes we can always find a non-primitive Heronian triangle of the same shape that will be decomposable into two Pythagorean triangles.
dont overlap do overlap The two Pythagorean triangles will have the altitude as the common leg but each Pythagorean triangle will have a different Heronian side as a hypotenuse. The Pythgorean triangles can overlap or be separate so that the sum or the difference of their areas is the Heronian area depending on whether the Heronian triangle is acute or obtuse.
No one knows if there is a Heronian triangle with 3 whole number medians.
52,102,146 is Heronian and has two integer medians 97, 35 but the third is 4√949; all its multiples will have 2 integer medians also.
Euler found the integer triangle 136,174,170 has medians 158, 127, 131 but its area is 60√2002.
This is Problem 14.2 in Unsolved Problems...see the reference below.

Applications of Integer Triangles

Alcuin's Sequence

Counting all integer-sided triangles by perimeter we got the sequence (0, 0) 1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7, 5,... A005044 called Alcuin's sequence.
The name comes from a problem of Alcuin of York (740 - 804 approx) having a number of expensive glass flasks of oil left by a father for his three sons. Some flasks were full, some half full and some empty but there were the same number of each. The oil and the flasks were to be divided equally between three children in such a way that they all got the same amount of oil and the same number of the expensive flasks too. How can this be done without pouring any oil from one flask into another?
Let's say there are n full flasks, n half-full and n empty to divide amont the three children.
If there was just one full, one half-full and one empty, then we cannot do it, there are no solutions.
The number of solutions start with the final 0 in the list above: Try the puzzle for yourself and verify that the number of solutions here are correct.
Show solutions...
Let F stand for a Full glass flask, h for a half-full glass flask and - for an empty glass flask.

1 glass flask of each kind:
F h o: -
cannot be done with each of the three getting just one glass flask each if they are all to get the same amount of oil!
0 solutions

nOil eachSolutions
1
F h o
1/2-0 solutions
2
FF hh oo:
1
FoFohh
1 solution
3
FFF hhh ooo
1.5
FhoFhoFho
1 solution
4
FFFF hhhh oooo
2
FFooFFoohhhh
FhhoFhhoFFoo
2 solutions
5
FFFFF hhhhh ooooo
2.5
FFhooFFhooFfffo
1 solution
6
FFFFFF hhhhhh oooooo
3
FFFoooFFFooohhhhhh
FFhhooFFhhooFFhhoo
FFFoooFFhhooFhhhho
3 solutions


Can you explain why this problem with n glass flasks of the three kinds should have the same number of solutions as that of finding integer-sided triangles with perimeter n+3?

Another application - partitions of a number

This same sequence arises in the problem of using coloured rods of just 3 kinds: magenta rods of length 2, blue rods of length 3 and green rods of length 4 to make a line of length n. We are interested in the collection of colours used so that 2+2+3 of length 7 using two magenta and a blue rod is the same as 2+3+2 and 3+2+2.
How many arrangements are there to make a line of length n?
Show the solution...
nsolutions
1- 0
221
331
42+2 = 42
52+31
62+4 = 3+3 = 2+2+23
73+4 = 2+2+32
84+4 = 2+2+4 = 2+3+3 = 2+2+2+24

Can you explain simply why this problem gives the same number of solutions as Alcuin's flasks and integer triangles of a given perimeter?

This correspondence can be related directly to the number of integer triangles with a given perimeter and is a nice exercise for the interested reader. The excellent reference below details the investigation of this problem by a school geometry class.
In order to find the connections yourself, you might find the integer triangles by perimeter table above a useful starting point. The reference below contains a fuller development and is not advanced.

Lattice Triangles

Integer-sided Triangles
1,1,1
area √3 

Lattice triangles
Heronian Triangles
5,5,6
area 12

Pythagorean
Triangles

3,4,5
area 6

1,√2,√5
area 1/2

1,2,√5
area 1
Non-heronians
Points that have integer x and y coordinates are called lattice points. The simplest example is squared paper, a sheet divided into squares called a lattice where we use the line intersections as our points. The coordinates of our points are therefore (x,y) where both x and y are whole numbers.

A triangle that has lattice points for all of its vertices is called a lattice triangle.
Not all of these have integer sides. For example the 45°-45°-90° right-angled triangle with sides 1, 1, √2 can be drawn using lattice points as its vertices: (0,0), (1,0), (1,1).
However, a moment's thought shows that all Pythagorean triangles can be drawn with integer coordinates because their two legs are integers.
What is not obvious is that all Heronian triangles can be drawn on the grid lattice with integer coordinates too.
But there are integer-sided triangles that are not lattice triangles!
Let's explore this a little more.

A special case of a lattice triangle is the Pythagorean triangle a-b-h which has both a right-angle and whole number sides. We can therefore draw it with its vertices at the integer coordinates (0,0), (a,0) and (b,0). A property of Pythagorean triangles is that the two legs cannot both be odd and therefore the area of a Pythagorean triangle will always be a whole number (half the product of the two legs).

What is also true is that every lattice triangle has an area that is an integer or half an integer. More...

rect James Tanton has a nice webpage on this.
Any lattice triangle can be enclosed within a rectangle as shown here. If we subtract from that rectangle the three triangles, we have the area of our lattice triangle. The rectangle area is an integer; the areas of the three right-angled triangles are integers or half integers (their hypotenuses need not be whole numbers so now the two legs of the right-angles may be odd).
When we remove the triangles from the rectangle the area left must be an integer or half an integer.

A right-angled triangle with legs 1 and n will have an area of n/2 so we can always find an integer triangle for every integer or half-integer.


There are many integer-sided triangles with a half-integer area such as:
Triangles with vertices at (0,0), (1,0), (1,n) base=1 height=1 area=1/2 for any whole number n
Triangles with vertices at (0,0), (3,0), (1,n) base=3 height=1 area=3/2 for any whole number n
Triangles with vertices at (0,0), (5,0), (1,n) base=5 height=1 area=5/2 for any whole number n
Triangles with vertices at (0,0), (2k+1,0), (1,n) base=2k+1 height=1 area (2k+1)/2 for any whole number n
Since we can "shear" a triangle by moving the third vertex parallel to the line between the other two vertices and still keep the same area, there are many non-right-angled triangles which also have an integer or half-integer area such as (0,0), (1,1), (1,2) with area 1/2.

A Heronian triangle has integer sides and integer area. All of them can be drawn as lattice triangles. A special subset of these are the Pythagorean triangles. There are other Heronian triangles that are not Pythagorean, for example join two 3,4,5 triangles along their 4 sides to make a 5,5,6 triangle with area of 12.
All this can be summarised in the Venn diagram on the right above.

There are integer-sided triangles that are not lattice triangles, such as the equilateral triangle of any (integer) side length. Such triangles never have a whole-number area. E Lucas in 1878 proved that no matter how big an equilateral triangle is, if its sides are whole numbers then it is never a lattice triangle.

There is an integer-sided triangle with one 60° angle: 5,7,8 and another with a 120° angle (so it has an exterior angle of 60°): 3,7,8.
There are non-integer sided triangles that nevertheless have an integer area for example the right angled triangle 1, 2, √5 which has an area of 1.

Area of a Lattice Triangle

All lattice triangles can be made up from basic triangles of area 1/2. These basic triangles have no lattice points inside them and any such triangle always has an area of 1/2.
These formulas give the area of any triangle using only the coordinates of its vertices:
The area of the triangle with vertices at (Ax,Ay), (Bx,By) and (Cx,Cy) is
 
Ax(By−Cy) + Bx(Cy−Ay) + Cx(Ay−By)
2
= 1
2
Ax Ay 1
Bx By 1
Cx Cy 1
(Ax, Ay) = (0,0) Area = Bx Cy − By Cx

Note that if we know the vertex coordinates then since we can always rotate, reflect and move a lattice triangle
so that one vertex is at (0,0), the area reduces to the very simple form above.

If all the coordinates' components are integers then the area is half an integer.
A more immediate proof that any lattice triangle has such an area is given by the diagram on the right.


Dividing any lattice Polygon into triangles

We can divide any lattice polygon (with straight-line sides and lattice point vertices) into basic triangles of area 1/2, each basic triangle containing no lattice point.
Leonhard Euler posed the problem of counting the number of way we can do this for a polygon on n sides.

Pick's Theorem

One remarkable property of lattice triangles - and in fact any polygon formed by joining lattice points with straight edges - is that the area can be written as a simple formula involving the number of lattice points inside the triangle and the number of lattice points on the edges of the shape.
Now you know that a simple formula exists, if you want to have a go at finding it yourself try filling in these tables and see if you can guess it or... Show Pick's Theorem
If I is the number of lattice points inside the polygon and B is the number of lattice points on the boundary (straight edges) then:
Area = I + B − 1
2
I = number of lattice points Inside the triangle;
B = number of points on the Boundary,the edges, of the triangle
TriangleIBarea
0 6 2
TriangleIBarea
½
1
2

TriangleIBarea
6
8

More on proving Pick's Theorem...
The formula Georg A Pick discovered and published in 1899 is:
It is not too difficult to prove and you might like to try to find your own proof.
One way is to show that all lattice polygons can be split into simple lattice triangles, each containing no lattice points.
You then need to show that all such basic triangles have area 1/2.
We can then use a kind of induction by showing that Pick's Theorem is true for all basic triangles:
Then we need to show that when we join a basic triangle onto a polygon for which the theorem holds then the new larger shape conforms to the theorem.
So we can see that any polygon that we can split into basic triangles can also be built back up using them and the Pick's theorem must apply to it.

Applications of Pick's Theorem

Here are a few applications of Pick's Theorem:

Pick's Theorem and Lattice Triangles


Range b: :0..50 :0-120 :0-250
When we plot b values against i values from Pick's Theorem for lattice triangles, some intriguing patterns emerge as shown in the plot on the right, with b: the number of lattice points on the boundary or edges of a lattice triangle against i: the number of lattice points inside the triangle. There are several prominent straks or rays of points emanating from near the origin with a positive slope. The slopes are multiples of 1/2 separated by "cones of silence" of regions where there are no (b,i) pairs for any lattice triangle.
i=0, b≥3
Points along the i-axis in the plot on the right. These are triangles with no internal lattice points. They are the 'fundamental triangles' since every other triangle (and polygons too) can be parititioned into such basic shapes. All such triangles have an area of ½.
There is a triangle with no internal points (i=0) and with b points on its boundary for every value of b≥3 with vertices at (0,0) (b-2,0) (b-2,1)
b=3, i≥0
There are triangles with only 3 boundary points but with i internal points for all values of i≥0. Examples include the triangles with vertices (0,0) (1,0) (2, 2i + 1)
b=4, i≥0
includes the triangles with vertices (0,0 (1,0) (2, 2i + 2)
b=5, i must be a multiple of 3
such as triangles with vertices (0,0) (1,0) (3, 2i + 3) where i=3n
Scott's Inequality says that there is only one triangle with b = 2i + 7
the triangle (0,0) (3,0) (0,3) or congruent lattice triangles where i=1 and b=9.
The lowest sloping line: b=2i+6
For all other triangles except the one above, we must have b ≤ 2i + 6. The triangles at this limit have b = 2i + 6 such as the triangles with vertices (0,0) (2,0) (2,2i + 2).
The other two cases with b=2i+k
k=4: Vertices for triangles with i internal points and b=2i+4 include (0,0) (1,0) (2i+1, 4i+2)
k=2: Vertices for triangles with i internal points are b=2i+2 include (0,0) (1,0) (2i,4i)
The lower boundary of the next "streak" of points with b=i+k...
b=i+8: (0,0) (3,0) (3,3n+3) has b=3n+9 and i=3n+1
...also has 2 more prominent parallel lines in that same streak:
b=i+5: the triangles (0,0) (1,0) (3n+1,9n+3) have b=3n+5 and i=3n and alternate with (0,0) (1,0) (3n+3, 9n+6) having b=3n+6 and i=3n+1
b=i+2: the other line has triangles (0,0) (1,4) (i+1,i+4) with b=i+2 if b is not a multiple of 3 OR else (0,0) (1,3) (3i,0) where b=3i
The "cones" of forbidden pairs have the following properties:
They have a starting point
If the lowest cone has parameter c=1 the apex of cone c is b=2c2+2c+2 and i=c3-c
an example triangle that fits this specification is (0,0) (2c2+2c,0) (1,c)
capex
b,i
example tri
vertices
1 6, 0 (0, 0), (4, 0), (1, 1)
2 14, 6 (0, 0), (12, 0), (1, 2)
3 26, 24 (0, 0), (24, 0), (1, 3)
4 42, 60 (0, 0), (40, 0), (1, 4)
5 62, 120 (0, 0), (60, 0), (1, 5)
6 86, 210 (0, 0), (84, 0), (1, 6)
7 114, 336 (0, 0), (112, 0), (1, 7)

Pick's Theorem in 3D?

What if we considered joining points in 3 dimensions instead of 2D? Does Pick's theorem generalize? If we cannot draw an equilateral triangle on a 2D lattice maybe we could in 3D, or even 4D?
To start answering these questions, we have bad news and good news!
First the bad news:
There is no simple 3D generalization to find the volume of a flat sided, straight edged polyhedron (a solid with volume) whose vertices are on 3D lattice points if we want the volume solely in terms of the number of lattice points inside it and the number on its surface.
Reeve (1957) (see references below) gives a simple example to show this by considering a tetrahedron defined by the 4 vertices (0,0,0), (1,0,0), (0,1,0) and (1,1,k). Its volume is k/6 but it has no points inside it nor on its surface nor its edges apart from the vertices yet its volume depends on k.
and now the good news... 3d equil
We can draw a perfect equilateral triangle using 3D lattice points!
(0,0,1), (0,1,0) and (1,0,0) define such a triangle and we can multiply these coordinates by any value we like to obtain an infinite set of equilateral triangles.
Imagine drawing three lines, one on the floor and two on the two walls of a room where the three points are each 1 metre from the same corner.
and more good news....
the hexagon is also a 3D lattice polygon.
More ...
cube frame
:outline :midpoints
The answer lies in a nice puzzle. You can find a regular hexagon in a cube. How?
By holding the cube so that a diagonal through opposite corners of the cube is in line with your eye.
If we now join the mid points of the sides as we go round the visible hexagon, we will get a flat hexagon. If the cube has sides of length 2 and the origin is a corner of the cube, its coordinates are
(2, 1, 0), (2, 0, 1), (1, 0, 2), (0, 1, 2), (0, 2, 1), (1, 2, 0)
or, if the origin is the centre of the cube:
(1, 0, -1), (1, -1, 0), (0, -1, 1), (-1, 0, 1), (-1, 1, 0), (0, 1, -1)
These coordinates are just the 6 possible sequences of numbers 0, 1 and 2 or -1, 0 and 1.
but more bad news...
The equilateral triangle, square and hexagon are the only regular polygons that can be drawn in a lattice of any number of dimensions! By regular here, we mean all sides are the same length.
More on what a higher dimension lattice is...
A "graph-paper" 2D lattice is the set of points (x,y) where x and y are integers.
The distance between (x,y) and (p,q) is (p−x)² + (q−y)².

When we extend to 3D we have (x,y,z) and again all three coordinates are integers and the distance between (x,y,z) and (p,q,r) is √(p−x)² + (q−y)² + (r−q)².

Mathematically there is no reason not to extend this to a list of 4 coordinates (x,y,z,w) or 5 or 6 ... and we measure distances between two "points" as the square-root of the squares of the differences in each dimension.

although there is even more good news....
If we mean all angles in the polygon are the same but not necessarily all the edges of the same size then we have equiangular polygons and these include all regular polygons too. Rectangles are equiangular polygons and they are lattice polygons if their side lengths are whole numbers.
But the good news is that there is another equiangular polygon that we can draw on our integer (2D) lattice that has neither 3, 4 nor 6 sides.
What is it?
More ...
The octagon:octagon

Unfortunately this is all there is, even in higher dimensions. The proof goes back to 1963. Here is a PDF on the Dynamics Of Polygons site that explains more.

Rational Triangles

grid tiling A rational triangle is a triangle with sides that are rational numbers (fractions or integers).
Diophantus is satisfied by rational solutions to his problems and, in most cases, a problem that can be solved with rational numbers can be solved for integers and vice versa.
In terms of triangles, we can easily convert a rational triangle into an integer triangle if we take the largest denominator in the sides of a rational triangle and multiply the sides by that number to find a similar integer triangle (a triangle with the same angles). Similarly, although an integer triangle is also a rational triangle, by dividing the sides of an integer triangle by the largest side, we have a rational triangle all of whose sides are rational numbers no bigger than 1.
Some rational triangles have an irrational area so some rational triangles are not Heronian.

However, there is at least one problem where the rational triangle/integer triangle correspondence is not applicable: tiling the plane with distinct rational triangles, that is, completely fill the infinite 2D plane with rational triangles, no two of which are the same shape (similar). There will clearly be an infinite number of tiles, each a rational triangle and so we cannot find the largest denominator of all of them to scale up any solution for integer triangles.
J H Conway posed this problem for rational triangles in 1965. The published solution of another solver involves taking one simple triangle that will tile the plane on its own, namely the 3-4-5 Pythagorean triangle and then showing how it can be split into two rational triangles in an infinite series of different ways. By applying this series of splits to each 3-4-5 triangle in the (infinite) plane tiling, we will have a complete tiling where no two rational triangle shape is ever repeated.

The problem of whether we can tile the plane with distinct integer triangles remains unsolved.

Links and References


© 2003-2018 Dr Ron Knott   Dr Knott's Maths HOME page

version 2: created 27 February 2016, updated 30 July 2018
version 1: 21 Nov 2003