\smallsetminus

The \smallsetminus command in LaTeX is used to denote the set-theoretic difference between two sets. It is a binary operator that is often used in mathematical expressions to indicate the elements that belong to one set but not to another.

Examples

The set of elements in A that are not in B.

A \smallsetminus B

The set of all real numbers that are not rational numbers, i.e., the irrational numbers.

\mathbb{R} \smallsetminus \mathbb{Q}

The set S excluding the element x.

S \smallsetminus \{x\}