# Solving for angle of hyperbolic triangle in Poincare disk

I am working out an example problem trying to find the angles of a hyperbolic triangle in the Poincare disk model. I am getting inconsistent answers.

For the sake of simplicity, I am using these coordinates for $\triangle OPQ$:

$O(0,0), P(\frac{1}{2},0),$ and $Q(0,\frac{1}{2}$).

I set up the problem in GeoGebra with the orange hyperbolic line graphed as the circle orthogonal to the unit disk through $P$ and $Q$. I graphed the tangent line to that circle and I see that it makes an angle of roughly $31^\circ$.

To solve the problem analytically, my strategy is to find the hyperbolic distances of the legs and the hypotenuse, then solve for the angle using the hyperbolic law of cosines:

$$\cos C= \frac{\cosh a \cosh b-\cosh c}{\sinh a \sinh b}$$

According to the notes I have, the hyperbolic distance between $P(x_1,y_1)$ and $Q(x_2,y_2)$ is given by the formula: $$d(P,Q)=\ln(\frac{u+v}{u-v})$$ where $u=(1-x_1 x_2-y_1 y_2)^2 +(x_1 y_2 - x_2 y_1)^2$

and $v=(x_1-x_2)^2 + (y_1-y_2)^2$ .

Substituting into the formulas I get:

$$\mathbf{legs}=\ln\left(\frac{1+\frac{1}{4}}{1-\frac{1}{4}}\right)=\ln\left(\frac{5}{3}\right)$$ $$\mathbf{hypotenuse}=\ln\left(\frac{\frac{5}{4}+\frac{1}{2}}{\frac{5}{4}-\frac{1}{2}}\right)=\ln\left(\frac{7}{3}\right)$$

$$\mathbf{\angle{OPQ}}=\arccos\left(\frac{\cosh(\ln(\frac{5}{3}))\cosh(\ln(\frac{7}{3}))-\cosh(\ln(\frac{5}{3}))}{\sinh(\ln(\frac{5}{3}))\sinh(\ln(\frac{7}{3}))}\right)\approx 31.788^\circ$$

Well that's weird. It's close but not close enough to be discounted as a rounding error.

I decide to check the method by solving for $\angle{QOP}$ which I know ought to be a right angle. Using the above method, I get that $\angle{QOP}\approx 109.8^\circ$. So obviously the method is incorrect. What gives?

Can anyone spot an error in the reasoning or suggest an alternate method?

Edit:

I have also searched for an alternate distance formula to use, but many of them seem to be tailored for the upper half-plane model or they involve calculations using complex numbers. Since both formulas were given in the same packet of notes from a university website, I expected to get a correct answer when using them.

For points $P = (a,b)$ and $Q=(c,d)$ in the Poincaré disk model, suppose that the hyperbolic distance, $\delta$, between them is given by a formula of the form

$$\delta = \ln \frac{u+v}{u-v} \tag{0}$$

for some expressions $u$ and $v$. Then $$\cosh \delta = \frac12\left(e^\delta + e^{-\delta}\right) = \frac12\left(\frac{u+v}{u-v}+\frac{u-v}{u+v}\right) = \frac{u^2+v^2}{u^2-v^2} \tag{1}$$

According to Wikipedia's "Poincaré Disk Model" entry (and assuming this source is more-authoritative than the university notes you reference), we should have (for a model circle of radius $1$, and with Euclidean distances $p := |OP|$, $q := |OQ|$, $r := |PQ|$) $$\cosh \delta = 1 + \frac{2r^2}{\left(1-p^2\right)\left(1-q^2\right)} = \frac{\left(\;(1-p^2)(1-q^2)+r^2\;\right) + r^2}{\left(\;(1-p^2)(1-q^2)+r^2\;\right) - r^2} \tag{2}$$ Thus, matching $(2)$ with $(1)$, we can take

\begin{align} u^2 &= (1-p^2)(1-q^2)+r^2 = ( 1 - (ac+bd))^2+(ad-bc)^2 \\ v^2 &=r^2 \phantom{+(1-p^2)(1-q^2)\;\,}= (a-c)^2+(b-d)^2 \end{align}\tag{\star}

The reader can verify that these values provide the expected angle measures at $P$ and at the origin.

So, there's a typo in the university notes. Either the author omitted the square roots (or squares) in the definition of $u$ and $v$, or else the author wrote "$\ln$" instead of "$\operatorname{arccosh}$" in the distance formula, accidentally (and, perhaps, understandably) mixing similar-looking elements from the identity $$\ln \frac{u+v}{u-v} = \operatorname{arccosh}\frac{u^2+v^2}{u^2-v^2}$$