Not all set operations are associative and/or commutative. In
the case of the set difference operation, as the example
demonstrates, the difference operation is not commutative, that
is
.
It is also easily verified that the
difference operation is not associative either, that is
.
These concepts of associativity and commutativity are of
fundamental importance in mathematics. The familiar operations
of addition and multiplication over the real numbers are both
associative and commutative.