Collinear points, parallel and perpendicular lines ·… | StemPy Lab
Course 6.1·Lesson 2 of 3
Collinear points, parallel and perpendicular lines
Two lines are parallel when their slopes are equal, and perpendicular when the product of their slopes is −1. Horizontal and vertical lines need care, because a vertical line has no slope. Three points lie on one straight line, which we call collinear, when the slope of the first pair equals the slope of the second pair.
about 25 min1 simulation
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
decide from slopes whether two lines are parallel or perpendicular;
handle horizontal and vertical lines correctly;
test whether three points are collinear, and find a missing coordinate;
use slopes to describe a shape such as a parallelogram or a right triangle.
Parallel lines
Parallel lines lean the same way, so they make the same angle with the x-axis. Equal angles of inclination mean equal tangents.
Two lines with slopes m1 and m2 are parallel exactly when m1=m2.
Two vertical lines are parallel too, but they have no slopes to compare. A line that has the same slope and passes through the same point is not a second line at all: the two lines are the same.
Perpendicular lines
Turn a line through 90∘ and its inclination becomes θ2=θ1+90∘. Then
m2=tan(θ1+90∘)=−cotθ1=−m11.
Two lines with slopes m1 and m2 are perpendicular exactly when m1m2=−1.
The same fact comes from the angle formula. When 1+m1m2=0, the denominator is 0 and the angle is 90∘.
A line of slope 32 is perpendicular to a line of slope −23: flip the fraction and change the sign. A horizontal line, with slope 0, is perpendicular to a vertical line, which has no slope. The product rule does not apply to that pair, so remember it separately.
Collinear points
Three points A, B and C are collinear when they lie on one straight line. Segments AB and BC share the point B. So they lie on one line exactly when they have the same slope.
A, B, C are collinear exactly when the slope of AB equals the slope of BC.
If all three points have the same x-coordinate, they lie on a vertical line and are collinear. A slope test cannot be used there.
The test is the same as the parallel test, with a shared point that forces the two lines to be one.
Worked examples
A missing coordinate. Find k so that A(1,3), B(4,k) and C(7,9) are collinear.
The slope of AC.7−19−3=1.
The slope of AB.4−1k−3=1, so k−3=3.
The answer.k=6.
A parallelogram. Show that P(0,0), Q(5,2), R(7,5) and S(2,3) are the corners of a parallelogram, taken in this order.
One pair of sides.PQ has slope 52, and SR has slope 7−25−3=52. They are parallel.
The other pair.QR has slope 7−55−2=23, and PS has slope 23. They are parallel.
The answer. Both pairs of opposite sides are parallel, so PQRS is a parallelogram. It is not a rectangle, because 52×23=53 is not −1.
Practise with new numbers
Try it in Python
The program tests collinearity by cross-multiplication, so it needs no division and works for vertical lines. It then checks the test on a thousand random triples.
Common mistakes
Saying that perpendicular lines have opposite slopes. The product is −1. Slopes 3 and −3 are not perpendicular.
Using the product rule on a vertical line. A vertical line has no slope, so use the rule for horizontal and vertical lines.
Taking equal slopes to mean the same line. Equal slopes give parallel lines, and they may be the same line.
Testing AB against CD. Collinearity needs two segments that share a point, such as AB and BC.