Set Notations in LaTeX

Last Updated : 14 Mar, 2026

LaTeX is widely used for typesetting mathematical expressions and provides many commands to represent set notation clearly and accurately. Since set notation is frequently used in mathematics, LaTeX makes it easy to write and format these symbols properly.

Set theory plays a fundamental role in logic, mathematics, and computer science. One commonly used form is set-builder notation, which describes a set by specifying the property that its elements must satisfy.

For example, an empty set is represented as \varnothing.

Symbols and Their LaTeX Code

This table shows how to write common set notation symbols in LaTeX with examples - perfect for students learning math typesetting:

Symbol NameSymbolLaTeX Code
Empty Set\varnothing
Element of\in
Not an Element of\notin
Subset\subset
Subset or Equal to\subseteq
Proper Subset\subsetneq
Superset\supset
Superset or Equal to\supseteq
Proper Superset\supsetneq
Union\cup
Intersection\cap
Set DifferenceA \ BA \setminus B
ComplementAᶜA^{c}
Symmetric Difference\triangle
Cartesian Product×\times
Power Set℘(A)\mathcal{P}(A)
Cardinality|A|`
Set Builder Notation{ x | P(x) }\{ x \mid P(x) \}
Union of Indexed Sets\bigcup
Intersection of Indexed Sets\bigcap
Cartesian PowerAⁿA^{n}
Set of Functions from A to BBᴬB^{A}
Disjoint SetsA ∩ B = ∅A \cap B = \varnothing

Set Notation Examples in LaTeX

The following examples show the usage of LaTeX to represent different set notations:

Example 1: Write a ∈ A

a \in A

Example 2: Write A ⊂ B

A \subset B

Example 3: Write A\B

A \setminus B

Example 4: Write {x ∈ \mathbb{R} | x > 0}

\{ x \in \mathbb{R} \mid x > 0 \}

Comment