Summation (∑) in LaTeX
\sum produces the summation operator. The index of summation goes in the subscript and the upper limit in the superscript, for example \sum from i=1 to n.
LaTeX command
\sumNot the symbol you meant? Draw it to find the command →
Write a sum as \sum_{i=1}^{n} a_i, attaching the index below with _ and the upper limit above with ^. Brace anything longer than one character, as in \sum_{k=0}^{\infty}. The subscript can be a condition rather than a range, for example \sum_{i \in S} or \sum_{0 \le k \le n}.
Placement of the limits depends on the mode. In a displayed equation they stack above and below the sign; inline, they shift beside it and the sign shrinks to fit the line. Force the stacked form inline with \displaystyle\sum or \sum\limits, and force the side form with \sum\nolimits.
\sum is a large operator, not the Greek capital \Sigma; using \Sigma gives the wrong spacing and no movable limits. The product, union and similar operators \prod, \coprod, \bigcup and \bigoplus all take limits in exactly the same way.
Other forms
\prodproduct (∏)\coprodcoproduct (∐)Examples
$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$an arithmetic series
$\sum_{k=0}^{\infty} \frac{1}{k!} = e$an infinite series
$\displaystyle\sum_{i=1}^{n} x_i$forcing display size inline
$\sum_{i \in S} a_i$a sum over an index set
$\sum_{i=1}^{n}\sum_{j=1}^{m} a_{ij}$a double sum
Tips and common mistakes
- Put the index below and the limit above with _ and ^:
\sum_{i=1}^{n}. Brace multi-character limits. - Inline, limits shift beside the sign and it shrinks; use
\displaystyle\sumor\sum\limitsto stack them,\sum\nolimitsto keep them beside. - The subscript may be a condition, e.g.
\sum_{i \in S}or\sum_{0 \le k \le n}. - Use
\sum, not\Sigma; the Greek capital has the wrong spacing and no limits. \prod,\coprod,\bigcupand\bigoplusbehave the same way with limits.
Working from handwritten notes?
LatexNotes turns a photo or PDF of handwritten mathematics into clean, compilable LaTeX - graphs and all. Free to try, no sign-up.
Convert your maths to LaTeX →FAQ
How do I write a summation with limits in LaTeX?
Use \sum with subscript and superscript: . Enclose multi-character bounds in braces.
Why are my sum limits beside the sigma instead of above and below?
You are in inline math, where limits move to the side. Use a displayed equation, or \displaystyle\sum, or \sum\limits, to stack them.
What is the difference between \sum and \Sigma?
\sum is the summation operator with proper spacing and movable limits; \Sigma is only the uppercase Greek letter. Always use \sum for sums.
How do I sum over a set or a condition?
Put the condition in the subscript, e.g. \sum_{i \in S} a_i or \sum_{0 \le k \le n} a_k.