Search

Search papers and lessons

Summation Notation

Level 1 · 8 min read

The sigma sign adds up a formula over a range of index values, giving a compact way to write long sums and a set of rules for rearranging them.

On this page

TL;DR

The summation sign ∑\sum is a short way to write the addition of many terms. ∑i=1nai\sum_{i=1}^{n} a_i means "add aia_i for every whole number ii from 1 to nn". The letter ii is only a placeholder, and the notation comes with rules for shifting, splitting and rearranging sums.

Where you'll see it: in the average of a dataset, the expected value of a random variable, the dot product of two vectors, exponential moving averages, and the approximating sums behind the definite integral.

Intuition

Suppose a receipt has 40 line items and you need the total. Writing a1+a2+⋯+a40a_1 + a_2 + \dots + a_{40} forces the reader to guess the pattern behind the dots. "Add the price of item ii for ii from 1 to 40" says the same thing without guessing, and it works for 40 items or 40 million.

The symbol ∑\sum is the Greek capital sigma, the S of "sum". Read it as "the sum over". Every sum has three parts:

  • the index ii, which takes each value in turn. It is a dummy variable, so ∑iai\sum_i a_i and ∑kak\sum_k a_k mean the same thing;
  • the bounds, the smallest and largest index values, written below and above the sign;
  • the term, the expression added at each step, here aia_i.

Think of it as a loop. Set ii to the lower bound, add the term, increase ii by one, and stop after the upper bound. Most sums in later lessons are this loop written on one line.

The plot below shows a sum that grows by smaller and smaller steps. Each dot is a partial sum: the first term, then the first two terms, and so on.

0123456700.511.52number of terms addedpartial sum
  • limit 2
  • partial sums of 1 + 1/2 + 1/4 + ...
Partial sums of 1 + 1/2 + 1/4 + ... creep toward 2 but never pass it.

The math

Definition

Definition: Summation notation

For quantities am,am+1,…,ana_m, a_{m+1}, \dots, a_n that can be added, where mm and nn are integers with m≤nm \le n,

∑i=mnai=am+am+1+⋯+an.\sum_{i=m}^{n} a_i = a_m + a_{m+1} + \cdots + a_n.

The index ii takes every integer value from mm to nn inclusive. It exists only inside the sum, so it can be renamed freely.

Here mm is the lower bound, nn the upper bound, and aia_i the term. The number of terms is n−m+1n - m + 1. For example, ∑i=36ai\sum_{i=3}^{6} a_i has four terms, a3a_3 through a6a_6.

Rules that make sums manageable

These follow directly from the definition. Each one is a rewrite you can check by writing out a few terms.

  1. Renaming the index:
∑i=1nai=∑k=1nak.\sum_{i=1}^{n} a_i = \sum_{k=1}^{n} a_k.
  1. Constant factors and sums of sums (linearity):
∑i=1n(c ai+bi)=c∑i=1nai+∑i=1nbi,\sum_{i=1}^{n} \bigl(c\,a_i + b_i\bigr) = c \sum_{i=1}^{n} a_i + \sum_{i=1}^{n} b_i,

where cc does not depend on ii. A constant can be pulled outside the sum.

  1. A constant term: adding the same value cc a total of nn times gives
∑i=1nc=nc.\sum_{i=1}^{n} c = nc.
  1. Shifting the index: substituting j=i−1j = i - 1 gives
∑i=1nai=∑j=0n−1aj+1.\sum_{i=1}^{n} a_i = \sum_{j=0}^{n-1} a_{j+1}.

The sum is the same, but the bounds move. This matters when a formula is written for indices starting at 0 rather than 1.

  1. Splitting the range: for 1≤k<n1 \le k \lt n,
∑i=1nai=∑i=1kai+∑i=k+1nai.\sum_{i=1}^{n} a_i = \sum_{i=1}^{k} a_i + \sum_{i=k+1}^{n} a_i.
  1. The empty sum: if the upper bound is below the lower bound, there are no terms and the sum is 00. This convention is what makes rule 5 work when k=nk = n.

Double sums

A sum can sit inside another sum. In ∑i=1m∑j=1naij\sum_{i=1}^{m} \sum_{j=1}^{n} a_{ij}, the inner sum over jj is computed first for each ii, and the results are then added over ii. When the term splits into a product, aij=xiyja_{ij} = x_i y_j, the double sum factors:

∑i=1m∑j=1nxiyj=(∑i=1mxi)(∑j=1nyj).\sum_{i=1}^{m} \sum_{j=1}^{n} x_i y_j = \left(\sum_{i=1}^{m} x_i\right)\left(\sum_{j=1}^{n} y_j\right).

This is the step that turns an expected value over two variables into a product of two simpler sums.

Three sums to know

∑i=1ni=n(n+1)2,∑i=1ni2=n(n+1)(2n+1)6.\sum_{i=1}^{n} i = \frac{n(n+1)}{2}, \qquad \sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}.

The first has a short proof. Write the sum SS forwards and backwards and add the two copies. Each pair adds to n+1n+1, and there are nn pairs, so 2S=n(n+1)2S = n(n+1).

The geometric sum with ratio r≠1r \ne 1 is

∑k=0nrk=1−rn+11−r.\sum_{k=0}^{n} r^k = \frac{1 - r^{n+1}}{1 - r}.

To derive it, let SS be the sum. Multiply by rr to get rS=∑k=1n+1rkrS = \sum_{k=1}^{n+1} r^k. Subtract: S−rS=1−rn+1S - rS = 1 - r^{n+1}, so S=(1−rn+1)/(1−r)S = (1 - r^{n+1})/(1 - r).

Worked examples

Example
Sum of squares

