Expressing the sum of all elements of a n x n matrix above the main diagonal (including) I have a $n\times n$ matrix and I need to express with sigma notation all the elements  of the matrix above the main diagonal (including the main diagonal). 
So basically this is my sum: $$a_{1}^{1}+a_{2}^{1}+\ldots+a_{n}^{1}+a_{2}^{2}+a_{3}^{2}+\ldots+a_{n}^{2}+\ldots+a_{n-1}^{n-1}+a_{n}^{n-1}+a_{n}^{n}\\=\sum_{i=1}^{n}a_{i}^{1}+\sum_{i=2}^{n}a_{i}^{2}+\ldots+\sum_{i=n-1}^{n}a_{i}^{n-1}+\sum_{i=n}^{n}a_{i}^{n}$$
I think that it can be expressed thus: $\underset{i\le j\le n}{\underset{1\le i\le n}{\sum}}a_{j}^{i}$ but I'm not sure about it. I'm also trying to figure whether it can be expressed like this: $\sum_{j=i}^{n}\sum_{i=1}^{n}a_{j}^{i}$ or like this: $\sum_{i=1}^{n}\sum_{j=i}^{n}a_{j}^{i}$ and which of them is the correct way to express the sum. 
If someone can explain how double sigmas with two related indices work it will help a lot. What I specifically don't understand is which index and which sum gets the priority.
 A: First of all, the notation $a^{i}_j$ is potentially dangerous, since it might represent the $i$-th power of $a_j$. Thus I will revert to the standard notation $a_{i,j}$. That being said, a concise way to write your sum is 
$$
\sum_{1 \leqslant i\leqslant j \leqslant n}a_{i,j}
$$
which means "sum of all coefficients $a_{i,j}$ such that ${1 \leqslant i\leqslant j \leqslant n}$".
A: In the expression $\sum_{j=i}^{n}\sum_{i=1}^{n}a_{j}^{i}$, the first $i$ is unbound because it is not in the scope of the second $\sum$. Hence, it is unrelated to the second $i$ : this expression depends on $i$ and is equal to $\sum_{j=i}^{n}\sum_{{\color{red}k}=1}^{n}a_{j}^{{\color{red}k}}$.
The sum of all elements above diagonal is $\sum_{i=1}^{n}\sum_{j=i}^{n}a_{j}^{i}$.
A: It is more convenient to express the entries of the matrix as $a_{ij}$. Note that your expressions include the terms in the main diagonal. If you want to sum only those above the main diagonal, but not including those in the main diagonal, this changes your expression a bit. Let me elaborate a little more on the latter. If you want to sum the terms above the main diagonal, when summing the first row, you would have $a_{12}+a_{13}+\cdots+a_{1n}$. When you pass to the second row, the sum becomes $a_{12}+a_{13}+\cdots+a_{1n}+a_{23}+a_{24}+\cdots+a_{2n}$. Note that, every time you change to the next row, your $j$ index starts one number ahead. So, when you finish the summation, you would have $\sum_{i=1}^{n-1}\sum_{j=1}^{n-1}a_{i,j+1}$. Note that there is no term above the $a_{nn}$ term. 
