# Integer triangle

An integer triangle or integral triangle is a triangle all of whose sides have lengths that are integers. A rational triangle can be defined as one having all sides with rational length; any such rational triangle can be integrally rescaled (can have all sides multiplied by the same integer, namely a common multiple of their denominators) to obtain an integer triangle, so there is no substantive difference between integer triangles and rational triangles in this sense. Note however, that other definitions of the term "rational triangle" also exist: In 1914 Carmichael[1] used the term in the sense that we today use the term Heronian triangle; Somos[2] uses it to refer to triangles whose ratios of sides are rational; Conway and Guy [3] define a rational triangle as one with rational sides and rational angles measured in degrees—in which case the only rational triangle is the rational-sided equilateral triangle.

There are few general properties for an integer triangle (Section 1 below). All other sections refer to classes of integer triangles with specific properties.

## General properties for an integer triangle

### Integer triangles with given perimeter

Any triple of positive integers can serve as the side lengths of an integer triangle as long as it satisfies the triangle inequality: the longest side is shorter than the sum of the other two sides. Each such triple defines an integer triangle that is unique up to congruence. So the number of integer triangles (up to congruence) with perimeter p is the number of partitions of p into three positive parts that satisfy the triangle inequality. This is the integer closest to p248 when p is even and to (p + 3)248 when p is odd.[4][5] It also means that the number of integer triangles with even numbered perimeters p = 2n is the same as the number of integer triangles with odd numbered perimeters p = 2n - 3. Thus there is no integer triangle with perimeter 1, 2 or 4, one with perimeter 3, 5, 6 or 8, and two with perimeter 7 or 10. The sequence of the number of integer triangles with perimeter p, starting at p = 1, is:

0, 0, 1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7, 5, 8, 7, 10, 8 ... (sequence A005044 in OEIS)

### Area of an integer triangle

By Heron's formula, if T is the area of a triangle whose sides have lengths a, b, and c then

$4T = \sqrt{(a+b+c)(a+b-c)(a-b+c)(-a+b+c)}.$

Since all the terms under the radical on the right side of the formula are integers it follows that all integer triangles must have an integer value of 16T2.

### Angles of an integer triangle

By the law of cosines, every angle of an integer triangle has a rational cosine.

If the angles of any triangle form an arithmetic progression then one of its angles must be 60°.[6] For integer triangles the remaining angles must also have rational cosines and a method of generating such triangles is given below. However, apart from the trivial case of an equilateral triangle there are no integer triangles whose angles form either a geometric or harmonic progression. This is because such angles have to be rational angles of the form πpq with rational 0 < pq < 1. But all the angles of integer triangles must have rational cosines and this will occur only when pq = 13 [7]:p.2 i.e. the integer triangle is equilateral.

### Side split by an altitude

Any altitude dropped from a vertex onto an opposite side or its extension will split that side or its extension into rational lengths.

## Heronian triangles

A Heronian triangle, also known as a Heron triangle or a Hero triangle, is a triangle with integer sides and integer area. Every Heronian triangle has sides proportional to[8]

$a=n(m^{2}+k^{2}) \,$
$b=m(n^{2}+k^{2}) \,$
$c=(m+n)(mn-k^{2}) \,$
$\text{Semiperimeter}=mn(m+n) \,$
$\text{Area}=mnk(m+n)(mn-k^{2}) \,$

for integers m, n and k subject to the contraints:

$\gcd{(m,n,k)}=1 \,$
$mn > k^2 \ge m^2n/(2m+n) \,$
$m \ge n \ge 1 \,$.

The proportionality factor is generally a rational  $\frac{p}{q}$  where  $q=\gcd{(a,b,c)}$  reduces the generated Heronian triangle to its primitive and  $p$  scales up this primitive to the required size.

### Pythagorean triangles

A Pythagorean triangle is right angled and Heronian. Its three integer sides are known as a Pythagorean triple or Pythagorean triplet or Pythagorean triad.[9] All Pythagorean triples $(a, b, c)$ with hypotenuse $c$ which are primitive (the sides having no common factor) can be generated by

