MGU Mathematics Series — Discrete Mathematics
Part I: Logic, Sets, and Mathematical Language
Sets · Quantifiers · Relations · Set Operations · Cartesian Products
Chapter 3 of 14
MGU Mathematics Series  ·  Discrete Mathematics  ·  Library Textbook Edition

Chapter 3:
Sets, Quantifiers,
and Relations

Set notation, membership, subsets, operations, Venn diagrams, Cartesian products, predicates, quantifiers, and relations — the precise language that unifies logic, proof, and computing

■ Part I: Logic, Sets, and Mathematical Language ■

■ 14 Sections  •  Chapter 3 of 14 ■

Follows Chapter 2: Logic and Truth  ·  Prepares students for Chapter 4: Methods of Proof

Purpose and Overview

This chapter introduces one of the most important languages in all of modern mathematics and computer science: the language of sets. A set is a precise way to describe a collection of objects. Once you know how to write, read, and work with sets, you gain a tool that appears in every branch of mathematics and in nearly every area of computing — databases store records in tables that behave like sets, programming languages use set-like structures to filter and classify data, logic uses sets to interpret quantifiers, and proof uses sets to express domains and conditions.

By the end of this chapter, you will be able to describe collections precisely, perform operations on sets, interpret diagrams that represent set relationships, build Cartesian products, write and evaluate statements about all objects or some objects, and recognize relations as structured sets of ordered pairs. You will also see how these ideas connect to filtering, searching, classifying, and defining rules in computing systems.

Opening Question

A library database stores information about books. A librarian wants to find all books that are either in the science section or checked out, but not both. How would you describe that collection precisely? How would you describe the collection of books that are in the science section and also checked out? How would you describe the books in the science section but not checked out? These questions are about how to describe collections of objects precisely, how to combine descriptions, and how to express conditions logically. That is exactly what set theory studies.

14Sections
14Objectives
28Key Terms
12+Worked Examples

Learning Objectives

  1. 1Define a set and describe a collection using set notation.
  2. 2Test whether an object is an element of a set.
  3. 3Write sets using roster notation and set-builder notation.
  4. 4Determine whether one set is a subset or proper subset of another.
  5. 5Identify the universal set, the empty set, and their roles.
  6. 6Compute the union, intersection, and difference of two sets.
  7. 7Compute the complement of a set relative to a universal set.
  8. 8Draw and interpret Venn diagrams for two and three sets.
  9. 9Compute Cartesian products and describe ordered pairs.
  10. 10Write predicates and evaluate them on specific inputs.
  11. 11Interpret and negate universal and existential statements.
  12. 12Describe a relation as a set of ordered pairs.
  13. 13Recognize how set operations appear in databases and computing.
  14. 14Identify and correct common mistakes in set notation and quantifier interpretation.

Sections at a Glance

Sections 3.1 – 3.5
Describing Collections: Sets, Notation, and Containment
What a Set Is · Membership · Notation · Subsets · Universal and Empty Sets

What a Set Is

A set is a well-defined collection of distinct objects. The objects in a set are called its elements or members. When we say a set is well-defined, we mean there is a clear rule or description that determines whether any given object belongs to the collection or does not. There should be no ambiguity.

This requirement matters. Consider the phrase "the collection of interesting numbers." Is 42 interesting? Is 7 interesting? Different people might answer differently. That collection is not well-defined, so it is not a set in the mathematical sense. Compare that to "the collection of even integers between 1 and 10." This is well-defined. For any candidate — say, 6 — you can check each condition mechanically. For 7: is it even? No. So 7 does not belong. There is no room for debate.

Sets can contain numbers, letters, words, points, functions, other sets, or any objects, as long as the collection is clearly defined. A set is unordered: the set containing 1, 2, and 3 is the same set as the one containing 3, 1, and 2. A set is also non-repeating: each element appears at most once.

Student Note

The words set and list mean different things. A list can have repeated items and a specific order. A set has no repeated items and no ordering. When you write a set, you are describing a collection, not a sequence.

Elements and Membership

To say that an object belongs to a set, we use the symbol ∈, read "is an element of." To say that an object does not belong, we use ∉, read "is not an element of." Sets are named with capital letters by convention. Elements are referred to by lowercase letters or specific values.

Membership Notation

If A = {1, 2, 3, 4, 5}, then:

3 ∈ A    (3 is an element of A — true)

7 ∉ A    (7 is not an element of A — true)

Example 3.2.1
Testing membership
  • ProblemLet B = {a, e, i, o, u}. Determine whether each is true or false: (a) e ∈ B, (b) b ∈ B, (c) u ∈ B, (d) y ∈ B.
  • ThinkCheck each candidate against the listed elements of B.
  • Solve (a) e appears in B → true.
    (b) b does not appear in B → false; write b ∉ B.
    (c) u appears in B → true.
    (d) y does not appear in B → false; write y ∉ B.
  • CheckB contains exactly five elements: the standard vowels. No non-vowel passes the test.
