Algebra of dot products
$$\begin{align}
\mathbf{x} \cdot ( \mathbf{y} + \mathbf{z}) &= \mathbf{x} \cdot \mathbf{y} + \mathbf{x} \cdot \mathbf{z}\\
(\mathbf{w} + \mathbf{x})\cdot(\mathbf{y} + \mathbf{z}) &= \mathbf{w}\cdot \mathbf{y} + \mathbf{w}\cdot \mathbf{z} + \mathbf{x} \cdot \mathbf{y} + \mathbf{x} \cdot \mathbf{z}\\
\mathbf{x}\cdot \mathbf{y} &= \mathbf{y}\cdot \mathbf{x}
\end{align}$$