# Find coordinates of unknown point given two other points and their distances [closed]

There are two known points in the coordinate plane $A(x_1,y_1)$ and $B(x_2,y_2)$. The coordinates of point $C(x_0,y_0)$ are to be found, given that the distance between $A$ and $C$ is $a$ and distance between $B$ and $C$ is $b$. Also the angle between the lines $AC$ and $BC$ is $\theta$. How can $x_0$ and $y_0$ be expressed in terms of the known information?

## closed as off-topic by Saad, Trevor Gunn, Mohammad Riazi-Kermani, JonMark Perry, Dando18May 6 '18 at 3:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Saad, Trevor Gunn, Mohammad Riazi-Kermani, JonMark Perry, Dando18
If this question can be reworded to fit the rules in the help center, please edit the question.

Consider points $A,B,C$ as vertices of $\triangle ABC$ with $|AC|=a$, $|BC|=b$ and $\angle ACB=\theta$.

Let $c=|AB|=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.

Note also that $\theta$ can be found from $a,b,x_1,y_1,x_2,y_2$.

The sought point $C$ can be found by rotating the point \begin{align} C_0&=A+(B-A)\cdot\frac{a}c \end{align}

around the point $A$ by the angle $\pm\alpha$.

There is no solution, if the numbers $a,b,c$ does not form a valid triangle, otherwise there are two solutions, (unless $\sin\alpha=0$): \begin{align} x_0&= x_1+\frac{a}c\,(x_2-x_1)\cos\alpha-\frac{a}c\,(y_2-y_1)\sin\alpha ,\\ y_0&= y_1+\frac{a}c\,(y_2-y_1)\cos\alpha+\frac{a}c\,(x_2-x_1)\sin\alpha \end{align}

and

\begin{align} x_0&= x_1+\frac{a}c\,(x_2-x_1)\cos\alpha+\frac{a}c\,(y_2-y_1)\sin\alpha ,\\ y_0&= y_1+\frac{a}c\,(y_2-y_1)\cos\alpha-\frac{a}c\,(x_2-x_1)\sin\alpha , \end{align}

where \begin{align} \cos\alpha&=\frac{a^2+c^2-b^2}{2ac} ,\\ \sin\alpha&=\sqrt{1-\cos^2\alpha} . \end{align}

• Thanks for the detailed reply and also for editing my poorly formatted question! I tried to verify the final equation given above and I believe that you have missed the (a/c) term before (x2-x1)term in both the equation for y0. The solutions I obtained without making that change seems to be incorrect. Please verify. Also, is there any formal name for the method that you have used above? Id like to know so that I can look into it further, thanks! – Vishnu Prem May 6 '18 at 23:50
• @Vishnu Prem: yes, this was indeed a typo, fixed, thanks. As for the method used, you can find more info here. – g.kov May 7 '18 at 8:41
• Im sorry I dont understand. What does this have to do with complex numbers? I assumed this would be leaning towards trigonometry – Vishnu Prem May 7 '18 at 22:59
• @Vishnu Prem: that's right, complex numbers are very closely related to trigonometry, remember $\exp(i\phi) = \cos\phi+i\cdot\sin\phi$ ? Sometimes it is more convenient to find a solution by considering 2D coordinates $(x,y)$ as a complex number $(x,y)$, or $x+y\cdot i$. For example, to rotate the point around the origin by the angle $\phi$ is the same as to multiply a complex number by $\exp(i\phi)$. – g.kov May 8 '18 at 8:29
• Hi, again. Where could I find the step by step derivation/proof of the C0 = A+(B-A).a/c formula. Also the x0,y0 formulas which follow. Thanks in advance! – Vishnu Prem May 21 '18 at 11:31

HINT

The point can be found as the intersection of

• circle centered in $A$ with radius $a$: $(x-x_1)^2+(y-y_1)^2=a^2$

• circle centered in $B$ with radius $b$: $(x-x_2)^2+(y-y_2)^2=b^2$

that is

• $(x_0-x_1)^2+(y_0-y_1)^2-a^2=(x_0-x_2)^2+(y_0-y_2)^2-b^2$

from here we can find a linear equation in $x_0$ and $y_0$. Then by the intersection with one of the circle we can find out the point C (we may have $0,1,2$ or infinitely many solutions).

You need the formulas $$a=\sqrt{(x_1-x_0)^2+(y_1-y_0)^2}$$ $$b=\sqrt{(x_2-x_0)^2+(y_2-y_0)^2}$$ and $$\tan(\theta)=\vert{\frac{m_1-m_2}{1+m_1m_2}\vert}$$