Summation
The summation symbol does, as the name suggest, sum things. The symbol is a capital greek letter "Sigma", so Sigma for sum.
Basic form: or
Parts:
- : Name of the index with initial value
- : Last value of the named index. ATTENTION! The last index is inclusive, so will take on that value and not stop one before that
- : The -th summation term. This could be any expression using (or not using!)
Meaning: Sum each term , starting at and ending at . If the upper stop value is lower than the initial value, then the sum is , e.g. .
Code:
Index variants ,
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).