sequences and recursion
Summation Notation
You should know: sequences and series
Overview
Summation notation (sigma notation) is a compact way to write the sum of a sequence of terms without writing out every addend. The capital Greek letter Σ (sigma) stands for 'sum,' and an expression like Σᵢ₌₁ⁿ aᵢ means 'add up the terms aᵢ as the index i runs from 1 to n.' The index variable is a placeholder — it takes each integer value in the given range exactly once, and the notation says nothing about how the sum is computed, only what is being added. Sigma notation is indispensable for writing series, statistical formulas (means, variances), polynomial expansions, and algorithm running-time analyses concisely, and it comes with a small set of algebraic rules (linearity, splitting, reindexing) that let sums be manipulated symbolically before any arithmetic is done.
Intuition
Think of Σ as a for-loop written in math: the bottom of the sigma sets the starting value of a counter, the top sets the stopping value, and the expression to the right is what gets accumulated on each pass. Just as a for-loop's accumulator doesn't care what the loop variable is named, Σᵢ₌₁ⁿ i² and Σⱼ₌₁ⁿ j² are exactly the same sum — the index is a dummy variable, invisible outside the sum. This loop picture also explains the algebra rules: splitting a range is just breaking one loop into two consecutive loops, and linearity is running two accumulators side by side versus one accumulator that does both additions per step.
Formal Definition
For a sequence of terms indexed by integers, the sum from index m to index n (m ≤ n) is written and defined as:
Derivation
Gauss's trick for the sum of the first n positive integers: write the sum forwards and backwards, then add term by term.
Sum written forwards
Same sum written backwards
Add the two equations term by term; each column sums to n+1
Divide by 2
Worked Examples
Write out each term for i = 1 through 5.
Simplify each term.
Add them up.
Answer: 35
Practice Problems
Evaluate Σᵢ₌₁⁴ i².
Use Gauss's formula to evaluate Σᵢ₌₁²⁰ i.
A class of students records daily step counts for a week as aᵢ for i = 1 to 7, and Σᵢ₌₁⁷ aᵢ = 63,000. If the average daily step count is defined as (1/7)Σᵢ₌₁⁷ aᵢ, what is the average?
Quiz
Summary
- Σᵢ₌ₘⁿ aᵢ means 'add the terms aᵢ for each integer i from m to n'; i is a dummy variable.
- Summation is linear: it distributes over addition and pulls out constant multiples.
- A sum can be split at any interior point into two consecutive sums covering the same range.
- Gauss's formula Σᵢ₌₁ⁿ i = n(n+1)/2 comes from pairing the sum with its reverse.
References
- WebsiteWikipedia — Summation
Mathematics