# Is it possible to swap sums like that?

Say that I have two sums like this : $$\sum_{a=0}^n\sum_{b=0}^m f_{ab}$$

Would it be true to say that this expression can be considered as equal to :
$$\sum_{a=0}^m\sum_{b=0}^n f_{ab}$$

As long as the expression that comes after the sums is the same is both cases ? If it is true, is it easy to prove ?

Thank you !

EDIT : This is what I want to prove :

• @Masacroso Thank you !!! – Trevör Sep 18 '16 at 15:06
• I changed it back to the original question, no problem. But it is different, now. – Dietrich Burde Sep 18 '16 at 15:14
• Addition is commutative and associative. So it is valid. (For finite sums. Infinite... well, in this case it's okay be you must watch out for associativity abuse in general.) – fleablood Sep 18 '16 at 15:21
• Oh, ooops. I didn't notice that the upper limit terms were swapped. Of course, that is not allowed. That'd be like saying 1 + 2 is equal to 1+2 + 3+..... +1000. THat's a completely different statement altogether. – fleablood Sep 18 '16 at 15:23
• You can switch the varables around and (if they are finite sums) you can switch the order. But they must be labelled consistantly. Your illustration is. The text in your post is not. – fleablood Sep 18 '16 at 15:44

Not at all, look:

$$\sum_{a=1}^2\sum_{b=1}^3 \frac ab=\sum_{a=1}^2 \left(\frac a1+\frac a2+\frac a3\right)=\frac 11+\frac 12+\frac 13+\frac 21+\frac 22+\frac 23=\frac {11}2,$$

and

$$\sum_{a=1}^3\sum_{b=1}^2 \frac ab=\sum_{a=1}^3 \left(\frac a1+\frac a2\right)=\frac 11+\frac 12+\frac 21+\frac 22+\frac 31+\frac 32=9.$$

You can swap the sums, but not just what is on the top of your sum.

You do have for all finite sums:

$$\sum_{a=0}^n\sum_{b=0}^m f_{ab}=\sum_{b=0}^m\sum_{a=0}^n f_{ab}.$$

Edit

What you want to prove works because you are dealing with finite sums , and you changed the indices too.

• There is something that I don't understand, you say that this is true for all finite sums, but isn't your example a finite sum ? So,why isn't it working in your example ? – Trevör Sep 18 '16 at 15:14
• @TrevörAnneDenise Yes, but in my first example, notice that I didn't swap the sums. I only changed the indices on top of them. – E. Joseph Sep 18 '16 at 15:17
• oh I see ! Thank you ! I updated my question with an example of what I want to prove... – Trevör Sep 18 '16 at 15:20
• @TrevörAnneDenise I edited too. – E. Joseph Sep 18 '16 at 15:22
• This is definitely wrong: $$\sum_{a=0}^n\sum_{b=0}^m f_{ab}=\sum_{b=0}^m\sum_{a=0}^n f_{ba}$$ You must not swap $f$'s indices! For $m<n$ it may happen $f_{0m}$ exists while $f_{0n}$ does not. Should be: $$\sum_{a=0}^n\sum_{b=0}^m f_\color{red}{ab}=\sum_{b=0}^m\sum_{a=0}^n f_\color{red}{ab}.$$ – CiaPan Sep 19 '16 at 8:23

$\sum_{z=0}^k\sum_{u=0}^j A_{\alpha u}B_{uz}C_{zb}=$

$\sum_{u=0}^k\sum_{z=0}^j A_{\alpha z}B_{zu}C_{ub}$

That's just swapping out the variables $u$, and $z$. The variables are labels so it doesn't matter what we call them.

Then $\sum_{u=0}^k\sum_{z=0}^j A_{\alpha z}B_{zu}C_{ub}=$

$\sum_{z=0}^j\sum_{u=0}^k A_{\alpha z}B_{zu}C_{ub}$

This is fine as addition is commutative so it doesn't matter in what order you add them. (Should be careful about infinite sums however. Infinite sums and grouping abuse can lead to "cheating" paradoxes".)

But $\sum_{a=0}^n\sum_{b=0}^m f_{ab} \ne \sum_{b=0}^n\sum_{c=0}^m f_{ab}$

On the LHS you are adding $b$ up to $m$ (presumably a set number) and $a$ up to $n$. On the RHS you are adding $b$ up to $n$ and $a$ up to $m$. These are completely different results.

However the following are true.

$\sum_{a=0}^n\sum_{b=0}^m f_{ab} = \sum_{b=0}^m\sum_{a=0}^n f_{ab}=$

$\sum_{b=0}^n\sum_{a=0}^m f_{ba} = \sum_{a=0}^m\sum_{b=0}^n f_{ba}$

No matter how you label $f_{ij}$ the first $i$ or $j$ goes to $n$ and the second $i$ or $j$ goest to $m$ and the order of which you add first doesn't matter.

We have $$\sum_{a=0}^1\sum_{b=0}^2 (a+2b)=\sum_{a=0}^1 (3a+6)=6+9=15,\quad \sum_{a=0}^2\sum_{b=0}^1 (a+2b)=\sum_{a=0}^2 (2a+2)=2+4+6=12,$$ so it is different.