Basis Lab

Answers · The mathematics underneath

What does the sigma notation with i=1 underneath and n on top actually tell me to add?

In shortIt tells you to write the expression after the sign once for each whole number from one up to the top number, then add all those copies.

A sigma with i=1i=1 underneath and nn on top tells you to let the counter ii take each whole number from 11 to nn, including nn, and to add the expression to the right once for each value. The expression is one term written once with a placeholder in it, not the whole sum. It is an abbreviation for an addition, and the only real question is what the counter is doing. Reading the three decorations before reading the term is the whole habit: bottom gives the start, top gives the stop, and the term tells you what is being added.

∑i=14i2=12+22+32+42=1+4+9+16=30\sum_{i=1}^{4} i^2 = 1^2 + 2^2 + 3^2 + 4^2 = 1 + 4 + 9 + 16 = 30

The order is mechanical. Put i=1i=1 into the expression and write the first term; put i=2i=2 in and write the second; continue until i=ni=n; put plus signs between the copies. For n=4n=4 and the term i2i^2 the copies are 121^2, 222^2, 323^2 and 424^2, and adding gives 1+4+9+16=301+4+9+16=30. The top limit is included, so the last term is the one with i=4i=4, not the one before it. Nothing is being multiplied by the sigma, and no term has been skipped: four values of ii produce four terms. In general the same instruction gives a sum of nn terms, with the counter substituted into the term each time.

∑i=1nwixi=w1x1+w2x2+⋯+wnxn\sum_{i=1}^{n} w_i x_i = w_1x_1 + w_2x_2 + \cdots + w_nx_n

What the bounds do

The counting is where most slips happen. From 11 to nn inclusive is nn terms, because the list 1,2,…,n1,2,\ldots,n has nn entries. From 00 to nn inclusive is n+1n+1 terms, because nought is a value as well; from 00 to 44 there are five terms, not four. From 11 to n−1n-1 is n−1n-1 terms. The counter is local: the ii under the sigma has no meaning outside that sum, so the same letter can be reused elsewhere without collision. A term that does not mention ii is still repeated once for every value; ∑i=141\sum_{i=1}^{4}1 is four ones added, not one one.

FIG 1Expanding the same instruction four ways
stepcompressed formwritten outnumber of termswhat happened
1sum from i=1 to 3 of 2i2*1 + 2*2 + 2*3three terms, total 12each term uses a different value of the counter
2sum from i=1 to 3 of (x_i - m)^2(x_1 - m)^2 + (x_2 - m)^2 + (x_3 - m)^2three terms; m is unchanged because it has no subscriptonly the letter carrying the counter changes
3sum from i=1 to 4 of 11 + 1 + 1 + 1four terms, total 4a term that ignores the counter is copied once per value anyway
4sum from i=5 to 4 of anythingnothingnought terms, value 0top below bottom means no terms, not an error
53 + 6 + 9 + 123*1 + 3*2 + 3*3 + 3*4four terms, so compressed as sum from i=1 to 4 of 3icompression means finding the pattern, then writing the sign
5 steps
Each row keeps the same reading: start the counter at the bottom value, stop on the top value, substitute each value into the single term on the right, and add the copies. The last row compresses an ordinary addition back into sigma notation, which is the same skill in reverse.

A term with no counter still gets copied. If the term is 11 and n=4n=4, the sum is 1+1+1+1=41+1+1+1=4, not 11. That is how a sum of ones counts the number of values. The trace also shows compression: 3+6+9+123+6+9+12 has four terms and each is three times a counter value, so it is the sum of 3i3i from i=1i=1 to 44. Finding the pattern is the work; writing the sigma is only abbreviation.

The natural guess

The natural guess is that the top nn means stop before nn, because many programming loops stop before their upper bound, or that the expression after the sign already describes every term. Neither is right. The sum includes i=ni=n, so from 11 to nn there are nn terms. With n=4n=4 the values are 1,2,3,41,2,3,4, not 1,2,31,2,3. If the term is 11, those four values give 1+1+1+1=41+1+1+1=4, which is nn, not 11. The top number is a stop value, not a count, and the expression is a template, not a total.

∑i=141=1+1+1+1=4\sum_{i=1}^{4} 1 = 1+1+1+1 = 4

A factor's position matters for what is being added. The expression immediately to the right of the sigma is inside the sum. A factor written to the left is outside and applies once, after all the adding. With x1=2x_1=2, x2=4x_2=4 and x3=6x_3=6, the left expression (1/3)∑xi(1/3)\sum x_i gives (2+4+6)/3=12/3=4(2+4+6)/3=12/3=4, while the right expression ∑xi/i\sum x_i/i gives 2/1+4/2+6/3=2+2+2=62/1+4/2+6/3=2+2+2=6. The second is not an average, because each term is divided by a different number. Division by ii is inside because it mentions the counter; division by nn is outside because nn does not change as ii runs. A factor may be moved across the sign only when it does not mention the counter: ∑cxi=c∑xi\sum c x_i = c\sum x_i, but ∑ixi\sum i x_i cannot have ii pulled out.

1n∑i=1nxiagainst∑i=1nxii\frac{1}{n}\sum_{i=1}^{n} x_i \qquad\text{against}\qquad \sum_{i=1}^{n}\frac{x_i}{i}

Where the simple reading stops

The limits need not be numbers. A sum may run over the members of a set, with the set named underneath and no top limit, and then there is one term per member and no meaningful third term. A condition can replace the bounds. When the top is below the bottom, there are no terms, and the agreed value is nought; a sum from i=5i=5 to 44 is empty and equals 00. That convention is not an error, it is what lets a recursive formula start at its base case without a special case.

Worth keeping

  • In a sum from i=1 to n, the top limit is included, so there are n terms, not n-1.
  • The expression to the right of the sigma is one term written once; each value of the counter produces one copy with that value substituted.
  • A factor written to the left of the sigma is outside the sum and applies once, while a factor written to the right is inside and applies to every term.

Where this goes next

This question is one step of Reading the Notation, a course that works through its subject from the beginning. The page that teaches this part of it is The Sum Sign Is a Loop, and it reads the whole way through whether or not you have an account.

What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.

Read that pageThe whole course

Other questions people ask about this

  1. Is f(x) just f times x, or is it something else?No. f(x) means the rule named f applied to x, giving one output value; it is not f multiplied by x.
  2. Why does any number to the power zero equal one?Any non-zero number to the power zero is one because no copies are multiplied, and an empty product is one, not zero.
  3. Does a subscript like a_ij mean a times i times j?No, a subscript marks which row and column an entry belongs to rather than multiplying by the letters underneath.
  4. What is the difference between variance and standard deviation?They measure the same spread: variance is the average squared distance from the mean, standard deviation is its square root, so you report the standard deviation and calculate with the variance.
  5. How do you make a vague claim precise enough to tell whether it's true?Fix what is being talked about, what is asserted, which cases are covered and the cut-off, then name an observation that would prove it false.
  6. How do you find the parabola that best fits a function near a point?Match the function's height, slope and bending at the chosen point; those three conditions single out exactly one parabola.

Read alongside