Collinearity

This online calculator finds if points are collinear given their coordinates

This online calculator can determine if points are collinear for any number of points and any dimensions (2d, 3d, etc.)
Enter the coordinates of a point separated by space, one line per point. The example below checks the collinearity of three points in 2d space, and their coordinates are (1,2), (2,4), and (3,6). Formulas can be found below the calculator.

PLANETCALC, Collinearity of points whose coordinates are given

Collinearity of points whose coordinates are given

Result
 

How to find if points are collinear

In coordinate geometry, in n-dimensional space, a set of three or more distinct points are collinear if and only if the matrix of the coordinates of these vectors is of rank 1 or less. For example, given three points X = (x1, x2, ... , xn), Y = (y1, y2, ... , yn), and Z = (z1, z2, ... , zn), if the matrix

\begin{bmatrix}x_{1}&x_{2}&\dots &x_{n}\\y_{1}&y_{2}&\dots &y_{n}\\z_{1}&z_{2}&\dots &z_{n}\end{bmatrix}
is of rank 1 or less, the points are collinear.1

Since this site already has the Matrix Rank calculator, it is used to determine the rank of entered coordinates matrix, and if it equals 1, points are collinear.

For the simplest case of three points in 2d space: (x_1,y_1), (x_2, y_2), (x_3, y_3) with the matrix

\begin{bmatrix}x_{1}&y_{1}\\x_{2}&y_{2}\\x_{3}&y_{3}\end{bmatrix}

you can apply this technique by checking maximum three minors for zero (you can stop as soon as you find non-zero minor)
x_1y_2-y_1x_2=0 \\ x_2y_3-y_2x_3=0 \\ x_1y_3-y_1x_3=0

Or you can use the equivalent definition of collinearity from the same Wikipedia page:

For every subset of three points X = (x1, x2, ... , xn), Y = (y1, y2, ... , yn), and Z = (z1, z2, ... , zn), if the matrix

\begin{bmatrix}1&x_{1}&x_{2}&\dots &x_{n}\\1&y_{1}&y_{2}&\dots &y_{n}\\1&z_{1}&z_{2}&\dots &z_{n}\end{bmatrix}

is of rank 2 or less, the points are collinear.

In case of three points in 2d space with the matrix
\begin{bmatrix}1&x_{1}&y_{1}\\1&x_{2}&y_{2}\\1&x_{3}&y_{3}\end{bmatrix}

they are collinear if and only if the determinant of the matrix is zero.

URL copied to clipboard
PLANETCALC, Collinearity

Comments