Answer: (a) True. (b) False. (c) True. (d) False.

Set-Builder Notation

Roster notation lists elements between curly braces: {1, 2, 3, 4, 5} or {2, 4, 6, 8, …}. It works well for small or patterned sets. Set-builder notation describes a set by giving a domain and a rule that elements must satisfy:

Set-Builder Notation

{x | P(x)}    Read: "the set of all x such that P(x)."

The vertical bar | is read "such that." A colon : may be used instead. Both notations are equivalent.

Standard number sets:   ℕ natural numbers · ℤ integers · ℤ⁺ positive integers · ℚ rationals · ℝ reals

Set-Builder FormDescriptionRoster Form
{x | x is even and x > 0}Positive even integers{2, 4, 6, 8, …}
{x ∈ ℤ | x² < 25}Integers whose square is less than 25{−4, −3, −2, −1, 0, 1, 2, 3, 4}
{n ∈ ℕ | n is divisible by 3}Multiples of 3{3, 6, 9, 12, …}
Example 3.3.1
Translating roster notation to set-builder notation
  • ProblemWrite {1, 4, 9, 16, 25} using set-builder notation.
  • ThinkThese are perfect squares — the squares of the integers 1 through 5. Capture that pattern.
  • Solve{n² | n ∈ ℤ⁺ and n ≤ 5}
  • CheckFor n = 1, 2, 3, 4, 5, the values n² are 1, 4, 9, 16, 25. Matches the roster.
Answer: {n² | n ∈ ℤ⁺ and n ≤ 5}
Example 3.3.2
Translating set-builder notation to roster form
  • ProblemList the elements of {x ∈ ℤ | −3 ≤ x ≤ 3}.
  • ThinkWe need integers between −3 and 3, inclusive.
  • Solve{−3, −2, −1, 0, 1, 2, 3}
Answer: {−3, −2, −1, 0, 1, 2, 3}
Student Warning

The vertical bar in set-builder notation means "such that." It is different from absolute value bars |x|. In context, you can tell them apart: set-builder notation always has a variable before the bar and a condition after it, inside curly braces.

Subsets and Proper Subsets

If every element of a set A is also an element of a set B, then A is a subset of B, written A ⊆ B. To check whether A ⊆ B, ask: for every element in A, is that element also in B? If you can find even one element in A that is not in B, then A ⊄ B.

A proper subset is a subset that is not equal to the whole set. If A ⊆ B and A ≠ B, then A ⊊ B. Every set is a subset of itself — that is called a trivial subset. The power set of A, written 𝒫(A), is the set of all subsets of A. If A has n elements, then 𝒫(A) has 2ⁿ elements.

Example 3.4.1
Identifying subsets and proper subsets
  • ProblemLet C = {1, 2, 3} and D = {1, 2, 3, 4, 5}. True or false: (a) C ⊆ D, (b) D ⊆ C, (c) C ⊊ D, (d) C ⊆ C.
  • ThinkCheck membership in each direction. A single missing element disproves a subset claim.
  • Solve (a) 1, 2, 3 are all in D → True.
    (b) D contains 4 and 5, which are not in C → False.
    (c) C ⊆ D and C ≠ D → True.
    (d) Every element of C is in C → True (always true for any set).
Answer: (a) True. (b) False. (c) True. (d) True.
Power Set Example

If A = {1, 2}, then 𝒫(A) = {∅, {1}, {2}, {1,2}}. Four subsets, which is 2² = 4. You will prove the general formula using induction in Chapter 5.

Universal Set and Empty Set

In any given discussion, there is usually a background collection of all possible objects under consideration. This is the universal set, often denoted U. It is not a fixed mathematical object — it depends on context. If you are discussing integer properties, U might be ℤ. If classifying students, U might be all enrolled students.

The empty set, denoted ∅ or {}, contains no elements. For any candidate object, the answer to "does this belong to ∅?" is always "no." The empty set is a subset of every set, because the condition "every element of ∅ is in A" is vacuously satisfied — there are no elements to check. The empty set is unique: there is only one set with no elements.

Student Warning — Three Common Confusions

∅ vs. {0}: The set {0} contains one element (the number zero). ∅ contains nothing. They are not the same.

∅ vs. {∅}: The set {∅} contains one element — the empty set itself. It is not empty.

∅ is not "nothing": The empty set is a well-defined mathematical object. It exists; it simply has no members.

