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 A ⊆ UA\ \subseteq\ U.

Drawing

Complement of a set: contains all the elements in the universal set U but not in A.

A‾=U−A\overline{A} = U-A

U = {1, 2, 3, 4, 5}

A = {2, 3}

A‾\overline{A} = {1, 4, 5}

Example exercise

Use a Venn diagram to show that A (+) B=A ∪B −(A ∩B)A\ (+)\ B = A\ \cup B\ -(A\ \cap B):

Same for both lol

Drawing

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: A∪B‾=A‾∩B‾\overline{A \cup B} = \overline{A} \cap \overline{B}

  • The complement of the intersection of two sets A and B is equal to the union of their complements: A∩B‾=A‾∪B‾\overline{A \cap B} = \overline{A} \cup \overline{B}

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 AA and BB be two sets, then:

A∪B=B∪AA \cup B = B\cup A

INTERSECTION:

Let AA and BB be two sets, then:

A∩B=B∩AA \cap B = B\cap A

Associative laws

The associative laws state that the grouping of sets does not affect the result when performing union or intersection.

UNION:

Let AA, BB and CC be three sets, then:

(A∪B)∪C=A∪(B∪C)(A \cup B) \cup C = A \cup( B\cup C)

INTERSECTION:

Let AA, BB and CC be three sets, then:

(A∩B)∩C=A∩(B∩C)(A \cap B) \cap C = A \cap( B\cap C)

Distributive laws

The distributive laws describe how union and intersection distribute over each other.

Union over intersection:

Let AA, BB and CC be three sets, then:

A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A\cup B) \cap (A \cup C)

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

Drawing

Intersection over union:

Let AA, BB and CC be three sets, then:

A∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A\cap B) \cup (A \cap C)

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: A∪∅=AA \cup \emptyset = A

  • Intersection with universal set: A∩U=AA \cap U = A

Complement laws

The complement laws describe the relationship between a set and its complement.

The notations A‾\overline{A} and AcA^{c} both represent the same concept in set theory and logic:

  • Union with complement: A∪A‾=AA \cup \overline{A} = A

  • Intersection with complement: A∩A‾=∅A \cap \overline{A} = \emptyset

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 AA and BB be two sets, then:

A∪(A∩B)=AA \cup (A \cap B) =A

INTERSECTION:

Let AA and BB be two sets, then:

A∩(A∪B)=AA \cap (A \cup B) =A

Double negation laws

The double negation law states that taking the complement of a complement returns the original set: (A‾)c=A\left( {\overline{A}} \right)^{c} = A

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:

A−B=A∩BcA - B = A \cap B^{c}

For example:

Let A={1,2,3} and B={2,3,4}. Then:

Bc=1B^{c} = 1

A∩Bc={1,2,3}∩{1}={1} and A−B=1A ∩ B^{c}= \{1,2,3 \}∩\{1\}=\{1\}\ and\ A−B={1}


Partition of a set

  • Disjoint sets: two sets are disjoint if and only if their intersection is ∅\emptyset.

A partition of A is a set of subsets of AiA_{i} of A such as: all the subsets AiA_{i} are disjoints and the union of all subsets AiAi is equal to A.