Summation in LaTeX: \sum with Bounds

The sigma operator, where its bounds go and why they move, plus the same syntax for products, unions and intersections.

The sigma is \sum; _ and ^ attach its lower and upper bound. Everything else about writing a sum is the subscript rule from Sub & Sup, applied to an operator that happens to be large — which is exactly why its bounds move between display and inline maths. When the bound describes a set rather than a range, the notation comes from Set Notation; when the terms are fractions, Fractions decides their size.

Which one to use

Situation Write this Because
Bounds beside the sigma
\sum_{i=1}^{n}
Default; placement follows the maths style.
Bounds forced underneath
\sum\limits_{i=1}^{n}
Keeps display placement even inline.
No upper bound
\sum_{i\ge 1}
An inequality is a perfectly good bound.
A condition instead of a range
\sum_{\substack{p\text{ prime}}}
Two lines under the sign need substack.
Product or union
\prod, \bigcup
Same syntax, different glyph.
A double sum
\sum_i \sum_j
Nest the operators; do not stack one sign twice.

The commands

What Type this Renders as
Sum with bounds The standard form. Index below, upper limit above in display maths.
\sum_{i=1}^{n} i
\sum_{i=1}^{n} i
Open-ended sum No upper bound, which reads as "over all k". Common in probability.
\sum_{k} a_k
\sum_{k} a_k
Product Identical syntax, different operator.
\prod_{j=1}^{m} j
\prod_{j=1}^{m} j
Union and intersection The \big forms take limits the same way; the plain \cup does not look right stacked.
\bigcup_{n} A_n \quad \bigcap_{n} A_n
\bigcup_{n} A_n \quad \bigcap_{n} A_n
Forced limits Pushes bounds above and below even where the style would put them to the side.
\sum\limits_{i=1}^{n}
\sum\limits_{i=1}^{n}
Side limits The opposite: keeps bounds to the right in display maths.
\sum\nolimits_{i=1}^{n}
\sum\nolimits_{i=1}^{n}
Double sum Two operators in sequence each take their own bounds.
\sum_{i=1}^{m}\sum_{j=1}^{n} a_{ij}
\sum_{i=1}^{m}\sum_{j=1}^{n} a_{ij}

Worked examples

A closed form

\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}

The classic, and a good test of whether your fraction and your bounds are both right.

Geometric series

\sum_{k=0}^{\infty} r^k = \frac{1}{1-r}
\sum_{k=0}^{\infty} r^k = \frac{1}{1-r}

An infinity as an upper bound is just another superscript argument.

Definition of a factorial

n! = \prod_{k=1}^{n} k
n! = \prod_{k=1}^{n} k

Product notation with the same bound syntax as the sum.

Common mistakes

  • Expecting bounds above and below in a running sentence. Inline maths deliberately places them to the side so the line height survives.
  • Writing \sum_{i=1}^n and then adding spaces inside the braces that change nothing — but writing \sum_\{i=1\} and breaking it.
  • Using \cup with limits when \bigcup is what stacks properly.
  • Putting the summand outside the operator it belongs to, e.g. \sum_{i}^n a_i + b where the + b is not part of the sum.

Questions about this notation

Why do my sum limits appear beside the sigma instead of above it?
You are in inline maths. LaTeX shrinks big operators there so they cannot stretch the line. Put the expression in a displayed equation, or force it with \sum\limits_{i=1}^n.
Is \Sigma the same as \sum?
No. \Sigma is the capital Greek letter, sized like a normal letter. \sum is the n-ary operator, larger and able to carry limits.
How do I write a sum with no upper limit?
Omit it: \sum_{k} a_k. That is standard notation for summing over every value of k in its domain.
How do I write conditions under a sum sign?
Use \substack from amsmath: \sum_{\substack{1 \le i \le n \\ i \ne j}} a_i. It stacks as many lines as you give it, split with \\. A plain brace group puts all of it on one line and pushes it beside the sign in inline maths, so \substack is the readable form — at the cost of working only in display maths.

Keep reading

Three ways into the same idea: the notation itself, the lesson that teaches it, and an article that applies it.