\(\newcommand{L}[1]{\| #1 \|}\newcommand{VL}[1]{\L{ \vec{#1} }}\newcommand{R}[1]{\operatorname{Re}\,(#1)}\newcommand{I}[1]{\operatorname{Im}\, (#1)}\)

Angles between vectors

Consider two vectors \(\vec{w}\) and \(\vec{v}\).

_images/vector_projection.svg

We already know from Vector projection that the vector projection of \(\vec{w}\) onto \(\vec{v}\) is \(c \vec{v}\) where:

\[c = \frac{\vec{w} \cdot \vec{v}}{\VL{v}^2}\]

We know from the definition of projection that \(c \vec{v}\) and \(\vec{w} - c \vec{v}\) form a right angle.

If the angle between \(\vec{v}\) and \(\vec{w}\) is \(\alpha\), then:

\[\VL{w} cos(\alpha) = \L{ c \vec{v} } = c \VL{v} = \frac{\vec{w} \cdot \vec{v}}{\VL{v}}\]

and:

\[\VL{v} \VL{w} cos(\alpha) = \vec{w} \cdot \vec{v}\]