$a = m^2 - n^2, \,$
$b = 2mn, \,$
$c = m^2 + n^2, \,$
$\text{Semiperimeter}=m(m+n) \,$
$\text{Area}=mn(m^2-n^2) \,$

where m and n are coprime integers and one of them is even with m > n.

#### Pythagorean triangles with integer altitude from the hypotenuse

All primitive Pythagorean triangles with legs a and b, hypotenuse c, and integer altitude $d$ from the hypotenuse, which necessarily have both $a^{2}+b^{2}=c^{2}$ and $\tfrac{1}{a^{2}}+\tfrac{1}{b^{2}}=\tfrac{1}{d^{2}}$, are generated by[10][11]

$a=(m^2-n^2)(m^2+n^2), \,$
$b=2mn(m^2+n^2), \,$
$c=(m^2+n^2)^2, \,$
$d=2mn(m^2-n^2), \,$
$\text{Semiperimeter}=m(m+n)(m^2+n^2) \,$
$\text{Area}=mn(m^2-n^2)(m^2+n^2)^2 \,$

for coprime integers m, n with m > n.

Furthermore, any Pythagorean triangle with legs xy and hypotenuse z can generate another Pythagorean triangle, this one with integer altitude d from the hypotenuse c, by[11]

$(a,b,c,d)=(xz, yz, z^2, xy). \,$

### Heronian triangles with sides in arithmetic progression

A triangle with integer sides and integer area has sides in arithmetic progression if and only if[12] the sides are (bd, b, b + d), where

$b=2(m^2+3n^2)/g, \,$
$d=(m^2-3n^2)/g, \,$

and where g is the greatest common divisor of $m^2-3n^2,$ $2mn$, and $m^2+3n^2.$

### Heronian triangles with one angle equal to twice another

All Heronian triangles with B=2A are generated by[13] either

$a=\tfrac{k^2(s^2+r^2)^2}{4}, \,$
$b=\tfrac{k^2(s^4-r^4)}{2}, \,$
$c=\tfrac{k^2(3s^4-10s^2 r^2+3r^4)}{4} \,$
$\text{Area}=\tfrac{k^2 csr(s^2-r^2)}{2} \,$

with integers k, s, r such that s2 > 3r2, or

$a=\tfrac{q^{2}(u^{2}+v^{2})^{2}}{4} \,$,
$b=q^{2}uv(u^{2}+v^{2}) \,$,
$c=\tfrac{q^{2}(14u^{2}v^{2}-u^{4}-v^{4})}{4} \,$,
$\text{Area}=\tfrac{q^{2}cuv(v^{2}-u^{2})}{2} \,$,

with integers q, u, v such that v > u and v2 < (7+4√3)u2.

No triangles with B = 2A are Pythagorean.

### Isosceles Heronian triangles

All isosceles Heronian triangles are given by rational multiples of[14]

$a=2(u^2-v^2),$
$b=u^2+v^2,$
$c=u^2+v^2,$

for coprime integers u and v with u>v.

### Properties of Heronian triangles

