Collinear 2 dimentional lines - Input 3 points (x , y) Print collinear 2 dimentional lines calculator
Point 1 X1  Y1 
Point 2 X2  Y2 
Point 3 X3  Y3 
Collinear test:
Lines equation:
Area between the points:
           
Collinear 3 dimentional lines - Input 3 points (x, y, z) Print collinear 3 dimentional lines calculator
Point 1 X1  Y1  Z1 
Point 2 X2  Y2  Z2 
Point 3 X3  Y3  Z3 
Collinear test:
Determinant of the points:
Rank of the determinant:
Parametric lines equation:
Vectors: n1, n2, n3,
Area between the points:
Plane equation:
           
Colinear points
Collinear points − 2D
Collinear points are all located on the same line.
Points will be collinear if:
And after rearranging terms to avoid division by zero we get:
(x2 − x1)(y3 − y1) − (x3 − x1)(y2 − y1) = 0
Another way of checking whether the points are collinear is by calculating the area formed by the points, if the area is zero then the points are collinear.
The area is:Triangle area
Triangle area
And after rearranging terms and omitting the value 1/2 we get the condition for collinearity:
x1(y2 − y3) + x2(y3 − y1) + x3(y1 − y2) = 0
Collinear points − 3D
Point 1:(x1 , y1 , z1)
Point 2:(x2 , y2 , z2)
Point 3:(x3 , y3 , z3)
Example: Find if the following points are collinear.
(-1, 0, 2),   (1, 1, 4),   (3, 2, 6)
According to the vector cross product:
(1 − 0)(6 − 2) - (2 − 0)(4 − 2) = 0
(3 + 1)(4 − 2) - (1 + 1)(6 − 2) = 0
(1 + 1)(2 − 0) - (3 + 1)(1 − 0) = 0
All the values are equal to 0 therefore the points are collinear (lay on one line).
Checking the sides of the triangle:
a = 3       b = 6       c = 3
It can be seen that the triangle inequality is not fulfilled
And also, the area     A = 0.
therefore, the points are collinear.
Collinear points − points that are located on the same line.
Few methods can be applied in order to find whether the points are collinear
1. If the cross product of the vectors n1 and n2 is zero in all directions then the points are collinear, n1 and n2 are the vectors connecting one point to the other two points. This is similar to calculating the area of the triangle by cross product.
First vector is:n1 = (x2 − x1)i + (y2 − y1)j + (z2 − z1)k
Second vector is:n2 = (x3 − x1)i + (y3 − y1)j + (z3 − z1)k
And the cross product in the x, y and z directions are:
(y2 − y1)(z3 − z1) − (y3 − y1)(z2 − z1) = 0
(x3 − x1)(z2 − z1) − (x2 − x1)(z3 − z1) = 0
(x2 − x1)(y3 − y1) − (x3 − x1)(y2 − y1) = 0
Condition of collinearity:       n1 × n2 = 0         (0i + 0j + 0k).
2. Calculating the triangle sides a, b and c by the equations:
Now apply one of the following methods:
triangle inequality:         a + b > c       a + c > b       b + c > a
if all the inequalities are true then the points are not collinear.
Second method is by calculating the area by Heron's formula:
If the area equal 0 then the points are collinear (s - half the perimeter).