Since three or fewer points are always coplanar, the problem of determining when a set of points is 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 -dimensional space where , a set of 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 \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{align} 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{align} 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 points and the origin are coplanar if and only if the matrix of the coordinates of the points is of rank 2 or less. ==Geometric shapes==