Sets and Set Theory
Set representation and manipulation
Updated Oct 20, 2026
U: A universal set is a set containing everything.
Venn diagram: used to visualise the possible relations among a collection of sets.
Example: Venn diagram of .
Complement of a set: contains all the elements in the universal set U but not in A.
U = {1, 2, 3, 4, 5}
A = {2, 3}
= {1, 4, 5}
Example exercise
Use a Venn diagram to show that :
Same for both lol
De Morgan's laws
Mathematical statements and concepts are related thru their opposites -> intersection and union of sets.
The complement of the union of two sets A and B is equal to the intersection of their complements:
The complement of the intersection of two sets A and B is equal to the union of their complements:

Law of sets: commutative, associative and distributive
Commutativity: set union, set intersection and symmetric difference. Set difference IS NOT commutative.
Associativity: grouping of elements, does not affect the result. Set union, set intersection and symmetric difference apply. Set difference IS NOT associative.
Distributivity: law of multiplication and division.

Commutative laws
The commutative laws state that the order in which two sets are combined does not affect the result.
UNION:
Let and be two sets, then:
INTERSECTION:
Let and be two sets, then:
Associative laws
The associative laws state that the grouping of sets does not affect the result when performing union or intersection.
UNION:
Let , and be three sets, then:
INTERSECTION:
Let , and be three sets, then:
Distributive laws
The distributive laws describe how union and intersection distribute over each other.
Union over intersection:
Let , and be three sets, then:
The union of everything in A with everything in common between B and C
equals
The union of everything in common between everything in A and B and everything in A and C
Intersection over union:
Let , and be three sets, then:
Everything in common between A and the union of everything in B and C
equals
Everything in common between A and B plus everything in common between A and C
Identity laws
The identity laws state that combining a set with the universal set or the empty set yields the set itself.
Union with empty set:
Intersection with universal set:
Complement laws
The complement laws describe the relationship between a set and its complement.
The notations and both represent the same concept in set theory and logic:
Union with complement:
Intersection with complement:
Absorption laws
The absorption laws simplify expressions by showing how combining a set with another set and their union or intersection affects the result.
UNION:
Let and be two sets, then:
INTERSECTION:
Let and be two sets, then:
Double negation laws
The double negation law states that taking the complement of a complement returns the original set:
Set difference laws
The difference of set A and set B, denoted as A − B or A \ B, is the set of elements that are in A but not in B. This can also be expressed using the intersection with the complement of B:
For example:
Let A={1,2,3} and B={2,3,4}. Then:
Partition of a set
Disjoint sets: two sets are disjoint if and only if their intersection is .
A partition of A is a set of subsets of of A such as: all the subsets are disjoints and the union of all subsets is equal to A.
