glucidessho

2022-12-20

Points (a,b), (m,n), and (x,y) are selected at random. What is the quickest/easiest way to tell if they are collinear?

Karen Chambers

Expert

If the line segments AB and BC have the same incline, then A, B, C are necessarily collinear. Note that there are some corner cases having to do with whether B is the "middle" point or not (in which case the slopes will still be equal), and one having to do with vertical lines (where some formula you use to compute slope might divide by 0).
Putting all this together, the points (a,b), (m,n) and (x,y) are collinear if and only if
$\left(n-b\right)\left(x-m\right)=\left(y-n\right)\left(m-a\right)$
(comes from $\frac{n-b}{m-a}=\frac{y-n}{x-m}$, but not writing it in fraction form to avoid division by 0)

Leonard Valentine

Expert

The area is zero, in formula $det\left(\begin{array}{ccc}1& a& b\\ 1& m& n\\ 1& x& y\end{array}\right)=0$