$$\sum_{i=1}^ni\;=\;\sum_{i=1}^n(n-i+1)\;=\;\sum_{i=0}^{n-1}(n-i)$$
I'm confused as to how this is true. It's in my textbook, but there's no explanation as to why it's true.
$$\sum_{i=1}^ni\;=\;\sum_{i=1}^n(n-i+1)\;=\;\sum_{i=0}^{n-1}(n-i)$$
I'm confused as to how this is true. It's in my textbook, but there's no explanation as to why it's true.
The second summation is basically the first summation, but it iterates itself backwards. Where the first is
$$1+2+3+ \cdots + n$$
the second is
$$n + (n-1) + (n-2) + \cdots + 2 + 1$$
This becomes very clear if you, instead of using an abstract "$n$", you try it for a particular value of $n$. Try $n=2,3,4,5$, see if you notice a pattern, if the above explanation doesn't convince you.
The third summation is just an index shifting of the second. This is easier to see if we use a different index. Let $m = i-1$. Then $i=m+1$. If $i=1$, then $m=0$. If $i=0$ then $m= n-1$, allowing us to manipulate the upper and lower bounds for the sum. We can also replace the $i$ in the summation with $m+1$ and simplify: we see
$$\sum_{i=1}^n (n-i+1) = \sum_{m=0}^{n-1} (n-m+1-1) = \sum_{m=0}^{n-1} (n-m)$$
You can at this point choose to rename the index $i$ again: $m, i, j, k,$ whatever name you want to give it isn't particularly important.
One might ask "why do we perform an 'index shift', then, if the expressions are equivalent?" The basic idea is that it might make it easier to apply certain identities, or it might just make the final expression look neater or make it easier to calculate. It all depends on the context.