# Intuitive understanding of calculating the dot product.

(there are two questions quite similar to this one, found here: (Dot Product Intuition, How to understand dot product is the angle's cosine?), but they have no accepted answers and I feel have a different approach than mine)

I am trying to intuitively understand the dot product, I am studying a first course in linear algebra.

So far in my studies I have two ways of calculating the dot product between two vectors.

The first one is to assume that the vectors are written in an orthonormal basis and then we can simply multiply and add the $x$ and $y$ coordinates of the vectors like this:

$\vec{u} = (\sqrt{2}, \sqrt{2})$, and $\vec{v} = (1, 0)$

gives: $\sqrt{2}\times1 + \sqrt{2}\times0 = \sqrt{2}$

The second way is to use the following formula $\vec{u}\cdot\vec{v} = |\vec{u}||\vec{v}|\cos{\alpha}$

This gives $2\times1\cos{45} = \sqrt{2}$

Now I understand how you can prove that these two methods will produce the same results.

But I have a hard time understanding how this is true intuitively.

Now one way to think about how the $|\vec{u}||\vec{v}|\cos{\alpha}$ formula is to always rotate the vectors so that the $\vec{v}$ has a $y$-coordinate of $0$.

Then by calculating the $\vec{u}\cdot\vec{v} = |\vec{u}||\vec{v}|\cos{\alpha}$ we simply get the "horizontal" projection of $\vec{u}$ onto $\vec{v}$.

In other words, we always make sure that the $y$-coordinate of one of the vectors are $0$, like in the example above $\sqrt{2}\times1 + \sqrt{2}\times0 = \sqrt{2}$

Thank you for your time and help!

• Please include links to the other two questions. – Gerry Myerson May 6 '14 at 11:24
• @GerryMyerson That should be fixed now, thank you for your comment! – Lukas Arvidsson May 6 '14 at 11:31

The formula $\vec{u} \cdot \vec{v} = |\vec{u}| |\vec{v}| \text{ cos } \alpha$ is simply a projection formula. Generally, we can write $\vec{u}$ as $\vec{u} = \vec{u}^\parallel + \vec{u}^\perp$ where $\vec{u}^\parallel$ is parallel to (i.e. in the span of) $\vec{v}$, and $\vec{u}^\perp \cdot \vec{v} = 0$. Taking the dot product, we have $$\vec{u} \cdot \vec{v} = (\vec{u}^\parallel + \vec{u}^\perp) \cdot \vec{v} = \vec{u}^\parallel \cdot \vec{v} + \vec{u}^\perp \cdot \vec{v} = \vec{u}^\parallel \cdot \vec{v} = \pm |\vec{u}^\parallel| |\vec{v}|$$ The last bit comes from the fact that $\vec{u}^\parallel$ and $\vec{v}$ are parallel, with plus or minus determined by whether or not the two vectors point in the same direction or opposite directions. With some geometric considerations in mind, one can show that $$\pm |\vec{u}^\parallel| = |\vec{u}| \text{ cos } \alpha$$ Thus we have the original expression in question. Note that everything done above was done using the usual definition of the dot product, namely multiplying the components of $\vec{u}$ and $\vec{v}$ together and then summing. This proves the desired relationship between the two ways of calculating the dot product.