Geometric and algebraic definitions of the dot product , proof of equivalence? I came upon this proof of equivalence between the geometric and algebraic definitions of the dot product. I do not understand why this person multiplies the two vectors together, that's not the dot product. The dot product is the product of the component of one vector going in the same direction as the other, and the other one itself. Why would this person multiply the two actual vectors together to get the algebraic definition when this I not the dot product?
Here is the proof:
$$\vec{a} \cdot \vec{b} = \left|\vec{a} \right|\cdot \left| \vec{b} \right| \cos \theta$$
Decomposing the vector into its unit vectors (assuming 2D for simplicity):
$$\begin{eqnarray}
a &=& a_x\hat{i}  + a_y \hat{j}\\
b &=& b_x \hat{i} + b_y \hat{j}
\end{eqnarray}$$
Multiplying the two vectors (loosely using the term 'multiplication') i.e., taking their dot product literally:
$$\vec{a} \cdot \vec{b}
 = a_x \hat{i} \cdot b_x \hat{i}
 + a_x \hat{i} \cdot b_y \hat{j}
 + a_y \hat{j} \cdot b_x \hat{i}
 + a_y \hat{j} \cdot b_y \hat{j}
 = a_x b_x + a_y b_y,
$$
since $\hat{i} \cdot \hat{i} = 1$ and $\hat{i} \cdot \hat{j} = 0$ (i.e., angle between $\hat{i}$ and $\hat{j}$ is $90^\circ$) and that $a_x,a_y,b_x,b_y$ are scalars.
Q.E.D.
 A: The proof assumes that the dot product is linear, which is not trivial to prove without the standard algebraic definition.
The more straightforward proof would be as follows: Create a triangle with the two vectors $a$ and $b$ so that the third side is $a-b$. Define the dot product as $a\cdot b=a_1b_1+a_2b_2$. Then note that $$||x||^2=x_1^2+x_2^2=(x_1,x_2)\cdot (x_1,x_2)$$ so the magnitude squared of a vector equals the vector dotted with itself. Then by the law of cosines, letting $\theta$ denote the angle between $a$ and $b$ and recalling that $a-b$ is the side opposite $\theta$ we get $$||a-b||^2=||a||^2+||b||^2-2||a||\,||b||\cos\theta$$ Using the magnitude squared/dot product relationship above gives $$(a-b)\cdot (a-b)=a\cdot a+b\cdot b-2||a||\,||b||\cos\theta$$ Clearly the dot product is linear and symmetric by our algebraic definition, so the left side can be re-written as $$a\cdot a+b\cdot b-2a\cdot b=a\cdot a+b\cdot b-2||a||\,||b||\cos\theta$$ from which it follows that $$a\cdot b=||a||\,||b||\cos\theta$$ 
A: Consider the following, doing the $2$-D case, which can be generalized to $n$-D.
Vector $A$ with coordinates $(x_A,y_A)$
Vector $B$  with coordinates $(x_B,y_B)$

The dot product of those two vectors is :
\begin{align*}
A\cdot B &= AB\cos(\theta) \\
&= AB\cos(\alpha−\beta)\qquad(\mathrm{since}\,\theta=\alpha-\beta) \\
&= AB(\cos(\alpha)\cos(\beta) + \sin(\alpha)\sin(\beta)) \\
&= AB\cos(\alpha)\cos(\beta) + AB\sin(\alpha)\sin(\beta) \\
&= A\cos(\alpha)B\cos(\beta) + A\sin(\alpha)B\sin(\beta) \\
&= x_Ax_B + y_Ay_B
\end{align*}
