\documentclass[a4paper,12pt]{article}
\newcommand\ds{\displaystyle}

\begin{document}

\parindent=0pt

QUESTION

If ${\bf a}={\bf j}+{\bf k}$ and ${\bf b}=2{\bf i}-{\bf j}+2{\bf
k}$  find the component of \textbf{a} in the direction of
\textbf{b}.

\bigskip

ANSWER

${\bf a}=(0,1,1),\ {\bf b}=(2,-1,2)$

The component of \textbf{a} in the direction of \textbf{b} is
$\mathbf{a.\hat{b}}$
\begin{eqnarray*}
\mathbf{a.\hat{b}}&=&(0,1,1)\frac{(2,-1,2)}{\sqrt{2^2+(-1)^2+2^2}}\\
&=&\frac{1}{3}(0,1,1).(2,-1,2)\\ &=&\frac{1}{3}(0-1+2)=\frac{1}{3}
\end{eqnarray*}





\end{document}
