As in two dimensions there are a number of standard formats which can be used.
Two‐point form.
The condition that the general point P(x,y,z) lies on the line through A(x1,y1,z1) and B(x2,y2,z2) is equivalent to requiring the direction ratios of AP and AB being equal. That is:
Parametric vector form.
If the vector (l,m,n) is parallel to the line and the point A(x1,y1,z1) lies on it, the position vector of a general point P on the line has the form
If a and b are the position vectors of points A and B on the line, the position vector of a general point is
Vector form.
The equation r = a + λ(b−a) can be rewritten as (r−a)×(b−a) = 0, where × denotes the vector product. More generally the equation
defines a line when a ≠ 0 and a⋅b = 0. This line is parallel to a and passes through the point (a × b)/|a|2.