• The perimeter of a Heronian triangle is always an even number.[15] Thus every Heronian triangle has an odd number of sides of even length,[16]:p.3 and every primitive Heronian triangle has exactly one even side.
• The area of a Heronian triangle is always divisible by 6.[15]
• All the altitudes of a Heronian triangle are rational.[2] This can be seen from the fact that the area of a triangle is one-half of one side times its altitude from that side, and a Heronian triangle has integer sides and area. Some Heronian triangles have three non-integer altitudes, for example the acute (15, 34, 35) with area 252 and the obtuse (5, 29, 30) with area 72. Any Heronian triangle with one or more non-integer altitudes can be scaled up by a factor equalling the least common multiple of the altitudes' denominators in order to obtain a similar Heronian triangle with three integer altitudes.
• Heronian triangles that have no integer altitude (in-decomposable) have sides that are all divisible by primes of the form 4k+1.[17]:p.40
• All the interior perpendicular bisectors of a Heronian triangle are rational: For any triangle these are given by $p_a=\tfrac{2aT}{a^2+b^2-c^2},$ $p_b=\tfrac{2bT}{a^2+b^2-c^2},$ and $p_c=\tfrac{2cT}{a^2-b^2+c^2},$ where the sides are $a \ge b \ge c$ and the area is $T;$[18] in a Heronian triangle all of a, b, c, and T are integers.
• There are no equilateral Heronian triangles.[2]
• There are no Heronian triangles with a side length of either 1 or 2.[19]
• There exist an infinite number of primitive Heronian triangles with one side length equal to a provided that a > 2.[19]
• Every angle of a Heronian triangle has a rational sine. This follows from the area formula Area = (1/2)ab sin C, in which the area and the sides a and b are integers (and equivalently for the other angles).
• There are no Heronian triangles whose three internal angles form an arithmetic progression. This is because at least one angle has to be 60°, which does not have a rational sine.[6]
• Any square inscribed in a Heronian triangle has rational sides: For a general triangle the inscribed square on side of length a has length $\tfrac{2Ta}{a^2+2T}$ where T is the triangle's area;[20] in a Heronian triangle, both T and a are integers.
• Every Heronian triangle has a rational inradius (radius of its inscribed circle): For a general triangle the inradius is the ratio of the area to half the perimeter, and both of these are rational in a Heronian triangle.
• Every Heronian triangle has a rational circumradius (the radius of its circumscribed circle): For a general triangle the circumradius equals one-fourth the product of the sides divided by the area; in a Heronian triangle the sides and area are integers.

## Integer triangles in a 2D lattice

A 2D lattice is a regular array of isolated points where if any one point is chosen as the Cartesian origin (0, 0), then all the other points are at (x, y) where x and y range over all positive and negative integers. A lattice triangle is any triangle drawn within a 2D lattice such that all vertices lie on lattice points. By Pick's theorem a lattice triangle has a rational area that is either an integer or has a denominator of 2. If the lattice triangle has integer sides then it is Heronian with integer area.[16]

Furthermore it has been proved that all Heronian triangles can be drawn as lattice triangles.[21] Consequently it can be stated that an integer triangle is Heronian if and only if it can be drawn as a lattice triangle.

## Integer triangles with specific angle properties

### Integer triangles with a rational angle bisector

A triangle family with integer sides $a,b,c$ and with rational bisector $d$ of angle A is given by[22]

$a=2(k^2-m^2), \,$
$b=(k-m)^2, \,$
$c=(k+m)^2, \,$
$d=\tfrac{2km(k^2-m^2)}{k^2+m^2}, \,$

with integers $k>m>0$.

### Integer triangles with integer n-sectors of all angles

There exist triangles in which the three sides and the bisectors of each of the three angles are integers.[23]

There exist triangles in which the three sides and the two trisectors of each of the three angles are integers.[23]

However, for n>3 there exist no triangles in which the three sides and the (n–1) n-sectors of each of the three angles are integers.[23]

### Integer triangles with one angle with a given rational cosine

Some integer triangles with one angle at vertex A having given rational cosine h/k (h<0 or >0; k>0) are given by[24]

$a=p^2-2pqh+q^2k^2,$
$b=p^2-q^2k^2,$
$c=2qk(p-qh),$

where p and q are any coprime positive integers such that p>qk.

#### Integer triangles with a 60° angle (angles in arithmetic progression)

All integer triangles with a 60° angle have their angles in an arithmetic progression. All such triangles are proportional to:[6]

$a=4mn \,$
$b=3m^2+n^2\,$
$c=2mn+|3m^2-n^2| \,$

with coprime integers m, n and 1 ≤ n ≤ m or 3m ≤ n. From here, all primitive solutions can be obtained by dividing a, b, and c by their greatest common divisor.

Integer triangles with a 60° angle can also be generated by[25]

$a=m^2-mn+n^2 \,$
$b=2mn - n^2\,$
$c=m^2-n^2 \,$

