In trigonometry, the law of cotangents is a relationship among the side lengths of a triangle and the cotangents of the halves of its angles.
For a triangle with side lengths \(a',b',c'\) opposite the vertices \(A,B,C\) respectively, let
\[s=\frac{a'+b'+c'}{2}\quad\text{and}\quad r=\text{inradius}.\]
If the angles at \(A,B,C\) are \(\alpha',\beta,\gamma\), then
\[\boxed{\;\frac{\cot(\alpha'/2)}{s-a'}=\frac{\cot(\beta/2)}{s-b'}=\frac{\cot(\gamma/2)}{s-c'}=\frac{1}{r}\; }.\]
In this note, we generalize the law of cotangents to cyclic quadrilaterals.
Let \(ABCD\) be a cyclic quadrilateral with side lengths
\[|AB|=a,\quad |BC|=b,\quad |CD|=c,\quad |DA|=d,\qquad s=\frac{a+b+c+d}{2}.\]
Set \(\alpha=\angle BAD\), \(\beta=\angle ABC\), \(\gamma=\angle BCD\), \(\varphi=\angle CDA\) (see Figure 1). Let \(\Delta\) denote the area of \(ABCD\).
![]() |
Figure 1. A cyclic quadrilateral $ABCD$. |
\[\boxed{\;\sin^2\frac{\alpha}{2}=\frac{(s-a)(s-d)}{ad+bc},
\qquad\cos^2\frac{\alpha}{2}=\frac{(s-b)(s-c)}{ad+bc}
\;}.\]
Proof. Let \(\gamma=\angle BCD\). Since \(ABCD\) is cyclic, \(\alpha+\gamma=\pi\). Applying the Law of Cosines in triangles \(ABD\) and \(BCD\) and using \(\cos(\pi-\alpha)=-\cos\alpha\),
\[a^2+d^2-2ad\cos\alpha=b^2+c^2-2bc\cos(\pi-\alpha)=b^2+c^2+2bc\cos\alpha,\]
hence
\[\cos\alpha=\frac{a^2+d^2-b^2-c^2}{2(ad+bc)}.\]
For \(\cos^2(\alpha/2)\):
\[\begin{aligned}\cos^2\frac{\alpha}{2}&=\frac{1+\cos\alpha}{2}
=\frac{2(ad+bc)+a^2+d^2-b^2-c^2}{4(ad+bc)}\\[2pt]&=\frac{(a+d)^2-(b-c)^2}{4(ad+bc)}=\frac{(a+d-b+c)(a+d+b-c)}{4(ad+bc)}\\[2pt]&=\frac{\bigl((a+b+c+d)-2b\bigr)\bigl((a+b+c+d)-2c\bigr)}{4(ad+bc)}\\[2pt]&=\frac{(s-b)(s-c)}{ad+bc}.\end{aligned}\]
For \(\sin^2(\alpha/2)\):
\[\begin{aligned}\sin^2\frac{\alpha}{2}&=\frac{1-\cos\alpha}{2}
=\frac{2(ad+bc)-(a^2+d^2-b^2-c^2)}{4(ad+bc)}\\[2pt]&=\frac{(b+c)^2-(a-d)^2}{4(ad+bc)}=\frac{(b+c-a+d)(b+c+a-d)}{4(ad+bc)}\\[2pt]&=\frac{\bigl((a+b+c+d)-2a\bigr)\bigl((a+b+c+d)-2d\bigr)}{4(ad+bc)}\\[2pt]&=\frac{(s-a)(s-d)}{ad+bc}.\end{aligned}\]
This proves the two identities for \(\alpha\). \(\square\)
Theorem (Generalized law of cotangents for cyclic quadrilaterals)
As a consequence of the half–angle formulas,
\[\boxed{\;\frac{\cot(\alpha/2)}{(s-b)(s-c)}\;=\;\frac{\cot(\beta/2)}{(s-c)(s-d)}=\frac{\cot(\gamma/2)}{(s-d)(s-a)}=\frac{\cot(\varphi/2)}{(s-a)(s-b)}=\frac{1}{\Delta}\; }.\]
Proof. From the lemma for \(\alpha\),
\[\cot^2\frac{\alpha}{2}=\frac{\cos^2(\alpha/2)}{\sin^2(\alpha/2)}
=\frac{(s-b)(s-c)}{(s-a)(s-d)},\]
hence
\[\frac{\cot(\alpha/2)}{(s-b)(s-c)}=\frac{1}{\sqrt{(s-a)(s-b)(s-c)(s-d)}}.\]
By Brahmagupta’s formula, \(\displaystyle \Delta=\sqrt{(s-a)(s-b)(s-c)(s-d)}\), so \(\displaystyle \frac{\cot(\alpha/2)}{(s-b)(s-c)}=\frac{1}{\Delta}\). Cyclic relabeling of \(a,b,c,d\) and \(\alpha,\beta,\gamma,\varphi\) yields the other three equalities. \(\square\)
Let \(d=0\). Then \(D\) coalesces with \(A\) and \(ABCD\) degenerates to the triangle \(ABC\) with semiperimeter \(s=\tfrac{a+b+c}{2}\) and area \(\Delta\) (see Figure 2). Taking \(\alpha\) as the angle formed by \(\overline{AB}\) and the limiting tangent at \(A\), the tangent–chord theorem and the limiting relation \(\alpha+\gamma=\pi\) give \(\alpha=\pi-\gamma\), hence \(\cot(\alpha/2)=\tan(\gamma/2)\).
From the generalized theorem, with \(d=0\),
\[\frac{\cot(\beta/2)}{(s-c)s}=\frac{1}{\Delta},\qquad\frac{\cot(\gamma/2)}{(s-a)s}=\frac{1}{\Delta}.
\tag{1}\]
\[r^2s^2=s(s-a)(s-b)(s-c)\quad\Longrightarrow\quad
r^2=\frac{(s-a)(s-b)(s-c)}{s}. \tag{2}\]
Using \((1)\) and \(\Delta=rs\),
\[\frac{\cot(\beta/2)}{s-c}=\frac{1}{r},\qquad\frac{\cot(\gamma/2)}{s-a}=\frac{1}{r}. \tag{3}\]
To obtain the relation at \(A\), set \(\alpha'=\angle BAC\).
Since \(\alpha'=\pi-(\beta+\gamma)\),
\[\cot\frac{\alpha'}{2}=\tan\!\left(\frac{\beta+\gamma}{2}\right)=\frac{\tan(\beta/2)+\tan(\gamma/2)}{1-\tan(\beta/2)\tan(\gamma/2)}.\]
From \((3)\), \(\tan(\beta/2)=\dfrac{r}{s-c}\) and \(\tan(\gamma/2)=\dfrac{r}{s-a}\). Therefore,
\[\begin{aligned}\cot\frac{\alpha'}{2}&=\frac{r\!\left(\frac{1}{s-c}+\frac{1}{s-a}\right)}{1-\dfrac{r^2}{(s-a)(s-c)}}=\frac{r\,\dfrac{2s-(a+c)}{(s-a)(s-c)}}{1-\dfrac{r^2}{(s-a)(s-c)}}\\[4pt]&=\frac{r\,\dfrac{b}{(s-a)(s-c)}}{\dfrac{b}{s}}
\quad\text{(since \(2s=a+b+c\) and by \((2)\))}\\[4pt]
&=\frac{rs}{(s-a)(s-c)}=\frac{rs}{\dfrac{r^2s}{\,s-b\,}}
=\frac{s-b}{r}.\end{aligned}\]
Hence
\[\frac{\cot(\alpha'/2)}{s-b}=\frac{\cot(\beta/2)}{s-c}=\frac{\cot(\gamma/2)}{s-a}=\frac{1}{r}.\]
Relabeling \(a':=|BC|\), \(b':=|CA|\), \(c':=|AB|\) gives
\[\boxed{\;\frac{\cot(\alpha'/2)}{s-a'}=\frac{\cot(\beta/2)}{s-b'}=\frac{\cot(\gamma/2)}{s-c'}=\frac{1}{r}\;},\]
which is precisely the classical law of cotangents for \(\triangle ABC\).