User Tools

Site Tools


Plugin installed incorrectly. Rename plugin directory '_include' to 'include'.
Plugin installed incorrectly. Rename plugin directory '__include' to 'include'.
lecture_23

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lecture_23 [2016/04/26 10:23] – [The distance between skew lines in $\mathbb{R}^3$] rupertlecture_23 [2017/05/06 09:59] (current) rupert
Line 1: Line 1:
 ===== The distance from a point to a line ===== ===== The distance from a point to a line =====
  
 +==== Cross product method ====
 +Suppose $L$ is a line in $\def\rt{\mathbb{R}^3}\def\rn{\mathbb{R}^n}\rt$. Let $A$ be a point on $L$ and let $\def\vv{\vec v}\vv$ be a direction vector along $L$.
  
 +Given a point $B$, how can we find $d=\text{dist}(B,L)$, the (shortest) distance from the point $B$ to the line $L$?
  
-==== Alternative method ====+{{ :dl.jpg?nolink&600 |}} 
 + 
 +Let $A$ be any point in $L$ and let $\theta$ be the angle between $AB$ and $\vv$. We have 
 +\[ d=\|\vec{AB}\|\,\sin \theta \frac{\|\vec{AB}\|\,\|\vv\|\sin \theta}{\|\vv\|} \frac{\|\vec{AB}\times \vv\|}{\|\vv\|}.\] 
 +So  
 +\[ \text{dist}(B,L) \frac{\|\vec{AB}\times \vv\|}{\|\vv\|}\] 
 +where $A$ is any point in $L$. 
 + 
 +=== Example === 
 + 
 +To find the distance from the point $B=(1,2,3)$ to the line \[L:\def\c#1#2#3{\begin{bmatrix}#1\\#2\\#3\end{bmatrix}}\c xyz=\c10{-1}+t\c41{-5},\quad t\in\mathbb{R}\] 
 +we can choose $A=(1,0,{-1})$ so that $\vec{AB}=\c024$ and taking $\vv=\c41{-5}$, we obtain  
 +\[ \vec{AB}\times \vv = \begin{vmatrix}\vec\imath&\vec\jmath&\vec k\\0&2&4\\4&1&-5\end{vmatrix}=\c{-14}{16}{-8}=2\c{-7}{8}{-4}\] 
 +so 
 +\[ \def\dist{\text{dist}}\dist(B,L)=\frac{\|\vec{AB}\times\vv\|}{\|\vv\|}=\frac{2\sqrt{7^2+8^2+4^2}}{\sqrt{4^2+1^2+5^2}} = \frac{2\sqrt{129}}{\sqrt{42}} \approx 3.5051.\] 
 + 
 +==== Dot product method ====
  
 The method above relies on the cross product, so only works in $\def\c#1#2#3{\begin{bmatrix}#1\\#2\\#3\end{bmatrix}}\def\rt{\mathbb{R}^3}\def\rn{\mathbb{R}^n}\def\vv{\vec v}\def\dist{\text{dist}}\rt$. The following alternative method works in $\rn$ for any $n$. The method above relies on the cross product, so only works in $\def\c#1#2#3{\begin{bmatrix}#1\\#2\\#3\end{bmatrix}}\def\rt{\mathbb{R}^3}\def\rn{\mathbb{R}^n}\def\vv{\vec v}\def\dist{\text{dist}}\rt$. The following alternative method works in $\rn$ for any $n$.
Line 22: Line 41:
 \[ \dist(B,L)=\|\nn\|=\frac17\sqrt{12^2+17^2+13^2} = \frac17\sqrt{602} \approx 3.5051.\] \[ \dist(B,L)=\|\nn\|=\frac17\sqrt{12^2+17^2+13^2} = \frac17\sqrt{602} \approx 3.5051.\]
  
-===== The distance between skew lines in $\mathbb{R}^3$ =====+===== The distance between lines in $\mathbb{R}^3$ ===== 
 + 
 +==== Skew lines ====
  
 Suppose that $L_1$ and $L_2$ are skew lines in $\rt$: lines which are not parallel and do not cross. Suppose that $L_1$ and $L_2$ are skew lines in $\rt$: lines which are not parallel and do not cross.
Line 46: Line 67:
  
 == Remark == == Remark ==
-What about the distance between lines which are not skew? This means that either they are non-parallel and they intersect (so that the distance between them will be zero), or the are parallel lines.+What about the distance between lines which are not skew? This means that either they are non-parallel and they intersect (so that the distance between them will be zero), or they are parallel lines.
  
-  * The same method and formula work if $L_1$ and $L_2$ are non-parallel lines which intersect, and you get  $\dist(L_1,L_2)=0$ in this case. The reason is that in this case $L_1$ and $L_2$ will lie in one plane, $\Pi$, and $\vec{AB}$ will also be in~$\Pi$, and $\vec n$ will be orthogonal to $\Pi$, so $\vec{AB}\cdot \vec n=0$. +  * The same method and formula work if $L_1$ and $L_2$ are non-parallel lines which intersect, and you get  $\dist(L_1,L_2)=0$ in this case. The reason is that in this case $L_1$ and $L_2$ will lie in one plane, $\Pi$, and $\vec{AB}$ will also be in $\Pi$, and $\vec n$ will be orthogonal to $\Pi$. So $\frac{\vec{AB}\cdot \vec n}{\|\vec n\|}=\frac{0}{\|\vec n\|}=0=\dist(L_1,L_2)$. 
-  * If $L_1$ and $L_2$ are parallel lines (i.e., if the vectors $\vec v_1$ and $\vec v_2$ along the lines are in the same direction), then a different method is required to find $\vec n$ because $\vv_1\times \vv_2=0$ which isn't helpful. Howeverif you can find a (non-zero) vector $\vec n$ orthogonal to $\vec v_1$ and $\vec v_2$, then the formula $\dist(L_1,L_2)=\frac{\vec AB\cdot \vec n}{\|\vec n\|}will give the correct answer.+  * If $L_1$ and $L_2$ are parallel lines (i.e., if the vectors $\vec v_1$ and $\vec v_2$ along the lines are in the same direction), then $\vv_1\times \vv_2=0$ which isn't helpful, so this method won't work hereIn this caseobserve that $\dist(L_1,L_2)=\dist(A,L_2)where $A$ is any point in $L_1$ (because the lines are parallel), so you can use one of the formulae above for the distance from a point to a line.
  
 === Example === === Example ===
Line 66: Line 87:
 and if $A=(1,0,1)$ and $B=(3,2,1)$ then $A$ and $B$ are points with one in $L_1$ and the other in $L_2$, and $\vec{AB}=\c 220$. Hence and if $A=(1,0,1)$ and $B=(3,2,1)$ then $A$ and $B$ are points with one in $L_1$ and the other in $L_2$, and $\vec{AB}=\c 220$. Hence
 \[\dist(L_1,L_2)=\frac{|\vec{AB}\cdot \nn|}{\|\nn\|}=\frac{2(5)+2(2)+0(-3)}{\sqrt{5^2+2^2+3^2}} = \frac{14}{\sqrt{38}}.\] \[\dist(L_1,L_2)=\frac{|\vec{AB}\cdot \nn|}{\|\nn\|}=\frac{2(5)+2(2)+0(-3)}{\sqrt{5^2+2^2+3^2}} = \frac{14}{\sqrt{38}}.\]
 +
 +
 +==== Distance between lines in $\mathbb{R}^3$ in general ====
 +
 +The formula $\dist(L_1,L_2)=\frac{|\vec{AB}\cdot \nn|}{\|\nn\|}$ where $\nn=\vec v_1\times \vec v_2$ works for
 +  * skew lines (not parallel, not intersecting), as we saw above,
 +  * and actually: any non-parallel lines $L_1$, $L_2$. We can see this by noticing that if the lines above intersect, then $L_1$ lies in $\Pi$, so the formula gives $\dist(L_1,L_2)=\dist(B,\Pi)=0$ which is the correct answer.
 +What about parallel lines?
 +    * The formula can't work because we'd have $\vec v_1=\vec v_2$ so $\vec n=\vec v_1\times \vec v_2=\vec 0$
 +    * Instead: observe that when $L_1$ and $L_2$ are parallel, we have $\dist(L_1,L_2)=\dist(A,L_2)$ for any point $A$ in $L_1$
 +    * So we can use one of of the point-to-line distance formulae we saw earlier.
 +
lecture_23.1461666227.txt.gz · Last modified: by rupert

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki