The orthogonal projection of a vector $\vec{w}$ onto a unit vector $\hat{v}$ is given by the dot product, as shown in Figure \ref{fig:dot_product}. The dot product gives a scalar quantity which can be written as
\[ \vec{w} \cdot \hat{v} = \left| \vec{w} \right| \left| \hat{v} \right| \cos \varphi \]
where $\varphi$ is the angle formed between the two vectors.
The dot product is linear, and the above formula can be modified for the projection onto a non-unit vector $\vec{v}$ by rewriting $\vec{v} = \left| \vec{v} \right| \hat{v}$. Hence,
\[ \vec{w} \cdot \vec{v} = \vec{w} \cdot \left(\left| \vec{v} \right| \hat{v}\right) = \left| \vec{v} \right| \vec{w} \cdot \hat{v} = \left| \vec{w} \right| \left| \vec{v} \right| \cos \varphi \]
Thus, when used with a non-unit vector $\vec{v}$, the dot product $\vec{w} \cdot \vec{v}$ gives a projection onto $\hat{v}$ stretched or weighted by $\left| \vec{v} \right|$.
Importantly, from this definition or based on Figure \ref{fig:dot_product}, note that the dot product between two non-zero vectors vanishes if and only if the vectors are orthogonal (e.g. $\varphi = \frac{\pi}{2}$).
\noindent
\begin{figure}[htbp]
\centering
\fbox{\resizebox{2.4in}{!}{\includegraphics{../images/instructors_guide_illustrations/dot_product}}}
\caption[Dot product as projection]{The dot product of $\vec{w}$ onto the unit vector $\hat{v}$}
\label{fig:dot_product}
\end{figure}