how is this series expansion $(\sum\limits_{i=1}^n{x_{i}})^2=(\sum\limits_{i=1}^n{x_{i}^2}+\sum\limits_{iI'm reading my vector calculus text when I encountered below formula.
$(\sum\limits_{i=1}^n{x_{i}})^2=(\sum\limits_{i=1}^n{x_{i}^2}+\sum\limits_{i<j}{2x_{i}x_{j}})$
Is this a definition or there's a proof for above?  
 A: Consider the array
$$\left[ \begin{array}{cccc} \color{red}{x_1^2} & \color{green}{x_1x_2} & \color{blue}{x_1x_3} & x_1x_4&&& \ldots &x_1x_n \\ \color{green}{x_1 x_2} & \color{red}{x_2^2} & x_2x_3 & x_2x_4 
&&&\ldots & x_2x_n \\  \color{blue}{x_1x_3} & x_2x_3 & \color{red}{x_3^2} & x_3x_4 &&&\ldots & x_3x_n \\ x_1x_4 & x_2x_4 & x_3x_4 & \color{red}{x_4^2} & x_4x_5 &&\ldots & x_4x_n  \\ &&&\vdots & \color{red}{\ddots} \\ &&&\vdots \\ &&&\vdots  \\ x_1x_n & x_2x_n & \ldots &&&&\ldots & \color{red}{x_n^2}\end{array}\right].$$
This is the array consisting of all terms in the expansion of $(x_1+\ldots + x_n)^2$. Notice that the array is symmetric about the diagonal. So therefore we just need to notice that 
$$\begin{eqnarray*} \left(\sum_{i=1}^n x_i\right)^2 = (x_1 + \ldots+ x_n)^2 &=& \text{(sum of all terms along the diagonal)} \\
&& \hspace{16mm}+ \text{($\color{red}{twice}$ the sum of all terms above the diagonal)}\\
&=& \sum_{i=1}^n x_i^2 + 2\sum_{i < j} x_ix_j.\end{eqnarray*}$$
$\hspace{6in} \square$
A: It's easily proved by induction using $(x_1+x_2)^2=x_1^2+2x_1x_2+x_2^2$ as the base case but it's actually more useful to "see" why it's true (replace the $\Sigma$'s with dots if it helps).
A: You can use multinomial theorem.
