Set Identities

Learn about the identities of sets and how they can be proved.

Commutativity

We know that the union and intersection operations are commutative. We also know that the set difference operation is not commutative. There’s a difference between keeping the elements of AA that are not in BB and keeping the elements of BB that are not in AA. Both sets can have elements that are not common. Therefore, we can say that ABBA{A\setminus B} \ne {B\setminus A}. But if we look at the symmetric difference, we can see that it’s commutative. This is because the union operation is commutative, as exhibited below:

Further, the Cartesian product is not commutative. That is, for arbitrary sets AA and BB, A×BB×AA\times B \ne B\times A. In other words:

Associativity

The union and intersection operations are associative. Now, let’s look at the other set operations and see if they are also associative.

Set difference

For the set difference operation, we use (AB)CA(BC)(A\setminus B)\setminus C \ne A \setminus (B \setminus C). To see the reason, let’s construct a counterexample. Take the sets X={1,2,3,4,5}X = \{1,2,3,4,5\}, Y={2,3,4,5}Y=\{2,3,4,5\}, and Z={3,4,5}Z=\{3,4,5\}.

We can note that (XY)Z={1}(X\setminus Y)\setminus Z =\{1\}. Whereas on the other side, we have X(YZ)={1,3,4,5}X \setminus (Y \setminus Z) = \{1,3,4,5\}. This concludes the argument.

The relation above can be proved through Venn diagrams for both the LHS and the RHS, as shown below:

Nonassociativity for the set difference (LHS)
Nonassociativity for the set difference (LHS)
Nonassociativity for the set difference (RHS)
Nonassociativity for the set difference (RHS)

Symmetric difference

Let’s revisit the following definition of the symmetric difference between the two sets AA and BB:

Let’s see the associativity for their symmetric difference. Are the sets (AB)C(A\oplus B)\oplus C and A(BC)A\oplus (B\oplus C) equal?

To solve this problem, let x(AB)Cx \in (A\oplus B)\oplus C . This implies the following:

(x(AB)x∉C)(x∉(AB)xC)(((xAx∉B)(x∉AxB))x∉C)(((xA ...