Summation in LaTeX (\sum_{i=1}^{n})
- LaTeX command
\sum_{i=1}^{n}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Sums a sequence of terms as the index i runs from 1 to n, using the capital-sigma large operator.
\sum is a large operator: in display math the limits i=1 and n sit below and above the sigma, while in inline math they move to the side as subscripts and superscripts. Add \limits to force stacked limits inline, or \nolimits for side limits in display, though stacked limits inline can disturb line spacing. For multi-line conditions under the sigma use \substack{0 \le i \le m \\ 0 < j < n}. Do not use the Greek letter \Sigma for summation; it is a smaller ordinary symbol without operator spacing. Typical uses include series, expectations, and \sum_{i=1}^{n} i = \frac{n(n+1)}{2}.
Also listed under: Summation & Product
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Summation: $\sum_{i=1}^{n}$
\[ \sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6} \]
\end{document}Related symbols
- Product
\prod_{i=1}^{n} - N-th Root
\sqrt[n]{x} - Integral
\int_{a}^{b} - Square Root
\sqrt{x} - Limit
\lim_{x \to \infty} - Fraction
\frac{a}{b}
Frequently asked questions
- How do I write Summation in LaTeX?
- Type \sum_{i=1}^{n} in math mode, for example $\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}$. It works in plain LaTeX without loading any package.
- Which package do I need for \sum_{i=1}^{n}?
- None. \sum_{i=1}^{n} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \sum_{i=1}^{n} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\sum_{i=1}^{n}$ in running text.
Best AI LaTeX Editor, Overleaf Alternative
Octree helps researchers from 15+ universities write research papers faster using AI
- Generate beautiful TikZ diagrams using AI
- Upload image and convert it to LaTeX seamlessly
- Get instant assistance with writing and formatting research papers