Simplifying the sum $\sum\limits_{i=1}^n\sum\limits_{j=1}^n x_i\cdot x_j$ How can I simplify the expression $\sum\limits_{i=1}^n\sum\limits_{j=1}^n x_i\cdot x_j$?
$x$ is a vector of numbers of length $n$, and I am trying to prove that the result of the expression above is positive for any $x$ vector.  Is it equal to $\sum\limits_{i=1}^n x_i\cdot \sum\limits_{j=1}^n x_j$? If it is then my problem is solved, because $\left(\sum\limits_{i=1}^n x_i\right)^2$ is non-negative (positive or zero).

Yes,
$$\sum_{i=1}^n\sum_{j=1}^nx_i x_j=\left(\sum_{i=1}^ nx_i\right)^2\;.$$
To see this, let $a=\sum_{i=1}^ nx_i$; then
$$\sum_{i=1}^n\sum_{j=1}^nx_i x_j=\sum_{i=1}^n\left(x_i\sum_{j=1}^nx_j\right)=\sum_{i=1}^na x_i=a^2\;.$$
