Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

I have the $x$ and $y$ values to $2$ points $A(x_a,y_a)$ and $B(x_b,y_b)$. I need to determine the coordinates of a third point $S(x_s,y_s)$ that is at $r$ distance away from both A and B points and lies on a line that is perpendicular to the line $AB$ in the midpoint of $AB$. Also picture because it explains it better than words:

enter image description here Thank you for the help.

share|cite|improve this question
What have you done so far? – mixedmath Mar 1 '12 at 1:14
up vote 2 down vote accepted

Note that you already know the co-ordinates of the mid-point of the line $AB$ joining $(x_a,y_a)$ and $(x_b,y_b)$. Call this point $D$. So, the co-ordinates of $D$ are $\left(\dfrac{x_a+x_b}{2},\dfrac{y_a+y_b}{2}\right)$.

Also note that $SD \perp AB$. Therefore, the product of the slope of $SD$ and AB is $-1$.

Slope of $AB$=$\dfrac{y_b-y_a}{x_b-x_a}$

So, this gives us the slope of $SD$ and we know a point that lies on it. So, we get the equation of the line $SD$.

The equation of the line $SD$ is $y-\dfrac{y_a+y_b}{2}=\dfrac{x_a-x_b}{y_b-y_a}\cdot\left(x-\dfrac{x_a+x_b}{2}\right)$

Now write the parametric equation of the line $SD$ with respect to the parameter $d$, distance of the point from $D$ and get hold of the co-ordinate $(x_s,y_s)$, by setting $d=\dfrac{\sqrt{r^2-l^2}}{2}$.

Alternatively, note that $SA=SB$ as $S$ is on the perpendicular bisector of $AB$. This coupled with the equation of the line will give you the co-ordinates of $S$.

I'll work the explicit details if you still have problem.

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.