Take the 2-minute tour ×
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.

I have several $2d$ line segments. for example, if I take a one line segment having end points $(x_1, y_1)$ and $(x_2, y_2)$. Then, I want to make a perpendicular line which passes through the midpoint of that line segment. for the simplicity if I say mid point $(x_3, y_3)$ then, how could I derive.

Any idea please. Thanks.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The midpoint of the line segment through $(x_1,y_1)$ and $(x_2,y_2)$ is $\left({x_1+x_2\over 2},{y_1+y_2\over 2}\right)$.

Also, perpendicular lines have negative reciprocal slopes, so if you want a line perpendicular to a line with slope $m$, you want to use a slope of $-{1\over m}$.

Finally, use the point-slope formula for the equation of a line through, say, $(x_3,y_3)$ with slope $m$: $y-y_3=m(x-x_3)$.

So, for example, if you want the perpendicular bisector to the segment through $P(x_1,y_1)$ and $Q(x_2,y_2)$:

  1. The midpoint is $\left({x_1+x_2\over 2},{y_1+y_2\over 2}\right)$.
  2. The slope of $\overline{PQ}$ is $m={y_2-y_1\over x_2-x_1}$, so the slope of a perpendicular is $-{1\over m}={x_1-x_2\over y_2-y_1}$.
  3. Finally, the equation of the perpendicular bisector of $\overline{PQ}$ is then $$y- {y_1+y_2\over 2}={x_1-x_2\over y_2-y_1}\left(x-{x_1+x_2\over 2}\right).$$
share|improve this answer
    
as this line should passes through mid point, then should I substitute {(x1+x2)/2,(y1+y2)/2} instead of (x1, y1)? Also, need a another clarification. as my constructor of the line segment is in the form of r = x.cos(theta)+y.sin(theta), then what would be the my perpendicular line passing through the mid point. plz teach me. thanks –  gnp Feb 17 '13 at 20:37
    
thanks for the edit. if you could please tell me how this can be done with polar coordinates as my constructor is in that way. –  gnp Feb 17 '13 at 20:39
    
The key to converting to polar coordinates $(r,\theta)$ is that the polar form of a line with slope $m$ and $y$-intercept $b$ is $r\sin\theta=mr\cos\theta+b$. With a little algebra you can translate what I gave above to the polar situation. –  JohnD Feb 17 '13 at 20:42

Your Answer

 
discard

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.