10

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 : enter image description here

Pop Flamingo
  • 807
  • 1
  • 8
  • 17
  • @Masacroso Thank you !!! – Pop Flamingo Sep 18 '16 at 15:06
  • 1
    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
  • 1
    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
  • @fleablood I understand, I hadn't correctly written my question... Thank you ! :) – Pop Flamingo Sep 18 '16 at 15:50
  • "As long as the expression that comes after the sums is the same is both cases ?" But it's NOT the same. In one you are adding $(f_{0,0}+...+f_{0,n}) + ....+(f_{m,0}+...+f_{m,n})$ and the other you are adding $(f_{0,0}+...+f_{0,m}) + ....+(f_{n,0}+...+f_{n,m})$. Different terms altogether. – fleablood Sep 18 '16 at 15:54
  • Also, if those are matrices, remember addition is commutative but multiplication isn't. (That doesn't affect this problem). – fleablood Sep 18 '16 at 15:56

3 Answers3

18

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.

E. Joseph
  • 14,843
  • 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 ? – Pop Flamingo 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... – Pop Flamingo Sep 18 '16 at 15:20
  • @TrevörAnneDenise I edited too. – E. Joseph Sep 18 '16 at 15:22
  • But if you switch the order of the sums and correct the indices it will work. – fleablood Sep 18 '16 at 15:45
  • 2
    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 08:23
  • @CiaPan I agree, someone added the $f_ab/f_ba$ on my post. – E. Joseph Sep 19 '16 at 08:26
8

Your illustration is fine:

$\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.

fleablood
  • 124,253
5

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.

Dietrich Burde
  • 130,978