My professor didn't specify how we had to prove this but I'm assuming it should be done by induction. If not a point in the right direction would be much appreciated. Thank you.
-
1Try it by hand for small values of $n$. A pattern will emerge. – Neal Sep 17 '17 at 21:06
-
You could also use linearity of sums – klirk Sep 17 '17 at 21:13
4 Answers
$$\sum_{i=1}^n\sum_{j=1}^n(i-j)=\sum_{i=1}^{n}\left(\sum_{j=1}^ni-\sum_{j=1}^nj\right)=\sum_{i=1}^n\left(ni-\sum_{j=1}^nj\right)=n\sum_{i=1}^ni-\sum_{i=1}^n\sum_{j=1}^nj$$ $$=n\sum_{i=1}^ni-n\sum_{j=1}^nj=n\left(\sum_{i=1}^ni-\sum_{j=1}^nj\right)=n\left(\sum_{k=1}^nk-\sum_{k=1}^nk\right)=n\cdot 0 =0$$
- 2,796
Induction would be an overkill.
Just use : The summand corresponding to some pair $(i,j)$ with $i<j$ cancels out with the summand corresponding to the pair $(j,i)$. If $i=j$ , the summand is $0$.
- 84,454
$\sum_{i=1}^n i = \sum_{j=1}^n j = \frac{n(n+1)}{2}$ (the exact number is irrelevant, call it $S_n$ as it only depends on $n$).
Then: $$\sum_{i=1}^n \sum_{j=1}^n (i-j) = \sum_{i=1}^n (ni - \sum_{j=1}^n j) = \sum_{i=1}^n (ni - S_n) = n(\sum_{i=1}^n i ) - nS_n = nS_n -nS_n = 0$$
where we use that in a sum over $i$ we can get the terms with $j$ out of that sum because these are constant in $i$, etc.
- 242,131
Lets say $\sum_{i,j}(i-j)=S$. But $$-S=-\sum_{i,j}(i-j)=\sum_{i,j}(j-i)=\sum_{j,i}(j-i)$$ is the same sum with renamed indices. Hence $-S=S$ and therefore $S=0$.
- 29,928