4

Can you change the order of summation like this and play around? If no, then what does it change?

$$ \displaystyle\sum\limits_{i=a}^{b} \sum\limits_{j=p}^{q} f(i) g(j) =\sum\limits_{j=p}^{q} \sum\limits_{i=a}^{b} f(i) g(j)=\sum\limits_{i=a}^{b} f(i) \sum\limits_{j=p}^{q} g(j)$$

I'm guessing yes, but just to be safe, I'm asking the question.

And can I do the same with,

$$ \displaystyle\sum\limits_{i=a}^{b} \sum\limits_{j=p}^{q} f(i,j)$$

William
  • 4,893
  • Totally fine. Try to list them in a table, or a grid. Then add them line by line or column by column. – xbh Aug 12 '18 at 11:52
  • 1
    Your changes are fine. Of course we need ot note that none of $a,b,p,q$ involves $i,j$. For example, your simple changes do not work on $$\sum\limits_{i=0}^{n} \sum\limits_{j=i}^{n} f(i) g(j)$$ – GEdgar Aug 12 '18 at 12:32

2 Answers2

3

In finite sums we can freely change the order of summation. We have \begin{align*} \color{blue}{\sum_{i=a}^{b}}&\color{blue}{ \sum_{j=p}^{q} f(i) g(j)}\\ &=f(a)g(p)+f(a)g(p+1)+\cdots f(a)g(q)\\ &\qquad+f(a+1)g(p)+f(a+1)g(p+1)+\cdots+f(a+1)g(q)\\ &\qquad\ \ \vdots\\ &\qquad+f(b)g(p)+f(b)g(p+1)+\cdots f(b)g(q)\tag{1}\\ &=\color{blue}{\sum_{j=p}^{q}\sum_{i=a}^{b} f(i) g(j)}\\ &=f(a)g(p)+f(a+1)g(p)+\cdots+f(b)g(p)\\ &\qquad+f(a)g(p+1)+f(a+1)g(p+1)+\cdots+f(b)g(p+1)\\ &\qquad\ \ \vdots\\ &\qquad+f(a)g(q)+f(a+1)g(q)+\cdots+f(b)g(q)\tag{2}\\ &\,\,\color{blue}{=\sum_{i=a}^{b}f(i) \sum_{j=p}^{q} g(j)}\\ &=f(a)\left(g(p)+g(p+1)+\cdots+g(q)\right)\\ &\qquad+f(a+1)\left(g(p)+g(p+1)+\cdots+g(q)\right)\\ &\qquad\ \ \vdots\\ &\qquad+f(b)\left(g(p)+g(p+1)+\cdots+g(q)\right)\tag{3}\\ \end{align*}

Note that (1), (2) and (3) are the same since we can go from one to the other by applying a finite number of times the laws of associativity, commutativity of addition and multiplication as well as the law of distributivity.

Analogously we can apply these laws to the more general double sum $\sum_{i=a}^{b} \sum_{j=p}^{q} f(i,j)$.

Markus Scheuer
  • 108,315
1

Of course, just write down a matrix $A$ with entries $a_{i,j} = f(i)g(j)$. Then you can see that sumation of entries over all rows is the same as the sumation over all columns.

nonuser
  • 90,026
  • I've edited the question, I accidentally pressed submit without completing the question – William Aug 12 '18 at 11:54
  • It doesn't change a thing. – nonuser Aug 12 '18 at 11:55
  • Just lemme know, am I doing it the right way or not, $ \displaystyle\sum\limits_{i=a}^{b} \sum\limits_{j=p}^{q} f(i,j) = \sum\limits_{i=a}^{b} \left( f(i,p) + f(i, p+1) + \cdots + f(i,q) \right) $ right? Now I have to substitute the values of $i$ from $a$ to $b$ in "each" of those $f(i,...)$ right? So in total I'll have $\left(b-a+1\right) \cdot \left(q-p+1 \right)$ terms? Right? – William Aug 12 '18 at 12:06
  • 2
    To the proposer: Yes yes yes. But don't do this stuff with sums of $infinite$ sequences unless are the terms are all non-negative (or all non-positive) or you might end up with nonsense. – DanielWainfleet Aug 12 '18 at 18:17