\section{Vectors, Dot Products, and Projections}

\subsection{Vectors} A vector $\mathbf{v}$ in $\mathbb{R}^2$ or $\mathbb{R}^3$ has two aspects: magnitude (length) and direction. Geometrically, we can represent a vector by an ordered pair of points, say $\mathbf{v} = \vec{AB}$. For example, if
$A : = (a_1, a_2, a_3)$ and $B: = (b_1, b_2, b_3)$ are points in $\mathbb{R}^3$,  then the vector $\vec{AB} = \langle b_1 - a_1, b_2 - a_2, b_3 - a_3 \rangle$ looks like an arrow rooted at $A$ with tip $B$.  Any vector $\mathbf{v}$ has many such representations. Taking points $C$ and $D$ in $\mathbb{R}^3$ which satisfy $d_i - c_i = b_i - a_i$ for $i = 1,2,3$ produces the same vector $\mathbf{v}=\vec{CD}=\vec{AB}$.  


\begin{figure}[H]\label{12fig1}
\centering\includegraphics[width=.75\textwidth]{12fig1.pdf}
\caption{The same vector in $\mathbb{R}^2$ can be represented by either one of the ordered pairs of points  $(A,B)$ and $(C,D)$.}
\end{figure}


As an example,  we can write vector $\mathbf{v} : = \langle 1,1,1\rangle$ as $\vec{AB}$ and $\vec{CD}$ where $A,B,C,D$ all satisfy,
$$
( 1,1,1 ) = \underbrace{( 3,3,3 )}_{A} - \underbrace{(2,2,2)}_{B} =  \underbrace{(\sqrt{3} + 1,  \pi + 1,  72.1 + 1 )}_{C} - ( \underbrace{\sqrt{3}, \pi, 72.1)}_{D}.
$$
Not all representations are equally aesthetically pleasing or easy to use; so, it's a good reminder to choose our representations carefully.  


For a vector $\mathbf{v} = \langle v_1, v_2, v_3 \rangle$, the real numbers $v_1, v_2, v_3$ are the \textbf{components} of $\mathbf{v}$. The vectors $\mathbf{i}$, $\mathbf{j}$ and $\mathbf{k}$ are the \textbf{standard basis vectors} in $\mathbb{R}^3$.  They are given by the equations,
$$
\mathbf{i} : = \langle 1,0,0 \rangle \quad \mathbf{j} : = \langle 0,1,0 \rangle \quad \mathbf{k} : = \langle 0,0,1 \rangle.
$$
In $3$-dimensional space, they form the corner of a cube with side-length $1$.


\begin{figure}\label{12fig2}
\centering\includegraphics[width=.3\textwidth]{12fig2.pdf}
\caption{The standard basis vectors $\mathbf{i}$, $\mathbf{j}$ and $\mathbf{k}$ in $\mathbb{R}^3$.}
\end{figure}

In $\mathbb{R}^2$, we will only use the vectors $\mathbf{i} : = \langle 1,0 \rangle$ and $\mathbf{j} : = \langle 0,1 \rangle$.  In $\mathbb{R}^n$, for $n > 3$,  one usually uses the notation $\mathbf{e}_1,...,\mathbf{e}_n$, where $\mathbf{e}_k$ is the vector with zeroes in all entries $j \neq k$ and $1$ in the $k$-th entry.


\subsection{Notation for vectors} Different sources (textbooks, WebWork, instructors) will have different preferences for their notation for vectors.  For example,  if $\mathbf{v}$ is a vector in $\mathbb{R}^3$,  we can write
$$
\mathbf{v} =\vec{v}= \langle v_1, v_2, v_3 \rangle = v_1 \mathbf{i} + v_2 \mathbf{j} + v_3 \mathbf{k}.
$$
In particular, the boldface notation $\mathbf{v}$ means the same thing as the over-arrow notation $\vec{v}$. You can use whichever you like. In these notes, we (mostly) retain the notation $\mathbf{v}$, but we will use the notation $\vec{AB}$ to denote the vector with tail at $A$ and tip at $B$. In handwritten materials where boldface is difficult to render, it is preferable to use $\vec{v}$. Similarly, we will mostly use angular brackets as in $\langle v_1, v_2, v_3 \rangle$ for vectors and round brackets as in $(x_1,x_2,x_3)$ for points, but the round bracket notation is also often used for vectors.






We also have the following notations:
\begin{itemize}
\item{The zero vector in $\mathbb{R}^3$ is $\mathbf{0} : = \langle 0,0,0 \rangle$; in $\mathbb{R}^2$, the definition is similar. }
\item{The \textbf{length} of a vector $\mathbf{v}: = \langle v_1, v_2, v_3 \rangle$ is $|\mathbf{v}|=\sqrt{v_1^2 + v_2^2 + v_3^2}$. This length is, in fact, a \textbf{norm} on $\mathbb{R}^3$, a concept you have likely encountered in your linear algebra course. However,  there are other norms on $\mathbb{R}^3$ which are \textbf{not} the length. The length of a vector is always nonnegative, and $|\mathbf{v}|=0$ if and only if $\mathbf{v}=0$.} 
\item{A \textbf{unit vector} is a vector of length $1$.  If $\mathbf{v}$ is any vector with $|\mathbf{v}| \neq 0$, then $\mathbf{u} : = \mathbf{v} / |\mathbf{v}|$ is a unit vector in the direction of $\mathbf{v}$.}
\end{itemize}

\subsection{The dot product} One of the most important definitions for vectors in $\mathbb{R}^3$ is the following.


\begin{definition}
If $\mathbf{u} : = \langle u_1, u_2, u_3 \rangle$ and $\mathbf{v} : = \langle v_1, v_2, v_3 \rangle$ then the \textbf{dot product} $\mathbf{u} \cdot \mathbf{v}$ is the real number

$$
\mathbf{u} \cdot \mathbf{v} : = u_1 v_1 + u_2 v_2 + u_3 v_3.
$$

\end{definition}


\smallskip

The dot product is also called the \textbf{scalar product} or \textbf{inner product} in other resources. (Strictly speaking, ``inner product'' and ``scalar product'' are more general concepts that can be defined on vector spaces other than $\RR^n$. You will see that in linear algebra.) The dot product in $\mathbb{R}^2$ has a similar definition, just without the third coordinate.
The proposition below lists a few basic properties of the dot product (you should try and prove them yourself!).

\smallskip
\noindent
\begin{proposition}
Let $\mathbf{u}, \mathbf{v}$ and $\mathbf{w}$ be vectors in $\mathbb{R}^3$ and let $c$ be some real scalar.  Then, 
\begin{enumerate}[(i)]
\item $\mathbf{u} \cdot \mathbf{v} = \mathbf{v} \cdot \mathbf{u}$ (commutativity)

\smallskip

\item $\mathbf{u} \cdot \mathbf{u} = |\mathbf{u}|^2$ (relation to the length norm $|\cdot |$)

\smallskip

\item $\mathbf{u} \cdot (\mathbf{v} + \mathbf{w}) = \mathbf{u} \cdot \mathbf{v} + \mathbf{u} \cdot \mathbf{w}$ (distributive law)

\smallskip

\item $(c \mathbf{u}) \cdot \mathbf{v} = c (\mathbf{u} \cdot \mathbf{v}) = \mathbf{u} \cdot (c \mathbf{v})$ (scalar multiplication)
\end{enumerate}
\end{proposition}
\smallskip

There is also an important geometric interpretation of the dot product.  


\begin{proposition}
Let $\mathbf{u}$ and $\mathbf{v}$ be vectors in $\mathbb{R}^3$. Choose the angle $\theta$ between $\mathbf{u}$ and $\mathbf{v}$ satisfying $0 \leq \theta \leq \pi$. Then,
$$
\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}| |\mathbf{v}| \cos \theta.
$$


\end{proposition}

\smallskip

This is based on the Cosine Law in geometry. Consider the triangle spanned by the vectors $\mathbf{u}$ and $\mathbf{v}$, with the angle $\theta$ between them. The vector $\mathbf{v}-\mathbf{u}$ completes the triangle. The Cosine Law is a relation between the sides of the triangle:
$$
|{\bf v}-{\bf u}|^2 =|{\bf u}|^2 + |{\bf v}|^2 - 2|{\bf u}||{\bf v}|\cos\theta.
$$
By (ii) above, we have $|{\bf v}-{\bf u}|^2= ({\bf v}-{\bf u})\cdot ({\bf v}-{\bf u})$. Expand this and simplify using the properties above... what do you get? Can you finish the proof?


