2.2 Algebra of Sets
There are operations that we can do on sets to form new sets. These operations can be interpreted as set-theoretic implementations of the Boolean operations and, or, & not. They also have satisfying parallels with operations and relations that we are familiar with for numbers. For the next three definitions, let and be sets.
Definition 2.6.
The union of and , , is defined as
Where ‘or’ is inclusive, so the union includes all elements of both and .
Definition 2.7.
The intersection of and , , is defined as
So the intersection includes only elements that are in both sets. and are said to be disjoint if and only if , i.e. they have no elements in common.
Definition 2.8.
The difference of and , , is defined as
We can also use this operation to define the complement of a set. For example, if is a subset of some set , then the complement of in is given by , i.e. the elements of that are not in .
Definition 2.9.
The Cartesian product of and , , is defined as
So in plain speech, the Cartesian product of two sets is the set of all ordered pairs where the first component is a member of the first set and the second component is a member of the second set. It can be seen as a generalisation of the notion of Cartesian coordinates in the plane. Sometimes the Cartesian product of a set with itself is noted as instead of , for example denoting the set of all integer points in the plane.