with coprime integers m, n with 0 < n < m (the angle of 60° is opposite to the side of length a). From here, all primitive solutions can be obtained by dividing a, b, and c by their greatest common divisor (e.g. an equilateral triangle solution is obtained by taking m = 2 and n = 1, but this produces a = b = c = 3, which is not a primitive solution). See also [26][27]

#### Integer triangles with a 120° angle

Integer triangles with a 120° angle can be generated by[28]

$a = m^2 + mn + n^2, \,$
$b = 2mn+n^2, \,$
$c = m^2 - n^2 \,$

with coprime integers mn with 0 < n < m (the angle of 120° is opposite to the side of length a). From here, all primitive solutions can be obtained by dividing a, b, and c by their greatest common divisor (e.g. by taking m = 4 and n = 1, one obtains a = 21, b = 9 and c = 15, which is not a primitive solution, but leads to the primitive solution a = 7, b = 3, and c = 5 which, up to order, can be obtained with the values m = 2 and n = 1). See also.[26][27]

### Integer triangles with one angle equal to an arbitrary rational number times another angle

For positive relatively prime integers h and k, the triangle with the following sides has angles $h \alpha$, $k \alpha$, and $\pi - (h+k) \alpha$ and hence two angles in the ratio h : k, and its sides are integers:[29]

$a = q^{h+k-1} \frac{\sin h \alpha}{\sin \alpha} = q^k \cdot\sum_{0 \leq i \leq \frac{h-1}{2}}(-1)^{i}\binom{h}{2i+1}p^{h-2i-1}(q^2-p^2)^i,$
$b = q^{h+k-1} \frac{\sin k \alpha}{\sin \alpha} = q^h \cdot\sum_{0 \leq i \leq \frac{k-1}{2}}(-1)^{i}\binom{k}{2i+1}p^{k-2i-1}(q^2-p^2)^i,$
$c = q^{h+k-1} \frac{\sin (h+k) \alpha}{\sin \alpha} = \sum_{0 \leq i \leq \frac{h+k-1}{2}}(-1)^{i}\binom{h+k}{2i+1}p^{h+k-2i-1}(q^2-p^2)^i,$

where $\alpha = \cos^{-1} \frac{p}{q}$ and p and q are any relatively prime integers such that $\cos \frac{\pi}{h+k} < \frac{p}{q} < 1$.

#### Integer triangles with one angle equal to twice another

With angle A opposite side $a$ and angle B opposite side $b$, some triangles with B=2A are generated by[30]

$a=n^2, \,$
$b = mn \,$
$c=m^2 - n^2, \,$

with integers m, n such that 0 < n < m < 2n.

Note that all triangles with B = 2A (whether integer or not) have[31] $a(a+c)=b^2$.

#### Integer triangles with one angle equal to 3/2 times another

The equivalence class of similar triangles with $\ B=\tfrac{3}{2}A$ are generated by[30]

$a=mn^3, \,$
$b=n^2(m^2-n^2), \,$
$c=(m^2 - n^2)^2 - m^2 n^2, \,$

with integers $\ m, n$ such that $\ 0<\varphi n, where $\ \varphi$ is the golden ratio $\varphi = \frac{1+\sqrt{5}}{2}\approx 1.61803$.

Note that all triangles with $\ B=\tfrac{3}{2}A$ (whether with integer sides or not) satisfy $\ (b^{2}-a^{2})(b^{2}-a^{2}+bc) = a^{2}c^{2}$.

#### Integer triangles with one angle three times another

We can generate the full equivalence class of similar triangles that satisfy B=3A by using the formulas [32]

$a=n^{3}, \,$
$b=n(m^{2}-n^{2}), \,$
$c=m(m^{2}-2n^{2}), \,$

where $m$ and $n$ are integers such that $\sqrt{2}n < m < 2n$.

Note that all triangles with B = 3A (whether with integer sides or not) satisfy $ac^2 = (b-a)^{2}(b+a)$.

## Integer triangles with integer ratio of circumradius to inradius

