A Pythagorean triple is a set of three positive integers satisfying . Two examples are and . These form the side lengths of a right-angled triangle, called a Pythagorean triangle.

Some time ago I found that a (3,4,5) triangle can be found inside a (7,24,25) right-angled triangle as follows.

In this post we will generalise the above figure. That is, in a right-angled triangle with integer side lengths consider a smaller right-angled triangle formed by one of its vertices, the incentre, and the incircle’s point of tangency with a side as shown above. For what side lengths of the orignal triangle does this inner triangle also have integer side lengths? Below is a second example.

To find the general solution we use the fact that primitive Pythagorean triples (those without a common factor) have the following form:

where and are positive integers with no common factor, and one of them is even. Any other (non-primitive) triple is formed by multiplying each of the three elements by the same positive integer.

Here is an easy way to derive (1) that I found here . We have from which where and are coprime integers. Hence and we have the two equations

Adding and subtracting the two equations gives and . We can then equate numerator and denominator leading to the desired result provided the right sides are reduced. This will be the case if and have no common factor and one of them is even (this ensures the numerator is odd).

Since a line from a vertex of a triangle to its incentre is an angle bisector, we have angles of and in our inner and outer triangles respectively. Since the inner triangle has side lengths forming a Pythagorean triple we have

or .

Only one of these is less than 1 since they are reciprocals of each other.

Using the identity ,

either

or .

These are equivalent up to sign and we choose the case for which (i.e. ) depending on whether is smaller or larger than .

Next we show that the numerator is coprime with the denominator (which is odd when and have different parity). Suppose an odd prime divides both in the numerator and in the denominator. Then divides and so divides or . But divides which implies is a factor of both and : contradiction. A similar contradiction can be used to show any odd prime factor of cannot divide the denominator.

Next if an odd prime divides both in the numerator and in the denominator, then divides implying divides both and : contradiction. A similar contradiction can be used to show any odd prime factor of cannot divide the denominator. We conclude that the numerator and denominator have no common factors.

From these values of , the numerator and denominator (possibly times a common multiple) correspond directly to side lengths for the outer triangle and we find the hypotenuse to be . Hence the **outer** triangle’s side lengths correspond to the following Pythagorean triples:

Hence we find the interesting fact that the hypotenuse of the outer triangle will always be a multiple of a perfect square, as is seen in the two above examples. With this as the side lengths of the outer triangle, the inradius will be (the formula is valid for any right angled triangle with hypotenuse ). This inradius corresponds to one of the side lengths of the inner triangle. The three side lengths of the **inner** triangle will have the form

The first diagram above corresponds to while the second corresponds to . The next simplest type would be leading to a inner triangle and an outer triangle.