Indexed Sum in LaTeX (\sum_{k \in K})
- LaTeX command
\sum_{k \in K}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Sum over every element k of a set K rather than over a numeric range.
Set-indexed sums are natural when the index set is not an interval: sums over primes \sum_{p \le x}, over divisors \sum_{d \mid n}, or over vertices in the handshake lemma \sum_{v \in V} \deg v = 2|E|. They make sense for any finite set, and for infinite ones when the series converges absolutely, since no ordering is implied. For several conditions use \substack, as in \sum_{\substack{k \in K \\ k \ne 0}}. In display mode the condition sits centered under the sigma, so keep it short to avoid a wide gap around the operator.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Indexed Sum: $\sum_{k \in K}$
\[ \sum_{v \in V} \deg(v) = 2|E| \]
\end{document}Related symbols
- Double Sum
\sum_{i=1}^{m} \sum_{j=1}^{n} - Big Square Union
\bigsqcup - Big Circle Dot
\bigodot - Big Tensor Product
\bigotimes - Big Direct Sum
\bigoplus - Big Vee
\bigvee
Frequently asked questions
- How do I write Indexed Sum in LaTeX?
- Type \sum_{k \in K} in math mode, for example $\sum_{v \in V} \deg(v) = 2|E|$. It works in plain LaTeX without loading any package.
- Which package do I need for \sum_{k \in K}?
- None. \sum_{k \in K} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \sum_{k \in K} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\sum_{k \in K}$ in running text.
Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf
Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI
- Gumawa ng magagandang TikZ diagrams gamit ang AI
- Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
- Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers