Summation \sum

The summation symbol \sum does, as the name suggest, sum things. The symbol is a capital greek letter "Sigma", so Sigma for sum.

Basic form: i=0nfi\sum\limits_{i=0}^{n}f_i or i=0nfi\sum_{i=0}^n f_i

Parts:

Meaning: Sum each term fif_i, starting at i=0i=0 and ending at i=ni=n. If the upper stop value is lower than the initial value, then the sum is 00, e.g. i=10=0\sum\limits_{i=1}^0 = 0.

Code:

Index variants in\sum\limits_{i}^n, i\sum\limits_{i}

Sometimes, authors don't explicitly write down the ranges of the iteration variables. In these cases, you will have to check the descriptions, what exactly is meant.

In general, this notation will just mean: "If it isn't written down, use the default full range".

If no lower initial value is given, this is generally the "first" index. So if the formula iterates over an array or some kind of numbered sequence of elements, it will start at 0 (though you might need to be careful, since sometimes mathematicians and some programming languages start with 1!).

If no upper end value is given, this is generally the "last" index. Again, for an array or numbered sequence, this will be "length - 1" (or "length" for 1-based indices).