Double summation identity I'm trying to understand the following identity from here
$$\sum_{k\le j \le i\le n} a_{i,j} = \sum_{i=k}^n\sum_{j=k}^i a_{i,j} = \sum_{j=k}^n\sum_{i=j}^n a_{i,j} =
\sum_{j=0}^{n-k}\sum_{i=k}^{n-j} a_{i+j,i}$$
There seems to be more than just index shifts involved. Can somebody explain the steps to me? Also how does one translate the index inequality in the first sum to a proper double sum? Are there some tricks one could use when being presented with some double sum? 
 A: The best way to understand it is to draw the set of couples $(i,j)$ such that
$$k\le j\le i\le n$$
as this

The cases where there are the stars are the set of desired couples and for example the first equality is to sweep these couples by rows:
$$\underbrace{(a_{k,k})}_{\text{first row}}+(a_{k+1,k}+a_{k+1,k+1})+\cdots+\underbrace{(a_{n,k}+a_{n,k+1}+\cdots+a_{n,n})}_{\text{last rows}}$$
A: You already received an answer to the main question.
You can write the summation as:$$\sum_{i=k}^n\sum_{j=k}^n a_{i,j}[j\leq i]$$ where $[j\leq i]$ denotes the function that takes value $1$ if $j\leq i$ and takes value $0$ otherwise.
This to get rid of the inequality in the first sum.
A: The inequality in $\sum_{k\le j \le i\le n} a_{i,j}$ means that you are summing up all $a_{i,j}$ with $i,j$ satisfying $k\le j\le i \le n$. ( $i, j$ are just dummy variables in this case)  
It will make sense if you read the double summation from the left to the right. The first $\sum_{i=k}^n$ means that you are summing from $i=k$ to $i=n$ so it's necessary that $k\le i\le n$. Then you read the second sum, $\sum_{j=k}^i$, which means summing from $j=k$ to $j=i$, so it's necessary that $k\le j\le i$. Combining $k\le i\le n$ and $k\le j\le i$ yield $k\le j\le i \le n$.   
For $\sum_{j=k}^n\sum_{i=j}^n a_{i,j}$, reading from the left to the right leads to $k\le j\le n$ and $j\le i\le n$, which again yield $k\le j\le i \le n$. 
Finally, $\sum_{j=0}^{n-k}\sum_{i=k}^{n-j} a_{i+j,i}$ indicates that $0\le j\le n-k$ and $ k\le i\le n-j$, which leads to $k\le i\le j+i \le n$. Then you notice in this case the terms are $a_{i+j,i}$ instead of $a_{i,j}$, but with the inequality changed it still means the same summation.
BTW, check out user296113's picture, it's easier to understand visually.
A: The two indices $i$ and $j$ run from $k$ to $n$, with $j\leq i$. 
In the second sum, you start with the index $i$ (from $k$ to $n$),
and then $j$ runs from $k$ to $i$ (as $j\leq i$).
In the third sum, you start with $j$ (from $k$ to $n$), and then
$i$ runs from $j$ to $n$.
In the last sum, there is a re-indexation. The indices $i$ and $j$
don't have the same meaning as before. If you want to understand better,
give them another name, say $p$ and $q$, so the last sum becomes
${\displaystyle \sum_{q=0}^{n-k}\sum_{p=k}^{n-q}a_{p+q,p}}$. Now,
in the second sum, put $j=p$ and $i=n-q$, that is $p=j$ and $q=n-i$. 
So, when $i$ runs from $k$ to $n$, $q=n-i$ runs (backwards) from
$n-k$ to $0$. And $p=j$ runs from $k$ to $i=n-q$.