Practice 3.1 – 3.5Sets, Membership, Notation, and Subsets
  1. Let A = {2, 4, 6, 8}. Determine whether each is true or false: (a) 4 ∈ A, (b) 5 ∈ A, (c) {4} ∈ A, (d) {4} ⊆ A, (e) ∅ ⊆ A, (f) A ⊆ A.
  2. Write each set in set-builder notation: (a) {1, 3, 5, 7, 9}, (b) {4, 9, 16, 25, 36}, (c) {…, −4, −2, 0, 2, 4, …}.
  3. List the elements: (a) {x ∈ ℤ | −2 ≤ x ≤ 4}, (b) {x ∈ ℤ | x² = 9}, (c) {x ∈ ℤ | x > 5 and x ≤ 8}.
  4. Let A = {1, 2, 3}. List all subsets of A. How many are there? Does the count equal 2³?
  5. True or false: ∅ ⊆ {∅}. Explain your reasoning carefully.
Sections 3.6 – 3.9
Operations on Sets and Cartesian Products
Union · Intersection · Difference · Complements · Venn Diagrams · Cartesian Products

Union, Intersection, and Difference

OperationSymbolDefinitionMembership Condition
UnionA ∪ BAll elements in A or B or bothx ∈ A or x ∈ B
IntersectionA ∩ BAll elements in both A and Bx ∈ A and x ∈ B
DifferenceA ∖ BElements in A but not in Bx ∈ A and x ∉ B
Disjoint Sets

Two sets are disjoint if their intersection is empty: A ∩ B = ∅. Disjoint sets share no elements at all.

Example 3.6.1
Computing union, intersection, and difference
  • ProblemLet A = {2, 4, 6, 8, 10} and B = {1, 2, 3, 4, 5}. Compute (a) A ∪ B, (b) A ∩ B, (c) A ∖ B, (d) B ∖ A.
  • ThinkApply each definition. Go through the elements of the relevant sets. Remember that union includes everything from both, intersection only includes shared elements, and difference removes B's elements from A.
  • Solve A ∪ B = {1, 2, 3, 4, 5, 6, 8, 10} A ∩ B = {2, 4} A ∖ B = {6, 8, 10} (in A, not in B) B ∖ A = {1, 3, 5} (in B, not in A)
  • CheckThe union should contain everything from both sets. A ∩ B, A ∖ B, and B ∖ A together cover all of A and B with no overlaps.
Answer: (a) {1,2,3,4,5,6,8,10}. (b) {2,4}. (c) {6,8,10}. (d) {1,3,5}.
Student Warning — Difference Is Not Symmetric

A ∖ B and B ∖ A are generally not equal. Set difference is not commutative. Always read the direction carefully: A minus B removes B's elements from A, not the other way around.

Complements

The complement of a set A, written Ā or Aᶜ, is the set of all elements in the universal set U that are not in A. The complement depends entirely on what U is. Always identify the universal set before computing a complement.

Complement Definition and Key Identities

Ā = {x ∈ U | x ∉ A}    (equivalently, Ā = U ∖ A)

A ∪ Ā = U    A ∩ Ā = ∅    Ā̄ = A    Ū = ∅    ∅̄ = U

These identities mirror the logical laws from Chapter 2: p ∨ ¬p is a tautology; p ∧ ¬p is a contradiction.

Example 3.7.1
Computing a complement
  • ProblemLet U = {a, b, c, d, e, f} and B = {b, d, f}. Find B̄.
  • ThinkThe complement of B consists of all elements in U that are not in B.
  • SolveRemove b, d, f from U. The remaining elements are a, c, e.B̄ = {a, c, e}
  • CheckB ∪ B̄ = {b,d,f} ∪ {a,c,e} = {a,b,c,d,e,f} = U. ✓
Answer: B̄ = {a, c, e}

Venn Diagrams

A Venn diagram is a visual representation of sets and their relationships. A rectangle represents the universal set U. Circles inside the rectangle represent sets. The position of a point inside or outside a circle represents membership or non-membership.

Two-Set Venn Diagram — Construction

Draw a rectangle labeled U. Inside, draw two overlapping circles labeled A (left) and B (right). The diagram divides the rectangle into four regions: Region I — inside A only (A ∖ B). Region II — inside both circles (A ∩ B). Region III — inside B only (B ∖ A). Region IV — outside both circles but inside U (complement of A ∪ B). Shade Region II to represent A ∩ B. Shade Regions I and II to represent A. Shade Regions I, II, and III to represent A ∪ B.

Example 3.8.1
Using a Venn diagram to solve a counting problem
  • ProblemIn a survey of 50 students, 30 play a sport, 20 play an instrument, and 10 do both. How many play a sport or an instrument? How many play neither?
  • ThinkDraw two circles: Sport and Instrument. Place the 10 "both" students in the overlap. Work outward.
  • Solve Sport only: 30 − 10 = 20 Instrument only: 20 − 10 = 10 Both: 10 Total (sport or instrument): 20 + 10 + 10 = 40 Neither: 50 − 40 = 10
  • Check20 + 10 + 10 + 10 = 50. Accounts for all students. ✓
Answer: 40 students play a sport or an instrument. 10 play neither.
Three-Set Venn Diagram — Construction

