# Meaning of dot product of two vectors

I understand that the dot product of two vectors tells the amount one vector goes in the direction of the other. But the vector you are projecting onto may have different length and contributes to the dot product. But the amount one vector goes in the other is the same regardless. So what is the dot product actually representing?

• In a real vector space it's the product of the length of the two vectors times cosine of the angle between them. Dec 24, 2023 at 20:46
• Have you seen any formulas for the dot product? If so, do you understand how these correspond to that rough idea “how much the vectors point in the same direction”? Dec 24, 2023 at 20:46
• If $e$ is a unit vector then $(a.e)e$ is the component of $a$ in the direction of $e$. The vector $a-(a.e)e$ is then the component of $a$ perpendicular to $e$. If $e$ is the unit vector in the direction of the positive x axis in 2D then these are the $x$ and $y$ components of $a$.
– Paul
Dec 24, 2023 at 21:47

I believe you are referring to the formula where, if $$\vec{a}$$ and $$\vec{b}$$ are vectors, $$\theta$$ is the angle between $$\vec{a}$$ and $$\vec{b}$$, and $$|\vec{a}|$$ is the euclidean norm (also called magnitude or length) of $$\vec{a}$$: $$\vec{a} \cdot \vec{b} = |\vec{a}| |\vec{b}| \cos(\theta)$$
Sure, if we project $$\vec{b}$$ onto $$\vec{a}$$ and denote it as $$\vec{b}_a$$, then $$\vec{b}_a$$ would have the new length of $$|\vec{b}|\cos(\theta)$$. To be clear, this is not the dot product. This is a projection of $$\vec{b}$$ onto $$\vec{a}$$, the dot product does not tell us this. The dot product, however, can be seen as product of the length of $$\vec{b}_a$$ and the length of $$\vec{a}$$. We may rewrite our first formula as: $$\vec{a} \cdot \vec{b} = |\vec{b}_a| |\vec{a}|$$
The "geometric representation of a dot product" would be the length of $$|\vec{a}|$$ amount of $$\vec{b}_a$$ vectors stacked tip to tail the way you are thinking about it. Or: the magnitude of $$|\vec{a}| \cdot \vec{b}_a$$. A possibly better way to think of it, is a product of the cosine of the angle between the two vectors and the magnitude of both vectors, since a good deal of the time when we discuss dot products of vectors we are concerned with their angle.