Sets
Definition FACT
A set is a collection of well-defined objects called its elements. For example, we write
A={2,4,6}
and 4∈A to say that 4 belongs to A. Conversely, 5∈/A.
Order and repetitions do not change a set: {2,4,6}, {6,4,2} and {2,2,4,6} denote the same set. Only one question matters: which elements belong to the collection?
Describing a set FACT
Its elements can be listed by extension:
B={a,e,i,o,u}
or defined by a property:
C={n∈N∣n<5}={0,1,2,3,4}
Here we use the convention 0∈N. The vertical bar is read “such that.” The property must decide unambiguously whether an object belongs to the set.
Empty set, equality and cardinality FACT
The empty set, written ∅, contains no element. It must not be confused with {∅}, which contains one element: the empty set itself.
Two sets are equal if they have exactly the same elements. For a finite set A, its cardinality $|A|$ is its number of elements. Thus, if A={2,4,6}, then $|A|=3$.
Inclusion and subsets FACT
We write A⊆B when every element of A also belongs to B. For example,
{2,4}⊆{1,2,3,4}
Membership and inclusion are not the same relation: 2∈A compares an object with a set; A⊆B compares two sets.
Every set is included in itself, and the empty set is included in every set.
Three fundamental operations FACT
Let A={1,2,3} and B={3,4}.
| Operation | Meaning | Result |
|---|---|---|
| Union A∪B | Elements in A or in B | {1,2,3,4} |
| Intersection A∩B | Elements shared by A and B | {3} |
| Difference A∖B | Elements of A that are not in B | {1,2} |
The word “or” in a union is inclusive: an element present in both sets does belong to the union, but appears there only once.
If a universal set U is fixed, the complement of A in U is U∖A. Without an explicitly chosen universe, “the complement of A” is incomplete.
Diagrams help, but do not define FACT
A Venn diagram represents sets as regions. Overlap visualizes intersection, and the combined regions visualize union. It is a reasoning aid, not the definition: a proof must return to membership conditions.
To show A∩B⊆A, take an arbitrary element x∈A∩B. By definition of intersection, x∈A and x∈B; therefore x∈A. The inclusion is proved.
Why the abstraction is useful FACT
Sets provide a common vocabulary for mathematics and computer science. A domain of values, query results, graph vertices or cases accepted by a rule can all be treated as sets. Relations then become sets of ordered pairs, and functions rely on a domain and a codomain.
This idea is therefore a direct prerequisite for studying relations, functions, databases, probability and graphs.
Summary
A set is determined by its elements: membership connects an object to a set; inclusion compares two sets; union, intersection and difference build new sets.