Draw a rectangle labeled U. Inside, draw three overlapping circles labeled A, B, and C, arranged so that all three pairs overlap and a center region exists where all three meet. This creates 7 interior regions and 1 exterior region. The regions represent: A only; B only; C only; A ∩ B only (not C); A ∩ C only (not B); B ∩ C only (not A); A ∩ B ∩ C (all three); and outside all three circles. Three-set Venn diagrams support inclusion-exclusion counting, studied in Chapter 7.

Cartesian Products

An ordered pair (a, b) is a pair of objects in which order matters. The pair (a, b) is not the same as the pair (b, a) unless a = b. This differs from a set, where {a, b} = {b, a}.

The Cartesian product of two sets A and B, written A × B, is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. The size of A × B equals |A| · |B|. Note that A × B ≠ B × A in general.

Cartesian Product Definition

A × B = {(a, b) | a ∈ A and b ∈ B}

|A × B| = |A| · |B|

The real coordinate plane ℝ² is the Cartesian product ℝ × ℝ. Each point (x, y) is an ordered pair.

Example 3.9.1
Listing a Cartesian product — coin and die
  • ProblemLet A = {H, T} and B = {1, 2, 3, 4, 5, 6}. List A × B and state its size. (This models flipping a coin and rolling a die.)
  • ThinkPair each element of A with each element of B. Two choices for the first coordinate, six for the second.
  • Solve A × B = {(H,1), (H,2), (H,3), (H,4), (H,5), (H,6), (T,1), (T,2), (T,3), (T,4), (T,5), (T,6)}
  • Check|A| = 2, |B| = 6, so |A × B| = 12. Counting the listed pairs confirms 12 elements. ✓
Answer: A × B has 12 ordered pairs, listed above.
MGU Library Connection
  • Cartesian products are the mathematical foundation of relational databases. A table is a relation — a set of ordered tuples from a Cartesian product of domains.
  • SQL's JOIN operation corresponds to a Cartesian product filtered by a condition. See the MGU Database Foundations module for more.
Practice 3.6 – 3.9Set Operations and Cartesian Products

Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A = {1, 3, 5, 7, 9}, B = {2, 3, 5, 7}, C = {4, 5, 6, 7, 8}.

  1. A ∪ B
  2. A ∩ B
  3. A ∖ B
  4. B ∖ A
  5. Ā
  6. B̄
  7. (A ∪ B) ∩ C
  8. A ∩ B ∩ C
  9. Ā ∪ B̄ (compare to A ∩ B̄)
  10. Ā ∩ B̄ (compare to A ∪ B̄)

Note: Problems 9 and 10 are related to De Morgan's Laws for sets.

Practice — Venn DiagramsCounting with Venn Diagrams
  1. In a class of 40 students, 25 have a laptop, 18 have a tablet, and 10 have both. Find: (a) how many have a laptop or a tablet; (b) how many have neither.
  2. In a group of 100 people surveyed: 60 drink coffee, 45 drink tea, 30 drink juice, 20 drink coffee and tea, 15 drink coffee and juice, 10 drink tea and juice, and 5 drink all three. Draw a three-set Venn diagram and find how many drink none of the three beverages.
Sections 3.10 – 3.11
Predicates and Quantifiers
Open Statements · ∀ and ∃ · Truth Conditions · Counterexamples · Negation · Nested Quantifiers

Predicates and Quantifiers

The conditions used in set-builder notation — like "x is even" or "x > 5" — are examples of predicates. A predicate is a statement that contains a variable and becomes a proposition (true or false) when that variable is replaced by a specific value from a given domain. We write P(x) to denote a predicate with variable x. The domain from which x is drawn is called the domain of discourse.

PredicateP(4)P(7)
P(x): x is evenTrue (4 is even)False (7 is odd)
Q(n): n² > 10True (16 > 10)True (49 > 10)
R(x,y): x + y = 10R(4,6): TrueR(7,2): False
Predicates vs. Propositions

A predicate contains a variable and has no truth value until the variable is assigned a value. A proposition has a definite truth value. Quantifiers convert predicates into propositions by making claims about an entire domain.

Universal and Existential Statements

The Two Quantifiers

∀x, P(x)    Universal: "For all x, P(x)." True only if P(x) holds for every element x in the domain. One failure makes it false.

∃x, P(x)    Existential: "There exists an x such that P(x)." True if P(x) holds for at least one element. False only if P(x) fails for every element.

Negation rules:

¬(∀x, P(x)) ≡ ∃x, ¬P(x)

¬(∃x, P(x)) ≡ ∀x, ¬P(x)

Counterexamples

A counterexample is a single element of the domain for which the predicate P(x) fails. Finding one counterexample is enough to disprove a universal statement. Checking 99% of cases is not sufficient to prove it true.

