[Math] How to know whether two lines in 3D space are intersecting or not

3dgeometryvector-spaces

While finding the distance between two lines, my book says that you will be asked for finding distance between skew lines or parallel lines, because intersecting lines would have this $0$.

But my question is how can I know whether the equation in front of me is of skew lines or intersecting lines ? (I can identify parallel lines)

Best Answer

Two lines are skew if and only if they are not coplanar (they are not in a same plane). So take two distinct points on the first line and two distinct points on the second line and check if those four points are coplanar: four points $P_i:=(x_i,y_i,z_i)$ for $i=1,2,3,4$ are coplanar if and only if the vectors $P_2-P_1$, $P_3-P_1$, $P_4-P_1$ are linearly dependent that is if and only if the matrix $$\begin{bmatrix}x_2-x_1 & x_3-x_1 & x_4-x_1\\ y_2-y_1 & y_3-y_1 & y_4-x_1\\ z_2-z_1 & z_3-z_1 & z_4-z_1\end{bmatrix}$$ has determinant zero.