Union in LaTeX
The union symbol ∪ is \cup in math mode: $A \cup B$. For the union of many sets with an index, use the big operator \bigcup, which takes limits like a sum: \bigcup_{i=1}^{n} A_i.
Union commands
\cupUnion of two sets (binary operator).
\bigcupBig union over an index, with limits below and above.
\bigcup_{i=1}^{n}Union for i from 1 to n.
\bigcup_{i \in I}Union over an index set.
\sqcupDisjoint union (square cup);
\bigsqcupfor the big version.\uplusMultiset or disjoint union;
\biguplusfor the big version.\CupDouble union (amssymb).
Try it live
Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.
Union examples
Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.
Union of two sets
LaTeXA \cup B = \{ x : x \in A \text{ or } x \in B \}Indexed union
LaTeX\bigcup_{i=1}^{n} A_iCountable union
LaTeX\bigcup_{n=1}^{\infty} \left[ \frac{1}{n}, 1 \right] = (0, 1]Union over an index set
LaTeX\bigcup_{\alpha \in I} U_\alphaDisjoint union
LaTeXX = \bigsqcup_{i=1}^{k} X_iDistributive law
LaTeXA \cup (B \cap C) = (A \cup B) \cap (A \cup C)
\cup versus \bigcup
\cup is a binary operator: it goes between two sets and gets operator spacing, like +. \bigcup is a large operator like \sum: it stands in front of an indexed family and carries the index as limits. Writing \cup_{i=1}^{n} gives a small symbol with tiny scripts beside it, which is the most common mistake.
In a displayed equation, the limits of \bigcup sit below and above the symbol. In running text they move to the right; add \limits (\bigcup\limits_{i=1}^{n}) if you want them stacked inline, at the cost of taller lines.
Disjoint union
There is no single standard notation. \sqcup / \bigsqcup and \uplus / \biguplus are built into LaTeX and common in papers; a union symbol with a dot can be built with \dot{\cup}. Say which notation you use the first time it appears.
Common mistakes
A capital U is a letter, spaced and shaped as a variable, not the ∪ operator.
Instead ofA U BWriteA \cup BIndexed unions need the big operator;
\cupwith scripts looks cramped and wrong.Instead of\cup_{i=1}^{n} A_iWrite\bigcup_{i=1}^{n} A_iThere is no
\unioncommand in LaTeX; the name follows the shape (cup).Instead of\unionWrite\cup
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
\cup,\bigcup,\sqcup,\bigsqcup,\uplusand\biguplusare built in;\Cupneeds amssymb.MathJax and KaTeX
MathJax and KaTeX render all of these, and move
\bigcuplimits inline or stacked the same way LaTeX does.Microsoft Word
In a Word equation,
\cupfollowed by Space inserts ∪. For an indexed union with limits, build it here and use Copy for Word, which pastes it as an editable Word equation.
Union in LaTeX: questions
- How do I write the union symbol in LaTeX?
- Use
\cupin math mode:$A \cup B$. - How do I write a big union with limits?
- Use
\bigcup_{i=1}^{n} A_i. In a displayed equation the limits appear below and above the symbol. - How do I write a disjoint union?
- Common choices are
\sqcup(big form\bigsqcup) and\uplus(\biguplus). Define your notation once in the text. - What is the LaTeX command for intersection?
- Intersection is
\cap, with\bigcapfor the big operator. See the intersection page for details.
Related LaTeX reference
- Intersection in LaTeXThe ∩ symbol with \cap, indexed intersections with \bigcap, and how to size and space them.
- Subset in LaTeX\subset, \subseteq, \subsetneq, the superset forms and the negated "not a subset" symbols.
- Empty Set in LaTeXThe empty set with \emptyset or the rounder \varnothing (amssymb), plus \{\} and common set statements.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
Have the formula as a picture?
Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.
Convert an image to LaTeX