# Lines
## Line - Line Intersection
### [[Vector]] & [[Parametric Equation|Parametric]] Form
#### $\R^2$
Two [[Lines]] in $\R^2$ in [[Lines#Vector Form|Vector Form]].
![[../../00 Excalidraw/Intersections .excalidraw.dark.svg]]
$\huge\begin{align*}
l: (x,y) &= P + t\vec u\\
k: (x,y) &= Q + s\vec v\\
\end{align*}$
There is no [[Intersection]] if $\vec u \parallel \vec v$.
> [!tip]
> A quick way to check is to see if $\vec u \cdot \vec v = 0$.
Rewrite in [[Lines#Parametric Form|Parametric Form]].
$\huge\begin{align*}
l: \cases{
x = P_{x} + t v_x \\
y = P_{y} + t v_y \\
}\\
k: \cases{
x = Q_{x} + s u_x \\
y = Q_{y} + s u_y \\
}
\end{align*}$
This creates a Linear [[System of Linear Equations]].
$\huge\begin{cases}
P_{x}+ tv_{x}= Q_x+su_x\\
P_{y}+ tv_{y}= Q_y+su_y\\
\end{cases}$
Rearrange in terms of $t$.
$\huge
t = \frac{Q_x+su_x-P_x}{v_x} \\
$
Plug in
$\huge\begin{align*}
P_{y}+ \frac{Q_x+su_x-P_x}{v_{x}}v_{y}&=
Q_{y}+ su_y
\end{align*}$
Then solve for $s$.
If the [[System of Linear Equations|Linear Equation]] can be satisfied, then the lines intersection. To find the intersection [[Point]] plug in $t$ to $l$ or $s$ to $k$ .
> [!tip] Gut Check
> To double check your work, you can take the values of $t$ and $s$ and plug them into the equation for the respective lines. If those two lines come up with different points from one another, then you did something wrong.
#### $\R^3$
Contrary to $\R^2$, 2 lines in $\R^3$ can be [[Parallel#Not Parallel|not parallel]] and *not* intersecting.
> [!definition] Skew Lines
>
> Two lines in $\R^3$ that do not intersect and aren't [[Parallel|parallel]].
### [[Normal]] Form
#### $\Rn2$
Basically the same thing as vector form.
Intersection of:
$\huge\begin{align*}
l&: 2x-3y = 1\\
k&:x+y=3
\end{align*}$
$\huge\begin{align*}
x=3-y \\
2(3-y) - 3y &= 1\\
6-2y-3y &= 1\\
-5 &= -5y\\
y &= 1\\
x &= (3-1) =2
\end{align*}$
#### $\Rn3$
Basically the same thing as vector form.
> [!example]
> $\huge\begin{align*}
> p&:(x,y)=(1,8)+t\mat{1\\-3} \\
> q&:2x-y=2\\
> \end{align*}$
> $\huge\begin{align*}
> p: \cases{
> x=1+t\\
> y=8-3t
> } \\
>
> 2(1+t) -(8-3t) &= 2\\
> 2+2t-8+3t&= 2\\
> t&= \frac{8}{5}\\
>
> (1,8)+ \frac{8}{5} \mat{1\\-3} \\
>
> \paren{ \frac{13}{5} , \frac{-24}{5}}
>
> \end{align*}$
# Planes
## Line-Plane Intersection
Intersection of:
$\huge\begin{align*}
l&:\cases{
x=1-t\\
y=t\\
z=2+3t
}\\
\alpha &: \cases{
x=3+s-2r\\
y=1+s\\
z=r
}
\end{align*}$
System of Linear Equations.
With line-plane intersection, it is easier to have one in normal form.
> [!example]
> $\huge \alpha:(x,y,z)=(3,1,0)+s\mat{1\\1\\0}+r\mat{-2\\0\\1}$
>
> $\huge\begin{align*}
> \mat{1\\1\\0} \times \mat{-2\\0\\1} &= \mat{1\\-1\\2} \\
> 3 -1 +2(0) &= 2 \\
> \alpha: x-y+2z &= 2\\
>
> (1-t) -t+2(2+3t)&= 2\\
> 1-2t+4+6t &= 2\\
> 4t &= -3 \\
> t &= -\frac{3}{4}
> \end{align*}$
> $\huge\begin{align*}
> \paren{\frac{1+3}{4}, - \frac{3}{4}, 2- \frac{3}{2}}
> \end{align*}$
>
> [!example]
> Intersection of:
> $\huge\begin{align*}
> k&: \cases{ x=-3t\\y=1+t\\z=2+t }\\
> \beta&: x+4y- z = 2 \\
> \end{align*}$
>
> $\huge\begin{align*}
>
> -3t+4(1+t)-(2+t)&= 2\\
> -3t+4+4t-2-t &= 2 \\
> 2 &= 2\\
> \end{align*}$
> $\huge \beta \parallel k $
>
> [!example]
> $\huge\begin{align*}
> l&: \cases{x=2+t\\y=-1+3t\\z=2t} \\
> k&:\cases{x=2s\\y=-7+6s\\z=1+5}
> \end{align*}$
> $\huge\cases{
> 2+t=-2s\\
> -1+3t=-7+6s \\
> 2t=1+5
> }$
> $\huge\begin{align*}
> t=-2+2s\\
> - 1+3(-2+2s)=-7+6s\\
> -7=-7
> \end{align*}$
> [!tip] In R3, never stop and assume if parallel, check with all equations in the system.
>
## Plane-Plane Intersection
In $\Rn3$, any two non parallel planes have a [[Lines|line]] of intersection.
$\huge \let l \in\R^3 = P+t\vec v$
$\huge\begin{align*}
l\parallel \alpha \\
l\parallel \beta
\end{align*}$
$\huge\begin{align*}
\alpha&: 2x +y +z =3 \\
\beta&: 3x-y+2z = 1
\end{align*}$
$\huge z = \text{arbitrary.} = 0$
$\huge
\cases{
2x+y=3\\
3x-y=1
}$
$\huge\begin{align*}
P &= \paren{\frac{4}{5},\frac{7}{5},0}
\end{align*}$
$\huge\begin{align*}
\vec v &= \alpha_{\perp} \times \beta_{\perp} \\
\vec v &= \mat{2\\1\\1}\times\mat{3\\-1\\2}=\mat{3\\-1\\-5}
\end{align*}$
When finding the line of intersection between [[Planes]], choose an arbitrary value to plug in to create a [[System of Linear Equations]] ([[Augmented Matrix]]).
### 3 Plane Intersection
Find the intersection: $\huge\begin{align*}
\alpha&: x+3y-z=1 \\
\beta&:2x-2y+2z=3\\
\gamma&:5x+y+2z=0 \\
\end{align*}$
$\huge\begin{align*}
&\rowechelon{
1&3&-1&1 \\
2 & -2 & 2 & 3 \\
5 & 1 & 2 & 0
}\\\\
\sim_{R_{1}-2R_{0}} &\rowechelon{
1 & 3 & -1 & 1 \\
0 & -8 & 4 & 1 \\
5 & 1 & 2 & 0
}\\\\
\sim_{R_{2}-5R_{0}} &\rowechelon{
1 & 3 & -1 & 1 \\
0 & -8 & 4 & 1 \\
0 & -14 & 7 & -5
}\\\\
\sim_{R_{1} - \frac{1}{2} R_{2}} &\rowechelon{
1 & 3 & -1 & 1 \\
0 & 1 & - \frac{1}{2} & - \frac{1}{8} \\
0 & -14 & 7 & -5
}\\\\
\sim_{?} &\rowechelon{
1 & 3 & -1 & 1 \\
0 & 1 & - \frac{1}{2} & - \frac{1}{8} \\
0 & 0 & 0 & - \frac{27}{4}
}\\\\
&\text{Inconsistent matrix.}
\end{align*}$