Set Difference
High school
Consider1 two sets $A$ and $B$. The set difference $A \setdiff B$ is the set of elements of $A$ that are not in $B$.
Examples
Examples
-
$\setdef{1, 2, 3} \setdiff \setdef{2}$ is a set difference because it removes the elements of $\setdef{2}$ from $\setdef{1, 2, 3}$.
Worked examples
-
Value:
$A \setdiff B = \setdef{1, 2}$
Notes
Most texts write the set difference as $A \setminus B$, and some write it as $A - B$. Readers can choose either one in the notation settings.
Distinctions involving this term
- Types of Difference: Many quantities compare two things by “how far apart” they are. A difference is the result of subtraction and can be negative. No distance is negative. An error compares an approximation with the truth, a change compares the end with the start, and a set difference removes elements.
All definitions · All distinctions · All examples · Notation