# 13.3 | The Dot Product

The dot product or scalar product of two nonzero vectors $$\mathbf{a}$$ and $$\mathbf{b}$$ is the number
$$\mathbf{a \cdot b} = \left| \mathbf{a} \right|\left| \mathbf{b} \right| \cos \theta$$
where $$\theta$$ is the angle between $$\mathbf{a}$$ and $$\mathbf{b}$$, $$0 \leq \theta \leq \pi$$. (So $$\theta$$ is the smaller angle between the vectors when the are drawn with the same initial point.) If either $$\mathbf{a}$$ or $$\mathbf{b}$$ is $$\mathbf{0}$$, we define $$\mathbf{a \cdot b} = 0$$.

Two vectors $$\mathbf{a}$$ and $$\mathbf{b}$$ are orthogonal if and only if $$\mathbf{a \cdot b} = 0$$
The dot product of $$\mathbf{a} = \left \langle a_1, a_2, a_3 \right \rangle$$ and $$\mathbf{b} = \left \langle b_1, b_2, b_3 \right \rangle$$ is
$$\mathbf{a \cdot b} = a_1 b_1 + a_2 b_2 + a_3 b_3$$
If $$\mathbf{a}$$,$$\mathbf{b}$$, and $$\mathbf{c}$$ are vectors in $$V_3$$ and $$c$$ is a scalar, then

1. $$\mathbf{a \cdot a}= \left|\mathbf{a}\right|^2$$
2. $$\mathbf{a \cdot b}= \mathbf{b \cdot a}$$
3. $$\mathbf{a \cdot} ( \mathbf{b} + \mathbf{c})= \mathbf{a \cdot b} + \mathbf{a \cdot c}$$
4. $$(c\mathbf{a}) \mathbf{\cdot b} = c (\mathbf{a\cdot b}) = \mathbf{a \cdot } (c \mathbf{b})$$
5. $$\mathbf{0 \cdot a } = 0$$
The scalar projection of $$\mathbf{b}$$ onto $$\mathbf{a}$$ is given by:
$$\text{comp}_{\mathbf{a}}\mathbf{b} = \frac{ \mathbf{a \cdot b}}{\left| \mathbf{a} \right|}$$
The vector projection of $$\mathbf{b}$$ onto $$\mathbf{a}$$ is given by:
$$\text{proj}_{\mathbf{a}}\mathbf{b} = \left(\frac{ \mathbf{a \cdot b}}{\left| \mathbf{a} \right|}\right) \frac{\mathbf{a}}{\left| \mathbf{a} \right|}= \frac{\mathbf{a \cdot b}}{\left| \mathbf{a} \right|^2}\mathbf{a}$$