# Finding coordinates of a point inside a square using angles

Suppose a square of side length $12$. The square has vertices at coordinates $(0,0), (12,0), (0,12), (12,12)$. Inside the square is a point $a$ with all angles known (from point $a$ to any two vertices). You have to find the coordinates of the point.

You tried to solve this by writing a non-linear set of equations using law of cosines.

$x^2+y^2-2xy\cdot \cos\alpha-12^2=0$
$y^2+z^2-2yz\cdot \cos\beta-12^2=0$
$z^2+w^2-2zw\cdot \cos\gamma-12^2=0$
$w^2+x^2-2wx\cdot \cos\delta-12^2=0$

Where $x,y,z,w$ are distances from point $a$ to the vertices and $\alpha,\beta,\gamma,\delta$ are the angles between point $a$ and two vertices.

You try to solve this numerically but find out that the matrix is singular. Sometimes you get a good approximation, but sometimes the approximation is just wrong. Depends a lot on the initial guess.

You think of another way to solve this, or you resign.

• why is the problem phrased to weirdly? – Jorge Fernández Hidalgo Jan 6 '17 at 20:45
• I think you are missing some information. – MathGuy Jan 6 '17 at 20:49
• This is all the information you have. – user2974951 Jan 6 '17 at 20:55

Find the equation of circle $a$, passing through $A=(0,0)$, $B=(12,0)$ and $(6, 6\cot(\alpha/2))$ (I'm supposing $\alpha$ is the angle facing side $AB$): $$x^2 + y^2 -12 x - 6 \left(\cot{\alpha\over2} - \tan{\alpha\over2}\right) y =0.$$ Every point $P$ of that circle, inside the square, has the property that $\angle APB=\alpha$.
Then find the equation of circle $b$, passing through $A=(0,0)$, $D=(0,12)$ and $(6\cot(\beta/2),6)$ (I'm supposing $\beta$ is the angle facing side $AD$): $$x^2 + y^2 -12 y - 6 \left(\cot{\beta\over2} - \tan{\beta\over2}\right) x =0.$$ Every point $P$ of that circle, inside the square, has the property that $\angle APD=\beta$.
The point you are seeking is the other intersection (different from $A$) of circles $a$ and $b$. Here's the final result: \begin{align} x &= {24 \cos(\alpha + \beta) \sin\beta (\sin\alpha-\cos\alpha) \over \cos 2 \alpha + \cos 2 \beta + \sin 2 \alpha + \sin 2 \beta - \sin 2(\alpha + \beta)-2};\\ \\ y &= {24 \cos(\alpha + \beta) \sin\alpha (\sin\beta-\cos\beta) \over \cos 2 \alpha + \cos 2 \beta + \sin 2 \alpha + \sin 2 \beta - \sin 2(\alpha + \beta)-2}.\\ \end{align}