# Square of a generic sum of elements

The formula for computing the square of a generic sum of terms is as follows:

 $\left(\sum_{k=1}^{K}a_{k}\right)^{2}=\sum_{k=1}^{K}a_{k}^{2}+2\sum_{j=1}^{K}% \sum_{i

We can prove this property by induction, considering that it holds for K=2, since

 $(a+b)^{2}=a^{2}+b^{2}+2ab$

and that if the property holds for a generic K, then it holds also for K+1, as is proven in the following passages:

 \aligned\left(\sum_{k=1}^{K+1}a_{k}\right)^{2}&=\left(\sum_{k=1}^{K}a_{k}+a_{K% +1}\right)^{2}=\left(\sum_{k=1}^{K+1}a_{k}\right)^{2}+a_{K+1}^{2}+2\sum_{k=1}^% {K}a_{k}a_{K+1}\\ &=\sum_{k=1}^{K}a_{k}^{2}+2\sum_{j=1}^{K}\sum_{i (1)
Title Square of a generic sum of elements SquareOfAGenericSumOfElements 2013-03-22 19:34:48 2013-03-22 19:34:48 mat (27197) mat (27197) 8 mat (27197) Definition msc 15-01