Operations on Sets
Learning objectives
- Compute union, intersection, and difference of two sets
- Find the complement of a set relative to a universal set
- State and use De Morgan's laws for sets
- Decide when two sets are disjoint and what that implies
If sets are the nouns of mathematics, the operations on sets are the verbs. Once you can describe collections of objects, you immediately want to combine them: glue two sets together, find the overlap, strip out the parts that share a property. Three operations — union, intersection, and difference — cover almost every combination you will ever need. They map, one-for-one, onto the logical connectives , , and you met in §1.1, and that correspondence lets you prove set identities by translating them into propositional logic and back. The big result of this section — De Morgan's laws for sets — is exactly the logical De Morgan laws wearing a set-theoretic costume.
Union, intersection, difference
Given sets and :
Union: — everything in at least one of , .
Intersection: — everything in both and .
Difference: — what remains of after deleting any elements that also lie in .
Notice the perfect parallel: union is "or," intersection is "and," and difference is "and not." Anything you know about , , and transfers to , , and .
Universal set and complement
In any given problem there is usually a tacit universal set — the larger arena from which all elements are drawn (the integers, the real numbers, the students in a class, etc.). Relative to this , the complement of a set is
If you change the universal set, the complement changes — the complement of "even numbers" inside is the odd integers; inside it is "all reals that are not even integers." Always name your .
De Morgan's laws for sets
The two cornerstone identities of set algebra are:
In words: the complement of a union is the intersection of the complements, and the complement of an intersection is the union of the complements. The proof in each case is one line of propositional logic: . The "push through, flip the connective" trick from logic is the proof of De Morgan for sets.
Disjoint sets
Two sets are disjoint if their intersection is empty: . Disjointness is the set-theoretic version of " and cannot both hold." A collection of pairwise disjoint sets whose union is the whole universal set is called a partition — partitions are the workhorse of counting arguments and (later) equivalence relations.
Pause and think: Why must the universal set be named before you can compute ? Try writing — what does the answer depend on? (Hint: the complement of the same three-element set is wildly different inside , inside , or inside .)
Try it
- Let and . Before computing: predict whether equals . Then compute and and explain what inclusion-exclusion has to do with it.
- Open the Venn-diagram widget. Predict which region represents . Now shade it and check.
- Predict first: if , what is ? What is ? What is ? Verify each with a concrete example.
- Test a De Morgan: take , , . Compute both sides of and verify equality.
- Are and disjoint? Does their union partition ? What would it take to make a three-piece partition of the same universal set?
A trap to watch for
Beginners often confuse with . They are completely different: relates an element to a set (""), while relates a set to a set (""). Mixing them produces nonsense like "" (false — is not a set) or "" (false — the set is not literally one of the three elements). The fix is to ask, every time: "is the left side an element of the right side (use ) or a subset (use )?"
What you now know
You can union, intersect, take differences, and complement sets — and you can prove identities like De Morgan's laws by translating to propositional logic. The next section closes Chapter 1 by tackling the trickiest of the connectives, the conditional , along with its biconditional sibling.
References
- Velleman, D. J. (2019). How to Prove It: A Structured Approach (3rd ed.). Cambridge University Press, ch. 1.
- Halmos, P. R. (1960). Naive Set Theory. Van Nostrand, §§3–5.
- Enderton, H. B. (1977). Elements of Set Theory. Academic Press, ch. 2.
- Kunen, K. (2009). The Foundations of Mathematics. College Publications, ch. 1.