\begin{figure}[H]\label{12fig3}
\centering\includegraphics[width= .5\textwidth]{12fig3.pdf}
\caption{The angle between two vectors $\mathbf{u}$ and $\mathbf{v}$ }
\end{figure}





%\vspace{-.75cm}

Now, you might be scratching your head and asking: why did we choose the angle interior to $\mathbf{u}$ and $\mathbf{v}$ in the previous figure? Well,  it turns out, we could have picked either! This is because
$$
\cos (\theta_{interior}) = \cos (- \theta_{interior}) = \cos (2 \pi - \theta_{interior}) = \cos (\theta_{exterior}).
$$
To show this, we used that the cosine function is even and has period $2 \pi$ radians. 

\subsection{Angles between vectors} The dot product can be used to find a formula for the angle between vectors in terms of their components.  If $\mathbf{u}$ and $\mathbf{v}$ make angle $\theta$ with one another,  one has
$$
\cos \theta : = \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{u}| |\mathbf{v}|}
$$

\begin{example}
Find the angle between the vectors $\mathbf{i} + \mathbf{k}$ and $2 \mathbf{i} - \mathbf{j}$.

\bigskip

\underline{Solution:} Let $\mathbf{u} := \mathbf{i} + \mathbf{k}$ and $\mathbf{v} : = 2 \mathbf{i}- \mathbf{j}$. Then $\mathbf{u} \cdot \mathbf{v} = 2 + 0 + 0 = 2$. Moreover, $|\mathbf{u}| = \sqrt{1+1} = \sqrt{2}$ and $|\mathbf{v}| = \sqrt{4 + 1} = \sqrt{5}$.  So,  $\cos (\theta)= \frac{2}{\sqrt{10}} \approx .63$.
So, we have:
$$
\theta = \arccos (0.63) \approx 0.866 \textrm{ radians}.
$$
Note: you need a calculator to determine $\arccos (0.63)$  to three decimal places.
\end{example}

\begin{remark}
An important special case is the situation when $\theta = \frac{\pi}{2}$ (which is another way of saying that $\mathbf{u}$ and $\mathbf{v}$ are perpendicular).  Then $\cos (\theta) = 0$, so that $\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}| |\mathbf{v}| \cos \theta = 0$.  

Conversely,  if $\mathbf{u} \cdot \mathbf{v} = 0$, then either $|\mathbf{u}| = 0$, or $|\mathbf{v}| = 0$, or $\cos (\theta) = 0$. Assume first that $\mathbf{u} \cdot \mathbf{v} = 0$ but $\mathbf{u}$ and $\mathbf{v}$ are nonzero. Then $\cos \theta = 0$, so that $\theta = \frac{\pi}{2}$ (in the definition of the dot product, we used the internal angle $0 \leq \theta \leq \pi$).  Hence, $\mathbf{u}$ and $\mathbf{v}$ are perpendicular. To keep things consistent, we will say that the zero vector $\mathbf{0}$ is perpendicular to all vectors by convention.

Let's summarize this as
$$
\mathbf{u} \perp \mathbf{v} \ \Longleftrightarrow\  \mathbf{u} \cdot \mathbf{v} = 0.
$$
\end{remark}

\begin{example}
Let $\mathbf{u} : = \langle 2, -1, 3 \rangle$, $\mathbf{v} : = \langle 0,4,2 \rangle$ and $\mathbf{w} : = \langle 1,-1,-1 \rangle$.  Then,  $\mathbf{u} \cdot \mathbf{v} = -4 + 6 \neq 0$ and $\mathbf{u} \cdot \mathbf{w} = 2 + 1 - 3 = 0$.  So, $\mathbf{u}$ is perpendicular to $\mathbf{w}$, but is not perpendicular to $\mathbf{v}$.
\end{example}

