Union in LaTeX (\cup)

∪\cup
LaTeX command
\cup
Package
No package needed: built into LaTeX
Mode
Math mode only
Copy the Unicode character
∪U+222A

Where it is used

Forms the union of sets: all elements that belong to at least one of them.

\cup is a binary operator, as in A \cup B, and gets medium spacing on both sides. For a union over an indexed family, use the large operator \bigcup, which stacks limits in display mode: \bigcup_{i=1}^{\infty} A_i. The disjoint union is often written \sqcup or \dot\cup. In probability, A \cup B corresponds to the event "A or B", giving P(A \cup B) = P(A) + P(B) - P(A \cap B). Do not use the letter U or the logical \lor in place of set union.

Also listed under: المؤثرات المتقدمة, نظرية المجموعات

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)
\documentclass{article}
\begin{document}
Union: $\cup$

\[ P(A \cup B) = P(A) + P(B) - P(A \cap B) \]
\end{document}

Related symbols

All الرموز الرياضية →

Frequently asked questions

How do I write Union in LaTeX?
Type \cup in math mode, for example $P(A \cup B) = P(A) + P(B) - P(A \cap B)$. It works in plain LaTeX without loading any package.
Which package do I need for \cup?
None. \cup is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \cup in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\cup$ in running text. If you only need the glyph in text, paste the Unicode character ∪ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث