SET
THEORY
A Set is a collection of distinct objects. It is the most fundamental concept in mathematics. Before we can count, measure, or compute, we must first learn to group.
a bunch of grapes,
or a flock of pigeons."
- Georg Cantor
Venn Logic
We manipulate sets using Operations. Just as arithmetic adds numbers, set theory unions and intersects collections.
Union
Everything in A OR B (or both). The "Marriage" of sets.
The Language
Set
A well-defined collection of distinct objects.
Element
An object that belongs to a set.
Subset
Set A is a subset of B if every element of A is also in B.
Empty Set
A set containing no elements. The "zero" of set theory.
Cardinality
The number of elements contained in a set.
Universal Set
The set containing all objects under consideration.
Why This Matters?
Set Theory is the foundation of Databases (SQL). When you query a database, you are essentially performing Unions, Intersections, and Differences on massive sets of data rows.