# Shortest distance between two lines Calculator

## Calculates the shortest distance between two lines in space.

 A line parallel to Vector (p,q,r) through Point (a,b,c) is expressed with$\hspace{20}\frac{x-a}{p}=\frac{y-b}{q}=\frac{z-c}{r}$
 line 1 parallel to vector V1(p1,q1,r1) through P1(a1,b1,c1) P1 ( , , ) V1 ( , , ) line 2 parallel to vector V2 (p2,q2,r2) through P2(a2,b2,c2) P2 ( , , ) V2 ( , , ) 6dgt10dgt14dgt18dgt22dgt26dgt30dgt34dgt38dgt42dgt46dgt50dgt distance d
 $\normal The\ shortest\ distance\ between\ two\ lines\\\vspace{5}(1)\ d=\left|\frac{(\vec{V_1}\times \vec{V_2})\cdot\vec{P_1P_2}}{\left|\vec{V_1}\times \vec{V_2}\right|}\right|,\hspace{30}at\ \left|\vec{V_1}\times \vec{V_2}\right|\ne0\\\hspace{10} =\left|{\normal\frac{(q_1r_2-q_2r_1)a_{12}+(r_1p_2-r_2p_1)b_{12}+(p_1q_2-p_2q_1)c__{12}}{\sqrt{(q_1r_2-q_2r_1)^2+(r_1p_2-r_2p_1)^2+(p_1q_2-p_2q_1)^2}}}\right|\\\vspace{10}(2)\ d= \frac{\left|\vec{V_1}\times \vec{P_1P_2}\right|}{\left|\vec{V_1}\right|},\hspace{30}at\ \left|\vec{V_1}\times \vec{V_2}\right|=0\\\hspace{10}={\normal\frac{\sqrt{(b_{12}r_1{\tiny-}c_{12}q_1)^2{\tiny+}(c_{12}p_1{\tiny-}a_{12}r_1)^2{\tiny+}(a_{12}q_1{\tiny-}b_{12}p_1)^2}}{\sqrt{p_1^2+q_1^2+r_1^2}}}\\\vspace{5}\hspace{20} a_{12}=a_1{\tiny-}a_2,\hspace{20} b_{12}=b_1{\tiny-}b_2,\hspace{20} c_{12}=c_1{\tiny-}c_2\\$

Thank you for your questionnaire.
Sending completion

To improve this 'Shortest distance between two lines Calculator', please fill in questionnaire.
Male or Female ?
Male Female
Age
Under 20 years old 20 years old level 30 years old level
40 years old level 50 years old level 60 years old level or over
Occupation
Elementary school/ Junior high-school student
High-school/ University/ Grad student A homemaker An office worker / A public employee
Self-employed people An engineer A teacher / A researcher
A retired people Others
Useful?
Very Useful A little Not at All
Purpose of use?
Comment/Request (Click here to report a bug).Bug report (Click here to report questionnaire.）
Calculation bug(Please enter information such as specific input values, calculation result, correct result, and reference materials (URL and documents).)
Text bug(Please enter information such as wrong and correct texts)
Your feedback and comments may be posted as customer voice.