LatexNotes

Union (∪) in LaTeX

\cup typesets the union symbol ∪; is the set of everything belonging to A, to B, or to both.

LaTeX command

\cup

Not the symbol you meant? Draw it to find the command →

Union combines two (or more) sets into one containing every element that appears in at least one of them. never loses an element, so if x is in A or in B (or both), it is in . Union is commutative and associative, so parentheses in a chain like are optional.

For a union of many sets indexed by i, use the big operator \bigcup rather than chaining \cup by hand. \bigcup_{i=1}^{n} A_i takes subscript and superscript limits exactly like \sum, and \bigcup_{i \in I} A_i handles an arbitrary index set I.

Union pairs naturally with intersection (\cap) and set difference. A common identity worth remembering when writing proofs is De Morgan's law, ()^c = , which is easy to typeset once the union and intersection commands are known.

Other forms

\bigcupbig union (⋃)

Examples

$A \cup B$

everything in A or B (or both)

$A \cup \emptyset = A$

the empty set is a union identity

$\bigcup_{i=1}^{n} A_i$

a union of many sets, with limits like \sum

$(A \cup B)^c = A^c \cap B^c$

De Morgan's law for union and intersection

$A \cup B \cup C$

union is associative, so no parentheses are needed

Tips and common mistakes

Working from handwritten notes?

LatexNotes turns a photo or PDF of handwritten mathematics into clean, compilable LaTeX - graphs and all. Free to try, no sign-up.

Convert your maths to LaTeX →

FAQ

What does mean?

It is the union of A and B: the set of all elements that belong to A, to B, or to both. Nothing that is in either set is left out.

What is the difference between \cup and \bigcup?

\cup joins two sets written explicitly, like . \bigcup is the 'big operator' version for a union over many sets given by an index, written \bigcup_{i \in I} A_i, the union analogue of \sum.

Is \cup the same as logical or?

They are closely related but not typeset the same way. \cup is for combining sets; \vee (or \lor) is the logical or connective between propositions. Use whichever matches what you are actually combining.

See also