\section{Lines and Planes}

\begin{enumerate}[1.]

\item
{\it Give an example of a line parallel to the plane $x+y+z=0$ but not contained in that plane. Give the equation of the
line in the vector parametric form ${\bf r}={\bf a} +t{\bf v}$.}

\medskip

The plane is perpendicular to the vector ${\bf n}=\ii+\jj+\kk$, so ${\bf v}$ should also be perpendicular to it.
Additionally, ${\bf a}$ should not satisfy the equation of the plane. Thus we need $v_1+v_2+v_3=0$
and $a_1+a_2+a_3\neq 0$. For example, we can take ${\bf v}=\ii-\jj$, ${\bf a}=\ii$, so that the line equation is
 ${\bf r}={\bf i} +t(\ii -\jj)$.

\bigskip

\item {\it The points $P,Q,R$ in ${\mathbb R}^3$ have coordinates $P=(1,1,-1)$, $Q=(2,-1,0)$, $R=(2,3,4)$.

\smallskip

(a) Find the area of the triangle $\triangle PQR$.}

\medskip

We have $\vec{PQ}=\langle 1,-2,1\rangle$ and $\vec{PR}=\langle 1,2,5\rangle$, so that
$$
\vec{PQ}\times \vec{PR}
=
\left|\begin{matrix}
{\bf i} & {\bf j} & {\bf k}\\
1& -2 & 1 \\
1 & 2 & 5 \\
            \end{matrix}\right|
 =-12 {\bf i} -4  {\bf j}  +4 {\bf k}
 =- 4( 3{\bf i} +  {\bf j}  - {\bf k} )
 $$
The area of the triangle is
$$
\frac{1}{2} | \vec{PQ}\times \vec{PR} |
=\frac{1}{2}\cdot 4 \sqrt{9 + 1 + 1 } =2\sqrt{11}.
$$

{\it (b)
Find the angle at $P$ in the triangle $\triangle PQR$. (An answer in the form $\cos^{-1}(\cdot)$ 
or $\sin^{-1}(\cdot)$ is sufficient.)}


\medskip


We have $|\vec{PQ}|=\sqrt{1+4+1}=\sqrt{6}$ and $|\vec{PR}|=\sqrt{1+4+25}=\sqrt{30}$. We also have
$\vec{PQ}\cdot\vec{PR}=1-4+5=2$. Therefore
$$
\cos\theta=\frac{2}{\sqrt{6}\sqrt{30}}=\frac{1}{\sqrt{45}},\ \ 
\theta=\cos^{-1}\left(\frac{1}{\sqrt{45}}\right).
$$

{\bf Alternative solution:} it is also possible to find $\sin\theta$ from 
$$
\sin\theta= \frac{ |\vec{PQ}\times \vec{PR}| }{ |\vec{PQ}| | \vec{PR}| }= \sqrt{ \frac{44}{45} }.
$$
However, this does not distinguish between the angles $\theta$ (in this case, acute) and $\pi-\theta$
(obtuse).  The first method is preferred because it does provide that information.

\smallskip

{\it (c)
Find the equation (in the form $Ax+By+Cz=D$) of the plane through the points $P,Q,R$.}

\medskip


The plane is perpendicular to the vector  $3{\bf i} + {\bf j}  -{\bf k} $ from (a), and passes through 
$P=(1,1,-1)$. Therefore the equation of the plane is
$$
3(x-1) +  (y-1) - (z+1) =0,$$
which simplifies to $3x-3+y-1-z-1=0$, or $3x+y-z=5$.

\bigskip

\item {\it
Prove that the line $x=t+1,y=3t,z=t+3$ is parallel to the plane $4x-y-z=2$.}


\medskip

The line is parallel to the vector ${\bf u}=\ii +3\jj + \kk$, and the plane is perpendicular to the vector ${\bf v}
=4\ii -\jj -\kk$. SInce ${\bf u}\cdot {\bf v}=4-3-1=0$, ${\bf u}$ is perpendicular to ${\bf v}$, therefore 
perpendicular to the plane.


\bigskip

\item {\it Find the equation (in the form $Ax+By+Cz=D$) of the plane that contains the line $x=t+1,y=3t,z=t+3$ and is perpendicular to the plane $4x-y-z=2$.}


\medskip

