Testing Collinearity
After this page you can test whether three points lie on one line by comparing coordinate changes with a cross-product equation that also works for vertical lines.
Compare changes from one point
Three points A, B, and C are collinear when the displacements from A to B and from A to C point along the same line. Compare them without dividing: (x_B − x_A)(y_C − y_A) = (y_B − y_A)(x_C − x_A). Equality means the points are collinear.
test collinearity of A=(0,1), B=(2,5), C=(4,9)For these points, both sides of the equation are 16. The two displacements therefore lie along the same line, so A, B, and C are collinear.
Recognize points not on one line
If the two products are unequal, the displacements are not parallel and the three points cannot all lie on one line. A single failed equality is enough to answer no.
test collinearity of A=(-1,0), B=(3,4), C=(2,-2)The products are −8 and 12. Since they differ, C is not on the line through A and B. Plotting the points gives a useful visual check, but the calculation decides the result.
Handle a vertical line without slope
Slope comparisons can fail on a vertical line because division by a zero horizontal change is undefined. The cross-product equation needs no division, so it remains valid when x-coordinates repeat.
test collinearity of A=(1/2,-1), B=(1/2,3), C=(1/2,5/2)Both products are 0 because both horizontal changes are 0. The three distinct points lie on the same vertical line. Use this test with your own points, including horizontal and vertical cases.
Practice
Practice: problems like this one, made and checked in your browser.
Recap
- Collinear points all lie on the same straight line.
- Compare the products of horizontal and vertical changes without dividing.
- Equal products prove collinearity; unequal products prove the points are not collinear.