Example 3.11.1
Evaluating and negating quantified statements
  • ProblemDomain: ℤ. (a) Evaluate ∀n ∈ ℤ, n² ≥ 0. (b) Evaluate ∃n ∈ ℤ, n + 1 < n. Write the negation of each and give its truth value.
  • ThinkApply the negation rules. Flip the quantifier and negate the predicate.
  • Solve (a) Original: ∀n ∈ ℤ, n² ≥ 0 TRUE: for any integer, squaring gives a non-negative result. Negation: ∃n ∈ ℤ, n² < 0 FALSE: no integer has a negative square. (b) Original: ∃n ∈ ℤ, n + 1 < n This means 1 < 0, which is impossible. FALSE. Negation: ∀n ∈ ℤ, n + 1 ≥ n TRUE: n + 1 > n for every integer.
  • CheckOriginal and negation always have opposite truth values. Confirmed above.
Answer: (a) True; negation is false. (b) False; negation is true.

Nested Quantifiers

When a predicate has two variables, statements can involve two quantifiers in sequence. The order matters critically.

StatementReadingTruth (domain ℤ)
∀x ∃y, x + y = 0For every x, there exists some y (depending on x) with x + y = 0.True: choose y = −x.
∃y ∀x, x + y = 0There exists one y that works for every x simultaneously.False: no single y satisfies x + y = 0 for all x at once.
Student Warning — Quantifier Order

The order of quantifiers changes the meaning of a statement fundamentally. ∀x ∃y allows y to depend on x. ∃y ∀x requires one fixed y to work for every x. These are not interchangeable. Always read quantifiers from left to right.

Practice 3.10 – 3.11Predicates and Quantifiers
  1. Domain: ℤ. Determine whether each statement is true or false. If false, give a counterexample.
    (a) ∀n ∈ ℤ, n + 1 > n    (b) ∀n ∈ ℤ, n² ≥ 0    (c) ∀n ∈ ℤ, n² > 0    (d) ∃n ∈ ℤ, n² = 2    (e) ∃n ∈ ℤ, n² = 9
  2. Write the negation of each statement. Simplify so that ¬ applies only to predicates, not quantifiers.
    (a) ∀x ∈ ℤ, x² ≥ 0    (b) ∃x ∈ ℤ, x + x = x    (c) ∀x ∈ ℤ ∃y ∈ ℤ, x + y = 0
  3. Determine whether each nested quantifier statement is true or false. Domain: ℤ.
    (a) ∀x ∃y, x · y = 0    (b) ∃y ∀x, x · y = 0    (c) ∀x ∃y, x + y = 10    (d) ∃x ∀y, x + y = 10
Sections 3.12 – 3.13
Relations and Applications
Relations as Sets of Ordered Pairs · Reflexive · Symmetric · Transitive · Computing

Relations as Sets of Ordered Pairs

A relation between two sets A and B is a set of ordered pairs drawn from the Cartesian product A × B. More precisely, a relation R from A to B is a subset of A × B: R ⊆ A × B. When a pair (a, b) belongs to R, we say that a is related to b under R, and we write aRb or (a, b) ∈ R.

A relation can also be defined from a set to itself — a relation on a set A is a subset of A × A.

Example 3.12.1
Defining a divisibility relation
  • ProblemLet A = {1, 2, 3} and B = {1, 2, 3, 4, 5, 6}. Define a relation D from A to B by: (a, b) ∈ D if and only if a divides b. List all pairs in D.
  • ThinkCheck each pair (a, b) with a ∈ A and b ∈ B. Include the pair only if a | b (a divides b evenly).
  • Solve D = {(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,2), (2,4), (2,6), (3,3), (3,6)}
  • Check1 divides everything. 2 divides 2, 4, 6. 3 divides 3 and 6. No other divisibility holds.
Answer: D contains 11 ordered pairs, listed above.

Properties of Relations

PropertyConditionMeaning
Reflexive(a,a) ∈ R for all a ∈ AEvery element is related to itself.
SymmetricIf (a,b) ∈ R, then (b,a) ∈ RRelation goes both ways.
TransitiveIf (a,b) ∈ R and (b,c) ∈ R, then (a,c) ∈ RRelation chains.
Equivalence Relation

A relation that is simultaneously reflexive, symmetric, and transitive is called an equivalence relation. Equivalence relations appear throughout algebra, number theory, and computing. The congruence modulo n relation from Chapter 6 is an important example.

Example 3.12.2
Analyzing a relation for reflexive, symmetric, and transitive properties
  • ProblemLet A = {1, 2, 3} and R = {(1,1), (2,2), (3,3), (1,2), (2,1)}. Is R reflexive? Symmetric? Transitive?
  • ThinkCheck each property by examining which pairs are in R.
  • Solve Reflexive: (1,1), (2,2), (3,3) all in R → YES Symmetric: (1,2) ∈ R and (2,1) ∈ R ✓ (1,1), (2,2), (3,3) are self-paired ✓ → YES Transitive: (1,2) ∈ R and (2,1) ∈ R → need (1,1) ∈ R ✓ (2,1) ∈ R and (1,2) ∈ R → need (2,2) ∈ R ✓ All other chains either don't arise or are covered → YES
  • CheckR is reflexive, symmetric, and transitive — it is an equivalence relation on A.
