# Linear Algebra: Line Intersection

Let L1 be the line passing through $$P = (-1, 3, -2) and Q = (5, -3, 10)$$ Let L2 be the line passing through $$(4,0,3)$$ in the direction of v= $$\begin{bmatrix} 3 \\ -1 \\ 1 \end{bmatrix} \quad$$ Do these lines intersect? If so, find the point of intersection.

My work:

L1 = P x Q which should give a det matrix of: \begin{vmatrix} i & -1 & 5 \\ j & 3 & -3 \\ k & -2 & 10 \end{vmatrix} Which should give you: $$i(30-6)-j(-10+10)+k(3-15)$$ which gives the equation: $$24x-12z=0$$

L2 = $$\begin{bmatrix} 4 \\ 0 \\ 3 \end{bmatrix} \quad + \begin{bmatrix} 3 \\ -1 \\ 1 \end{bmatrix} \quad t$$

Which gives: $$x = 4+3t$$ $$y = -t$$ $$z= 3+t$$
Now you have to sub in these values into L1: $$24(4+3t) - 12(3+t) = 0$$ $$60 + 60t = 0$$ $$t = -1$$
Now sub t back into L2: $$x = 4+3(-1) = 1$$ $$y = -t = 1$$ $$z= 3+t = 2$$

Is this the point of intersection? I don't know if I did this question correctly.

• How do you find the equation of a line given two points on the line? Surely you can't take the cross-product! – Mathematician 42 Apr 8 '18 at 16:27
• It's a linear algebra course, so I'm not allowed to use y=mx+b – user433562 Apr 8 '18 at 16:30
• It's wrong, also, $y=mx+b$ doesn't work as we are dealing with lines 3 dimensions here. – Mathematician 42 Apr 8 '18 at 16:31
• But, this is how we were taught. What do you suggest I do? – user433562 Apr 8 '18 at 16:35
• The cross product is used to find a vector perpendicular to two given vectors. This useful for determining the normal of a plane. It has little to do with finding the equation of a line. However, your equation of $L_2$ is correct. Given two points on a line, you can subtract them from each other to obtain the direction of the line. This gives you the equation of line $1$ as well. – Mathematician 42 Apr 8 '18 at 16:39

## 4 Answers

Since $P=(-1,3,-2)$ and $Q=(5,-3,10)$, we can describe $L_1$ as $$L_1=\left\{(-1,3,-2)+t(6,-6,12)\mid t\in \mathbb{R}\right\}.$$ Indeed, the direction is simply determined by $P-Q$ (or $Q-P$ as I did here). As you said, $$L_2=\left\{(4,0,3)+t(3,-1,1)\mid t\in \mathbb{R}\right\}.$$ Let $P=(x,y,z)\in L_1\cap L_2$, then $\exists t,s\in \mathbb{R}$ such that \begin{eqnarray} (x,y,z) &=& (-1+4t,3-6t,-2+12t)\\ &=& (4+3s,0-s,3+s)\\ \end{eqnarray}Hence $$(-5+4t+3s,3-6t+s,-2+12t-s)=(0,0,0).$$ Now you can solve this linear system in the variables $s$ and $t$.

• Just a question, if there were 3 points for L1 (so:P,Q,R), would using the cross product work here? i.e PQxQR? – user433562 Apr 8 '18 at 16:42
• No, also, if you choose three points, they likely won't lie on one line. – Mathematician 42 Apr 8 '18 at 16:46
• So if s and t do not produce LHS = RHS,, then they do not intersect? – user433562 Apr 8 '18 at 16:52
• That's correct. – Mathematician 42 Apr 9 '18 at 8:04

You will get the system $$-1+6s=4-3t$$ $$3-6s=-t$$ $$-2+12s=3+t$$ adding the last two equations we obtain $$1+6s=3$$ so $$s=\frac{1}{3}$$ and $$t=-1$$ plugging this in your first equation we have $$1=1$$ so the intersection point is given by $$[x,y,z]=[7;1;2]$$

• where did you get the left side of the system? I.e, =1+6s.... – user433562 Apr 8 '18 at 16:37
• the line through $P$ and $Q$ – Dr. Sonnhard Graubner Apr 8 '18 at 16:41
• $$\vec{x}=[-1;3;-2]+s[6;-6;12]$$ – Dr. Sonnhard Graubner Apr 8 '18 at 16:43

First line:

Direction vector: $\;\vec{PQ}=Q-P=(6,-6,12)\implies \text{direction vector is}\;\;(1,-1,2)\;$

Thus the line is

$$\;\color{red}{r_1(t)=P+t\vec{PQ}=(-1,3,-2)+t(1,-1,2) =(t-1, -t+3, 2t-2)\;,\;\;t\in\Bbb R}\;$$

Second line:

Directly, the line is

$$\;\color{red}{r_2(t)=(4,0,3)+t(3,-1,1)=(3t+4,-t,t+3)\;,\;\;t\in\Bbb R}\;$$

Both lines intersect iff there exist $\;t,\,s\in\Bbb R\;$ such that $\;r_1(t)=r_2(s)\;$ , which means:

$$(t-1,\,-t+3,\,2t-2) =(3s+4,\,-s,\,s+3)\iff\begin{cases}I&t-1=3s+4\\II&-t+3=-s\\III&2t-2=s+3\end{cases}$$

From $\;I-II\;$ we get $\;2=2s+4\implies s=-1\;$

and thus from $\;I:\;\;t-1=-3+4\implies t=2\;$

and now we substitute in $\;II\;$ in order to find whether things come together (and thus there's an intersection point)m or else we get a contradiction and there is no such a point:

$$III:\;\;2\cdot2-2=-1+3\iff2=2...\checkmark$$

and thus both lines do intersect each other, at point $\;r_1(2)=r_2(-1)\;$

A vector that can 'represent' line connecting $P=(−1,3,−2)$ and $Q=(5,−3,10)$ is : $$v_{pq} = [6, -6, 12]$$ The line $L_{1}$ is therefore can be represented as $$L_{1} \rightarrow x = -1 + 6t, \: \: y = 3 -6t, \:\: z = -2 + 12t, \:\:\:\: t \in \mathbb{R}$$

For $L_{2}$ is clearly $$L_{2} \rightarrow x = 4 + 3t', \: \: y = -1t', \:\: z = 3 + t', \:\:\:\: t' \in \mathbb{R}$$

so for intersection, we must have : $$-1+6t = 4+3t' \implies 6t - 3t' = 5 \: \: \: \: (l_{1})$$ $$3-6t = -t' \implies-6t + t' = -3 \: \: \: \: (l_{2})$$ $$-2+12t = 3 + t' \implies 12t - t' = 5 \: \: \: \: (l_{3})$$ hence if 2D lines $l_{1}, l_{2},$ and $l_{3}$ have a point at which all three intersect at same time, then $L_{1}$ and $L_{2}$ intersect each other.

$$-6t + t' = -3 \implies t' = 6t - 3$$ so $$6t - 3t' = 5 \implies t = 1/3$$ $$12t - t' = 5 \implies t = 1/3$$

so there is a solution, that is t $t=1/3$ and $t' = -1$. So $L_{1}$ and $L_{2}$ intersect each other at this point : $$x(t=1/3)=x(t' = -1)=...,$$ $$y(t=1/3)=y(t'=-1)=...,$$ $$z(t=1/3)=z(t' = -1)=...$$