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

  • \cup
    ∪

    Union of two sets (binary operator).

  • \bigcup
    ⋃

    Big union over an index, with limits below and above.

  • \bigcup_{i=1}^{n}
    ⋃ i = 1 n

    Union for i from 1 to n.

  • \bigcup_{i \in I}
    ⋃ i ∈ I

    Union over an index set.

  • \sqcup
    ⊔

    Disjoint union (square cup); \bigsqcup for the big version.

  • \uplus
    ⊎

    Multiset or disjoint union; \biguplus for the big version.

  • \Cup
    ⋓

    Double 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.

Templates

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

    A ∪ B = { x : x ∈ A  or  x ∈ B }
    LaTeX
    A \cup B = \{ x : x \in A \text{ or } x \in B \}
  • Indexed union

    ⋃ i = 1 n A i
    LaTeX
    \bigcup_{i=1}^{n} A_i
  • Countable union

    ⋃ n = 1 ∞ [ 1 n , 1 ] = ( 0 , 1 ]
    LaTeX
    \bigcup_{n=1}^{\infty} \left[ \frac{1}{n}, 1 \right] = (0, 1]
  • Union over an index set

    ⋃ α ∈ I U α
    LaTeX
    \bigcup_{\alpha \in I} U_\alpha
  • Disjoint union

    X = ⨆ i = 1 k X i
    LaTeX
    X = \bigsqcup_{i=1}^{k} X_i
  • Distributive law

    A ∪ ( B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C )
    LaTeX
    A \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 of
    A U B
    Write
    A \cup B
  • Indexed unions need the big operator; \cup with scripts looks cramped and wrong.

    Instead of
    \cup_{i=1}^{n} A_i
    Write
    \bigcup_{i=1}^{n} A_i
  • There is no \union command in LaTeX; the name follows the shape (cup).

    Instead of
    \union
    Write
    \cup

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    \cup, \bigcup, \sqcup, \bigsqcup, \uplus and \biguplus are built in; \Cup needs amssymb.

  • MathJax and KaTeX

    MathJax and KaTeX render all of these, and move \bigcup limits inline or stacked the same way LaTeX does.

  • Microsoft Word

    In a Word equation, \cup followed 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 \cup in 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 \bigcap for the big operator. See the intersection page for details.

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