Find the equation defining a perpendicular bisector

Hello fellows,

I've not had much time to post questions, but I post this one because while in my Maths lesson, I became annoyed by solving the same thing over and over again, when a good formula could be made. It was to find an equation for the perpendicular bisector (for which I don't know if a name in English exists, in Portuguese we call it "mediatriz", I'll call it medisector) known the extremities of a segment.

So I tried to use the slope in order to generalize, but then I thought: Why not use what I already have? But that is already part of my answer...

As far as I see, this can be solved through at least three ways, using: the Pythagorean theorem (which we learn in school); the slope (I don't feel like doing this one, go ahead); or rotating around the middle point $90$ degrees (the point which can be found by the average of the coordinates of the extremities of the segment, and the rest should be Trigonometry).

Please only give one way per answer; if you feel like doing in any other way, put that in another answer (otherwise the answers will become too big).

Given two points, say $(x_1,y_1)$ and $(x_2,y_2)$, the midpoint of these two points is $$M:=\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right)$$

the gradient of the line joining them is

$$G:=\frac{y_1-y_2}{x_1-x_2}$$

Hence, for the perpendicular bisector, we want the line passing through $M$ and with gradient $-1/G$. If $M=(m_1,m_2)$ then the equation of the perpendicular bisector is $$\frac{y-m_2}{x-m_1} = \frac{x_1-x_2}{y_2-y_1}$$

After some algebraic manipulation we find that the equation is

$$(x_1-x_2)x+(y_1-y_2)y=\tfrac{1}{2}\left(x_1^2+y_1^2-x_2^2-y_2^2\right)$$

• Can you please solve it in order to $y$? – JMCF125 Nov 15 '13 at 20:48
• That's trivial. Multiply by $x-m_1$ and add $m_2$ – Rocket Man Nov 15 '13 at 20:49
• @JMCF125 Solving for $y$ is not a good idea. What if $(x_1,y_1)=(1,1)$ and $(x_2,y_2)=(3,1)$?! The perpendicular bisector would be a vertical line passing through $(2,1)$. Vertical lines cannot be expressed in the form $y=mx+c$ because $m=\infty$ for vertical lines. – Fly by Night Nov 15 '13 at 20:56
• @AJStas, no doubt, but if it were for trivialty I wouldn't've made this post. – JMCF125 Nov 15 '13 at 20:57
• @JMCF125 If you want the equation in the form $y=\ldots$ then just divide by $x_1-x_2$. However, that is possible if and only if $x_1 \neq x_2$. I would wholeheartedly disagree that the form $y=mx+c$ is "vastly most used". I would agree that that is how we teach school children, but that is not the most general case. Lines are most often represented by $ax+by=c$, where $(a:b:c)$ is a ratio in its simplest form. – Fly by Night Nov 15 '13 at 21:07

A medisector is defined by all points that are at the same distance to both extremities of the segment; as a set in $\mathbb R^2$ such that the extremities are $A$ and $B$, it is $\{\forall P\in \mathbb R^2: \overline{AP}=\overline{BP}\}$.

In this example, $$[AB]:=y=-\frac{4x+2}3\land -5\leq x\leq1$$

And by the Pythagorean theorem, $$\overline{AP}=\sqrt{(x_A-x_P)^2+(y_A-y_P)^2}\\ \overline{BP}=\sqrt{(x_B-x_P)^2+(y_B-y_P)^2}$$ (note that $(a-b)^2=(b-a)^2$)

As $\overline{AP}=\overline{BP}$, the equation $\sqrt{(x_A-x_P)^2+(y_A-y_P)^2}=\sqrt{(x_B-x_P)^2+(y_B-y_P)^2}$ can be formed. Which is ${\Delta^A_P x}^2+{\Delta^A_P y}^2={\Delta^B_P x}^2+{\Delta^B_P y}^2$, done by squaring, using delta notation - no, it is not Chemistry. Note ${\Delta^A_B x}^2 = \left(x_A-x_B \right)^2=\left(\Delta^A_B x\right)^2\neq {\Delta^A_B \left(x^2\right)}= x_A^2-x^2_B$, $\Delta$ has always priority.

The goal is to discover the analytic expression that represents the (straight) line $m$, therefore, the equation may be solved in order to $y_P$ (logically, this doesn't work if the medisector is a vertical line, but if that was the case, this formula wouldn't need to be used), because the points like $P$ are hypothetical points and variables that constitute the line.

From there, $x_P$ must be variable and all other values excluding this and $y_P$ (the dependent variable) must be taken as constants. These are $x_A$, $x_B$, $y_A$ and $y_B$.

$$(x_A-x_P)^2+(y_A-y_P)^2=(x_B-x_P)^2+(y_B-y_P)^2\Leftrightarrow\\\Leftrightarrow x_A^2-2x_Ax_P+x_P^2+y_A^2-2y_Ay_P+y_P^2=\\= x_B^2-2x_Bx_P+x_P^2+y_B^2-2y_By_P+y_P^2\Leftrightarrow\\\Leftrightarrow 2x_Bx_P-2x_Ax_P-2y_Ay_P+2y_By_P=x_B^2-x_A^2-y_A^2+y^2_B\Leftrightarrow\\ \Leftrightarrow \left(x_B-x_A\right)x_P+\left(y_B-y_A\right)y_P=\frac{x_B^2-x_A^2-y_A^2+y^2_B}2$$

This gives one an equation of the format $ax+by=c$ (note as $P$ is the only point varying, one can use $y$ and $x$ for $y_P$ and $x_P$), which works for all straight lines. It is easy to convert to a commonly used format $y=ax+b$, which logically doesn't work for vertical lines, (or to $x=ay+b$, which doesn't work for horizontal lines, but who'd use that?):

$$\left(x_B-x_A\right)x+\left(y_B-y_A\right)y=\frac{x_B^2-x_A^2-y_A^2+y^2_B}2 \Leftrightarrow\\\Leftrightarrow \left(y_B-y_A\right)y=\frac{x_B^2-x_A^2}2+\frac{-y_A^2+y^2_B}2-\left(x_B-x_A\right)x \Leftrightarrow\\\Leftrightarrow y=\frac{x_B^2-x_A^2}{2\left(y_B-y_A\right)}+ \frac{\left(y_B+y_A\right)\left(y_B-y_A\right)}{2\left(y_A-y_B\right)}+ \frac{\left(x_B-x_A\right)x}{y_B-y_A} \Leftrightarrow\\\Leftrightarrow y=\frac{\left(x_A-x_B\right)x}{y_B-y_A}+ \frac{x_B^2-x_A^2}{2\left(y_B-y_A\right)}+\frac{y_B+y_A}2+ \Leftrightarrow\\\Leftrightarrow y=\frac{\left(\Delta^A_B x\right)x}{\Delta^B_A y}+ \frac{\Delta^B_A\left(x^2\right)}{2\Delta^B_A y}+\overline y_{\scriptstyle{(A,B)}} \\ \\\left(:\Delta^A_B y\neq 0\right)$$

The same answer was handwritten with Portuguese, and any moderator or staff member is free to delete of Imgur the images as far as I'm concerned. They're available here (if you do delete them, please remove this paragraph).

I hope this helps someone confused (I did mix the signs accidentally twice doing this and this examples),