Summation in LaTeX (\sum_{i=1}^{n})

∑i=1n\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: Penjumlahan & Hasil Darab

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

∑i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}
\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

All Simbol Matematik →

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.
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan