# Why is the dot product of the vector and itself equals to the length of the vector squared?

So by intuition, the dot product of two vectors gives how much one vector is going in the direction of the other.

By this logic, one would think that the dot product of the a vector and itself would be equal to the length of the given vector, since the vector is going wholly in its own direction, but this doesn’t seem to be the case.

So could someone please explain the error in my logic, and please don’t use algebraic proves because those are hard to understand intuitively. I thank you in advance!

• The length of vector $v$ in the direction of vector $w$ is not $v \cdot w$ unless $\|w\|=1$. In general it's $v \cdot w/\|w\|$. Maybe that's the source of your confusion. An intuitive explanation of why that is true is to think about multiplying $w$ by some positive constant $c$. That would not change the direction of $w$, so we wouldn't expect it to change the length of $v$ in the direction of $w$. – Joe May 17 at 19:49
• So, in short, is my intuition regarding dot product incorrect? If so, what would be a better intuition? – MINH TO May 17 at 20:01
• @MINHTO It's proportional to both parts, but $x\cdot x$ is "proportional" to $x$ both times. – J.G. May 17 at 20:07
• The dot product of two vectors of magnitudes $a$ and $b$ is proportional each of $a$ and $b$, and increases from $-ab$ to $ab$ as the angle between them decreases from $180^\circ$ to $0^\circ.$ Your intuition, which is that the dot product of two vectors increases as the angle between them decreases from $180^\circ$ to $0^\circ,$ is consistent with this, and is merely missing the range $[-ab,ab].$ – Ryan G May 17 at 20:08

It might help to distinguish three different things here:

The dot product of $$A$$ and $$B$$ is $$A\cdot B = |A||B| \cos \theta$$.

The vector projection of $$B$$ on $$A$$ is $$|B| \cos \theta \cdot \frac{A}{|A|} = |B| \cos \theta \cdot \hat A$$.

The scalar projection of $$B$$ on $$A$$ is $$|B| \cos \theta$$.

If you have two vectors that point in the same direction, say $$A = (3,0)$$ and $$B = (5,0)$$, their dot product is $$15$$, the product of their magnitudes.

The vector projection of $$B$$ on $$A$$ would be $$(5,0)$$. The scalar projection would be $$5$$.

Apologies for a tiny amount of algebra.

The dot product $$x\cdot x$$ is $$\sum_ix_i^2$$. Even in $$1$$-dimensional space, this is $$x^2$$, the length squared. In the $$2$$-dimensional case, we again get a squared length by the Pythagorean theorem. Every time the dimension increments by $$1$$, this remains true, again by the Pythagorean theorem. For example, if $$x$$ is a $$3$$-dimensional vector, it can be thought of as the longest diagonal of a cuboid, and hence the hypotenuse of a right-angled triangle, whose other two sides are an edge and the hypotenuse of another right-angled triangle.

The intuitive reason why the length is squared is because $$x\cdot x$$ is a product of two $$x$$s, and has units of length squared. It can no more have the units of length than can the base-times-height area of a rectangle. One more way to make sense of it is that if $$x$$ doubles, $$x\cdot x$$ becomes$$(2x)\cdot(2x)=4x\cdot x.$$Doubling a vector quadruples its squared length, not the length itself.

As @Joe noted, $$x$$'s projection onto $$y$$ is of length $$\frac{x\cdot y}{\Vert y\Vert}$$ and is $$\frac{x\cdot y}{\Vert y\Vert}\frac{y}{\Vert y\Vert}=\frac{x\cdot y}{y\cdot y}y$$, so the projection of $$x$$ onto itself is $$\frac{x\cdot x}{x\cdot x}x=x$$. Note $$x\cdot x$$ itself has become irrelevant here.