

Discover more from The Palindrome
One of the most common questions I get: “What is that Σ symbol?“
After 16 years of working with them, I routinely use the “Σ symbol”, a.k.a. the sum, but it was not always like that. As a freshman, I recall watching in terror the multitude of sums stacked on each other, feeling utterly confused about what was in front of me. Being comfortable with summation is not the default.
So, I am painfully aware of what you are feeling.
To help you, here’s a brief guide, with an infographic at the end. (If you are already comfortable with summation, you might want to skip this issue.)
By definition, the capital Greek sigma (Σ) symbolizes repeated addition, which is called summation. We mainly use this to sum sequences, that is, numbers indexed by integers.
In most programming languages, summation can be implemented via a for loop. (There are other approaches, like in Haskell, where summation is done via a recursion.)
Here it is in Python:
The sequence-to-be-summed is called the summand, while the variable that determines which terms are being added is called the running index. The lower and upper bounds of the running index are indicated above and below the Σ.
For instance, here is the sum of the first n squares. (I omitted the color highlighting to give you a bit of a challenge.)
If you want to practice getting comfortable with summation, here is an exercise: I’ll describe the sum in words, and you write it down with mathematican symbols. (Solutions are at the end of this post.)
The sum of the first 16 cube numbers.
The sum of the Fibonacci numbers from the 8-th to the 22-th (both endpoints included). Denote the n-th Fibonacci number by Fₙ.
The sum of the values of the trigonometric sin function at integer multiples of π/8, for integers between -10 and 10.
The running index can be more complicated, there might even be multiple running indices. In case of a double index, we are talking about a double sum as well.
As the order of addition doesn’t matter (because, you know, a + b = b + a), the order of the sums can be switched.
You can imagine this double sum as laying out the summand in a table form, then adding its members together via either row-first or column-first style.
As a bonus, I made a visual summary. One that you can glance at to get a summary of the post. (From now on, I’ll aim to make these infographics for all of my future posts.)
As promised, here are the solutions for the exercises.
Epsilons, no. 6: What is that Σ?
Why does your python script start with a sequence of squares when the equation shows a simple sum?