# Expansion of the square of the sum of $N$ numbers

Do I need to cite any results to use the following equality

$$\left( \sum_{n=1}^N a_n \right)^2 = \sum_{n=1}^N a_n^2 + 2 \sum_{j=1}^{N}\sum_{i=1}^{j-1} a_i a_j$$

where $a_n \in \mathbb{R}\setminus{}\left\{0\right\}$ or $a_n \in \mathbb{Z}\setminus{}\left\{0\right\}$ for $n = 1,\ldots{},N$? It is the definition of the second exponent of sum of $N$ numbers.

I believe I have found a result related to the above expansion. It looks like it is a special case of the following equation (let $x=1$ and $a_0 = a_i = 0$ for $i>N$ ) which is given in (8) in the Power Sum page of WolframMath:

$$\left( \sum_{n=0}^\infty a_n x^n \right)^2 = \sum_{n=0}^\infty a_n^2 x^{2n} + 2 \sum_{\substack{n=1\\i+j=n\\i<j}}^{\infty} a_i a_j x^n.$$

However, I could not find any citations to the reference of this result.

• I think the title can be improved – Jorge Fernández Hidalgo Mar 13 '15 at 1:48
• Thank you! Apparently I have forgot it... – Halil ŞEN Mar 13 '15 at 1:49

## 1 Answer

I think this is well-known, but whether this can be used without proof depends on in which level of mathematics you are studying in. In fact there is an easy proof by induction on $N$.

When $N = 1$, then L.H.S. $= a_1^2 =$ R.H.S.

Assume $$\left(\sum_{n=1}^N a_n\right)^2 = \sum_{n=1}^N a_n^2 + 2 \sum_{j=1}^N \sum_{i=1}^{j-1} a_ia_j$$

Then \begin{align} \left(\sum_{n=1}^{N+1} a_n\right)^2 & = a_{N+1}^2 + 2a_{N+1}\sum_{n=1}^N a_n + \left(\sum_{n=1}^N a_n\right)^2\\ & = a_{N+1}^2 + 2a_{N+1}\sum_{i=1}^N a_i + \left(\sum_{n=1}^N a_n^2 + 2 \sum_{j=1}^N \sum_{i=1}^{j-1} a_ia_j\right)\\ & = \left(\sum_{n=1}^N a_n^2 + a_{N+1}^2\right) + 2\left(\sum_{j=1}^N \sum_{i=1}^{j-1} a_ia_j + \sum_{i=1}^{(N+1)-1} a_ia_{N+1}\right)\\ & = \sum_{n=1}^{N+1} a_n^2 + 2\sum_{j=1}^{N+1} \sum_{i=1}^{j-1} a_ia_j \end{align}

• Are the limits of the double sum correct? What happens when $j = 1$ in the double some? – user144410 Nov 7 '18 at 20:53