# If $(x-a)^2+y^2=r^2$, prove that $r=\sqrt{(x_1-a)^2+y_1^2}=\sqrt{(x_2-a)^2+y_2^2}$ and $a=\frac{x_2^2+y_2^2-x_1^2-y_1^2}{2(x_2-x_1)}$.

Consider this is taking place in the hyperbolic half plane model

If $x_1 \not= x_2$ then the line $\overleftrightarrow{AB}$ has the following equation $(x-a)^2+y^2=r^2$. Prove that $r=\sqrt{(x_1-a)^2+y_1^2}=\sqrt{(x_2-a)^2+y_2^2}$ and $$a=\frac{x_2^2+y_2^2-x_1^2-y_1^2}{2(x_2-x_1)}$$

Now I understand that $r$ comes from taking the square root of the equation and recognizing the radius is the same from both points. Now I'm not quite sure how to arrive at $a$ which seems to be the center of the half circle.

You have:

$$\sqrt{(x_1-a)^2+y_1^2}=\sqrt{(x_2-a)^2+y_2^2}$$

Squaring both the sides we get:

$$(x_1-a)^2+y_1^2=(x_2-a)^2+y_2^2$$ $$(x_1-a)^2-(x_2-a)^2=y_2^2-y_1^2$$ $$(x_1-a-x_2+a)(x_1-a+x_2-a)=y_2^2-y_1^2$$ $$(x_1-x_2)(x_1+x_2-2a)=y_2^2-y_1^2$$ $$x_1^2-x_2^2-2a(x_1-x_2)=y_2^2-y_1^2$$ $$2a(x_2-x_1)=x_2^2+y_2^2-x_1^2-y_1^2$$ $$a={x_2^2+y_2^2-x_1^2-y_1^2\over2(x_2-x_1)}$$