$(X_1+X_2+ X_3 + \cdots + X_n)^2 =$ $?$
with $X_i$'s $ \in \mathbb{R}$
Just from computing $(a+b+c)^2 = a^2 + b^2 + c^2 + 2ab + 2ac + 2bc$ I am guessing the general formula is:
$(x_1 + \cdots + x_n)^2 = x_1^2 + \cdots + x_n^2 + 2(x_1 x_2) + \cdots + 2(x_{n-1}x_n) = \sum_{i=1}^n{(x_i)^2} + \sum_{i\not=j}{2(x_i)(x_j)}$
Can someone verify this?
EDIT: Sorry lots of edits but I think I have finally come to what I think the general form is!
What you wrote is a little off, it must be either $$ \sum_{i=1}^n{(x_i)^2} + \sum_{i <j}{2(x_i)(x_j)}$$ or $$ \sum_{i=1}^n{(x_i)^2} + \sum_{i \neq j}{(x_i)(x_j)}$$