Hello. This lesson will focus on determining the relative positions of two (or more) points with respect to a given line. That is, whether two given points lie on the same side of a given line, or opposite.
Let L be a given line, whose equation is ax + by + c = 0, and P(x1, y1) and Q(x2, y2) be two points. How will we know if P and Q lie on the same or opposite sides of L?
To determine that, we’ll use the section formula. Let’s see how.
Let R(x, y) be the point of intersection of PQ and the given line. This is assuming PQ isn’t parallel to the line. We’ll come back to this case a little later.
Now, depending on the position of the two points, we could have one of the following situations.
Let’s assume that R divides PQ in the ratio m : n. Then, using the section formula, the coordinates of R will be:
((mx2 + nx1)/(m + n), (my2 + ny1)/(m+n))
Since R lies on the line ax + by + c = 0, its coordinates will satisfy the equation. Therefore, we have:
a(mx2 + nx1) + b(my2 + ny1) + c(m + n) = 0
⇒ m/n = -(ax1+ by1 + c)/(ax2 + by2 + c)
Let’s focus on the RHS of the last equation. If ax1 + by1 + c and ax2 + by2 + c are of the opposite signs (i.e. one positive and the other negative), then the RHS will be positive, which makes the m/n positive.
This means that R divides PQ in the ratio m : n internally. And, this can only happen when R lies between P and Q, implying that P and Q lie on the opposite sides of the given line.
To summarize, if ax1 + by1 + c and ax2 + by2 + c are of the opposite signs, then P and Q lie on the opposite sides of the line ax + by + c = 0.
Let’s go back to the last equation:
m/n = -(ax1+ by1 + c)/(ax2 + by2 + c)
Now, if ax1 + by1 + c and ax2 + by2 + c are of the same sign (i.e. both positive or both negative), then the RHS will be negative, which makes m/n negative.
This means that R divides PQ in the ratio m : n externally. And, this can only happen if R lies outside the line segment PQ, implying that P and Q lie on the same side of the given line.
To summarize, if ax1 + by1 + c and ax2 + by2 + c are of the same sign, then P and Q lie on the same side of the line ax + by + c = 0.
So, what happens when PQ doesn’t intersect the line L? This will happen when PQ is parallel to the given line, which means P and Q lie on the same side of the line.
But you needn’t worry about this case separately. Just substitute the coordinates of both points in the given line, and check the signs of the resulting expressions. Same sign, same side. Opposite signs, opposite sides. That’s all.
Here’s a simulation that demonstrates this rule.
Try dragging the two points and check the signs of the expression (that is obtained by substituting their coordinates in the line’s equation). If P and Q are on the same side of the line, do the two expressions have the same sign? When the points are on the opposite sides, do the expressions have the opposite signs?
Lesson Summary
- The points P(x1, y1) and Q(x2, y2) will lie on the same side of the line ax + by + c = 0 if ax1+ by1 + c and ax2 + by2 + c have the same signs.
- The points P(x1, y1) and Q(x2, y2) will lie on the opposite sides of the line ax + by + c = 0 if ax1 + by1 + c and ax2 + by2 + c have opposite signs.
See you in the next lesson with a few examples.