# Determining whether two given lines intersect or are parallel

$$L_1:\left \{\begin{matrix}x & = & 5-6t, \\ y & = & -3t, \\ z & = & -3-9t,\end{matrix}\right .$$$$L_2:\pmatrix{x\\y\\z\\}=\pmatrix{5\\-1\\11\\}+s\pmatrix{3\\-4\\2\\},$$notice that $$L_2$$ is in parametric form so the equation for $$L_2$$ would be$$L_2:\left \{\begin{matrix}x & = & 5+3s, \\ y & = & -1-4s, \\ z & = & 11+2s.\end{matrix}\right .$$What is the best way to solve the linear system of equations to see if they intersect?

• If the vectors multiplying $s$ and $t$ are proportional, then the lines are parallel. If not, $x$ and $y$ from line 1 and $x$ and $y$ from line 2 must be equal at the intersection. Find $s$ and $t$ (system with two equations with two unknowns). Plug in to find $z$ for those values. If the $z$ values are different, then the lines do not intersect. Jun 28 at 14:19
• The vectors multiplying $s$ and $t$ (namely, $(3,-4,2)$ and $(-6,-3,-9)$) are clearly not proportional, so the lines must be either intersecting or skew. Jun 28 at 14:34
• nice trick----- Jun 28 at 14:37
• Let construct plane $\alpha$ parallel to $L_2$ and passing through $L_1$. Parametrization of $\alpha$ is $(5,0,-3)+(6,-3,-9)t+(3,-4,2)s$. If $L_2$ is in $\alpha$, then $(5,-1,11)$ should lie in $\alpha$, then exist such $t$ and $s$ that $(5,0,-3)+(6,-3,-9)t+(3,-4,2)s=(5,-1,11)$. Check shows that there are no such $t$ and $s$, then $L_2$ does not lie in one plane with $L_1$, lines $L_1$ and $L_2$ are skewing. Jun 29 at 6:53

For the two to intersect, there must be a solution to the overdetermined system $$5-6t = 5+3s,$$ $$-3t = -1-4s,$$ $$-3-9t = 11+2s.$$

Pick two equations where the coefficients of $$s$$ and $$t$$ are not multiples of each other. If this $$2 \times 2$$ system has a solution $$(s,t)$$, substitute into the remaining equation. If it is satisfied, you have found the intersection.

• I get confused in how to solve the system Jun 28 at 14:23
• @ramanujansalkhazarim, I explain in my answer how to solve it. Pick two of the three equations. Then, check to see if third is satisfied. If not, repeat with different set of two equations.
– Doug
Jun 28 at 14:28

If two lines intersect, they must necessarily lie in the same plane, i.e. be coplanar.

$$L_1: \vec r= (5,0,-3)-\lambda(6,3,9)$$$$= (5,0,-3)-3\lambda(2,1,3)= (5,0,-3)+\mu(2,1,3)$$ $$L_2: \vec r=(5,-1,11)+\beta(3,-4,2)$$

Now, for $$\lambda=0$$, $$\vec a_1=(5,0,-3)$$ lies on $$L_1$$. Similarly, $$\vec a_2=(5,-1,11)$$ lies on $$L_2$$. Then, $$\vec a_1-\vec a_2$$ lies on the same plane as the lines. However, this must mean that $$\vec a_1-\vec a_2=(0,1,-14)$$ is coplanar with the vectors $$\vec b_1=2\hat i+\hat j+3\hat k$$ and $$\vec b_2=3\hat i-4\hat j+2\hat k$$. Thus, $$\vec a_1-\vec a_2$$ must be perpendicular to $$\vec b_1\times \vec b_2$$, i.e. $$(\vec a_1-\vec a_2)\cdot (\vec b_1\times \vec b_2)=0.$$. If the above expression is 0, then the lines intersect, otherwise not.

P.S. The shortest distance between two lines in 3D space, $$L_1:\vec r=\vec a_1+\lambda_1\vec b_1$$ and $$L_2:\vec r=\vec a_2+\lambda_1\vec b_2$$ is $$d_{min}= \frac{(\vec a_1-\vec a_2)\cdot (\vec b_1\times \vec b_2)}{|\vec b_1\times \vec b_2|}.$$ If the lines intersect, the shortest distance is 0.

• what is a1 and b1? do you mean the componets of x?? Jun 28 at 14:45
• Look at the expression you have written for $L_2$ in the question. Notice the first vector? $(5,-1,11)$? That denotes the position vector of a point that lies on the line. I have denoted this by $a_1, a_2$. Then, see the vector $(3,-4,2)$ which has a variable in front of it. That denotes the vector that is parallel to the given line. I have denoted that by $b_1, b_2$. Jun 28 at 14:51

Um, it might be a dumb method, but just assume that they intersect, and let x, y, z be the coordinates that is the intersection point. so you'll have three sets of s-t equations listed as follows :

5 - 6t = 5 + 3s

-3t = -1 -4s

-3 - 9t = 11 + 2s

solve these three equations and check if various s and t sets are the same or not, and you can know if these two lines really intersect or not.

• I get confused in how to solve the system Jun 28 at 14:23
• solve these three sets of equations : 5 - 6t = 5 + 3s | -3t = -1 -4s -3t = -1 -4s | -3 - 9t = 11 + 2s 5 - 6t = 5 + 3s | -3 - 9t = 11 + 2s if the three (s, t) answers are the same, then that means these two lines intersect.
– Kuro
Jun 28 at 14:25
• how do I solve them? Jun 28 at 14:29
• Solve these three sets of equations : (5 - 6t = 5 + 3s | -3t = -1 -4s -3t = -1), (-4s -3t = -1 -4s | -3 - 9t = 11 + 2s), (5 - 6t = 5 + 3s | -3 - 9t = 11 + 2s), if the three (s, t) answers are the same, then that means these two lines intersect. If my answer was unclear back then, I sincerely apologize.
– Kuro
Jun 28 at 14:31