Answer: R is reflexive, symmetric, and transitive. It is an equivalence relation.
Relations and Functions

A function from A to B is a special type of relation: a subset of A × B in which every element of A appears as the first coordinate of exactly one pair. Functions are relations with an extra uniqueness condition. This is why both functions and relations are defined as sets of ordered pairs.

Sets in Databases, Classification, and Computing

The set operations in this chapter are directly implemented in the tools that manage data and power computing systems. They are not abstract constructions invented for purely theoretical purposes.

Computing ContextSet OperationExample
SQL query with WHERESet-builder / subset selectionSELECT * FROM Users WHERE city = 'Chicago' returns a subset of the Users table.
SQL UNION / INTERSECT∪ and ∩Combine or intersect result sets from two queries.
SQL JOINCartesian product + filterProduces ordered tuples from two tables, filtered by a join condition.
Keyword search (all terms)IntersectionDocuments matching "discrete" AND "mathematics" = their intersection.
Keyword search (any term)UnionDocuments matching "discrete" OR "mathematics" = their union.
Access controlRelation membershipAccess granted if (user, action, resource) ∈ PermittedAccess.
Bridge to Computer Science

In classification problems (machine learning), a category is a set — a collection of objects satisfying certain conditions. Deciding whether a new object belongs to a category is a membership question: does this object satisfy the predicate that defines the set? Every classifier, at its core, evaluates a predicate P(x) and assigns x to the set for which P(x) is true.

Practice 3.12 – 3.13Relations and Applications
  1. Let A = {1, 2, 4}. Define R on A by: (a, b) ∈ R if a divides b. List all pairs in R. Is R reflexive? Symmetric? Transitive?
  2. A social network defines a relation F on users where (a, b) ∈ F if user a follows user b. Is F necessarily reflexive? Symmetric? Transitive? Explain.
  3. A streaming service has: W = watched titles, L = titles on the user's list, P = purchased titles. Describe in set language: (a) titles the user has watched and purchased; (b) titles on the list but not yet watched; (c) purchased but not watched and not on the list.
  4. A university requires that students have completed either Calculus I or Discrete Mathematics. Write a predicate P(s) that is true if student s satisfies this requirement. Write a universal statement claiming all students in the course satisfy the requirement.
Section 3.14 — Common Mistakes
Common Set and Quantifier Mistakes
Nine Recurring Errors · Explanations · Corrections · Prevention Strategies

Common Set and Quantifier Mistakes

Mistake 1 — Confusing an element with a set containing that element
3 = {3}

The number 3 is an integer. The set {3} is a collection containing one element. They are different objects. Writing 3 = {3} is incorrect. Correctly: 3 ∈ {3} (3 is a member of the set {3}).

Mistake 2 — Treating the empty set as nothing
The empty set has no meaning; you can ignore it.

The empty set ∅ is a well-defined mathematical object. It is a subset of every set. The set {∅} contains one element — the empty set itself. These distinctions are essential in proof.

Mistake 3 — Reversing subset and membership
1 ⊆ {1, 2, 3}

The correct statement is 1 ∈ {1, 2, 3}. The ⊆ symbol is for sets, not elements. Write: {1} ⊆ {1, 2, 3} (the set containing 1 is a subset). Write: 1 ∈ {1, 2, 3} (the element 1 is a member).

Mistake 4 — Confusing union with "and" and intersection with "or"
"Elements in both A and B" → A ∪ B

Correct: elements in both A and B → A ∩ B (intersection uses "and"). Elements in A or B → A ∪ B (union uses "or"). Trust the definitions, not the English phrasing alone.

Mistake 5 — Forgetting the universal set when computing complements
"The complement of A is all elements not in A." (No U specified.)

The complement Ā = U ∖ A. Without knowing U, the complement is undefined. Always identify the universal set before computing a complement.

Mistake 6 — Confusing ordered pairs and sets
The pair (2, 5) equals the pair (5, 2) because they contain the same numbers.

Ordered pairs are not sets. (2, 5) ≠ (5, 2) unless 2 = 5. The set {2, 5} = {5, 2} because sets are unordered, but ordered pairs record position.

Mistake 7 — Reversing the order of quantifiers
∀x ∃y, P(x,y) is the same as ∃y ∀x, P(x,y).

These are fundamentally different. The first allows y to depend on x. The second requires one fixed y to work for every x. In general, ∃y ∀x is a stronger claim and is often false when the first is true.

Mistake 8 — Trying to prove a universal statement by checking many cases
"I checked 100 cases of ∀n, P(n) and they all worked, so the statement is true."

A universal statement must hold for every element in the domain — not just many of them. Checking finite cases proves nothing in general. To prove ∀n, P(n), you must give a general argument. To disprove it, find one counterexample.

