TITLE: If I have three points, is there an easy way to tell if they are collinear?
QUESTION [18 upvotes]: Points $(a,b)$, $(m,n)$, and $(x,y)$ are selected at random. What is the quickest/easiest way to tell if they are collinear? At first I thought it was a matter of comparing slopes but that doesn't appear to be enough.

REPLY [7 votes]: This is an explanation of $\textbf{Ma Ming}$'s excellent idea, in case it was unclear.
Consider a triangle with vertices at points $(a,b)$, $(m,n)$, and $(x,y)$, and observe that the area $A$ of the triangle is zero if and only if the points are collinear. Now, it can be shown that
$$A=\frac{1}{2}\left|\det\pmatrix{1&1&1\\a&m&x\\b&n&y}\right|=\frac{1}{2}\left|a(n−y)+m(y−b)+x(b−n)\right|.$$
Hence we just have to check whether the expression $a(n−y)+m(y−b)+x(b−n)$ is non-zero or not.