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

 $\vec{r}=\vec{a}\!+\!s\vec{u}$

and

 $\vec{r}=\vec{b}\!+\!t\vec{v},$

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

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

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

 $\vec{d}:=[(\vec{a}\!-\!\vec{b})\!\cdot\!\vec{n}]\,\vec{n}$

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

 $d=\frac{|(\vec{a}\!-\!\vec{b})\cdot(\vec{u}\!\times\!\vec{v})|}{|\vec{u}\!% \times\!\vec{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 $\vec{a}\!-\!\vec{b}$ is at right angles to the common normal vector $\vec{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 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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 26, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9162242412567139, "perplexity": 564.0426647404817}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-13/segments/1552912202640.37/warc/CC-MAIN-20190322074800-20190322100800-00384.warc.gz"}