Conditions are known in terms of elliptic curves for an integer triangle to have an integer ratio N of the circumradius to the inradius.[33][34] The smallest case, that of the equilateral triangle, has N=2. In every known case, N ≡ 2 (mod 8)—that is, N–2 is divisible by 8.

## Particular integer triangles

• The only triangle with consecutive integers for sides and area has sides $(3,4,5)$ and area $6$.
• The only triangle with consecutive integers for an altitude and the sides has sides $(13,14,15)$ and altitude from side 14 equal to 12.
• The $(2,3,4)$ triangle and its multiples are the only triangles with integer sides in arithmetic progression and having the complementary exterior angle property.[35][36][37] This property states that if angle C is obtuse and if a segment is dropped from B meeting perpendicularly AC extended at P, then ∠CAB=2∠CBP.
• The $(3,4,5)$ triangle and its multiples are the only integer right triangles having sides in arithmetic progression[37]
• The $(4,5,6)$ triangle and its multiples are the only triangles with one angle being twice another and having integer sides in arithmetic progression.[37]
• The $(3,5,7)$ triangle and its multiples are the only triangles with a 120° angle and having integer sides in arithmetic progression.[37]
• The only integer triangle with area=semiperimeter[38] has sides $(3,4,5)$.
• The only integer triangles with area = perimeter have sides[38][39] (5, 12, 13), (6,8,10), (6,25,29), (7,15,20), and (9,10,17). Of these the first two, but not the last three, are right triangles.
• There exist integer triangles with three rational medians.[9]:p. 64 The smallest has sides (68, 85, 87). Others include (127, 131, 158), (113, 243, 290), (145, 207, 328) and (327, 386, 409).
• There are no isosceles Pythagorean triangles.[14]
• The only primitive Pythagorean triangles for which the square of the perimeter equals an integer multiple of the area are (3,4,5) with perimeter 12 and area 6 and with the ratio of perimeter squared to area being 24; (5,12,13) with perimeter 30 and area 30 and with the ratio of perimeter squared to area being 30; and (9, 40, 41) with perimeter 90 and area 180 and with the ratio of perimeter squared to area being 45.[40]

## References

