Line through P(x₁, y₁, z₁) and Q(x₂, y₂, z₂). Direction ratios are (x₂−x₁, y₂−y₁, z₂−z₁).
For P1(x1,y1,z1) and P2(x2,y2,z2), the direction vector of the line is:
b=P1P2=(x2−x1,y2−y1,z2−z1)
Line through P1 with this direction:
x2−x1x−x1=y2−y1y−y1=z2−z1z−z1
Parameter meaning: λ=0 gives P1; λ=1 gives P2; λ=1/2 gives the midpoint.
Collinearity of three points A, B, C: C lies on line AB iff the DRs of AB and AC are proportional:
xB−xAxC−xA=yB−yAyC−yA=zB−zAzC−zA
Alternatively, AB×AC=0.