Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given are two points, $P1(x_1, y_2)$ and $P2(x_2, y_2)$, and distance $a$. Now I want to find the two points $T1$ and $T2$.

$$d(P1,T1) = d(P2, T1) = a = d(P1,T2) = d(P2, T2)$$

Eg: (T1 and T2 are my two points I want to find)

 len = a / | \ len = a
        /  |L \
      P1 ------ P2
        \  |  /
 len = a \ | / len = a

len = a The distance between the points is given (they are all the same ($a$))
L Angle of 90 degrees.

I've been trying to solve this equation for an hour. I need this for an application, so I need an abstract formulla, in which I can insert the given $x_1, y_1, x_2, y_2$.


share|cite|improve this question
Note that $a$ has to be greater than $\frac{1}{2}d(P_1,P_2)=\frac{1}{2}\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$, otherwise the points $T_1$ and $T_2$ will not exist (or if it equals this quantity, the points $T_1$ and $T_2$ will be identical). – Zev Chonoles Jul 10 '11 at 18:04
up vote 3 down vote accepted

The point at the centre of the diagram has coordinates $(x_1+x_2)/2$ and $(y_1+y_2)/2$. The distance $d$ from each of $P_1$ and $P_2$ to the centre is half the distance between $P_1$ and $P_2$, so $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}/2$. Then the distance $h$ from each of $T_1$ and $T_2$ to the centre follows by Pythagoras: $h=\sqrt{a^2-d^2}$. The vector with components $y_2-y_1,x_1-x_2$ is orthogonal to the line $P_1P_2$ and thus points along the line $T_1T_2$. Thus you just have to add $\pm h$ times a normalized version of that vector to the centre to get $T_1$ and $T_2$:

$$ \begin{eqnarray} T_{1,2} &=& \frac12\left({x_1+x_2\atop y_1+y_2}\right)\pm\frac{\sqrt{a^2-\frac14((x_2-x_1)^2+(y_2-y_1)^2)}}{\sqrt{(x_1-x_2)^2+(y_2-y_1)^2}}\left(y_2-y_1\atop x_1-x_2\right) \\ &=& \frac12\left({x_1+x_2\atop y_1+y_2}\right)\pm{\sqrt{\frac{a^2}{(x_2-x_1)^2+(y_2-y_1)^2}-\frac14}}\left(y_2-y_1\atop x_1-x_2\right) \end{eqnarray} $$

share|cite|improve this answer
What does it mean when we put two statements in brackets? Like you did in front of and at the end of the equation. – Martijn Courteaux Jul 10 '11 at 18:25
Aha! Got it. It are vectors. – Martijn Courteaux Jul 10 '11 at 18:28
@Martijn: This is a notation for vectors -- the vector $$\left(x_1+x_2\atop y_1+y_2\right)$$ represents the point with Cartesian coordinates $x_1+x_2$ and $y_1+y_2$. See also (where they use square brackets instead). – joriki Jul 10 '11 at 18:28

Another way of looking at it:

  1. Knowing the coordinates $(x_1,y_1)$ and $(x_2,y_2)$, it is easy to construct the equation for the perpendicular bisector of the segment joining those two points:


  1. The perpendicular bisector also intersects the circles of radius $a$ centered at the two given points, $(x-x_1)^2+(y-y_1)^2=a^2$ (and similarly for the other circle).

If you solve these two simultaneous equations (you only need to pick one of the two circles), you should obtain the same results as in joriki's answer.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.