Definitions & Notation
Sets, elements, and how we write them
Set
A well-defined collection of distinct objects, called elements (or members). "Well-defined" means that for every object it is possible to determine whether it belongs to the collection or not.
Element
An object that belongs to a set. We write x ∈ S to mean "x is an element of S" and x ∉ S to mean "x is not an element of S."
Universal Set U
The set of all elements under consideration in a given context. Every set in the discussion is a subset of U. The choice of U depends on the problem.
Convention — 0 ∈ ℕ in this course. Some textbooks start the natural numbers at 1, but in Discrete Mathematics we follow the convention ℕ = {0, 1, 2, 3, …}.
Standard Number Sets
ℕ = {0, 1, 2, 3, …} (natural numbers)
ℤ = {…, −2, −1, 0, 1, 2, …} (integers)
ℚ = the set of all rational numbers (fractions p/q where p, q ∈ ℤ and q ≠ 0)
ℝ = the set of all real numbers (rationals and irrationals)
Roster Notation
A way of describing a set by explicitly listing all of its elements between curly braces, separated by commas. For example, {1, 2, 3} is the set containing exactly 1, 2, and 3.
Set-Builder Notation
A way of describing a set by specifying a property that its elements must satisfy. Written as {x ∈ S | P(x)}, which reads "the set of all x in S such that P(x) is true." The vertical bar | (or colon :) means "such that."
Write in set-builder notation: "the set of natural numbers less than 5."
Empty Set
The set with no elements, denoted ∅ or {}. It is unique: there is exactly one set with no elements.
∅ ≠ {∅} — the empty set is different from a set containing the empty set. ∅ has 0 elements, but {∅} has 1 element (that element is ∅ itself). This distinction comes up frequently on exams!
Singleton
A set with exactly one element, written {a}. For example, {7} is the singleton containing only the number 7. Note that a ≠ {a} — an element is not the same as the singleton set containing it.
Is 3 ∈ {1, 2, 3}? Is {3} ∈ {1, 2, 3}?
Section Quiz
Test your understanding with 6 questions
Relationships
Subsets, equality, and common traps
Subset
A is a subset of B, written A ⊆ B, if and only if every element of A is also an element of B. Formally: A ⊆ B ⟺ ∀x(x ∈ A → x ∈ B).
Proper Subset
A is a proper subset of B, written A ⊂ B, if and only if A ⊆ B and A ≠ B. This means every element of A is in B, but B contains at least one element not in A.
A ⊆ B ⟺ ∀x(x ∈ A → x ∈ B)
Empty Set Subset
∅ ⊆ A for every set A.
Subset Reflexivity
A ⊆ A for every set A.
Set Equality
Two sets A and B are equal, written A = B, if and only if A ⊆ B and B ⊆ A. This is called the principle of double containment (or mutual inclusion). In other words, A and B have exactly the same elements.
Prove that {1, 2, 3} = {3, 1, 2}.
Common mistake — confusing ∈ and ⊆.
• 1 ∈ {1, 2} ✓ (1 is an element of the set)
• {1} ⊆ {1, 2} ✓ ({1} is a subset — every element of {1} is in {1, 2})
• 1 ⊆ {1, 2} ✗ (1 is not a set, so ⊆ does not apply)
• {1} ∈ {1, 2} ✗ (the elements of {1, 2} are 1 and 2, not {1})
Remember: ∈ relates an element to a set; ⊆ relates a set to a set.
Let A = {1, {2}}. Determine which of the following are true: 1 ∈ A, {2} ∈ A, 2 ∈ A, {1} ⊆ A.
Section Quiz
Test your understanding with 6 questions
Operations
Combining and separating sets
Union
The union of A and B, written A ∪ B, is the set of all elements that belong to A or to B (or both). A ∪ B = {x | x ∈ A or x ∈ B}.
Intersection
The intersection of A and B, written A ∩ B, is the set of all elements that belong to both A and B. A ∩ B = {x | x ∈ A and x ∈ B}.
Complement
The complement of A (with respect to the universal set U), written Ā, A', or Aᶜ, is the set of all elements in U that are not in A. Aᶜ = {x ∈ U | x ∉ A}.
Two important special cases of complement:
• Uᶜ = ∅ (nothing can be in U and not in U at the same time)
• ∅ᶜ = U (every element of U is not in the empty set)
Set Difference
The difference of A and B, written A \ B or A − B, is the set of all elements that belong to A but not to B. A \ B = {x | x ∈ A and x ∉ B}.
Symmetric Difference
The symmetric difference of A and B, written A △ B, is the set of elements that belong to exactly one of A or B. Equivalently:
A △ B = (A \ B) ∪ (B \ A) = (A ∪ B) \ (A ∩ B).
Let U = {1, 2, 3, 4, 5}, A = {1, 2, 3}, B = {3, 4, 5}. Find A ∪ B, A ∩ B, A \ B, B \ A, and Ā.
Think of ∪ as "or", ∩ as "and", complement as "not", and \ as "but not". This maps directly to logical connectives and helps you translate between set expressions and logic.
A ∩ B = {x | x ∈ A ∧ x ∈ B}
When are two sets disjoint? Give an example.
Section Quiz
Test your understanding with 6 questions
De Morgan's Laws
The two laws that flip everything
De Morgan's First Law
(A ∪ B)ᶜ = Aᶜ ∩ Bᶜ
The complement of a union is the intersection of the complements.
De Morgan's Second Law
(A ∩ B)ᶜ = Aᶜ ∪ Bᶜ
The complement of an intersection is the union of the complements.
Memory trick by Yusuf (Y-U-S-U-F)
Say it out loud:
• If you can't be in both, then you're missing at least one.
→ (A ∩ B)ᶜ = Aᶜ ∪ Bᶜ
"Not in A AND B" means "not in A OR not in B."
• If you're not in either one, then you're missing both.
→ (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ
"Not in A OR B" means "not in A AND not in B."
The complement always flips the operation: AND ↔ OR, ∩ ↔ ∪.
Give an element-chasing proof that (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ.
Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A = {1, 2, 3, 4}, B = {3, 4, 5, 6}. Verify that (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ.
De Morgan's Laws extend to any finite (or even infinite) number of sets:
(A₁ ∪ A₂ ∪ … ∪ Aₙ)ᶜ = A₁ᶜ ∩ A₂ᶜ ∩ … ∩ Aₙᶜ
(A₁ ∩ A₂ ∩ … ∩ Aₙ)ᶜ = A₁ᶜ ∪ A₂ᶜ ∪ … ∪ Aₙᶜ
The pattern is the same: complement distributes by flipping ∪ and ∩.
Section Quiz
Test your understanding with 6 questions
Theorems & Proof Patterns
Learn the patterns first, then the laws
This section is longer and a bit harder than the earlier ones. First you'll learn three proof patterns, then the algebra laws. Take it step-by-step, Tasnim — there's no rush.
Master these three proof patterns and you can handle almost any set proof on the exam.
Proof Pattern: Subset (A ⊆ B)
To prove A ⊆ B, pick an arbitrary element from A and show it must also be in B.
Template:
1. "Let x ∈ A."
2. Use definitions to figure out properties of x.
3. Conclude "so x ∈ B."
4. Since x was arbitrary, A ⊆ B. □
This is called "element chasing" — you chase a generic element from one side to the other.
Prove that (A ∩ B) ⊆ A.
Hint: If x is in the intersection, what do you know about x?
Always start with "Let x ∈ [left side]" and work toward showing "x ∈ [right side]." Never start with the right side. This direction matters for the proof to be logically correct.
Try it yourself: Can you prove that A ⊆ A? (Every set is a subset of itself.) Use the template above — it should be just 2-3 lines.
Proof Pattern: Equality (A = B)
To prove A = B, show both directions:
1. Show A ⊆ B (every element of A is in B).
2. Show B ⊆ A (every element of B is in A).
This is called "double containment" or "mutual inclusion." If both sides contain each other, they must be the same set.
Prove that A ∩ (A ∪ B) = A. (This is the absorption law — we'll name it properly below.)
Hint: For ⊆, start with x in the left side. For ⊇, start with x in A.
Try it yourself: Prove that A ∪ (A ∩ B) = A. (Hint: this is the other absorption law. Use double containment — show each side is a subset of the other.)
Proof Pattern: Empty Set (A = ∅)
To prove A = ∅, show that no element can be in A. The most common way is proof by contradiction:
1. "Suppose for contradiction that x ∈ A."
2. Derive a contradiction (like x ∈ S and x ∉ S).
3. Conclude "no such x exists, so A = ∅."
Prove that A ∩ (B ∩ Aᶜ) = ∅.
Hint: Assume an element exists in the set and find a contradiction.
Try it yourself: Prove that A ∩ Aᶜ = ∅. (Hint: assume x ∈ A ∩ Aᶜ and show you get a contradiction.)
Now the laws. Think of these like arithmetic rules but for sets — they let you simplify and transform expressions.
Commutative Laws
A ∪ B = B ∪ A
A ∩ B = B ∩ A
Order doesn't matter for union or intersection, just like 3 + 5 = 5 + 3 in arithmetic.
Associative Laws
A ∪ (B ∪ C) = (A ∪ B) ∪ C
A ∩ (B ∩ C) = (A ∩ B) ∩ C
Grouping doesn't matter. You can drop the parentheses and just write A ∪ B ∪ C or A ∩ B ∩ C.
Identity Laws
A ∪ ∅ = A
A ∩ U = A
Union with the empty set changes nothing (∅ adds no elements). Intersection with the universal set changes nothing (everything in A is already in U).
Domination Laws
A ∪ U = U
A ∩ ∅ = ∅
Union with U always gives U (you can't go beyond everything). Intersection with ∅ always gives ∅ (there's nothing to share).
Idempotent Laws
A ∪ A = A
A ∩ A = A
Combining a set with itself gives back the same set.
Complement Laws
A ∪ Aᶜ = U
A ∩ Aᶜ = ∅
Every element in U is either in A or not in A — so their union is all of U. And nothing can be in A and not in A at the same time — so their intersection is empty.
Involution Law (Double Complement)
(Aᶜ)ᶜ = A
Complementing twice gives you back the original set. "Not not A" is just A.
Absorption Laws
A ∪ (A ∩ B) = A
A ∩ (A ∪ B) = A
A "absorbs" the extra part. A ∩ B is already inside A, so unioning adds nothing. Similarly, every element of A is in A ∪ B, so the intersection just gives A.
Distributive Laws
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
Union distributes over intersection, and intersection distributes over union. It works just like how multiplication distributes over addition: a × (b + c) = a × b + a × c.
De Morgan's Laws (recap)
(A ∪ B)ᶜ = Aᶜ ∩ Bᶜ
(A ∩ B)ᶜ = Aᶜ ∪ Bᶜ
We covered these in detail in the De Morgan section. The complement flips ∪ ↔ ∩.
You don't need to memorize all of these perfectly — the exam usually gives you a reference sheet. What matters is that you can recognize which law applies and use it correctly in proofs and simplifications.
Practice proofs (exam-style) Try each proof on paper first, then reveal the solution. These are the kinds of proofs that show up on exams.
Practice proof 1: Prove that (A ∩ B) ⊆ A.
Hint: Use the subset proof pattern. Start with "Let x ∈ A ∩ B."
Practice proof 2: Prove that if A ⊆ B, then A ∩ C ⊆ B ∩ C.
Hint: Start with "Let x ∈ A ∩ C" and use the assumption A ⊆ B.
Practice proof 3: Prove that A ∩ (B ∩ Aᶜ) = ∅.
Hint: Use the empty set proof pattern: assume an element exists and find a contradiction.
Practice proof 4: Prove that (A ∩ B) ∪ (A ∩ Bᶜ) = A.
Hint: This says A can be split into two parts based on B. Use double containment.
Section Quiz
Test your understanding with 6 questions
Cardinality & Power Set
Counting elements and subsets
Cardinality
The cardinality of a finite set A, written |A|, is the number of distinct elements in A. For example, |{a, b, c}| = 3.
Duplicates don't count! Since sets contain only distinct elements, repetition in roster notation doesn't increase cardinality. |{1, 1, 2}| = |{1, 2}| = 2.
Find |∅|, |{a}|, and |{1, 2, 3}|.
Power Set
The power set of A, written P(A) or 𝒫(A), is the set of all subsets of A, including the empty set ∅ and A itself. P(A) = {S | S ⊆ A}.
|P(A)| = 2^{|A|}
Find P(A) and |P(A)| for A = {1, 2}.
Find P(A) and |P(A)| for A = {a, b, c}.
To find P(A), systematically include or exclude each element of A. Each element has 2 choices (in or out), giving 2ⁿ subsets total. Organizing subsets by size (0, 1, 2, …, n) helps ensure you don't miss any.
Inclusion-Exclusion Principle (Two Sets)
|A ∪ B| = |A| + |B| − |A ∩ B|
When counting the union, we add the sizes of A and B but subtract the overlap (intersection) to avoid double-counting elements that appear in both sets.
Section Quiz
Test your understanding with 6 questions
Cartesian Product
Ordered pairs and product sets
Ordered Pair
An ordered pair (a, b) is a pair of objects where the order matters. Two ordered pairs are equal if and only if their corresponding components are equal: (a, b) = (c, d) ⟺ a = c and b = d. In particular, (a, b) ≠ (b, a) unless a = b.
Cartesian Product
The Cartesian product of A and B, written A × B, is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. A × B = {(a, b) | a ∈ A and b ∈ B}.
|A × B| = |A| · |B|
Let A = {1, 2} and B = {x, y}. Find A × B and |A × B|.
A × B ≠ B × A in general! For example, if A = {1} and B = {x}, then A × B = {(1, x)} and B × A = {(x, 1)}. Since (1, x) ≠ (x, 1), the two products are different sets.
Find {1, 2} × {1, 2}.
ℝ × ℝ = ℝ² is the Cartesian plane — the familiar x-y coordinate plane. Every point on the plane is an ordered pair (x, y) where x, y ∈ ℝ. This is where the name "Cartesian" comes from (after René Descartes).
Cartesian Product Distributes over Union
A × (B ∪ C) = (A × B) ∪ (A × C)
The Cartesian product distributes over union. An ordered pair (a, x) is in A × (B ∪ C) precisely when a ∈ A and x ∈ B ∪ C, i.e., x ∈ B or x ∈ C, which means (a, x) is in A × B or A × C.
Section Quiz
Test your understanding with 6 questions
Practice Sets
Mixed problems for exam prep
These problems cover all topics from the previous sections. Try each one on paper before checking the solution! Working through these will prepare you for exam-style questions.
Let A = {1, 2, 3, 4}, B = {3, 4, 5, 6}, U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Find:
(a) A ∪ B
(b) A ∩ B
(c) A \ B
(d) Aᶜ
(e) (A ∩ B)ᶜ
(f) Aᶜ ∪ Bᶜ
Find P({1, 2, 3}) and its cardinality.
Let A = {a, b} and B = {1, 2, 3}. Find A × B and |A × B|.
Prove: If A ⊆ B, then A ∩ C ⊆ B ∩ C.
Is {∅} ∈ P({1, 2})?
How many elements does P(P(∅)) have?
On exams, always check your work by:
1. Verifying cardinalities match (e.g., |P(A)| = 2^|A|, |A × B| = |A| · |B|).
2. Checking that De Morgan's Laws hold for your computed sets.
3. Confirming ∅ ⊆ A for any set A you produce.
4. Making sure you haven't confused ∈ with ⊆.
These quick sanity checks can catch careless errors before you submit.