# Summation Notation

(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
This is a Helper Page for:
Matrix
Markus-Lyapunov Fractals
Induction
Pascal's triangle

## Contents

Summation Notation, sometimes called Sigma Notation, is a shorthand way of writing a long sum of numbers using the symbol $\sum$, the Greek capital letter sigma.

## Translating a simple sum into summation notation

Let's say we have a long string of integers being summed up:

$1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20$

There's a pattern to this sum: we start at 1, we go up to 20, and in between, each number we add to our total is one greater than the number that came before it. Because of this pattern, we should be able to describe the sum to someone else by explaining the pattern to them, instead of having to write the whole sum out. This is what summation notation does. In summation notation, the above sum looks like this:

$\sum_{i=1}^{20} i$

Here's what the different pieces of the notation mean:

 The sigma tells us that we're going to be adding up several things according to a pattern, and that our dummy variable will be increasing by 1 at each stage in the patern. The symbols to the right of the sigma tell us what the terms in our sum will look like. In this case, the i tells us that each piece of our sum is a single integer. The symbols under the sigma tell us what our dummy variable is, and what value it starts at. In this case, the i=1 tells us that our dummy variable is i, and that its starting value is 1. The symbols on top of the sigma tell us what value our dummy variable stops at. In this case, we're going to stop our sum when i is 20.

So to get from the summation notation back to our original sum, first we take $i$ and replace it with a 1. Next, we take $i$ again, but this time we replace it with a 2, and add it to our previous 1. The next time, we replace $i$ with 3, and so on, until we've replaced $i$ with 20, at which point we stop.

$\sum_{i=1}^{20} i = 1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20$

Cupcake liners are the dummy variables of baking.

As we can see in the example above, dummy variables are placeholders. We use them to make the outline of a pattern, but then we need to fill them in with something else.

We can think of dummy variables as being similar to cupcake liners. When we're making cupcakes, we need to set out the liners to see where our cupcakes will go. The liners create an outline and define the space where our cupcakes will be.

When baking, we don't actually have any cupcakes until we fill the liners with batter. Similarly, with summation notation, we don't actually have a sum until we replace the dummy variable with numbers.

In summation notation, we fill our dummy variable with a different number each time. In our cupcake analogy, we can imagine that we're making colored cupcakes: in each cupcake liner, we add one more drop of food coloring.

$\sum_{i=1}^{5} {(i + 2)} = ?$

$\sum_{i=1}^{5} (i + 2) = (1 + 2) + (2 + 2) + (3 + 2) + (4 + 2) + (5 + 2)$
$= 3 + 4 + 5 + 6 + 7$
$= 25$

$\sum_{i=2}^{6} {i^2} = ?$

$\sum_{i=2}^{6} {i^2} = (2^2) + (3^2) + (4^2) + (5^2) + (6^2)$
$= 4 + 9 + 16 + 25 + 36$
$= 90$
This one was tricky - did you notice that the dummy variable was set to start at 2 and not 1?

$\sum_{i=1}^{5} {(ix + 4)} = ?$

$\sum_{i=1}^{5} (ix + 4) = (1x + 4) + (2x + 4) + (3x + 4) + (4x + 4) + (5x + 4)$
$= (x + 2x + 3x + 4x + 5x) + (4 + 4 + 4 + 4 + 4)$
$= 15x + 20$

## Indexing

Let's look at another sum written with summation notation:

$\sum_{i=1}^{5} {x_i}$

How do we translate this back into a long sum? Let's just ignore that $x$ for now, and follow the rules we used above. The first term in our sum is whatever symbols are to the right of the sigma, but with $i$ replaced by 1. The second term is the same, but with $i$ replaced by 2. In the third term, $i$ is replaced by 3, in the fourth term it's replaced by 4, and we stop at the fifth term, where $i$ is replaced by 5. Now we have something that looks like this:

$\sum_{i=1}^{5} {x_i} = x_1 + x_2 + x_3 + x_4 + x_5$

But what are $x_1$, $x_2$, $x_3$, $x_4$, and $x_5$? Well, they could be unknowns. If

$x_1 + x_2 + x_3 + x_4 + x_5 = 300$

were part of a system of equations in five variables, we might write

$\sum_{i=1}^{5} {x_i} = 300$

But $x_1$, $x_2$, $x_3$, $x_4$, and $x_5$ can also be part of an indexed list or sequence. If we have a sequence of numbers, such as $0, 6, 14, 22, 94, 5, 2$, we can use indexing to talk about the numbers in the sequence. So $x_1$ can mean "the first item the sequence", which happens to be the number 0. Similarly, $x_2 = 6$, because 6 is the second number in the sequence; and $x_3 = 14$, because 14 is the third number in the sequence. If our sum $\sum_{i=1}^{5} {x_i}$ is talking about the sequence $0, 6, 14, 22, 94, 5, 2$ , then it is asking us to add up the first five terms in that sequence:

$\sum_{i=1}^{5} {x_i} = x_1 + x_2 + x_3 + x_4 + x_5$
$= 0 + 6 + 14 + 22 + 94$

## Sums to n and ∞

$\sum_{i=1}^{n} {x_i}$

This sum asks us to add up the first $n$ terms in a sequence, where $n$ is an arbitrarily large integer. That means that $n$ is finite but unspecified - whatever claims we're making about the series are true no matter what number we choose for $n$.

$\sum_{i=1}^{ \infty} {x_i}$
This sum asks us to add up an infinite number of terms - the $\infty$ on top of the sigma tells us that we never stop adding numbers to our series. This is used to talk about infinite series, which are evaluated in terms of limits.

## Summation and distribution

Since summation notation is just shorthand addition, multiplication and division distribute over the sigma sign.

Multiplication:

$\sum_{i=1}^n {af(x_i)} = af(x_1) + af(x_2) + \cdots + af(x_n) = a(f(x_1) + f(x_2) + \cdots + f(x_n)) = a \sum_{i=1}^n {f(x_i)}$

Division:

$\sum_{i=1}^n { \frac{f(x_i)}{a}} = \frac{f(x_1)}{a} + \frac{f(x_2)}{a} + \cdots + \frac{f(x_n)}{a} = \frac{f(x_1) + f(x_2) + \cdots + f(x_n)}{a} = \frac{ \sum_{i=1}^n {f(x_i)}}{a}$

## Matrices and double-indexing

One major use of indexing in summation notation is for working with matrices. In a matrix, each entry is indexed based on the row and column it's in, and if our matrix is very large, it is helpful to talk about operations on it using summation notation.

When working with matrices, we typically need two indexing variables, because each entry is indexed both by row and by column:

$A = \begin{bmatrix} a_{11} & a_{12} & a_{13} & \cdots & a_{1m} \\ a_{21} & a_{22} & a_{23} & \cdots & a_{2m} \\ a_{31} & a_{32} & a_{33} & \cdots & a_{3m} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & a_{n3} & \cdots & a_{nm} \end{bmatrix}$

If we want to add up all of the entries in this matrix, we can use two sigmas, for our two indexing variables:

$\sum_{i=1}^n {\sum_{j=1}^m a_{ij}}$

To check that this actually does add up all of the entries, we'll write it out as a long sum. First, we get rid of the inner sigma by replacing the $j$ with the numbers $1$ through $m$, and adding that up:

$\sum_{i=1}^n {(a_{i1} + a_{i2} + a_{i3} + \cdots + a_{im})}$

The sum inside the parentheses represents the sum of any of the rows. Now, we undo the remaining sigma:

$(a_{11} + a_{12} + a_{13} + \cdots + a_{1n}) + (a_{21} + a_{22} + a_{23} + \cdots + a_{2m}) + \cdots + (a_{n1} + a_{n2} + a_{n3} + \cdots + a_{nm})$

Although many of the terms are represented only by dots, we can see that this sum does indeed include every element of matrix A.

If our matrix is square, then our indexing variables have the same limits, and so they can also be written using only one sigma:

$\sum_{i=1}^n {\sum_{j=1}^n a_{ij}} = \sum_{i,j=1}^n {a_{ij}}$

## Polynomials

Summation notation can also be used to generalize polynomials. For example, a generic polynomial of degree 3 can be written as:

$p_3 (x) = \sum_{i=0}^3 {a_i x^i}$

Since $a$ represents a constant, the long version of this sum is:

$p_3 (x) = a_0 x^0 + a_1 x^1 + a_2 x^2 + a_3 x^3$
$= a_0 + a_1 x^1 + a_2 x^2 + a_3 x^3$

A generic polynomial of degree $n$ can be written as:

$p_n (x) = \sum_{i=0}^n {a_i x^i} = a_0 x^0 + a_1 x^1 + a_2 x^2 + a_3 x^3 + \cdots + a_n x^n$

## Common power sums

These are some sums you'll run into often, especially if you study calculus:

$\sum_{k=1}^{n} k = 1 + 2 + \ldots + n = \frac{n(1+n)}{2}$
$\sum_{k=1}^{n} {k^2} = 1^2 + 2^2 + \ldots + n^2 = \frac{n(1+n)(2n+1)}{6}$
$\sum_{k=1}^{n} {k^3} = 1^3 + 2^3 + \ldots + n^3 = \frac{{n^2}{(n+1)^2}}{4}$

Although these three are the ones that are most commonly encountered, there are formulas of this kind for all sums of the form

$\sum_{k=1}^{n} {k^m}$
where $m$ is a positive integer.