The following equation can be easily proved with induction (using $(a+b)^2=a^2+2ab+b^2$):
$$\left(\sum\limits_{i=1}^n a_i\right)^2 = \sum\limits_{i=1}^n a_i^2 + 2\sum\limits_{1\leq i<j\leq n} a_ia_j$$
Do you have some intuitive explanation why is this equation true?
