Does changing the order of sigma notation matter? 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)$$
 A: 
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)$.
A: 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.
