[Math] Why is dot product multiplication commutative

linear algebramultivariable-calculus

Say I have a unit vector $\hat{u}$ and another vector $\vec{t}$ of magnitude 4 units, then I connect the vectors tail to tail with an acute angle between them. I don't understand how the dot product of these 2 vectors can be commutative because the projection of $\hat{u}$ onto $\vec{t}$ is a different length when compared to the projection of $\vec{t}$ onto $\hat{u}$.

Secondly, I had the first vector be a unit vector because I have this question: if I wanted to find the component of $\vec{t}$ in a certain direction, what is the intuitive reason for why I have to dot product $\vec{t}$ with a unit vector that is going in this direction?

Best Answer

For the first question, write out the formula for projection of $\hat u$ onto $\vec t.$ Now write the formula for projection of $\vec t$ onto $\hat u.$ There is a dot product in both formulas, but other parts of the formulas are not the same as each other, are they? So even though both dot products give the same number, you get different results for each projection, as you expected.

For the second question, the component of $\vec t$ in the direction of $\hat u$ is the same as the component of $\vec t$ in the direction of $2\hat u$ or $0.1\hat u,$ is it not? That is, if all you care about is the direction in which you want to take a component, the length of the vector that provides you with the direction shouldn't matter.

The way we make the length of the "direction pointing" vector not matter is that whatever vector we are given, we replace it with a unit vector pointing in the same direction. We need some kind of normalization like that because otherwise (as you should well know) the dot product $\vec u\cdot \vec t$ will be larger or smaller as the magnitude of $\vec u$ is larger or smaller.

More technically, the dot product satisfies the equation $$ \vec u\cdot \vec t = \lVert\vec u\rVert\lVert\vec t\rVert \cos\theta,$$ where $\theta$ is the angle between the vectors. Whereas (if $\theta$ is acute) the projection of $\vec t$ onto $\vec u$ needs to be one leg of a right triangle with hypotenuse of length $\lVert\vec t\rVert$ and an angle $\theta$ between the projection vector and $\vec t.$ Draw the triangle; by the definition of cosine, the length of the projection vector has to be $\lVert\vec t\rVert \cos\theta.$ This looks a lot like the right-hand side of the equation above, but the factor $\lVert\vec u\rVert$ is missing.

So what to do about that pesky extra factor of $\lVert\vec u\rVert$ in the equation for $\vec u\cdot \vec t$? Make sure it's always $1$ so it won't give you a wrong result.

That formula is my intuition about why in particular it makes sense to take a dot product with a unit vector.