The plane should be parallel to both ${\bf u}$ and ${\bf v}$ from (a), therefore perpendicular to
their cross product:
$$
{\bf u }\times {\bf v}
=
\left|\begin{matrix}
{\bf i} & {\bf j} & {\bf k}\\
1& 3 & 1 \\
4 & -1 & -1 \\
            \end{matrix}\right|
 =-2 {\bf i} +5  {\bf j}  -13 {\bf k}.
 $$
 For a point that lies in the plane, we can take any point from the given line, for example with $t=0$ we get
 $(1,0,3)$. Hence the equation of the plane is
$$
-2(x-1)+5 (y-0) -13 (z-3) = 0,
$$
which simplifies to $-2x+2+5y-13z+39=0$, or $2x-5y+13z=41$.


\bigskip

\item {\it 
Find the equation of the plane that contains the line $x=t, y=2t, z=0$, and the point $(3,-1,-1)$.}

\medskip

The plane has to be parallel to the vector $\ii+2\jj$ (the direction vector of the line). We are given that the point $(3,-1,-1)$ lies in the plane, and so does
$(0,0,0)$ since it lies on the given line, so another vector parallel to the plane is $3\ii-\jj-\kk$.
We now find the normal vector
$$
{\bf n}=(3\ii-\jj-\kk) \times \ii+2\jj
=\left|\begin{matrix} 
{\bf i}&{\bf j}&{\bf k}\\  3&-1&-1\\  1&2&0\\ \end{matrix}\right|
=2{\bf i}-{\bf j}+7{\bf k}.
$$
The plane perpendicular to ${\bf n}$ and through $(0,0,0)$ is $2x-y+7z=0$.





\bigskip

\item {\it 
Write the vector ${\bf w}=\ii-\jj+4 \kk$ as a sum of two vectors ${\bf w}={\bf u}+{\bf v}$ such that
${\bf u}$ is parallel to the plane $x+2y-2z=0$ and the other is perpendicular to it.}

\bigskip

The vector ${\bf v}$ should be the vector projection of ${\bf w}$ on a vector ${\bf n}$ normal to the plane. From
the equation of the plane, we can take ${\bf n}=\ii+2\jj-2 \kk$. Then
$$
{\bf v}={\bf w}_{\bf n}=\frac{{\bf w}\cdot {\bf n}}{|{\bf n}|^2}{\bf n}
=\frac{1-2-8}{1+4+4}{\bf n}= -{\bf n}=- \ii -2\jj+2\kk
$$
and
$$
{\bf u}={\bf w}-{\bf v} = (1-(-1))\ii 
+(-1 - (-2))\jj + (4 - 2)\kk
$$
$$
= 2 \ii + \jj + 2\kk
$$


\bigskip

\item {\it 
Find the equations (in whichever form you prefer) of the line 
of intersection of the planes $3x-y+z=2$ and $x+2y-z=-4$.}

\bigskip

The two planes have normal vectors ${\bf n}_1=3\ii-\jj+\kk$ and ${\bf n}_2=\ii+2\jj-\kk$. The direction vector ${\bf v}$ of the line should be perpendicular to them both, so we take
$$
{\bf v}={\bf n}_1\times {\bf n}_2
=\left|\begin{matrix} 
{\bf i}&{\bf j}&{\bf k}\\  3&-1&1\\  1&2&-1\\ \end{matrix}\right|
=-{\bf i}+4{\bf j}+7{\bf k}.
$$
To find a point on the line, set e.g. $x=0$ in the equations of both planes. We get $-y+z=2$ and $2y-z=-4$.
Adding these two equations we get $y=-2$, then from the first equation $z=y+2=0$. Thus, $P=(0,-2,0)$ is a point in the plane. (Of course there are other possibilities.)

Using $P$ and ${\bf v}$ as above, the (vector parametric) equation of the line is
$$
{\bf r}=\langle -t,\ -2+4t,\ 7t\rangle
$$



\bigskip


\item {\it
Find vectors {\bf a}, {\bf b}, {\bf c} in $\rr^2$ such that the 
set of points whose position vector ${\bf r}$ satisfies the inequalities
\begin{equation}\label{e1}
{\bf r}\cdot {\bf a}\leq 1,\ {\bf r}\cdot {\bf b}\leq 1,\ {\bf r}\cdot {\bf c}\leq 1
\end{equation}
is the triangle with vertices $(1,2)$, $(2,-2)$, $(-3,0)$.}

