Prerequisite: if you want the notation in this unit to feel familiar, review 1.1 Propositional logic first. Set membership is often read with logical language in the background.
What a set is
Definition
A set
A set is a collection of things.
We write when x is an element of the set , and when it is
not.
Two sets are equal when they have exactly the same elements.
The main operations
| Operation | Symbol | Read as |
| --- | --- | --- |
| Union | | elements in or |
| Intersection | | elements in both and |
| Difference | A \ B | elements in but not in |
| Complement | | elements outside in a chosen universal set |
See the operations on a concrete example
Worked example
Track elements through two sets
Let and .
Then:
If the universal set is , then .
Solution
A quick De Morgan check
A note on two extra constructions
The local notes also introduce two useful constructions:
- , the Cartesian product, is the set of ordered pairs
(a, b). P(A), the power set, is the set of all subsets of .
These are worth recognizing early, even if you only use them in a few places in this unit.
Common mistake
Common mistake
Do not confuse complement and difference
depends on a universal set. A \ B depends on a second set. They are not
the same idea.
Quick check
Quick check
If and , what is ?
Work directly from the definition of intersection: keep only the elements that belong to both sets.
Solution
Answer
Pause and test the idea
Read and try
Compare one pair of sets
The live explorer lets you move elements in and out of A and B and watch the resulting operations update immediately.
Set A
Set B
Union
{1, 2, 3, 4}
Intersection
{2, 4}
Difference A \ B
{1}