Line (geometry)
Collinear points

Three or more points are said to be collinear if they lie on the same line. If three points are not collinear, there is exactly one plane that contains them.

In affine coordinates, in n -dimensional space the points X = (x, x,..., x), Y = (y, y,..., y), and Z = (z, z,..., z) are collinear if the matrix {\displaystyle {\begin{bmatrix}1&x_{1}&x_{2}&\cdots &x_{n}\\1&y_{1}&y_{2}&\cdots &y_{n}\\1&z_{1}&z_{2}&\cdots &z_{n}\end{bmatrix}}} has a rank less than 3. In particular, for three points in the plane (n = 2), the above matrix is square and the points are collinear if and only if its determinant is zero.

Equivalently for three points in a plane, the points are collinear if and only if the slope between one pair of points equals the slope between any other pair of points (in which case the slope between the remaining pair of points will equal the other slopes). By extension, k points in a plane are collinear if and only if any (k –1) pairs of points have the same pairwise slopes.

In Euclidean geometry, the Euclidean distance d (a, b) between two points a and b may be used to express the collinearity between three points by:

However, there are other notions of distance (such as the Manhattan distance) for which this property is not true.

In the geometries where the concept of a line is a primitive notion, as may be the case in some synthetic geometries, other methods of determining collinearity are needed.
punctuation:no_comma, detectable_content:postscript, length_constraints:number_paragraphs[3]