Academy
Formulas/maths/Straight Lines/Position of a Point Relative to a Line

Position of a Point Relative to a Line

Two points lie on the same side of ax + by + c = 0 if the expressions ax₁ + by₁ + c and ax₂ + by₂ + c have the same sign, and on opposite sides if signs differ.
Derivation

For the line L:ax+by+c=0L: ax+by+c=0, define f(x,y)=ax+by+cf(x,y) = ax+by+c.

On the line: f=0f = 0. On one side: f>0f > 0. On the other: f<0f < 0.

Why signs agree for points on the same side

Take two points P1P_1 and P2P_2 on the same side of LL. The segment P1P2P_1P_2 does not cross LL, so ff does not change sign along it. Since ff is continuous and nonzero on the segment, it maintains one sign throughout — so f(P1)f(P_1) and f(P2)f(P_2) have the same sign.

Conversely, if P1P_1 and P2P_2 are on opposite sides, the segment crosses LL where f=0f=0, so ff changes sign — f(P1)f(P_1) and f(P2)f(P_2) have opposite signs.

Practical test

To check if P1(x1,y1)P_1(x_1,y_1) and P2(x2,y2)P_2(x_2,y_2) are on the same side of ax+by+c=0ax+by+c=0:

Compute (ax1+by1+c)(ax_1+by_1+c) and (ax2+by2+c)(ax_2+by_2+c).

  • Same sign \Rightarrow same side.
  • Opposite sign \Rightarrow opposite sides (the segment P1P2P_1P_2 crosses the line).

This is also the basis of the sign analysis in angle bisector problems.