Right triangle and "b" are the legs of the triangle. If the incircle is tangent to the hypotenuse AB at point P, then denoting the semi-perimeter as "s", we have and , and the area is given by This formula only applies to right triangles. If an altitude is drawn from the vertex with the right angle to the hypotenuse then the triangle is divided into two smaller triangles which are both similar to the original and therefore similar to each other. From this: In equations, where "a", "b", "c", "d", "e", "f" are as shown in the diagram. Thus Moreover, the
Fermat's right triangle theorem and the other is odd. Therefore, both formula_39 and formula_40 are even, one of which is divisible by 4. From these two numbers Fermat derives two more numbers formula_41 and formula_42, one of which is even by the previous sentence. Because formula_43 is a square, formula_44 and formula_45 are the legs of another primitive Pythagorean triangle whose area formula_46. Since formula_27 is itself a square and since formula_48 is even, formula_49 is a square. Thus, any Pythagorean triangle with square area leads to a smaller Pythagorean triangle with square area, completing the proof. Fermat's right triangle theorem Fermat's right triangle