On 29 October 1675, Leibniz wrote ∫ in a manuscript. It is a long s — the initial of summa, “sum”, stretched vertically — and the shape still says what the integral sign originally was: a mark for adding things up. The summation Σ came from Euler, in chapter I of his Institutiones calculi differentialis of 1755. In LaTeX, though, these two sibling symbols behave quite differently: in a display, \sum stacks its range above and below while \int keeps it at the side. That asymmetry is written into the definition of \int itself. This page covers the big operators — \sum, \prod, \int, \oint, \bigcup and the rest — how limits attach, how to move them with \limits and \nolimits, how to write a multi-line condition with \substack, and how to declare an operator of your own with \DeclareMathOperator.
What a big operator is, and why limits are not just subscripts
A big operator is a symbol that TeX has put in the \mathop class. \sum, \prod, \int and \bigcup all belong to it, and membership brings two properties. First, the symbol switches between a large and a small glyph according to the surrounding style. Second, a subscript _ or superscript ^ attached to it is treated not as an ordinary script but as a limit. The i in x_i merely sits at the lower right of the letter; the k=0 and n in \sum_{k=0}^{n} may be stacked directly under and over the symbol. Which of the two you get depends on the style and on the kind of symbol — the subject of the next sections.
The core symbols are built into standard LaTeX — into the underlying TeX, in fact — and need no extra package. The multiple integrals \iint and \iiint, the multi-line subscript \substack, and the operator-defining \DeclareMathOperator all require the amsmath package. Since amsmath is the de facto standard, it is simply practical to keep \usepackage{amsmath} in the preamble whenever you set serious mathematics.
\sum and \prod: the range goes above and below, or beside
Above and below in a display, beside it in running text. The summation is \sum, the product \prod and the coproduct \coprod, and you give the range with a subscript _ and a superscript ^. Put \sum_{k=0}^{n} a_k inside \[ … \] and the Σ is set large with k=0 directly below it and n directly above. Embed the same formula in text with $ … $ and the Σ shrinks while k=0 and n stack at its right. Measuring the boxes makes the difference obvious: in display it is 14.54521pt wide, 16.51393pt high and 13.02782pt deep — tall and narrow; in text it is 25.6008pt wide, 8.04175pt high and 3.00005pt deep — short and wide. Tall means stacked, wide means beside.
% displayed: limits stack above and below
\[
\sum_{k=0}^{n} a_k = a_0 + a_1 + \dots + a_n,
\qquad \prod_{k=1}^{n} k = n!
\]
% inline: the same sum keeps its limits at the side
The series $\sum_{k=0}^{n} a_k$ fits inside the line.This above/below-versus-side switch is the default behaviour, tied to the style. The so-called sum-class symbols — summation, product, coproduct and their relatives — stack their limits above and below in display style but place them at the side in text style; amsmath calls this scheme displaylimits. It is a well-chosen default that keeps the surrounding line spacing from spreading needlessly. If the range has only one part, write only that part; you can also put a condition in the lower limit, as in \sum_{i \in S}. What to watch for: wrap anything longer than one token in { }. Write \sum_k=1 and only the k becomes a subscript, while =1 spills out to the right of the symbol.
Putting limits above an integral: why \int is \intop\nolimits
The integral sign \int keeps its limits at the side even in a display. That difference from the summation is not an accident; it is written directly into the definition. Lines 253–254 of LaTeX’s fontmath.ltx read \DeclareMathSymbol{\intop}{\mathop}{largesymbols}{"52} followed by \DeclareRobustCommand\int{\intop\nolimits}. In other words, \int is the integral glyph \intop with a \nolimits stuck to it — the mathematical convention baked into the command. Lines 260–261 give \oint the same shape: \ointop\nolimits. Turn that around and you get an escape hatch: use the bare glyph \intop or \ointop directly and you are back to the sum-class default. Measurement confirms it — a displayed \int_0^1 is 14.48615pt wide and 15.65013pt high, while \intop_0^1 is 10.00002pt wide, 21.12231pt high and 15.789pt deep. One spreads sideways, the other stretches upward.
\[
\int_{0}^{\infty} e^{-x}\,dx = 1,
\qquad \oint_{C} \mathbf{F}\cdot d\mathbf{r},
\qquad \intop_{0}^{1} x^2\,dx
\]You can set a multiple integral by repeating the sign as \int\int, but the gap between signs looks slack. amsmath provides dedicated commands with the spacing tightened: the double \iint, triple \iiint, quadruple \iiiint, and \idotsint, which puts dots between two integral signs (∫⋯∫). The tightening is measurable — in a display, \int\int is 21.66666pt wide and \iint is 16.66678pt. That is exactly 5pt, half an em at 10pt. \iiint came out at 23.33354pt, \iiiint at 30.0003pt and \idotsint at 34.9999pt. If you need the closed surface and volume integrals common in physics, the esint package adds \oiint (closed surface), \varoiint, \sqint, \sqiint, \ointclockwise, \ointctrclockwise, \fint and a few more. \oiiint is not among them — for a triple closed integral you have to look to another font package. Out of the box, plain LaTeX gives you only \oint.
% preamble: \usepackage{amsmath}
\[
\iint_{D} f(x,y)\,dx\,dy,
\qquad \iiint_{V} f\,dV,
\qquad \iiiint f, \qquad \idotsint_{A} f\,dV
\]\limits and \nolimits: forcing the position
To override the default, write \limits (force above and below) or \nolimits (force to the side) after the operator. To stack a sum’s range in running text, write \sum\limits_{k=1}^{n}; to put the bounds above and below a displayed integral, write \int\limits_0^1. As the previous section showed, the latter is the same thing as the bare \intop — measured, both come out at 10.00002pt wide, 21.12231pt high and 15.789pt deep. To return a symbol to the style-linked default, use \displaylimits.
% force limits above and below inside running text
The partial sum $\sum\limits_{k=1}^{n} k$ sits in the line.
% force limits above and below on a displayed integral
\[
\int\limits_{0}^{1} x^2\,dx = \frac{1}{3}
\]There is a rule about placement. \limits must follow a \mathop; otherwise the run stops with ! Limit controls must follow a math operator. (TeX adds I'm ignoring this misplaced \limits or \nolimits command.). Both x\limits^2 and \frac{1}{2}\limits raise it. A common belief, though, is that writing it after the scripts is an error — that is not true. \sum_{k=1}\limits^{n} compiles fine, and measured it gives exactly the same box as \sum\limits_{k=1}^{n}: 14.54521pt wide, 16.51393pt high, 13.02782pt deep. The operator atom is still the one immediately preceding. Even so, right after the operator is clearer for your readers and for you, so make that the habit. And when several of \limits, \nolimits and \displaylimits appear in a row, the last one wins: \sum\limits\nolimits_{k=1}^{n} came out at the side, \sum\nolimits\limits_{k=1}^{n} above and below. There is one exception to the rule. After a function name such as \log or \lim, \limits is silently ignored when amsmath is loaded — amsopn.sty swallows it with \@ifnextchar\limits{\nolimits\@gobble}, with no error and no warning. Measured: without amsmath the depth of \log\limits_{k}x is 9.4722pt, while with amsmath it stays at 2.44443pt, exactly the same as plain \log_{k}x. To put a subscript under a function name, use \DeclareMathOperator*.
If you want to change the policy for a whole document, there are amsmath package options instead of writing the command every time. Lines 46–49 of amsmath.sty declare intlimits, nointlimits, sumlimits and nosumlimits, and the \ExecuteOptions at lines 92–93 sets the defaults to nointlimits, sumlimits — exactly the behaviour described so far. Write \usepackage[intlimits]{amsmath} and every displayed integral in the document stacks its limits above and below. Tried out, a displayed \int_0^1 then measures 10.00002pt wide, 21.12231pt high and 15.789pt deep, matching \intop_0^1. Pass nosumlimits and sums move to the side instead. Before scattering \limits through individual formulas, it is worth considering this as a document-wide decision.
| Symbol / command | Display style | Inline style |
|---|---|---|
\sum, \prod, \bigcup | stacked above and below | at the right side |
\int, \oint, \iint | at the right side (a \nolimits is built into the definition) | at the right side |
\intop, \ointop | stacked above and below (the bare glyph, with no \nolimits) | at the right side |
\limits | forced above and below; place it right after the operator | forced above and below |
\nolimits | forced to the side; place it right after the operator | forced to the side |
\displaylimits | back to the style-linked default (stacked) | back to the style-linked default (at the side) |
The \lim family: upright names with the condition underneath
\lim (limit), \limsup (limit superior) and \liminf (limit inferior) are operators set upright, in roman, like function names, but their scripts behave in the sum-class way: in a display the subscript sits directly below, and inline it sits at the lower right. \limsup and \liminf are set as the two words “lim sup” and “lim inf”, with proper space between them. \sup, \inf, \max and \min belong to the same family and place a subscript below (the function names are also gathered on the separate page “Math mode basics”). The arrow → is \to, and infinity is \infty.
\[
\lim_{n \to \infty} \frac{1}{n} = 0,
\qquad \limsup_{n \to \infty} a_n \ge \liminf_{n \to \infty} a_n,
\qquad \sup_{x \in X} f(x)
\]The \bigcup family: prefix a binary operator with big
The n-ary operators used in set theory, logic and algebra also have large versions, just like \sum. The naming is mechanical: take the name of the corresponding binary operator and prefix it with big. For the binary union \cup (A ∪ B), the variable-size version is \bigcup. All of them are sum-class, so they stack their limits above and below in a display and set them at the side inline. Measured, a displayed \bigcup_{i=1}^{n} is 12.95433pt wide, 16.51393pt high and 12.79865pt deep — much the same tall, narrow box as \sum.
| Command | Meaning | Binary counterpart |
|---|---|---|
\bigcup | union (n-ary) | \cup (∪) |
\bigcap | intersection (n-ary) | \cap (∩) |
\bigsqcup | disjoint union | \sqcup (⊔) |
\biguplus | multiset union | \uplus (⊎) |
\bigvee | logical OR / join | \vee (∨) |
\bigwedge | logical AND / meet | \wedge (∧) |
\bigoplus | direct sum (circled plus) | \oplus (⊕) |
\bigotimes | tensor product (circled times) | \otimes (⊗) |
\bigodot | circled dot (n-ary) | \odot (⊙) |
\[
\bigcup_{i=1}^{n} A_i, \qquad
\bigcap_{i \in I} A_i, \qquad
V = \bigoplus_{k} V_k
\]Two lines of conditions under a sum: \substack and subarray
Put amsmath’s \substack{…} into the subscript position as a whole. Each line separated by \\ is stacked, centred, so you can line up “0 ≤ i ≤ m” and “0 < j < n” on two lines directly under the Σ. Do not put a \\ after the final line. To left-align the lines, use the more general subarray environment: \begin{subarray}{l} … \end{subarray}. {l} is left-aligned and {c} centred, and lines are broken with \\ exactly as in \substack. In fact the definition of \substack is \subarray{c}…\endsubarray, so the two are the same machinery wearing different faces. Note that setting a brace or a line above or below a symbol — \overbrace, \underbrace, \overline — is a different question, handled on the separate page “Over and under”. What is at stake here is specifically the limits of an operator.
% preamble: \usepackage{amsmath}
\[
\sum_{\substack{0 \le i \le m \\ 0 < j < n}} P(i,j)
\qquad
\sum_{\begin{subarray}{l} i \in \Lambda \\ 0 < j < n \end{subarray}} P(i,j)
\]Defining argmax yourself: what the star in \DeclareMathOperator* does
The star decides whether the condition sits directly below or at the lower right. When you need an operator name that is not in the standard list — argmax, argmin, esssup — set upright and with its subscript directly below like \lim, declare it once in the preamble with amsmath’s \DeclareMathOperator* and call it as a short command in the body. Without the star, the subscript sits at the lower right of the name. Measurement shows it: the box for \operatorname*{argmax}_{\theta} is 9.4722pt deep — it grows downward — while the unstarred \operatorname{argmax}_{\theta} is 37.05215pt wide and only 2.44443pt deep, growing to the right instead. For a one-off you can also write \operatorname{rank} directly, without declaring anything (or \operatorname*{…} to put the limit below).
% in the preamble:
\usepackage{amsmath}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator{\rank}{rank}
% in the body:
\[
\hat{\theta} = \argmax_{\theta} L(\theta),
\qquad \rank A \le n,
\qquad \sideset{}{'}\sum_{n} a_n
\]The name text follows special conventions: a hyphen - is set as an ordinary text hyphen (not a minus sign), and an asterisk * as a raised text asterisk (not the centred binary star). The \, in arg\,max is the thin space that separates the two words. Function names should be set with \DeclareMathOperator or \mathrm, not \text{…}; that way the spacing around them is adjusted automatically and they stay upright even in an italic context such as a theorem environment. Finally, to put scripts at the four corners of a sum-class symbol — a prime (′) on a summation, say — amsmath offers \sideset. Writing \sideset{}{'}\sum_{n} a_n adds a prime at the upper right of the Σ while still placing the limit below. The first argument sets the two left corners and the second the two right ones; within each you write _{lower}^{upper}. Note that it works only for sum-class symbols.