\subsection{Scalar and Vector Projections} Let $\mathbf{w}$ and $\mathbf{v}$ be two vectors with $\mathbf{v} \neq \mathbf{0}$.  We want to find two vectors ${\bf a}$ and ${\bf b}$ such that:
\begin{itemize}
\item $\mathbf{w} = \mathbf{a} + \mathbf{b}$,
\item $\mathbf{a}$ is parallel to $\mathbf{v}$ (but may point in the opposite direction),
\item $\mathbf{b}$ is perpendicular to $\mathbf{v}$.
\end{itemize}
Then $\mathbf{a}$ is the \textbf{vector projection} of $\mathbf{w}$ on $\mathbf{v}$ (notation: $\mathbf{a} = \mathbf{w}_{\mathbf{v}}$).  

We first note (see the picture below) that ${\bf a}$ and ${\bf b}$ depend only on the {\it direction} of ${\bf v}$. Therefore, in the calculation for ${\bf a}$ and ${\bf b}$, we will use instead the unit vector ${\bf u}={\bf v}/|{\bf v}|$ in the same direction.
Since ${\bf a}$ is parallel to ${\bf v}$, therefore also to ${\bf u}$, we have ${\bf a}=s{\bf u}$ for some real number $s$ that we will call the {\bf scalar projection} of ${\bf w}$ on ${\bf v}$. We find $s$ from the condition that ${\bf b}={\bf w}-{\bf a}$ should be perpendicular to ${\bf u}$:
\begin{align*}
0&= ({\bf w}-{\bf a})\cdot {\bf u}= ({\bf w}-s{\bf u})\cdot {\bf u} \\
&= {\bf w}\cdot {\bf u} -s{\bf u}\cdot {\bf u} = {\bf w}\cdot {\bf u} -s,
\end{align*}
where at the end we used that ${\bf u}\cdot {\bf u}=|{\bf u}|^2=1$. Therefore $s=  {\bf w}\cdot {\bf u}$. This gets us the following formulas for the vector and scalar projections:


Suppose $\mathbf{w}$ and $\mathbf{v}$ are vectors in $\mathbb{R}^3$, with ${\bf v}\neq 0$.  Then, the vector projection and scalar projection of ${\bf w}$ on ${\bf v}$ are given by the formulae,
\medskip

$$
\textrm{(Scalar projection)} \quad \quad s = \frac{\mathbf{w} \cdot \mathbf{v}}{|\mathbf{v}|} = |\mathbf{w}| \cos \theta,
$$
$$
\textrm{(Vector projection)} \quad \quad \mathbf{a} = \mathbf{w}_{\mathbf{v}} = 
s\frac{{\bf v}}{|{\bf v}|}= \frac{\mathbf{w} \cdot \mathbf{v}}{|\mathbf{v}|^2} \mathbf{v}
$$
\medskip

where $\theta$ is the angle between ${\bf w}$ and ${\bf v}$.




\begin{figure}[H]\label{12fig4}
\centering\includegraphics[width= .3\textwidth]{12fig4.pdf}
\caption{Projections of $\mathbf{w}$ onto $\mathbf{v}$, with $\mathbf{a}$ as the vector projection of $\mathbf{w}$ onto $\mathbf{v}$.  Since $\mathbf{w}$ points in the same direction as $\mathbf{v}$, we have $+ |\mathbf{w}|$ as the scalar projection. The vectors $\mathbf{v}$ and $\mathbf{w}$ are \textit{always collinear}! In this diagram, $\mathbf{v}$ is drawn slightly off from $\mathbf{a}$ to make the picture less messy.}
\end{figure}
It is important to remember that the vector projection is a vector and the scalar projection is a scalar (just a number!). 
The fraction 
$$\frac{\mathbf{w} \cdot \mathbf{v}}{|\mathbf{v}|^2} $$ in the vector projection formula is also just a number, so that $\mathbf{a}$ (equal to that number times ${\bf v}$) is a vector parallel to $\mathbf{v}$. The length of ${\bf a}$ is $|{\bf a}|=|s{\bf u}|=|s|$, since ${\bf u}$ has length 1. 
Notice that the number $s$ is positive if the angle $\theta$ is acute and negative if $\theta$ is obtuse (see Figure 1.12 below). Thus $s=\pm |\mathbf{a}|$, and we choose $+$ or $-$ based on whether $\mathbf{a}$ points in the same (or opposite) direction as $\mathbf{v}$. 


\begin{figure}[H]\label{12fig5}
\centering\includegraphics[width= .6\textwidth]{12fig5.pdf}
\caption{If $\theta < \frac{\pi}{2}$, then $\cos \theta > 0$; in this situation, we see that $\mathbf{a} = \mathbf{w}_{\mathbf{v}}$ points in the same direction as $\mathbf{v}$.  When $\theta > \frac{\pi}{2}$,  we have $\cos \theta < 0$; in this case, we see that $\mathbf{a}$ points in the opposite direction from $\mathbf{v}$.}
\end{figure}



\section*{Worked Problems}
Here are some examples of how we use the dot product and vector projection. 

\begin{enumerate}[1.]
\item{(Simple) If $\mathbf{u} = \langle u_1, u_2, u_3\rangle$ and $\mathbf{v} = \mathbf{i}$, then $\mathbf{u} \cdot \mathbf{v} = u_1$.}

\bigskip

\item{(Less Simple) {\it Write the vector } $2 \mathbf{i} - \mathbf{k}$ {\it as a sum} $\mathbf{u} + \mathbf{v}$, {\it where }$\mathbf{u}$ {\it is parallel to} $\mathbf{i} + 3 \mathbf{j}$ {\it and} $\mathbf{v}$ {\it is perpendicular to } $\mathbf{u}$.

\bigskip

We have that $\mathbf{u}$ is the vector projection of $2 \mathbf{i} - \mathbf{k}$ onto $\mathbf{i} + 3 \mathbf{j}$.  Therefore,
$$
\mathbf{u} = \frac{(2 \mathbf{i} - \mathbf{k})\cdot(\mathbf{i} + 3 \mathbf{j})}{|\mathbf{i} + 3 \mathbf{j}|^2} (\mathbf{i} + 3 \mathbf{j}) = \frac{1}{5} (\mathbf{i} + 3 \mathbf{j}).
$$
To find $\mathbf{v}$,  recall the relationship of the perpendicular vector that of the projection of $(2 \mathbf{i} - \mathbf{k})$ on $(\mathbf{i} + 3 \mathbf{j})$. Namely, we must have:
$$
\mathbf{v} = (2 \mathbf{i} - \mathbf{k}) - \frac{1}{5}(\mathbf{i} + 3 \mathbf{j}) = \frac{9}{5}\mathbf{i} - \frac{3}{5} \mathbf{j} - \mathbf{k}.
$$
}

\bigskip

\item{ (Even Less Simple) \it
Find all vectors ${\bf v}$ that satisfy all of the following conditions:
\begin{itemize}
\item[(a)] $|{\bf v}|=2$,
\item[(b)] ${\bf v}$ is perpendicular to $\ii -2\jj +\kk$,
\item[(c)] ${\bf v}$ makes a 45 degrees angle with $\ii -\kk$.
\end{itemize}
}

\bigskip

Let ${\bf v} = x\ii + y\jj + z\kk$ be any vector in $\rr^3$. We want to find the equations that $x,y,z$ must solve so that ${\bf v}$ satisfies the three conditions stated. For convenience let ${\bf u} = \ii -2\jj + \kk$ and ${\bf w} = \ii - \kk$. Then condition (b) says that ${\bf v} \cdot {\bf u} = 0$, and so from the definition of dot product we have
\begin{equation}
x -2y +z = 0. \label{eq1}
\end{equation}
To work with condition (c) we use the relation between the dot product and the angle between two vectors, which gives
\begin{equation*}
{\bf v} \cdot {\bf w} = |{\bf v}| |{\bf w}| \cos 45^{\circ}.
\end{equation*}
We may use the definition of the dot product on the left hand side, the fact that $|{\bf v}|=2$, compute that $|{\bf w}|=\sqrt{2}$ and $\cos 45^{\circ} = 1/\sqrt{2}$, to obtain
\begin{equation*}
x - z = 2.
\end{equation*}
This allows us to solve for $z$ in terms of $x$ only, namely $z=x-2$, and so we can now eliminate $z$ from the rest of the problem. For example, plugging back into \eqref{eq1} and rearranging gives
\begin{equation*}
y = x - 1.
\end{equation*}
Finally, note that condition (a) may be written as $|{\bf v}|^2=4$, that is,
\begin{equation*}
x^2 + y^2 + z^2 = 4.
\end{equation*}
Using what we found above to eliminate both $y$ and $z$ gives $x^2 + (x-1)^2 + (x-2)^2 = 4$, which simplifies to $3x^2 - 6x + 1 = 0$. This is a quadratic equation in $x$, so we may use the quadratic formula to get that
\begin{equation*}
x = 1 \pm \frac{\sqrt{6}}{3}.
\end{equation*}
For each of these values of $x$ we can find the corresponding values of $y$ and $z$ from above, and hence we are left with two vectors ${\bf v_1} = (1+\frac{\sqrt{6}}{3})\ii + \frac{\sqrt{6}}{3}\jj + (-1+\frac{\sqrt{6}}{3})\kk$ and ${\bf v_2} = (1-\frac{\sqrt{6}}{3})\ii - \frac{\sqrt{6}}{3}\jj - (1+\frac{\sqrt{6}}{3})\kk$ as the only possible solution candidates. One should now check by direct computation that these do indeed satisfy conditions (a)-(c).



