If two lines l1 and l2 are parallel, then they are coplanar.
Let the lines be given by r=a1+λb ...(i)
and r=a2+μb....(ii)
where a1 is the position vector of a point S on l1 and a2 is the position vector of a point T on I2.
As I1,I2 are coplanar, if the foot of the perpendicular from T on the line l1 is P, then the distance between the lines, l1 and I2=∣TP∣.
Let θ be the angle between the vector ST and b.
Then, b×ST=(∣b∣∣ST∣sinθ)n where n^ is the unit vector perpendicular to the plane of the line I1 and I2
But ST=a2−a1
Therefore, from Eq. (iii), we get b×(a2−a1)=∣b∣PTn^(∵PT−STsinθ) i.e., ∣b×(a2−a1)∣=∣b∣PT⋅1(as∣n^∣=1)
Hence, the distance between the given parallel lines is d=∣PT∣=∣∣∣b∣b×(a2−a1)∣∣