01 / 20

Set Notation &
Operations

Master the language of sets: union, intersection, and complement: the building blocks of discrete mathematics and logic.

Discrete Math

What Is a Set?

A set is a well-defined collection of distinct objects, called elements or members. Sets are typically named with uppercase letters and their elements are listed inside curly braces.

Essential Set Notation

\( \in \) and \( \notin \)
"Is an element of" and "is not an element of"
\( \subseteq \)
"Is a subset of": every element of A is also in B
\( \emptyset \) or \( \{\} \)
The empty set: contains no elements at all
\( |A| \)
Cardinality: the number of elements in set A

Why Sets Matter

Sets are the foundation of modern mathematics. Every structure you study: functions, relations, probability, and logic: is built on set theory. Understanding set operations lets you reason precisely about collections of objects.

1
Computer Science: databases, search queries, and data filtering all use set operations.
2
Probability: events are sets of outcomes. Union = "or", intersection = "and".
3
Logic: Boolean algebra maps directly to set operations through De Morgan's Laws.

Union: \( A \cup B \)

U A B
\( A \cup B \): everything in either set

Intersection: \( A \cap B \)

U A B
\( A \cap B \)
\( A \cap B \): only what they share

Complement: \( A' \) or \( \overline{A} \)

U A
\( A' \)
\( A' \): everything outside A

Core Definitions at a Glance

Union \( \cup \)
\( A \cup B = \{x \mid x \in A \text{ or } x \in B\} \)
Intersection \( \cap \)
\( A \cap B = \{x \mid x \in A \text{ and } x \in B\} \)
Complement \( A' \)
\( A' = \{x \mid x \in U, x \notin A\} \)

Set Difference vs. Symmetric Difference

Difference \( A \setminus B \)
Elements in A but not in B.
\( A \setminus B = \{x \mid x \in A \text{ and } x \notin B\} \)
Symmetric Diff \( A \triangle B \)
Elements in either A or B, but not both.
\( A \triangle B = (A \setminus B) \cup (B \setminus A) \)

Union vs. Intersection

Union \( A \cup B \) Intersection \( A \cap B \)
Logic equivalent OR AND
Includes Everything from either Only shared elements
Size relationship \( |A \cup B| \ge |A|, |B| \) \( |A \cap B| \le |A|, |B| \)
Identity element \( A \cup \emptyset = A \) \( A \cap U = A \)
Domination \( A \cup U = U \) \( A \cap \emptyset = \emptyset \)

De Morgan's Laws

First Law
\( (A \cup B)' = A' \cap B' \)
The complement of a union is the intersection of the complements.
Second Law
\( (A \cap B)' = A' \cup B' \)
The complement of an intersection is the union of the complements.

How to Evaluate Set Expressions

1
List the elements of each set and the universal set \( U \) explicitly.
2
Work from the inside out. Evaluate the innermost operation first, just like order of operations in arithmetic.
3
Apply the complement last (unless parentheses dictate otherwise). Remember: \( A' = U \setminus A \).
4
Draw a Venn diagram if the expression has two or more operations: shading regions makes results visible.
5
Verify: check that every listed element satisfies the original expression's conditions.

Example 1: Union & Intersection

Let \( A = \{1, 2, 3, 4\} \) and \( B = \{3, 4, 5, 6\} \). Find \( A \cup B \) and \( A \cap B \).

U 1 2 3 4 5 6 A B

Example 2: Complement

Let \( U = \{1, 2, 3, 4, 5, 6, 7, 8\} \) and \( A = \{2, 4, 6, 8\} \). Find \( A' \).

1
Identify U: \( U = \{1, 2, 3, 4, 5, 6, 7, 8\} \)
2
Remove A's elements from U: take out 2, 4, 6, 8.
3
Result: \( A' = \{1, 3, 5, 7\} \): the odd numbers.

Example 3: Combined Operations

Let \( U = \{1,2,3,4,5,6,7,8,9,10\} \), \( A = \{1,2,3,4,5\} \), \( B = \{4,5,6,7\} \). Find \( (A \cup B)' \).

1
Compute \( A \cup B \): \( \{1,2,3,4,5\} \cup \{4,5,6,7\} = \{1,2,3,4,5,6,7\} \)
2
Take the complement: \( U \setminus \{1,2,3,4,5,6,7\} = \{8,9,10\} \)
3
Verify with De Morgan's: \( A' = \{6,7,8,9,10\} \), \( B' = \{1,2,3,8,9,10\} \), so \( A' \cap B' = \{8,9,10\} \) ✓

Common Mistakes

✕ Duplicating Elements
Writing \( \{1,2,3\} \cup \{2,3,4\} = \{1,2,2,3,3,4\} \). Sets never contain duplicates: the correct result is \( \{1,2,3,4\} \).
✕ Forgetting the Universal Set
Computing \( A' \) without knowing \( U \). The complement depends entirely on which universal set is defined.
✕ Confusing \( \cup \) and \( \cap \)
Union means "or" (bigger result), intersection means "and" (smaller result). Mixing them up reverses the logic.

Summary of Set Operations

Operation Symbol Meaning Key Identity
Union \( A \cup B \) In A or B (or both) \( A \cup \emptyset = A \)
Intersection \( A \cap B \) In both A and B \( A \cap U = A \)
Complement \( A' \) In U but not A \( (A')' = A \)
Difference \( A \setminus B \) In A but not B \( A \setminus A = \emptyset \)
Sym. Diff. \( A \triangle B \) In A or B, not both \( A \triangle A = \emptyset \)

Question 1 of 5

If \( A = \{a, b, c\} \) and \( B = \{b, c, d, e\} \), what is \( A \cap B \)?

Question 2 of 5

If \( U = \{1,2,3,4,5,6\} \) and \( A = \{1,3,5\} \), what is \( A' \)?

Question 3 of 5

Which of the following is De Morgan's Law?

Question 4 of 5

If \( A = \{1,2,3,4,5\} \) and \( B = \{4,5,6,7\} \), what is \( A \setminus B \)?

Question 5 of 5

For any set \( A \), which statement is always true?