Mistake 9 — Misapplying negation of quantifiers
The negation of ∀x, P(x) is ∀x, ¬P(x).

Correct negation: ¬(∀x, P(x)) ≡ ∃x, ¬P(x). The negation flips the quantifier from ∀ to ∃ and negates the predicate. Simply negating the predicate without flipping the quantifier is wrong.

Chapter Summary

Key Terms Review

set
A well-defined, unordered collection of distinct objects.
element / member
An object belonging to a set. Written x ∈ A.
roster notation
A set described by listing its elements between curly braces: {1, 2, 3}.
set-builder notation
A set described by a condition: {x | P(x)}. Read "the set of all x such that P(x)."
empty set (∅)
The set containing no elements. A subset of every set.
universal set (U)
The background domain for a given problem. All objects under consideration.
subset (A ⊆ B)
Every element of A is also in B.
proper subset (A ⊊ B)
A ⊆ B and A ≠ B.
power set 𝒫(A)
The set of all subsets of A. If |A| = n, then |𝒫(A)| = 2ⁿ.
union (A ∪ B)
All elements in A or B or both.
intersection (A ∩ B)
All elements in both A and B.
set difference (A ∖ B)
All elements in A but not in B. Not commutative.
complement (Ā)
All elements of U not in A. Requires knowing U.
disjoint sets
Two sets with empty intersection: A ∩ B = ∅.
Venn diagram
A visual of sets using overlapping circles inside a rectangle representing U.
Cartesian product (A × B)
The set of all ordered pairs (a, b) with a ∈ A and b ∈ B. Size: |A| · |B|.
ordered pair
A pair (a, b) in which order matters. (a, b) ≠ (b, a) in general.
predicate
A statement P(x) with a variable that becomes true or false when x is assigned a value.
domain of discourse
The set from which variables in a predicate draw their values.
universal quantifier (∀)
"For all." ∀x P(x) claims P holds for every element of the domain.
existential quantifier (∃)
"There exists." ∃x P(x) claims P holds for at least one element.
counterexample
A single element for which the predicate P(x) fails, disproving a universal statement.
relation
A subset of a Cartesian product A × B. Formalizes connections between elements.
reflexive
A relation R on A where (a, a) ∈ R for every a ∈ A.
symmetric
A relation R where (a, b) ∈ R implies (b, a) ∈ R.
transitive
A relation R where (a,b) ∈ R and (b,c) ∈ R implies (a,c) ∈ R.
equivalence relation
A relation that is reflexive, symmetric, and transitive.

Concept Review Questions

Written explanations are expected for each question.

  1. What does it mean for a set to be "well-defined"? Why does the definition require this? Give an example of a collection that is not well-defined.
  2. Explain the difference between ∈ and ⊆. Give an example of each used correctly.
  3. Why is the empty set a subset of every set? What does "vacuously true" mean?
  4. Explain the difference between union and intersection in your own words. Which uses "or" and which uses "and"?
  5. Why does the complement of a set require a universal set to be defined? What happens if U changes?
  6. What is a Venn diagram used for? Describe the four regions of a two-set Venn diagram.
  7. Explain the difference between an ordered pair and a set. Why does order matter in a Cartesian product?
  8. What is a predicate? How does a predicate differ from a proposition?
  9. State the negation rule for a universal statement. Explain why it makes logical sense.
  10. State the negation rule for an existential statement. Explain why it makes logical sense.
  11. What is a relation? How does a relation relate to a Cartesian product?
  12. What is the difference between a reflexive, symmetric, and transitive relation? Give a real-world example of a relation with each property.

Skill Practice

Part ASet Notation Practice
  1. Write {2, 4, 6, 8, 10} in set-builder notation.
  2. List {x ∈ ℤ | x² < 20}.
  3. Let A = {1,2}. List all elements of 𝒫(A).
  4. Is {1} ⊆ {1,{1}}? Is 1 ∈ {1,{1}}? Is {1} ∈ {1,{1}}?
Part BSet Operations

Let U = {1,2,3,4,5,6,7,8}, A = {1,2,3,4}, B = {3,4,5,6}.

  1. A ∪ B
  2. A ∩ B
  3. A ∖ B
  4. Ā
  5. Ā ∩ B̄
  6. Verify De Morgan's Law: show A ∪ B̄ = Ā ∩ B̄ is false; show A ∪ B̄ ≠ Ā ∩ B̄. Then correctly state De Morgan's Law for ∪ and verify it.
Part CQuantifier Evaluation

Domain: ℤ. Determine true or false. If false, give a counterexample.

  1. ∀n, 2n > n
  2. ∃n, n² = n
  3. ∀n, n² ≥ 0
  4. ∃n, n³ = n
  5. ∀n, n + 0 = n
  6. ∃n, n + n = n
Part DNegating Quantified Statements

