# Coplanarity

In geometry, a set of points in space are coplanar if there exists a geometric plane that contains them all. For example, three points are always coplanar, and if the points are distinct and non-collinear, the plane they determine is unique. However, a set of four or more distinct points will, in general, not lie in a single plane.
Two lines in three-dimensional space are coplanar if there is a plane that includes them both. This occurs if the lines are parallel, or if they intersect each other. Two lines that are not coplanar are called skew lines.
Distance geometry provides a solution technique for the problem of determining whether a set of points is coplanar, knowing only the distances between them.

## Properties in three dimensions

In three-dimensional space, two linearly independent vectors with the same initial point determine a plane through that point. Their cross product is a normal vector to that plane, and any vector orthogonal to this cross product through the initial point will lie in the plane. This leads to the following coplanarity test using a scalar triple product:
Four distinct points, x$_1$, x$_2$, x$_3$, x$_4$, are coplanar if and only if,
    $[(x_{2}-x_{1})\times (x_{4}-x_{1})]\cdot (x_{3}-x_{1})=0.$
which is also equivalent to
    $(x_{2}-x_{1})\cdot [(x_{4}-x_{1})\times (x_{3}-x_{1})]=0.$
If three vectors a, b, c are coplanar, then if a ⋅ b = 0 (i.e., a and b are orthogonal) then
    $(\mathbf {c} \cdot \mathbf {\hat {a}} )\mathbf {\hat {a}} +(\mathbf {c} \cdot \mathbf {\hat {b}} )\mathbf {\hat {b}} =\mathbf {c} ,$
where ⁠$\mathbf {\hat {a}}$⁠ denotes the unit vector in the direction of a. That is, the vector projections of c on a and c on b add to give the original c.

## Coplanarity of points in n dimensions whose coordinates are given

Since three or fewer points are always coplanar, the problem of determining when a set of points are coplanar is generally of interest only when there are at least four points involved. In the case that there are exactly four points, several ad hoc methods can be employed, but a general method that works for any number of points uses vector methods and the property that a plane is determined by two linearly independent vectors.
In an n-dimensional space where n ≥ 3, a set of k points $\{p_{0},\ p_{1},\ \dots ,\ p_{k-1}\}$ are coplanar if and only if the matrix of their relative differences, that is, the matrix whose columns (or rows) are the vectors p$_0$p$_1$$^→$, p$_0$p$_2$$^→$, …, p$_0$p$_{k−1}$$^→${\overrightarrow {p_{0}p_{1}}}, \ {\overrightarrow {p_{0}p_{2}}}, \ \dots , \ {\overrightarrow {p_{0}p_{k-1}}} is of rank 2 or less.
For example, given four points
    ${\begin{aligned}X&=(x_{1},x_{2},\dots ,x_{n}),\\Y&=(y_{1},y_{2},\dots ,y_{n}),\\Z&=(z_{1},z_{2},\dots ,z_{n}),\\W&=(w_{1},w_{2},\dots ,w_{n}),\end{aligned}}$
if the matrix
    ${\begin{bmatrix}x_{1}-w_{1}&x_{2}-w_{2}&\dots &x_{n}-w_{n}\\y_{1}-w_{1}&y_{2}-w_{2}&\dots &y_{n}-w_{n}\\z_{1}-w_{1}&z_{2}-w_{2}&\dots &z_{n}-w_{n}\\\end{bmatrix}}$
is of rank 2 or less, the four points are coplanar.
In the special case of a plane that contains the origin, the property can be simplified in the following way: A set of k points and the origin are coplanar if and only if the matrix of the coordinates of the k points is of rank 2 or less.

## Geometric shapes

A skew polygon is a polygon whose vertices are not coplanar. Such a polygon must have at least four vertices; there are no skew triangles.
A polyhedron that has positive volume has vertices that are not all coplanar.