# distance of non-parallel lines

As an application of the vector product (http://planetmath.org/CrossProduct) we derive the expression of the $d$ between two non-parallel lines in ${\mathbb{R}}^{3}$.

Suppose that the position vectors of the points of the two non-parallel lines are expressed in parametric forms

$$\overrightarrow{r}=\overrightarrow{a}+s\overrightarrow{u}$$ |

and

$$\overrightarrow{r}=\overrightarrow{b}+t\overrightarrow{v},$$ |

where $s$ and $t$ are parameters. A common vector of the lines is the cross product $\overrightarrow{u}\times \overrightarrow{v}$ of the direction vectors of the lines, and it may be normed to a unit vector^{}

$$\overrightarrow{n}:=\frac{\overrightarrow{u}\times \overrightarrow{v}}{|\overrightarrow{u}\times \overrightarrow{v}|}$$ |

by dividing it by its , which is distinct from 0 because of the non-parallelity. The vectors $\overrightarrow{a}$ and $\overrightarrow{b}$ are the position vectors of certain points $A$ and $B$ on the lines, and thus their difference $\overrightarrow{a}-\overrightarrow{b}$ is the vector from $B$ to $A$. If we project $\overrightarrow{a}-\overrightarrow{b}$ on the unit normal $\overrightarrow{n}$, the obtained vector

$$\overrightarrow{d}:=[(\overrightarrow{a}-\overrightarrow{b})\cdot \overrightarrow{n}]\overrightarrow{n}$$ |

has the sought $d=|(\overrightarrow{a}-\overrightarrow{b})\cdot \overrightarrow{n}|$, i.e.

$$d=\frac{|(\overrightarrow{a}-\overrightarrow{b})\cdot (\overrightarrow{u}\times \overrightarrow{v})|}{|\overrightarrow{u}\times \overrightarrow{v}|}.$$ |

For illustrating that $d$ is the minimal distance between points of the two lines we underline, that the construction of $d$ guarantees that it connects two points on the lines and is perpendicular^{} to both lines — thus any displacement of its end point^{} makes it longer.

Notes. The numerator is the absolute value^{} of a triple scalar product. If the lines intersect each other, then the connecting vector $\overrightarrow{a}-\overrightarrow{b}$ is at right angles^{} to the common normal vector $\overrightarrow{n}$ of their plane and thus the dot product^{} of these vectors vanishes, i.e. also $d=0$. If the lines do not intersect, they are called agonic lines^{} or skew lines; then $d>0$.

Title | distance of non-parallel lines |

Canonical name | DistanceOfNonparallelLines |

Date of creation | 2013-03-22 15:27:16 |

Last modified on | 2013-03-22 15:27:16 |

Owner | pahio (2872) |

Last modified by | pahio (2872) |

Numerical id | 15 |

Author | pahio (2872) |

Entry type | Derivation |

Classification | msc 15A72 |

Synonym | distance of lines |

Related topic | LineInSpace |

Related topic | DistanceFromPointToALine |

Related topic | EuclideanDistance |

Related topic | AngleBetweenTwoLines |

Defines | agonic lines |

Defines | skew lines |