# Hyperbolic law of cosines

In hyperbolic geometry, the "law of cosines" is a pair of theorems relating the sides and angles of triangles on a hyperbolic plane, analogous to the planar law of cosines from plane trigonometry, or the spherical law of cosines in spherical trigonometry. It can also be related to the relativistic velocity addition formula.

## History

Describing relations of hyperbolic geometry, Franz Taurinus showed in 1826 that the spherical law of cosines can be related to spheres of imaginary radius, thus he arrived at the hyperbolic law of cosines in the form:
$A=\operatorname {arccos} {\frac {\cos \left(\alpha {\sqrt {-1}}\right)-\cos \left(\beta {\sqrt {-1}}\right)\cos \left(\gamma {\sqrt {-1}}\right)}{\sin \left(\beta {\sqrt {-1}}\right)\sin \left(\gamma {\sqrt {-1}}\right)}}$
which was also shown by Nikolai Lobachevsky (1830):
$\cos A\sin b\sin c-\cos b\cos c=\cos a;\quad [a,\ b,\ c]\rightarrow \left[a{\sqrt {-1}},\ b{\sqrt {-1}},\ c{\sqrt {-1}}\right]$
Ferdinand Minding gave it in relation to surfaces of constant negative curvature:
$\cos a{\sqrt {k}}=\cos b{\sqrt {k}}\cdot \cos c{\sqrt {k}}+\sin b{\sqrt {k}}\cdot \sin c{\sqrt {k}}\cdot \cos A$
as did Delfino Codazzi in 1857:
$\cos \beta \,p\left({\frac {a}{r}}\right)p\left({\frac {s}{r}}\right)=q\left({\frac {a}{r}}\right)q\left({\frac {s}{r}}\right)-q\left({\frac {\lambda }{r}}\right),\quad \left[{\frac {e^{t}-e^{-t}}{2}}=p(t),\ {\frac {e^{t}+e^{-t}}{2}}=q(t)\right]$
The relation to relativity using rapidity was shown by Arnold Sommerfeld in 1909 and Vladimir Varićak in 1910.

## Hyperbolic laws of cosines

Take a hyperbolic plane whose Gaussian curvature is −1/k$^2$ {\textstyle -{\frac {1}{k^{2}}}}. Given a hyperbolic triangle $ABC$ with angles $\alpha ,\beta ,\gamma$ and side lengths $BC=a$, $AC=b$, and $AB=c$, the following two rules hold. The first is an analogue of Euclidean law of cosines, expressing the length of one side in terms of the other two and the angle between the latter:
| $\cosh {\frac {a}{k}}=\cosh {\frac {b}{k}}\cosh {\frac {c}{k}}-\sinh {\frac {b}{k}}\sinh {\frac {c}{k}}\cos \alpha ,$ | (1) |
The second law has no Euclidean analogue, since it expresses the fact that lengths of sides of a hyperbolic triangle are determined by the interior angles:
$\cos \alpha =-\cos \beta \cos \gamma +\sin \beta \sin \gamma \cosh {\frac {a}{k}}.$
Houzel indicates that the hyperbolic law of cosines implies the angle of parallelism in the case of an ideal hyperbolic triangle:
   When $\alpha =0,$ that is when the vertex A is rejected to infinity and the sides BA and CA are "parallel", the first member equals 1; let us suppose in addition that $\gamma =\pi /2$ so that $\cos \gamma =0$ and $\sin \gamma =1.$ The angle at B takes a value β given by $1=\sin \beta \cosh(a/k);$ this angle was later called "angle of parallelism" and Lobachevsky noted it by "F(a)" or "Π(a)".

## Hyperbolic law of Haversines

In cases where $a/k$ is small, and being solved for, the numerical precision of the standard form of the hyperbolic law of cosines will drop due to rounding errors, for exactly the same reason it does in the Spherical law of cosines. The hyperbolic version of the law of haversines can prove useful in this case:
$\sinh ^{2}{\frac {a}{2k}}=\sinh ^{2}{\frac {b-c}{2k}}+\sinh {\frac {b}{k}}\sinh {\frac {c}{k}}\sin ^{2}{\frac {\alpha }{2}},$

