Symmetric Difference
The symmetric difference (disjunctive union/disunion) of sets A and B (A ^ B) is the set of all elements that are in set A or in set B but not both. Symmetric difference is also commutative, meaning A ^ B == B ^ A.
Difference
The difference (subtraction) of sets A and B (A – B) is the set of all elements that are in set A and not in set B. Subtraction is not commutative meaning A – B != B – A.
Intersection
The intersection of sets A and B (A ∩ B) is the set of all elements that are contained in both A and B. Note again that the result is still a set (no duplicates). Intersection is also commutative, meaning A ∩ B == B ∩ A.
Union
A set is a collection of elements in which there are no duplicates. The union of sets A and B (A ∪ B or A + B) is the set of all elements that are contained in either A or B (or both). Note that the result is still a set (no duplicates) even if an element is in both A […]