Condition for Collinearity of Three Points

Following are the steps to find out whether points A, B and C having position vectors \(\vec{A}\), \(\vec{B}\) and \(\vec{C}\) are collinear:

  1. Calulate vectors \(\vec{AB}\) and \(\vec{AC}\)
  2. The points are collinear if the following is true
    \(\frac{\vert \vec{AB} \cdot \vec{AC}\vert}{\vert\vec{AB}\vert \vert\vec{AC}\vert}=1\)
  3. Alternatively, the points are collinear if the following is true
    \(\vec{AB} \times \vec{AC}=0\)
The above formulae are applicable for both 2D and 3D Lines.

In 2D only, 3 points (x1,y1), (x2,y2) and (x3,y3) are collinear if the following is true
\(\begin{vmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{vmatrix}=0\)