\bigskip




\item {\it  Let ${\bf u}$ and ${\bf v}$ be two non-zero vectors in $\rr^2$ that are not parallel to each other.
Let $a,b$ be two real numbers. Prove that there is exactly one vector ${\bf r}$ in $\rr^2$ such that its
scalar projection on ${\bf u}$ is $a$ and its scalar projection on ${\bf v}$ is $b$. }

\smallskip



{\it (Optional: what would be the corresponding statement in $\rr^3$?)}

\medskip

\begin{center}
\begin{figure}[htbp]
\centering\includegraphics[width=.65\textwidth]{12fig6.pdf}%\caption{.}
\end{figure}
\end{center}

\noindent
{\bf Proof 1: geometric.} Let's represent ${\bf u}$ and ${\bf v}$ as $\vec{OA}$ and $\vec{OB}$ in the 
plane. Then all vectors whose scalar projections on ${\bf u}$ is $a$ can be
represented as $\vec{OP}$, where $P$ lies on the line $\frac{{\bf u}}{|{\bf u}|} \cdot \vec{OP}=a$.
This line is perpendicular to ${\bf u}$, or equivalently, to the line through $O$ and $A$. Similarly, 
all vectors whose scalar projections on ${\bf v}$ is $b$ can be
represented as $\vec{OQ}$, where $Q$ lies on the line $\frac{{\bf v}}{|{\bf v}|} \cdot \vec{OQ}=b$.
That line is perpendicular to ${\bf v}$. Since ${\bf u}$ and ${\bf v}$ are not parallel, the two
lines perpendicular to them are not parallel, either. Therefore they intersect at exactly one point
$P_0$, so that the vector ${\bf r}=\vec{OP_0}$ is the only one that satisfies both conditions.





\medskip\noindent
{\bf Proof 2: using linear equations.} Let ${\bf r}=x{\bf i}+y{\bf j}$, 
${\bf u}=u_1{\bf i}+u_2{\bf j}$, ${\bf v}=v_1{\bf i}+v_2{\bf j}$. Then the two projection 
conditions say that
$$
{\bf r}\cdot{\bf u}= a|{\bf u}|,\ \ {\bf r}\cdot{\bf v}= b|{\bf v}|,
$$
or in terms of components,
\begin{align*}
u_1x + u_2y &= a|{\bf u}|,
\\
v_1x + v_2y &= b|{\bf v}|.
\end{align*}
If ${\bf u}$ and ${\bf v}$ are not parallel, then the coefficient matrix 
$$
\left( \begin{matrix}
u_1& u_2 \\ v_1& v_2\\
\end{matrix} \right)
$$
is non-degenerate (i.e. has non-zero determinant), so the linear system of equations has
a unique solution for $(x,y)$. Alternatively, you can just solve the system of equations and
find $(x,y)$ from it.

\medskip

{\bf Answer to the optional question:} if ${\bf u}$, ${\bf v}$, ${\bf w}$ are three non-coplanar vectors 
in $\rr^3$, and if
$a,b,c$ are real numbers, then there is exactly one vector ${\bf r}$ in $\rr^3$ such that its
respective scalar projections on ${\bf u}, {\bf v}, {\bf w}$ are $a,b,c$.


\bigskip


\item {\it 
Let $Q=(2,0,-1)$. Describe the set of points $P=(x,y,z)$ such that the vector $\vec{PQ}$ makes
equal angles with the vectors 
${\bf u}={\bf i} +{\bf j}$ and ${\bf v}=3{\bf j}-4 {\bf k}$. (Give an equation describing that set.)}


