Law of cotangents



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.

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.

Statement
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 $$\frac{\cot\frac{1}{2}\alpha}{s-a} = \frac{\cot\frac{1}{2}\beta}{s-b} = \frac{\cot\frac{1}{2}\gamma}{s-c} = \frac{1}{r},$$

and furthermore that the inradius is given by $$r = \sqrt{\frac{(s-a)(s-b)(s-c)}{s}}\,.$$

Proof
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 $$\cot\frac{\alpha}{2} = \frac{s-a}{r}\,$$ 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: $$ \cot(u+v+w) = \frac{\cot u + \cot v + \cot w - \cot u \cot v \cot w}{1 - \cot u \cot v - \cot v \cot w - \cot w \cot u}.$$

Applying to $$\cot\left(\tfrac{1}{2}\alpha + \tfrac{1}{2}\beta + \tfrac{1}{2}\gamma\right) = \cot \tfrac{\pi}{2} = 0,$$ we obtain:

$$ \cot\frac{\alpha}{2}  \cot\frac{\beta}{2}  \cot\frac{\gamma}{2} = \cot\frac{\alpha}{2} + \cot\frac{\beta}{2} + \cot\frac{\gamma}{2}. $$ (This is also the triple cotangent identity.)

Substituting the values obtained in the first part, we get: $$ \begin{align} \frac{(s-a)}{r} \frac{(s-b)}{r} \frac{(s-c)}{r} &= \frac{s-a}{r} + \frac{s-b}{r} +\frac{s-c}{r} \\[2pt] &= \frac{3s-2s}{r} \\[2pt] &= \frac{s}{r} \end{align}$$ Multiplying through by $r^{3}⁄s$ gives the value of $r^{2}$, proving the second assertion.

Some proofs using the law of cotangents
A number of other results can be derived from the law of cotangents.

$$\begin{align} S &= r(s-a) + r(s-b) + r(s-c) \\ &= r\bigl(3s - (a+b+c)\bigr) \\ &= r(3s - 2s) \\ &= rs \end{align}$$ This gives the result $$S = \sqrt{s(s-a)(s-b)(s-c)}$$ as required. $$\frac{\sin \tfrac{1}{2}(\alpha - \beta) }{\sin\frac{1}{2}(\alpha + \beta) } = \frac{\cot\frac{1}{2}\beta - \cot\tfrac{1}{2} \alpha}{\cot\frac{1}{2}\beta + \cot\tfrac{1}{2}\alpha} = \frac{a-b}{2s-a-b}.$$ This gives the result $$\frac{a-b}{c} = \dfrac{\sin\frac{1}{2}(\alpha - \beta)}{\cos\frac{1}{2}\gamma}$$ as required. $$\begin{align} \frac{\cos\tfrac{1}{2}(\alpha - \beta) }{\cos\tfrac{1}{2}(\alpha + \beta)} &= \frac {\cot\tfrac{1}{2}\alpha \, \cot\tfrac{1}{2}\beta + 1}{\cot\tfrac{1}{2}\alpha \, \cot\tfrac{1}{2}\beta - 1} \\[4pt] &= \frac{\cot\tfrac{1}{2}\alpha + \cot \tfrac{1}{2}\beta + 2\cot\tfrac{1}{2}\gamma }{\cot\tfrac{1}{2}\alpha + \cot\tfrac{1}{2}\beta} \\[4pt] &= \frac{4s - a - b - 2c}{2s - a - b}. \end{align}$$ Here, an extra step is required to transform a product into a sum, according to the sum/product formula. This gives the result $$\frac{b+a}{c} = \dfrac{\cos\tfrac{1}{2}(\alpha - \beta)}{\sin\tfrac{1}{2}\gamma}$$ as required.
 * Heron's formula. Note that the area of triangle $ABC$ is also divided into 6 smaller triangles, also in 3 pairs, with the triangles in each pair having the same area.  For example, the two triangles near vertex $A$, being right triangles of width $s − a$ and height $r$, each have an area of $1⁄2r(s − a)$.  So those two triangles together have an area of $r(s − a)$, and the area $S$ of the whole triangle is therefore
 * Mollweide's first formula. From the addition formula and the law of cotangents we have
 * Mollweide's second formula. From the addition formula and the law of cotangents we have
 * The law of tangents can also be derived from this.

Other identities called the "law of cotangents"
The law of cotangents is not as common or well established as the laws of sines, cosines, or tangents, so the same name is sometimes applied to other triangle identities involving cotangents. For example:

The sum of the cotangents of two angles equals the ratio of the side between them to the altitude through the third vertex:


 * $$\cot \alpha + \cot \beta = \frac{c}{h_c}.$$

The law of cosines can be expressed in terms of the cotangent instead of the cosine, which brings the triangle's area $$S$$ into the identity:


 * $$c^2 = a^2 + b^2 - 4S \cot \gamma.$$

Because the three angles of a triangle sum to $$\pi,$$ the sum of the pairwise products of their cotangents is one:


 * $$\cot \alpha\,\cot \beta + \cot \alpha\,\cot \gamma + \cot \beta\,\cot \gamma = 1.$$