Set Operations
Commonly, sets interact. For example, you and a new roommate decide to have a house party, and you both invite your circle of friends. At this party, two sets are being combined, though it might turn out that there are some friends that were in both sets.
set operations: union, intersection, complement, and difference
- The union of two sets contains all the elements contained in either set (or both sets).
- The union is notated [latex]A \cup B[/latex]. More formally, [latex]x \in A \cup B[/latex] if [latex]x \in A[/latex] or [latex]x \in B[/latex] (or both).
- The intersection of two sets contains only the elements that are in both sets.
- The intersection is notated [latex]A \cap B[/latex]. More formally, [latex]x \in A \cap B[/latex] if [latex]x \in A[/latex] and [latex]x \in B[/latex].
- The complement of a set [latex]A[/latex] contains everything that is not in the [latex]A[/latex].
- The complement is notated [latex]A'[/latex], or [latex]A^c[/latex], or sometimes ~[latex]A[/latex].
- The difference of two sets is the list of all the elements that are in one set but not present in the other.
- The difference between two sets is notated [latex]A \setminus B[/latex]. More formally, [latex]x \in A \setminus B[/latex] if [latex]x \in A[/latex] & [latex]x \notin B[/latex].
Let’s try applying the set operations.
- [latex]A = \{\text{red, green, blue}\}[/latex]
- [latex]B = \{\text{red, yellow, orange}\}[/latex]
- [latex]C = \{\text{red, orange, yellow, green, blue, purple}\}[/latex]
Find the following:
- Find [latex]A \cup B[/latex]
- Find [latex]A \cap B[/latex]
- Find [latex]A^c \cap C[/latex]
Set operations can be grouped together – for example, [latex]A^c \cap C[/latex]. Grouping symbols can be used like they are with arithmetic – to force an order of operations.
universal set
A universal set is a set that contains all the elements we are interested in. This would have to be defined by the context.
A complement is relative to the universal set, so [latex]A^c[/latex] contains all the elements in the universal set that are not in [latex]A[/latex].
Sets and Subsets
You can view the transcript for “THREE EXERCISES IN SETS AND SUBSETS – DISCRETE MATHEMATICS” here (opens in new window).
You can view the transcript for “Intersection of Sets, Union of Sets and Venn Diagrams” here (opens in new window).
You can view the transcript for “Sets: Elements Of and Subsets” here (opens in new window).