1. ^ Carmichael, R. D., 1914, Diophantine Analysis, pp.11-13; in R. D. Carmichael, 1959, The Theory of Numbers and Diophantine Analysis, Dover.
2. ^ a b c Somos, M., "Rational triangles," http://grail.csuohio.edu/~somos/rattri.html
3. ^ Conway, J. H., and Guy, R. K., "The only rational triangle," in The Book of Numbers, 1996, Springer-Verlag, pp.201 and 228-239.
4. ^ Tom Jenkyns and Eric Muller, Triangular Triples from Ceilings to Floors, American Mathematical Monthly 107:7 (August 2000) 634-639
5. ^ Ross Honsberger, Mathematical Gems III, pp 39-37
6. ^ a b c Zelator, K., "Triangle Angles and Sides in Progression and the diophantine equation x2+3y2=z2," Cornell Univ. archive, 2008
7. ^ Jahnel, Jörg (2010), When is the (Co)Sine of a Rational Angle equal to a rational number?, Cornell Univ. archive
8. ^ Carmichael, R. D. The Theory of Numbers and Diophantine Analysis. New York: Dover, 1952.
9. ^ a b Sierpiński, Wacław. Pythagorean Triangles, Dover Publ., 2003 (orig. 1962).
10. ^ Voles, Roger, "Integer solutions of a-2+b-2=d-2," Mathematical Gazette 83, July 1999, 269–271.
11. ^ a b Richinick, Jennifer, "The upside-down Pythagorean Theorem," Mathematical Gazette 92, July 2008, 313–317.
12. ^ a b Buchholz, R. H.; MacDougall, J. A. "Heron Quadrilaterals with sides in Arithmetic or Geometric progression". Bull. Austral. Math. Soc. pp:263-269; Vol. 59 (1999).
13. ^ Mitchell, Douglas W., "Heron triangles with ∠B=2∠A," Mathematical Gazette 91, July 2007, 326–328.
14. ^ a b Sastry, K. R. S., "Construction of Brahmagupta n-gons", Forum Geometricorum 5 (2005): 119–126.
15. ^ a b Friche, Jan. "On Heron Simplices and Integer Embedding". Ernst-Moritz-Arndt Universät Greiswald Publication, 2 Jan. 2002.
16. ^ a b Buchholz, R. H.; MacDougall, J. A. (2001), Cyclic Polygons with Rational Sides and Area, CiteSeerX Penn State University, p. 3
17. ^ Yiu, Paul (2008), Heron triangles which cannot be decomposed into two integer right triangles, 41st Meeting of Florida Section of Mathematical Association of America
18. ^ Mitchell, Douglas W. (2013), "Perpendicular Bisectors of Triangle Sides", Forum Geometricorum 13, 53-59: Theorem 2.
19. ^ a b Carlson, John R. "Determination of Heronian triangles". San Diego State College (1970).
20. ^ Bailey, Herbert, and DeTemple, Duane, "Squares inscribed in angles and triangles", Mathematics Magazine 71(4), 1998, 278–284.
21. ^ Marshall, Susan H.; Perlis, Alexander R. (2012), Heronian tetrahedra are lattice tetrahedra, University of Arizona, p. 2
22. ^ Zelator, Konstantine, Mathematical Spectrum 39(3), 2006/2007, 59-62.
23. ^ a b c De Bruyn,Bart, "On a Problem Regarding the n-Sectors of a Triangle", Forum Geometricorum 5, 2005: pp. 47–52.
24. ^ Sastry, K.R.S, "Integer-sided triangles containing a given rational cosine", Mathematical Gazette 68, December 1984, 289-290.
25. ^ Gilder, J., Integer-sided triangles with an angle of 60°," Mathematical Gazette 66, December 1982, 261 266
26. ^ a b Burn, Bob, "Triangles with a 60° angle and sides of integer length," Mathematical Gazette 87, March 2003, 148–153.
27. ^ a b Read, Emrys, "On integer-sided triangles containing angles of 120° or 60°", Mathematical Gazette 90, July 2006, 299-305.
28. ^ Selkirk, K., "Integer-sided triangles with an angle of 120°," Mathematical Gazette 67, December 1983, 251–255.
29. ^ Hirschhorn, Michael D., "Commensurable triangles", Mathematical Gazette 95, March 2011, pp. 61-63.
30. ^ a b Deshpande,M. N., "Some new triples of integers and associated triangles," Mathematical Gazette 86, November 2002, 464–466.
31. ^ Willson, William Wynne, "A generalisation of the property of the 4, 5, 6 triangle," Mathematical Gazette 60, June 1976, 130–131.
32. ^ Parris, Richard, College Mathematics Journal 38(5), November 2007, 345-355.
33. ^ MacLeod, Allan J., "Integer triangles with R/r = N", Forum Geometricorum 10, 2010: pp. 149-155.
34. ^ Goehl, John F. Jr., "More integer triangles with R/r = N", Forum Geometricorum 12, 2012: pp. 27-28
35. ^ Barnard, T., and Silvester, J., "Circle theorems and a property of the (2,3,4) triangle," Mathematical Gazette 85, July 2001, 312-316.
36. ^ Lord, N., "A striking property of the (2,3,4) triangle," Mathematical Gazette 82, March 1998, 93-94.
37. ^ a b c d Mitchell, Douglas W., "The 2:3:4, 3:4:5, 4:5:6, and 3:5:7 triangles," Mathematical Gazette 92, July 2008.
38. ^ a b MacHale, D., "That 3,4,5 triangle again," Mathematical Gazette 73, March 1989, 14-16.
39. ^ L. E. Dickson, History of the Theory of Numbers, vol.2, 181.
40. ^ Goehl, John F. Jr., "Pythagorean triangles with square of perimeter equal to an integer multiple of area", Forum Geometricorum 9 (2009): 281–282.