\medskip

The triangle is the common part of three closed half-planes:
\begin{itemize}
\item above the line through $(-3,0)$ and $(2,-2)$,
\item below the line through $(1,2)$ and $(2,-2)$, 
\item below the line through $(-3,0)$ and $(1,2)$,
\end{itemize}
all with the boundary line included.
We need to find the inequalities defining the three half-planes. Here we present the proof for the first one,
the other two are similar. We first find the equation of the line through $(-3,0)$ and $(2,-2)$. The line must be
parallel to $\langle 5,-2\rangle$, so its equation is
$$
\frac{x+3}{5}-\frac{y}{-2},\ \ -2(x+3)=5y.
$$
The half-plane is then given by $5y\geq -2(x+3)$. Similarly, the other two half-planes are $y\leq -4x+6$
and $2y\leq x+3$.

We now need to rewrite these inequalities in a form that matches (1):
$$
-2x-5y\leq 6,\ \ 4x+y\leq 6,\ \ -x+2y\leq 3,$$
$$
\frac{-2x-5y}{6}\leq 1,\ \ \frac{4x+y}{6}\leq 1,\ \ \frac{-x+2y}{3}\leq 1.$$
So we can let
$${\bf a}=\left\langle \frac{-1}{3}, \frac{-5}{6} \right\rangle,\ \ 
{\bf b}=\left\langle \frac{2}{3}, \frac{1}{6} \right\rangle,\ \ 
{\bf c}=\left\langle \frac{-1}{3}, \frac{2}{3} \right\rangle.
$$
These are unique up to relabelling.


\item {\it\
Let ${\bf v}$ and ${\bf w}$ be two nonzero vectors in $\rr^3$ that are perpendicular to each other. Prove that the set
$$
\{P=(x,y,z)\in\rr^3:\ \vec{OP}\times {\bf v}={\bf w}\}
$$
is a line. }

\smallskip

We provide a proof based on the determinant formula for the cross product. Geometric proofs, if correct, are also fine.

Let ${\bf v}=A\ii+B\jj+C\kk$ and ${\bf w}=a\ii+b\jj+c\kk$. Then
$$
\vec{OP}\times \mathbf{v} =
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
x& y& z \\
A& B& C
\end{vmatrix}
=
(Cy-Bz) \mathbf{i} - (Cx-Az) \mathbf{j} + (Bx-Ay) \mathbf{k}.
$$
This is equal to ${\bf w}$ if and only if 
$$
Cy-Bz=a,\ \ Cx-Az=-b.\ \ Bx-Ay=c.
$$
We assumed that ${\bf v}\neq {\bf 0}$. Without loss of generality (interchanging the $x,y,z$ coordinates if necessary), we may assume that $C\neq 0$. Then the first two equations above are equivalent to
\begin{equation}\label{14e-line}
y=C^{-1}(a+Bz),\ \ x=C^{-1}(Az-b).
\end{equation}
Substituting (\ref{14e-line}) for $x$ and $y$, the last equation becomes
\begin{equation}\label{14e-line2}
\begin{split}
c& =Bx-Ay=BC^{-1}(Az-b)-AC^{-1}(a+Bz)\\
&=C^{-1}(ABz-bB-aA-ABz)= C^{-1}(-bB-aA),
\\
cC&=-bB-aA.
\end{split}
\end{equation}
But we assumed that ${\bf v}$ and ${\bf w}$ are perpendicular to each other, so that
$$
0={\bf v}\cdot {\bf w}=aA+bB+cC
$$
and the last equation in (\ref{14e-line2}) is always satisfied.

This means that (\ref{14e-line}) provides the complete set of solutions. We just have to notice that (\ref{14e-line}) describes a line. Letting $z=Ct$, we get
$$
x=At-C^{-1}b,\ \ y=Bt +C^{-1}a, \ \ z=t,
$$
a line with the direction vector $A\ii+B\jj+C\kk$, passing through the point $(-C^{-1}b, C^{-1}a,0)$.

(Notice that the line is parallel to ${\bf v}$! Can you give a geometric reason why this should be the case?)














\end{enumerate}