\medskip

Let ${\bf w}=\vec{PQ}=(2-x)\ii-y\jj + (-1-z)\jj$. For the two angles to be equal, we need their cosines to be equal:
$$
\frac{{\bf w}\cdot {\bf u}}{|{\bf u}| |{\bf w}| } 
=\frac{{\bf w}\cdot {\bf v}}{|{\bf v}| |{\bf w}| } ,\ \ \hbox{so that } \ \ 
%
\frac{{\bf w}\cdot {\bf u}}{|{\bf u}| } 
=\frac{{\bf w}\cdot {\bf v}}{|{\bf v}|} .
$$
Plugging in, we get $|{\bf u}|=\sqrt{1+1}=\sqrt{2}$, $|{\bf v}|=\sqrt{9+16}=\sqrt{25}=5$, so that
we need to have
$$
\frac{(2-x)-y}{\sqrt{2}} = \frac{-3y -4(-1-z)}{5},
$$
$$
5(2-x-y)=\sqrt{2}(-3y+4z+4).
$$
After simplification, we get $5x+(5-3\sqrt{2})y+4\sqrt{2}z=10-4\sqrt{2}$. (We will see soon that this is the equation of a plane.)


\bigskip





\end{enumerate}

\section*{Practice Problems}
Try the following problems to test your understanding of the material.  Solutions can be found in the Solutions Manual.

\begin{enumerate}[1.]

\item { What is the distance from the point $(1,2,3)$ in $\mathbb{R}^3$ to the nearest point on the 
$x$-axis?}

\bigskip

\item{  Express the vector ${\bf i} +2{\bf j}-{\bf k}$ as a sum of vectors ${\bf u}$ and ${\bf v}$, where
${\bf u}$ is parallel to the vector ${\bf i}-{\bf j}$ and ${\bf v}$ is perpendicular to ${\bf u}$.}



\bigskip

\item{
Let ${\bf u}=5\ii +7\kk$. Find vectors ${\bf v}$ and ${\bf w}$ such that:
${\bf u} = {\bf v} + {\bf w}$,
 ${\bf v}$ is parallel to the vector $\ii +2\jj -2\kk$,
and ${\bf w}$ is perpendicular to the vector $\ii +2\jj -2\kk$.

}

\bigskip

\item{ Find all values of $t$ for which the vector ${\bf v}=(t-2){\bf i} +2{\bf j}+ (2t+1){\bf k}$ is
perpendicular to the vector ${\bf w}=2t{\bf i} +(3-4t){\bf j}+ 2{\bf k}$. 
}


\bigskip




\item {  Let $Q=(1,0,-1)$. The set of points $P=(x,y,z)$ such that the vector $\vec{PQ}$ makes
equal angles with the vectors 
${\bf u}=2 {\bf i} -{\bf j}$ and ${\bf v}={\bf i}+ {\bf j}+3 {\bf k}$ can be described by an equation in $x,y,z$.
Find that equation.}



\bigskip

\item{
Let ${\bf u}$ and ${\bf v}$ be two non-zero vectors in $\rr^2$ that are not
parallel and not perpendicular to each other. Consider the following sequence
of vectors ${\bf w}_1, {\bf w}_2,\dots$ in $\rr^2$:
\begin{itemize}
\item ${\bf w}_1$ is the vector projection of ${\bf u}$ in the direction of
${\bf v}$,
\item ${\bf w}_2$ is the vector projection of ${\bf w_1}$ in the direction of
${\bf u}$,
\item ${\bf w}_3$ is the vector projection of ${\bf w_2}$ in the direction of
${\bf v}$,
\item ${\bf w}_4$ is the vector projection of ${\bf w_3}$ in the direction of
${\bf u}$),
\item continue in this manner, alternating projections in the directions of
${\bf u}$ and ${\bf v}$.
\end{itemize}
Find the general formula for the length of ${\bf w}_n$ for $n=1,2,\dots$, in
terms of $|{\bf u}|$, $|{\bf v}|$, and the angle $\theta$ between ${\bf u}$ and
${\bf v}$. What happens as $n\to\infty$? (Optional: you may want to draw a
picture.)}

\end{enumerate}





