Set Theory

Understanding sets, operations, and their properties

Definition of a Set

A set is a collection of things (called elements).

Key Properties and Examples:

• The ordering of elements does not matter

Example: \(\{1, 2, 3\} = \{3, 1, 2\}\)

Natural Numbers

\(\mathbb{N} = \{1, 2, 3, \ldots\}\)

Integers

\(\mathbb{Z} = \{\ldots, -2, -1, 0, 1, 2, \ldots\}\)

Rational Numbers

\(\mathbb{Q}\) (all fractions)

Real Numbers

\(\mathbb{R}\) (all numbers on number line)

Interval Notation:

  • Closed interval: \([2,3] = \{x : 2 \leq x \leq 3\}\)
  • Open interval: \((-1,2) = \{x : -1 < x < 2\}\)
  • Half-open interval: \((1,3] = \{x : 1 < x \leq 3\}\)

📖 Set Terminology

Subset

A set \(A\) is a subset of set \(B\) (denoted \(A \subseteq B\)) if every element of \(A\) is also in \(B\).

Set Equality

Two sets \(A\) and \(B\) are equal if \(A \subseteq B\) and \(B \subseteq A\).

Empty Set

A set with no elements is called the empty set or null set, denoted by \(\emptyset\) or \(\phi\).

Universal Set

The universal set is the set of all things we could possibly consider in our context. Every set \(A\) is a subset of the universal set.

Countable Set

A set \(S\) is countable if there exists a bijective function \(f: S \rightarrow \mathbb{N}\).

Examples: \(\mathbb{N}\) and \(\mathbb{Q}\) are countable.

Finite vs. Countably Infinite

  • Finite set: A set with a finite number of elements
  • Countably infinite: A set that is countable but not finite

🎨 Venn Diagrams

Venn diagrams are useful visual tools for analyzing relationships between sets.

Two Sets

U A B

Subset Relationship

U B A

\(A \subseteq B\)

⚙️ Set Operations

Union (\(\cup\))

The union of two sets \(A\) and \(B\), denoted \(A \cup B\), contains all elements that are in \(A\) or in \(B\).

Example:

\(\{1, 2\} \cup \{2, 3\} = \{1, 2, 3\}\)

General Form:

\(A_1 \cup A_2 \cup \cdots \cup A_k = \bigcup_{i=1}^k A_i\)

A B

\(A \cup B\) (shaded region)

Intersection (\(\cap\))

The intersection of two sets \(A\) and \(B\), denoted \(A \cap B\), contains all elements that are in \(A\) and in \(B\).

Example:

\(\{1, 2\} \cap \{2, 3\} = \{2\}\)

General Form:

\(A_1 \cap A_2 \cap \cdots \cap A_k = \bigcap_{i=1}^k A_i\)

A B

\(A \cap B\) (shaded region)

Complement (\(A^c\))

The complement of set \(A\), denoted \(A^c\), contains all elements in the universal set \(U\) that are not in \(A\).

U A

\(A^c\) (shaded region)

Set Difference (\(A - B\))

The set difference \(A - B\) contains elements that are in \(A\) but not in \(B\).

Example:

If \(A = \{1, 2, 3\}\) and \(B = \{3, 5\}\),

then \(A - B = \{1, 2\}\)

Disjoint Sets:

Two sets \(A\) and \(B\) are mutually exclusive or disjoint if they have no shared elements: \(A \cap B = \emptyset\)

A B

\(A - B\) (shaded region)

🔗 Advanced Concepts

Cartesian Product

The Cartesian product of sets \(A = \{a_1, a_2, \ldots, a_m\}\) and \(B = \{b_1, b_2, \ldots, b_n\}\), denoted \(A \times B\), is:

\(A \times B = \bigcup_{i,j} \{(a_i, b_j)\}\)

Example:

If \(A = \{1, 2\}\) and \(B = \{x, y\}\), then:

\(A \times B = \{(1,x), (1,y), (2,x), (2,y)\}\)

Partition of a Set

A collection of nonempty sets \(A_1, A_2, \ldots\) is a partition of set \(A\) if:

  • • They are disjoint (no overlapping elements)
  • • Their union is \(A\)
A A₁ A₂ A₃

Partition: \(A_1 \cup A_2 \cup A_3 = A\) and all disjoint

⚖️ Important Laws

De Morgan's Laws

For any sets \(A_1, A_2, \ldots, A_n\):

\((A_1 \cup A_2 \cup \cdots \cup A_n)^c = A_1^c \cap A_2^c \cap \cdots \cap A_n^c\)

\((A_1 \cap A_2 \cap \cdots \cap A_n)^c = A_1^c \cup A_2^c \cup \cdots \cup A_n^c\)

Distributive Laws

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

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

🧠 Test Your Understanding

Quiz 1:

If \(A\) and \(B\) are countable sets, is \(A \cup B\) also countable?

Quiz 2:

What is \(\{1, 2, 3\} \cap \{3, 4, 5\}\)?

Previous: Counting Next: Sum and Product Rule