I want to define the scalar product by $\vec a \cdot \vec b = | \vec a | |\vec b | \cos(\varphi)$ and derive $\vec a \cdot \vec b = a_1 b_1 + a_2 b_2$. Algebraically, this is no problem (we can just expand the vectors in the standard basis).
How do I show this by using only elementary geometry? I've drawn the areas of the rectangles $a_1 b_1$, $a_2 b_2$ and $| \vec a | \cos(\varphi) \cdot |\vec b | $but I don't see why they should be equal.
/edit: I'm really interested in the general case and in using elementary geometry, not in getting an elegant proof which involves rotations.


One way is to compute the (square of the) red length two ways, and equate the two.
On the one hand, Pythagoras tells us that the red length is the hypotenuse of a right triangle, whose legs have length $|a_1 - b_1|$ and $|a_2 - b_2|$, so the square of its length must be $$|a_1 - b_1|^2 + |a_2 - b_2|^2 = (a_1 - b_2)^2 + (a_2 - b_2)^2$$
On the other hand, the Law of Cosines tells us that the square of the red length is $$|a|^2 + |b|^2 - 2|a||b|\cos(\varphi) = (a_1^2 + a_2^2) + (b_1^2 + b_2^2) - 2|a||b|\cos( \varphi )$$
Since these are equal, we have $(a_1 - b_2)^2 + (a_2 - b_2)^2 = (a_1^2 + a_2^2) + (b_1^2 + b_2^2) - 2|a||b|\cos( \varphi )$
It looks like a mess, but if you multiply out the squares on the left side, you get a bunch of cancellation (with the squares on the right), and before long, $a_1b_1 + a_2b_2 = |a||b|\cos( \varphi )$ pops out.