Write the negation of each. Simplify so ¬ applies only to predicates.

  1. ∀x ∈ ℤ, x > 0
  2. ∃x ∈ ℤ, x² = 2
  3. ∀n ∈ ℕ, n is even
  4. ∃x ∀y, x + y = y
Part ERelations
  1. Let A = {2, 3, 6, 12}. Define R on A by (a, b) ∈ R if a divides b. List all pairs. Is R reflexive? Symmetric? Transitive?
  2. Let A = {1, 2, 3, 4}. Define R by (a, b) ∈ R if a + b is even. List all pairs. Is R an equivalence relation?

Error Analysis

Each problem contains an error. Identify it and write the correct answer.

Problem 1
A student writes: "Let A = {1, 2, 3}. Then 1 ⊆ A is true because 1 is in A."

What is wrong? What is the correct statement and why?

Problem 2
A student computes: A = {1,2,3}, B = {3,4,5}. A ∪ B = {3}.

Identify the error. What operation gives {3}? What is A ∪ B?

Problem 3
A student negates: "The negation of ∀x P(x) is ∀x ¬P(x)."

What is the correct negation? State the rule and apply it.

Problem 4
A student writes: "Since (2,5) and (5,2) contain the same numbers, they are the same ordered pair."

Explain the error. When are two ordered pairs equal?

Problem 5
A student says: "I checked 50 integers and P(n) was true every time, so ∀n ∈ ℤ, P(n) is proven."

What is wrong with this reasoning? What would it actually take to prove a universal statement?

Proof and Reasoning

Write complete mathematical arguments using set-builder definitions and logical equivalences.

  1. Prove De Morgan's Law for sets: A ∪ B̄ = Ā ∩ B̄. Use the set-builder definitions and logical equivalences from Chapter 2.
  2. Prove that if A ⊆ B and B ⊆ C, then A ⊆ C. (Transitivity of subsets.)
  3. Prove that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C). (Distributive law for sets.)
  4. Prove that the empty set is a subset of every set, using the definition of subset and the concept of vacuous truth.
  5. Let A and B be sets. Prove that A ∖ B = A ∩ B̄.

Chapter 3 Checkpoint

Chapter 3 Checkpoint
Complete without assistance — assesses all key skills and concepts from Chapter 3
Section A — Set Notation
  1. Let A = {x ∈ ℤ | 0 < x < 8 and x is odd}. List the elements of A.
  2. Write {0, 1, 4, 9, 16} in set-builder notation.
  3. True or false: ∅ ⊆ {∅}. Explain.
Section B — Set Operations
Let U = {1,2,3,4,5,6,7,8}, A = {1,2,3,4}, B = {3,4,5,6}.
  1. Compute A ∪ B, A ∩ B, A ∖ B, and Ā.
  2. Verify De Morgan's Law: show that A ∪ B̄ = Ā ∩ B̄.
Section C — Venn Diagrams
  1. In a group of 60 people, 35 own a car, 28 own a bicycle, and 12 own both. Draw a Venn diagram and find: (a) how many own a car or a bicycle; (b) how many own neither.
Section D — Cartesian Products
  1. Let A = {0, 1} and B = {a, b, c}. List all elements of A × B.
  2. How many elements does A × B × A have?
Section E — Quantifiers
  1. Domain: ℤ. Determine whether each statement is true or false. If false, give a counterexample: (a) ∀n ∈ ℤ, 2n > n; (b) ∃n ∈ ℤ, n² = n.
  2. Write the negation of ∀n ∈ ℤ, n² > 0. Is the original true or false? Is the negation true or false?
Section F — Relations
  1. Let A = {1, 2, 4}. Define R on A by (a, b) ∈ R if a divides b. List all pairs in R. Is R reflexive? Symmetric? Transitive?
Looking Ahead
Chapter 4: Methods of Proof

You now have a precise language for describing collections, conditions, and relationships. Sets give you a way to talk about domains. Quantifiers give you a way to make claims about all or some members of a domain. Relations give you a way to express structured connections between elements.

Chapter 4 takes this foundation and asks: how do you prove that a statement about sets, integers, or quantified claims is true? You will learn the methods mathematicians use to justify general claims — direct proof, proof by contrapositive, proof by contradiction, proof by cases — and you will write complete, rigorous proofs for the first time. The vocabulary from this chapter — element, subset, universal statement, existential statement, predicate, domain — will be the objects about which you prove things. The logic from Chapter 2 will supply the inference rules. Chapter 4 brings them together into mathematical proof.

MGU Library Connection
  • Set Theory Reference — Appendix D of this textbook
  • Quantifier Reference — Appendix E of this textbook
  • Logic Laws Reference — Appendix C of this textbook
  • MGU Database Foundations module: relational algebra, SQL, Cartesian products in practice
  • MGU Cybersecurity Foundations module: access control models and set-based permission systems
  • MGU Formal Languages and Automata module: set-theoretic foundations of computation
  • MGU Dictionary entries: set, element, predicate, quantifier, relation, equivalence relation