[Math] The cosine of the angle between two vectors proof

geometrytrigonometry

Vector $\mathbf{v}$ and $\mathbf{v'}$ make angles $\alpha , \beta, \gamma$ and $\alpha ', \beta', \gamma$' with the coordinate axes respectively.

$\phi$ is the angle between $\mathbf{v}$ and $\mathbf{v'}$.

Why is $\cos(\phi)=\cos(\alpha)\cos(\alpha')+\cos(\beta)\cos(\beta')+\cos(\gamma)\cos(\gamma')$?

Best Answer

Note that $$ \cos(\alpha) = \frac{v_1}{||v||},\; \cos(\beta) = \frac{v_2}{||v||}, \;\cos(\gamma) = \frac{v_3}{||v||}$$ and $$ \cos(\alpha') = \frac{v_1'}{||v'||},\; \cos(\beta') = \frac{v_2'}{||v'||}, \;\cos(\gamma') = \frac{v_3'}{||v'||}.$$ Then $$ \cos(\phi) = \frac{\langle v, v' \rangle}{||v|| \cdot ||v'||} = \frac{v_1 v_1' + v_2v_2' + v_3v_3'}{||v|| \cdot ||v'||} = $$ $$\cos(\alpha) \cos(\alpha') + \cos(\beta) \cos(\beta') + \cos(\gamma) \cos(\gamma').$$