In trigonometry, the law of cotangents is a relationship among the lengths of the sides of a triangle and the cotangents of the halves of the three angles. This is also known as the Cot Theorem.
Just as three quantities whose equality is expressed by the law of sines are equal to the diameter of the circumscribed circle of the triangle (or to its reciprocal, depending on how the law is expressed), so also the law of cotangents relates the radius of the inscribed circle of a triangle (the inradius) to its sides and angles.
Using the usual notations for a triangle (see the figure at the upper right), where a, b, c are the lengths of the three sides, A, B, C are the vertices opposite those three respective sides, α, β, γ are the corresponding angles at those vertices, s is the semiperimeter, that is, s = a + b + c/2, and r is the radius of the inscribed circle, the law of cotangents states that
and furthermore that the inradius is given by
In the upper figure, the points of tangency of the incircle with the sides of the triangle break the perimeter into 6 segments, in 3 pairs. In each pair the segments are of equal length. For example, the 2 segments adjacent to vertex A are equal. If we pick one segment from each pair, their sum will be the semiperimeter s. An example of this is the segments shown in color in the figure. The two segments making up the red line add up to a, so the blue segment must be of length s − a. Obviously, the other five segments must also have lengths s − a, s − b, or s − c, as shown in the lower figure.
By inspection of the figure, using the definition of the cotangent function, we have
and similarly for the other two angles, proving the first assertion.
For the second one—the inradius formula—we start from the general addition formula:
Applying to cotα/2 + β/2 + γ/2 = cot π/2 = 0, we obtain:
(This is also the triple cotangent identity)
Substituting the values obtained in the first part, we get:
Multiplying through by r3/s gives the value of r2, proving the second assertion.