# Law of tangents

Figure 1 – A triangle. The angles α, β, and γ are respectively opposite the sides a, b, and c.

In trigonometry, the law of tangents[1] is a statement about the relationship between the tangents of two angles of a triangle and the lengths of the opposing sides.

In Figure 1, a, b, and c are the lengths of the three sides of the triangle, and α, β, and γ are the angles opposite those three respective sides. The law of tangents states that

$\frac{a-b}{a+b} = \frac{\tan[\frac{1}{2}(\alpha-\beta)]}{\tan[\frac{1}{2}(\alpha+\beta)]}.$

The law of tangents, although not as commonly known as the law of sines or the law of cosines, is equivalent to the law of sines, and can be used in any case where two sides and the included angle, or two angles and a side, are known.

The law of tangents for spherical triangles was described in the 13th century by Persian mathematician Nasir al-Din al-Tusi (1201–74), who also presented the law of sines for plane triangles in his five-volume work Treatise on the Quadrilateral.[2][3]

## Proof

To prove the law of tangents we can start with the law of sines:

$\frac{a}{\sin\alpha} = \frac{b}{\sin\beta}.$

Let

$d = \frac{a}{\sin\alpha} = \frac{b}{\sin\beta},$

so that

$a = d \sin\alpha \text{ and }b = d \sin\beta. \,$

It follows that

$\frac{a-b}{a+b} = \frac{d \sin \alpha - d\sin\beta}{d\sin\alpha + d\sin\beta} = \frac{\sin \alpha - \sin\beta}{\sin\alpha + \sin\beta}.$

Using the trigonometric identity, the factor formula for sines specifically

$\sin(\alpha) \pm \sin(\beta) = 2 \sin\left( \frac{\alpha \pm \beta}{2} \right) \cos\left( \frac{\alpha \mp \beta}{2} \right), \;$

we get

$\frac{a-b}{a+b} = \frac{2\sin\tfrac{1}{2}\left(\alpha-\beta\right)\cos\tfrac{1}{2}\left(\alpha+\beta\right)}{2\sin\tfrac{1}{2}\left(\alpha+\beta \right)\cos\tfrac{1}{2}\left(\alpha-\beta\right)} = \frac{\tan[\frac{1}{2}(\alpha-\beta)]}{\tan[\frac{1}{2}(\alpha+\beta)]}. \qquad\blacksquare$

As an alternative to using the identity for the sum or difference of two sines, one may cite the trigonometric identity

$\tan\left( \frac{\alpha \pm \beta}{2} \right) = \frac{\sin\alpha \pm \sin\beta}{\cos\alpha + \cos\beta}$

## Application

The law of tangents can be used to compute the missing side and angles of a triangle in which two sides $a,b$ and the enclosed angle $\gamma$ are given. From $\tan\left[\frac{1}{2}(\alpha-\beta)\right] = \frac{a-b}{a+b} \tan\left[\frac{1}{2}(\alpha+\beta)\right]= \frac{a-b}{a+b} \cot\left(\frac{\gamma}{2}\right)$ one can compute $\alpha-\beta$; together with $\alpha+\beta=180^\circ-\gamma$ this yields $\alpha$ and $\beta$; the remaining side $c$ can then be computed using the law of sines. In the time before electronic calculators were available, this method was preferable to an application of the law of cosines $c=\sqrt{a^2+b^2-2ab \cos \gamma}$, as this latter law necessitated an additional lookup in a logarithm table, in order to compute the square root. In modern times the law of tangents may have better numerical properties than the law of cosines: If $\gamma$ is small, and $a$ and $b$ are almost equal, then an application of the law of cosines leads to a subtraction of almost equal values, which implies a loss of significant digits.

## Spherical version

On a sphere of unit radius, the sides of the triangle are arcs of great circles. Accordingly their lengths can be expressed in radians or any units in which angles can be measured. Let (capital) A, B, C be the angles at the three vertices of the triangle and let (lower-case) a, b, c be the respective lengths of the opposite sides. The spherical law of tangents the says[4]

$\frac{\tan\left(\dfrac{A-B}{2}\right)}{\tan\left(\dfrac{A+B}{2}\right)} = \frac{\tan\left(\dfrac{a-b}{2}\right)}{\tan\left(\dfrac{a+b}{2}\right)}.$