Let $\vec{v}_1 = \left[ \begin{matrix} a\\ b \end{matrix} \right]$ and $\vec{v}_2 = \left[ \begin{matrix} c\\ d \end{matrix} \right]$.
It is often taught that the dot product $\vec{v}_1 \cdot \vec{v}_2$ can be interpreted as projecting $\vec{v}_2$ onto $\vec{v}_1$ (or vice versa), which I will refer to as $\vec{v}_2'$, and then multiplying the lengths of $\vec{v}_2'$ and $\vec{v}_1$. Or equivalently,
$\vec{v}_1 \cdot \vec{v}_2 = \cos{\theta}\mid\vec{v}_1\mid\mid\vec{v}_2\mid = \mid\vec{v}_1\mid\mid\vec{v}_2'\mid$
But where did this interpretation come from? Why does multiplying each component of the vectors and adding them correspond to projecting then multiplying the lengths?
It helps me to think of it this way: the dot product is a measure of similarity between two vectors. Of course, their magnitudes play a role in the product as well, but that is not the point. In the case of projection, you trash the component of $\vec{v}_2$ that is orthogonal to $\vec{v}_1$, and you are only left with the part of $\vec{v}_2$ that is similar to $\vec{v}_1$.
Multiplying their corresponding components works in much the same way. You break each vector into its orthogonal components, and multiply them with the corresponding orthogonal components of the other vector.
$\vec{v}_1 \cdot \vec{v}_2 = (\vec{v}_a + \vec{v}_b) \cdot (\vec{v}_c + \vec{v}_d)$
$=\vec{v}_a \cdot \vec{v}_c + \vec{v}_a \cdot \vec{v}_d + \vec{v}_b \cdot \vec{v}_c +
\vec{v}_b \cdot \vec{v}_d$
$=\vec{v}_a \cdot \vec{v}_c + 0 + 0 + \vec{v}_b \cdot \vec{v}_d$
$=\vec{v}_a \cdot \vec{v}_c + \vec{v}_b \cdot \vec{v}_d$
$=ac + bd$
This can be visualized nicely:
In the image, it becomes apparent that multiplying each component of the two vectors really represents multiplying their "similarity" in the horizontal direction and the vertical direction then adding them up to sum to the "total similarity." This summation of the similarity in both directions really is exactly the same as the projection method-- because projecting a vector onto another is keeping only the "similar" components between the vectors.
It use to puzzle me how the computation of the dot product corresponds with the geometric interpretation, but this idea of similarity between the vectors has helped me gain some intuition. It also makes sense that the dot product of two orthogonal vectors is 0, since they share no similarity in the direction they point.
Often when multiplication is involved, it can be helpful to visualize with areas. So I will leave with this last visualization of the dot product in which the area of the two outer boxes sums to the area of the inner one.
Let me know if you have any other visualizations or ideas to help with gaining an intuition for the dot product.
No comments:
Post a Comment