## Relativistic velocity addition via hyperbolic law of cosines

Setting $\left[{\tfrac {a}{k}},\ {\tfrac {b}{k}},\ {\tfrac {c}{k}}\right]=\left[\xi ,\ \eta ,\ \zeta \right]$ in (1), and by using hyperbolic identities in terms of the hyperbolic tangent, the hyperbolic law of cosines can be written:
| ${\begin{aligned}&&\cosh \xi &=\cosh \eta \cosh \zeta -\sinh \eta \sinh \zeta \cos \alpha \\&\Rightarrow &{\frac {1}{\sqrt {1-\tanh ^{2}\xi }}}&={\frac {1}{\sqrt {1-\tanh ^{2}\eta }}}{\frac {1}{\sqrt {1-\tanh ^{2}\zeta }}}-{\frac {\tanh \eta }{\sqrt {1-\tanh ^{2}\eta }}}{\frac {\tanh \zeta }{\sqrt {1-\tanh ^{2}\zeta }}}\cos \alpha \\&\Rightarrow &\tanh \xi &={\frac {\sqrt {-\tanh ^{2}\zeta -\tanh ^{2}\eta +2\tanh \eta \tanh \zeta \cos \alpha +\left(\tanh \eta \tanh \zeta \sin \alpha \right)^{2}}}{1-\tanh \eta \tanh \zeta \cos \alpha }}\end{aligned}}$ | (2) |
In comparison, the velocity addition formulas of special relativity for the x and y-directions as well as under an arbitrary angle $\alpha$, where v is the relative velocity between two inertial frames, u the velocity of another object or frame, and c the speed of light, is given by
${\begin{aligned}&&\left[U_{x},\ U_{y}\right]&=\left[{\frac {u_{x}-v}{1-{\frac {v}{c^{2}}}u_{x}}},\ {\frac {u_{y}{\sqrt {1-{\frac {v^{2}}{c^{2}}}}}}{1-{\frac {v}{c^{2}}}u_{x}}}\right]\\&&U^{2}&=U_{x}^{2}+U_{y}^{2},\ u^{2}=u_{x}^{2}+u_{y}^{2},\ \tan \alpha ={\frac {u_{y}}{u_{x}}}\\&\Rightarrow &U&={\frac {\sqrt {-u^{2}-v^{2}+2vu\cos \alpha +\left({\frac {vu\sin \alpha }{c}}\right)^{2}}}{1-{\frac {v}{c^{2}}}u\cos \alpha }}\end{aligned}}$
It turns out that this result corresponds to the hyperbolic law of cosines - by identifying $\left[\xi ,\ \eta ,\ \zeta \right]$ with relativistic rapidities ${\scriptstyle \left(\left[{\frac {U}{c}},\ {\frac {v}{c}},\ {\frac {u}{c}}\right]=\left[\tanh \xi ,\ \tanh \eta ,\ \tanh \zeta \right]\right)},$ the equations in (2) assume the form:
${\begin{aligned}&&\cosh \xi &=\cosh \eta \cosh \zeta -\sinh \eta \sinh \zeta \cos \alpha \\&\Rightarrow &{\frac {1}{\sqrt {1-{\frac {U^{2}}{c^{2}}}}}}&={\frac {1}{\sqrt {1-{\frac {v^{2}}{c^{2}}}}}}{\frac {1}{\sqrt {1-{\frac {u^{2}}{c^{2}}}}}}-{\frac {v/c}{\sqrt {1-{\frac {v^{2}}{c^{2}}}}}}{\frac {u/c}{\sqrt {1-{\frac {u^{2}}{c^{2}}}}}}\cos \alpha \\&\Rightarrow &U&={\frac {\sqrt {-u^{2}-v^{2}+2vu\cos \alpha +\left({\frac {vu\sin \alpha }{c}}\right)^{2}}}{1-{\frac {v}{c^{2}}}u\cos \alpha }}\end{aligned}}$