Compute ∑i=15i2\sum_{i=1}^{5} i^2.

  1. Write out the terms: 12+22+32+42+521^2 + 2^2 + 3^2 + 4^2 + 5^2.
  2. Evaluate them: 1+4+9+16+251 + 4 + 9 + 16 + 25.
  3. Add: 5555.
  4. Check with the formula: 5⋅6⋅116=55\frac{5 \cdot 6 \cdot 11}{6} = 55. The formula is faster for large nn, but writing the terms out is the best way to confirm you read the bounds correctly.
Example
Expected value of a fair die

A fair six-sided die shows xx with probability 16\tfrac16 for each xx from 1 to 6. Its expected value is ∑x=16x⋅16\sum_{x=1}^{6} x \cdot \tfrac16.

  1. Pull the constant 16\tfrac16 outside the sum (rule 2): 16∑x=16x\tfrac16 \sum_{x=1}^{6} x.
  2. Apply the formula for the first nn integers with n=6n = 6: ∑x=16x=6⋅72=21\sum_{x=1}^{6} x = \tfrac{6 \cdot 7}{2} = 21.
  3. Multiply: 16⋅21=3.5\tfrac16 \cdot 21 = 3.5.
  4. Interpretation: over many rolls, the average result approaches 3.5. No single roll can show 3.5, which is normal for an average.
Example
Weights in a moving average

An average gives the newest reading weight 1, the one before it weight 0.50.5, then 0.250.25, then 0.1250.125. The total weight for the last four readings is ∑k=030.5k\sum_{k=0}^{3} 0.5^k.

  1. Write it out: 1+0.5+0.25+0.1251 + 0.5 + 0.25 + 0.125.
  2. Use the geometric formula with r=0.5r = 0.5, n=3n = 3: 1−0.541−0.5=0.93750.5=1.875\dfrac{1 - 0.5^4}{1 - 0.5} = \dfrac{0.9375}{0.5} = 1.875.
  3. Both methods give 1.8751.875. Interpretation: the weights add to a little under 2, so an average built on them must divide by 1.8751.875 to stay on the scale of the readings.
Example
Linearity, checked both ways

Let a=(1,0,2,5)a = (1, 0, 2, 5). Compute ∑i=14(2ai+3)\sum_{i=1}^{4} (2a_i + 3).

  1. Directly: the terms are 5,3,7,135, 3, 7, 13, which sum to 2828.
  2. Using rule 2: 2∑ai+∑3=2(1+0+2+5)+4⋅3=16+12=282 \sum a_i + \sum 3 = 2(1 + 0 + 2 + 5) + 4 \cdot 3 = 16 + 12 = 28.
  3. The two routes agree, so the rule is safe to use on the rest of the problem.

Tradeoffs and failure modes

Sigma notation is best when the terms follow one pattern, because the pattern is what the index encodes. It is worse when the terms are irregular or only a few in number. Three terms with no pattern are clearer written out.

SituationProblemBetter choice
Three or four terms with no patternThe sigma suggests a rule that is not thereWrite the terms out
The same letter used for two indicesResults are silently wrongUse distinct letters, such as ii and jj
Treating ∑aibi\sum a_i b_i as (∑ai)(∑bi)(\sum a_i)(\sum b_i)The product creates cross terms that the original sum lacksExpand with a double sum, or accept the sum as it is
Off-by-one bounds, such as 00 to nn instead of 11 to nnResults count one term too many or too fewCheck with n=1n = 1 or n=2n = 2 by hand
Infinite sumsSome diverge, and some depend on the order of the termsConfirm convergence before using a finite formula as a value

History

Capital sigma was chosen for sums because Σ\Sigma is the Greek S, for "sum". Leonhard Euler introduced it for sums in the 1750s, and Joseph Fourier later added the lower and upper bounds above and below the sign in the early 1820s, giving the form used today.

It caught on because sums written with dots were ambiguous beyond a few terms, and index notation let a result be stated once and applied to any range.

Check yourself

QuestionWhat does ∑i=36i\sum_{i=3}^{6} i mean, and what is its value?Show answer

It means add the integers from 3 to 6 inclusive: 3+4+5+6=183 + 4 + 5 + 6 = 18. The lower bound is the first index value and the upper bound is the last. Both are included.

QuestionCompute ∑k=14(2k+1)\sum_{k=1}^{4} (2k + 1) without writing every term if you can.Show answer

Split it with linearity: 2∑k=14k+∑k=141=2⋅10+4=242 \sum_{k=1}^{4} k + \sum_{k=1}^{4} 1 = 2 \cdot 10 + 4 = 24. Writing the terms 3,5,7,93, 5, 7, 9 also gives 2424, which is a good check.

QuestionWhy can ∑aibi\sum a_i b_i not be rewritten as (∑ai)(∑bi)\left(\sum a_i\right)\left(\sum b_i\right)?Show answer

The product of the two sums contains every pair aibja_i b_j, including the pairs where i≠ji \ne j. The original sum only includes matched pairs aibia_i b_i. With a=(1,2)a = (1, 2) and b=(3,4)b = (3, 4), the true sum is 3+8=113 + 8 = 11, while the product is 3⋅7=213 \cdot 7 = 21.

QuestionA group of people report their ages, and you want the mean. Write the mean using sigma notation, then compute it for the four ages 10, 12, 14 and 16.Show answer

The mean of nn values is 1n∑i=1nxi\frac{1}{n}\sum_{i=1}^{n} x_i. For the four ages, 14(10+12+14+16)=524=13\frac{1}{4}(10 + 12 + 14 + 16) = \frac{52}{4} = 13. The same formula works for any number of values, which is why the mean is written this way in statistics.

Sources