Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the following, which one of the following is true ??

$$\left( \sum^{n-1}_{j=0}Z_j\right)^2 = \sum^{n-1}_{j=0} Z_j^2 + \sum^{n-1}_{j\neq i} Z_i Z_j$$


$$\left( \sum^{n-1}_{j=0}Z_j\right)^2 = \sum^{n-1}_{j=0} Z_j^2 + \sum^{n-1}_{j< i} Z_i Z_j$$

There is a difference between $j \neq i $ and $j < i$ in the above expressions. But I dont know how to think through this.

Please help me out. Thanks

share|cite|improve this question
Try with $n = 3$. – Damien L Mar 13 '13 at 12:18
$n=2$ is enough. – user1551 Mar 13 '13 at 12:19
up vote 12 down vote accepted

The first one is correct. Remember that the summation would be applied on all $(i,j)$ pairs that satisfy the very condition. Actually we have $$\sum\limits_{j\neq i}Z_iZ_j=\sum\limits_{j<i}Z_iZ_j+\sum\limits_{j>i}Z_iZ_j=2\sum\limits_{j<i}Z_iZ_j$$ Thus $$\left(\sum\limits_{j=0}^{n-1}Z_j\right)^2=\sum\limits_{j=0}^{n-1}Z_j^2+\sum\limits_{j\neq i}Z_iZ_j=\sum\limits_{j=0}^{n-1}Z_j^2+2\sum\limits_{j<i}Z_iZ_j$$

A detailed deduction may be $$\begin{array}{ccl} \left(\sum\limits_{j=0}^{n-1}Z_j\right)^2&=&\left(\sum\limits_{i=0}^{n-1}Z_i\right)\left(\sum\limits_{j=0}^{n-1}Z_j\right)\\ &=&\sum\limits_{j=0}^{n-1}Z_j\left(Z_j+\sum\limits_{j\neq i}Z_i\right)\\ &=&\sum\limits_{j=0}^{n-1}Z_j^2+\sum\limits_{j\neq i}Z_iZ_j\\ \end{array}$$ You can also think it in the following way. Let each $Z_j$ equal 1. Then $LHS$ would equal $n^2$, which implies that there would be $n^2$ terms totally. Check $RHS$ and you will find the number of such $(i,j)$ pairs that $i<j$ is $\frac{n^2-n}{2}$ while the number of such $(i,j)$ pairs that $i\neq j$ is $n^2-n$. Thus $i\neq j$ should be the correct answer.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.