Dot Product of Vector with Itself

Theorem
Let $\vec u$ be a vector in the vector space $\R^n$.

Then $\vec u \cdot \vec u = \left\|{ \vec u }\right\|^2$ where $\left\|{ \vec u }\right\|$ is the length of $\vec u$.

Proof
Let $\vec u = \left({ u_1, u_2 , \ldots , u_n }\right)$. Then

Note
Because this theorem is used to prove the general (n-dimensional) case of Cosine Formula for Dot Product, this proof is circular the way we have defined the dot product.

However, some texts use the cosine formula as the definition of the dot product and derive the sum of products form as a consequence.

The two definitions are equivalent, so we have included this proof to show how the statement would be proved from the cosine definition.