Locus of a Perpendicular Bisector (Equation from Two Points)
A locus is the set of all points that satisfy a given geometric condition. One of the most important
locus results in analytic geometry is the perpendicular bisector of a segment. If you are given two distinct points
\(A(x_1,y_1)\) and \(B(x_2,y_2)\), the perpendicular bisector is the line consisting of all points \(P(x,y)\) that are
equidistant from \(A\) and \(B\). In other words, it is the locus of points \(P\) such that \(PA = PB\).
This idea appears everywhere: constructing triangle circumcenters, defining Voronoi diagram boundaries, and reasoning about
“closest facility” regions in applied geometry.
There are two common ways to generate the equation of this locus. The first is a geometric construction.
You begin by computing the midpoint of segment \(AB\):
\[
M\left(\frac{x_1+x_2}{2},\;\frac{y_1+y_2}{2}\right).
\]
The perpendicular bisector must pass through \(M\) (because it “bisects” the segment), and it must be perpendicular to the segment.
If the slope of \(AB\) is \(m_{AB}=\dfrac{y_2-y_1}{x_2-x_1}\) (when \(x_2\neq x_1\)), then the slope of any perpendicular line is the
negative reciprocal:
\[
m_\perp = -\frac{1}{m_{AB}} = -\frac{x_2-x_1}{y_2-y_1}.
\]
Using point–slope form through \(M\), the locus becomes
\[
y-y_M = m_\perp(x-x_M).
\]
Special cases are essential: if \(AB\) is vertical (\(x_1=x_2\)), then the bisector is horizontal \(y=y_M\); if \(AB\) is horizontal
(\(y_1=y_2\)), then the bisector is vertical \(x=x_M\).
The second method comes directly from the locus condition \(PA=PB\). Using the distance formula, equidistance means:
\[
(x-x_1)^2+(y-y_1)^2=(x-x_2)^2+(y-y_2)^2.
\]
When you expand both sides, the \(x^2\) and \(y^2\) terms cancel automatically, leaving a linear equation in \(x\) and \(y\).
This is a key insight: the perpendicular bisector is always a straight line (unless \(A=B\), when there is no unique segment and the “bisector”
is not uniquely defined). The simplified linear equation can be written in standard form \(ax+by+c=0\).
This calculator uses both viewpoints: it computes the midpoint and perpendicular direction (with correct vertical/horizontal handling),
and it also shows the equidistance equation that reduces to a line. The interactive plot draws the segment \(AB\), highlights the midpoint \(M\),
and shows the perpendicular bisector as a dashed locus line—the set of all points equidistant from \(A\) and \(B\).