Two lines in space may or may not lie in a common plane. Parallel lines always do — any two parallel lines determine a plane between them. The interesting case is a pair of non-parallel lines: such lines are coplanar precisely when the shortest distance between them is zero (if it were positive, the lines would be skew, passing each other in different planes without ever meeting). This gives a clean test: two non-parallel lines r=a1+λ1b1 and r=a2+λ2b2 are coplanar if and only if
(a2−a1)⋅(b1×b2)=0.
When this holds, the common plane can be pinned down immediately: it passes through the point A(a1), and since both b1 and b2 lie in the plane, their cross product b1×b2 must be normal to it. So the plane's equation is
(r−a1)⋅(b1×b2)=0.
In Cartesian form, for lines a1x−x1=b1y−y1=c1z−z1 and a2x−x2=b2y−y2=c2z−z2, the same idea becomes a 3×3 determinant test:
x2−x1a1a2y2−y1b1b2z2−z1c1c2=0,
and the plane determined by the two lines is
x−x1a1a2y−y1b1b2z−z1c1c2=0.
Worked example. Show that the lines r=(i^+j^−k^)+λ(2i^−2j^+k^) and r=(4i^−3j^+2k^)+μ(i^−2j^+2k^) are coplanar, and find the plane they determine.
Here a1=i^+j^−k^, a2=4i^−3j^+2k^, b1=2i^−2j^+k^, b2=i^−2j^+2k^, so a2−a1=3i^−4j^+3k^.