# Calculate the vertex of isosceles triangle with given angle and two other points using vector method

The coordinates of points $P_1, P_2$ and angle $\theta$ are known and the sides $PP_1$ and $PP_2$ have equal length. Although the point $P$ can be calculated using isosceles triangle properties and Pythagoras Theorem, I like to try vector method.

Deriving from the equation, $$cos(\theta) = n_1 \cdot n_2 ,$$ where $n_1 = \frac{\vec{PP_1}}{|\vec{PP_1}|}$ $, n_2 = \frac{\vec{PP_2}}{|\vec{PP_2}|}$

$$cos(\theta) = \frac{P_1 - P}{\sqrt{(P_{1x} - P_x)^2 + (P_{1y} - P_y)^2}} \cdot \frac{P_2-P}{\sqrt{(P_{2x}-P_x)^2 + (P_{2y} - P_y)^2}}$$

How can I find $P$ when $P_1$, $P_2$ and $cos(\theta)$ values are substituted in the above equation? I get confused whether it is correct to solve the equation by substituting the vectors with coordinates if the dot product is only for vectors.

• Anytime you're using coordinates in plane geometry as opposed to simply angles and lengths, you must specify which origin you want to use. After all, you want the coordinates of $P$ with respect to some coordinate system. Can we take the origin halfway between $P_{1}$ and $P_{2}$? Or did you have something else in mind? Jul 31, 2017 at 2:51
• It doesn't matter where the origin is! The above equation is correct, however as you have noticed, it is not easily solvable, because you have Px and Py terms in the dot product and also in the square roots. Dot product is not the best method to solve this problem. Jul 31, 2017 at 3:01

Let $P_1(x_1,y_1)$, $P_2(x_2,y_2)$ and $D$ is a midpoint of $P_1P_2$.
Thus, $$\vec{P_1P}=\vec{P_1D}+\vec{DP}=\frac{1}{2}(x_2-x_1,y_2-y_1)\pm\frac{1}{2}\cot\frac{\theta}{2}(y_2-y_1,x_1-x_2),$$ which says $$P\left(\frac{1}{2}\left(x_2-x_1\pm\cot\frac{\theta}{2}(y_2-y_1\right)+x_1,\frac{1}{2}\left(y_2-y_1\pm\cot\frac{\theta}{2}(x_1-x_2\right)+y_1\right)$$ or $$P\left(\frac{1}{2}\left(x_2+x_1\pm\cot\frac{\theta}{2}(y_2-y_1\right),\frac{1}{2}\left(y_2+y_1\pm\cot\frac{\theta}{2}(x_1-x_2\right)\right)$$
What is missing from your solution is using the fact that the two sides have equal lengths. $$(P_{1x}-P_x)^2+(P_{1y}-P_y)^2=(P_{2x}-P_x)^2+(P_{2y}-P_y)^2$$The equation for the cosine becomes: $$\cos\theta=\frac{(P_{1x}-P_x)(P_{2x}-P_x)+(P_{1y}-P_y)(P_{2y}-P_y)}{(P_{1x}-P_x)^2+(P_{1y}-P_y)^2}$$ From the first equation you can find $P_y$ in terms of $P_x$ $$(P_{1x}-P_x)^2-(P_{2x}-P_x)^2=(P_{2y}-P_y)^2-(P_{1y}-P_y)^2\\ P_{1x}^2-P_{2x}^2-2P_x(P_{1x}-P_{2x})=-P_{1y}^2+P_{2y}^2-2P_y(P_{2y}-P_{1y})$$ If you substitute $P_y$ in the cosine equation above, you should get a quadratic equation. The two solutions correspond to the two points $P$ on either side of $P_1P_2$ line. Note that you can do this substitution only if $P_{2y}\ne P_{1y}$. If they are equal, then $P_{1x}^2-P_{2x}^2-2P_x(P_{1x}-P_{2x})=0$ or $$P_x=\frac{P_{1x}+P_{2x}}{2}$$ In this case you just substitute this in the cosine equation, to get the two $P_y$ values