Relations and Their Properties

3249 words
16 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Relations and Their Properties ## ๐ŸŽฏ Learning Objectives By the end of this topic, you will be able to: 1. **Compute** the Cartesian product of two or more sets 2.

Relations and Their Properties

๐ŸŽฏ Learning Objectives

By the end of this topic, you will be able to:
  1. Compute the Cartesian product of two or more sets
  2. Define a binary relation as a subset of a Cartesian product
  3. Classify relations as reflexive, symmetric, transitive, antisymmetric
  4. Identify equivalence relations and partition sets into equivalence classes
  5. Represent relations using ordered pairs, matrices, and graphs

๐Ÿ“‹ Prerequisites

  • Sets and Set Operations โ€” sets, subsets, elements, set-builder notation
  • Arithmetic with integers โ€” remainders (mod) and factors

๐Ÿ“– Core Content

2.1 Cartesian Product

2.1.1 Intuition: Combining Sets Systematically

Imagine you have two lists: A={Alice,Bob}A = \{\text{Alice}, \text{Bob}\} and B={Pizza,Pasta}B = \{\text{Pizza}, \text{Pasta}\}. How many possible ways can you pair one person with one dish? Every person can be paired with every dish:
  • (Alice, Pizza), (Alice, Pasta)
  • (Bob, Pizza), (Bob, Pasta) This all-possible-pairings is the Cartesian product Aร—BA \times B. The order matters: (Alice, Pizza) is different from (Pizza, Alice) โ€” the first element always comes from AA, the second from BB.
๐Ÿ’ก Why this matters: In databases, the CROSS JOIN of two tables is a Cartesian product. In probability, the sample space of rolling two dice is {1,2,3,4,5,6}ร—{1,2,3,4,5,6}\{1,2,3,4,5,6\} \times \{1,2,3,4,5,6\}.

2.1.2 Formal Definition

The Cartesian product of sets AA and BB is:
Aร—B={(a,b)โˆฃaโˆˆA,ย bโˆˆB}A \times B = \{(a, b) \mid a \in A,\ b \in B\}
Each element (a,b)(a, b) is an ordered pair โ€” the position matters. Key properties:
  • โˆฃAร—Bโˆฃ=โˆฃAโˆฃร—โˆฃBโˆฃ|A \times B| = |A| \times |B|
  • Aร—Bโ‰ Bร—AA \times B \neq B \times A (unless A=BA = B or one is empty)
  • Aร—(Bร—C)โ‰ (Aร—B)ร—CA \times (B \times C) \neq (A \times B) \times C (triples vs. nested pairs)
  • โˆ…ร—A=Aร—โˆ…=โˆ…\emptyset \times A = A \times \emptyset = \emptyset For three sets:
Aร—Bร—C={(a,b,c)โˆฃaโˆˆA,ย bโˆˆB,ย cโˆˆC}A \times B \times C = \{(a, b, c) \mid a \in A,\ b \in B,\ c \in C\}
This generalizes to nn sets (ordered nn-tuples).

2.1.3 Worked Examples

Example 1.1 (Easy): Let A={1,2}A = \{1, 2\}, B={3,4}B = \{3, 4\}. Compute Aร—BA \times B and Bร—AB \times A. Step 1: Aร—BA \times B pairs each element of AA with each element of BB:
Aร—B={(1,3),(1,4),(2,3),(2,4)}A \times B = \{(1,3), (1,4), (2,3), (2,4)\}
Step 2: Bร—AB \times A pairs each element of BB with each element of AA:
Bร—A={(3,1),(3,2),(4,1),(4,2)}B \times A = \{(3,1), (3,2), (4,1), (4,2)\} Aร—Bโ‰ Bร—A,ย e.g.ย (1,3)โˆˆAร—Bย butย (1,3)โˆ‰Bร—A\boxed{A \times B \neq B \times A,\ \text{e.g.}\ (1,3) \in A \times B \text{ but } (1,3) \notin B \times A}
Example 1.2 (Medium): How many elements are in Aร—Bร—CA \times B \times C if โˆฃAโˆฃ=3|A| = 3, โˆฃBโˆฃ=4|B| = 4, โˆฃCโˆฃ=5|C| = 5? Step 1: โˆฃAร—Bร—Cโˆฃ=โˆฃAโˆฃร—โˆฃBโˆฃร—โˆฃCโˆฃ=3ร—4ร—5=60|A \times B \times C| = |A| \times |B| \times |C| = 3 \times 4 \times 5 = 60
60ย orderedย triples\boxed{60 \text{ ordered triples}}
Example 1.3 (Exam-style): Let A={1}A = \{1\}, B={2,3}B = \{2, 3\}. List all elements of Aร—Bร—AA \times B \times A. Step 1: First coordinates from AA, second from BB, third from AA. Aร—Bร—A={(1,2,1),(1,3,1)}A \times B \times A = \{(1,2,1), (1,3,1)\}
{(1,2,1),(1,3,1)}\boxed{\{(1,2,1), (1,3,1)\}}

2.2 Binary Relations

2.2.1 Intuition: Connections Between Elements

A relation is simply a rule that connects elements from one set to another. "Alice teaches Mathematics" defines a relation between people and subjects. "5 is less than 10" defines a relation between numbers. A relation doesn't have to connect every element โ€” it's a subset of all possible pairings (the Cartesian product).
๐Ÿ’ก Why this matters: Relations are the mathematical foundation for database tables (each row is a tuple), social networks (edges between users), and dependency graphs (prerequisite relationships).

2.2.2 Formal Definition

A binary relation RR from set AA to set BB is a subset of Aร—BA \times B:
RโІAร—BR \subseteq A \times B
If (a,b)โˆˆR(a, b) \in R, we write aโ€‰Rโ€‰ba\,R\,b (read: "aa is related to bb").
  • Domain of RR: {aโˆˆAโˆฃโˆƒbโˆˆB,ย (a,b)โˆˆR}\{a \in A \mid \exists b \in B,\ (a,b) \in R\}
  • Range of RR: {bโˆˆBโˆฃโˆƒaโˆˆA,ย (a,b)โˆˆR}\{b \in B \mid \exists a \in A,\ (a,b) \in R\}
  • If A=BA = B, we say RR is a relation on AA. (Diagram)

2.2.3 Examples of Relations

Set AASet BBRelation RRRโІAร—BR \subseteq A \times B
TeachersCoursestt teaches cc{(t,c)โˆฃtย teachesย c}\{(t,c) \mid t \text{ teaches } c\}
N\mathbb{N}N\mathbb{N}aโˆฃba \mid b ( aa divides bb ){(a,b)โˆฃaโˆฃb}\{(a,b) \mid a \mid b\}
R\mathbb{R}R\mathbb{R}a<ba < b{(a,b)โˆฃa<b}\{(a,b) \mid a < b\}
StudentsGPAsโ‰ค8.5\leq 8.5 GPA{(s,g)โˆฃGPA(s)โ‰ค8.5}\{(s,g) \mid \text{GPA}(s) \leq 8.5\}
Pythagorean triples as a relation:
R={(a,b,c)โˆฃa,b,cโˆˆN,ย a,b,c>0,ย a2+b2=c2}R = \{(a,b,c) \mid a,b,c \in \mathbb{N},\ a,b,c > 0,\ a^2 + b^2 = c^2\}
Example triples: (3,4,5)(3,4,5), (5,12,13)(5,12,13), (6,8,10)(6,8,10).

2.3 Properties of Relations (on a Set)

When RR is a relation on a set AA (i.e., RโІAร—AR \subseteq A \times A), we classify it by these properties:

2.3.1 Reflexive

Intuition: Every element is related to itself. "Every number is equal to itself." Definition: RR is reflexive if for every aโˆˆAa \in A, (a,a)โˆˆR(a, a) \in R. Examples:
  • โ‰ค\leq on R\mathbb{R}: aโ‰คaa \leq a for all aa โ†’ reflexive โœ“
  • divides on N\mathbb{N}: aโˆฃaa \mid a for all a>0a > 0 โ†’ reflexive โœ“
  • << on R\mathbb{R}: a<aa < a is false โ†’ NOT reflexive โœ—

2.3.2 Symmetric

Intuition: If aa relates to bb, then bb relates back to aa. Like a two-way street. Definition: RR is symmetric if whenever (a,b)โˆˆR(a,b) \in R, then (b,a)โˆˆR(b,a) \in R. Examples:
  • = on R\mathbb{R}: a=bโ€…โ€ŠโŸนโ€…โ€Šb=aa = b \implies b = a โ†’ symmetric โœ“
  • gcd(a,b) = 1 on N\mathbb{N}: gcdโก(a,b)=1โ€…โ€ŠโŸบโ€…โ€Šgcdโก(b,a)=1\gcd(a,b) = 1 \iff \gcd(b,a) = 1 โ†’ symmetric โœ“
  • $\leq$ on R\mathbb{R}: 2โ‰ค32 \leq 3 does NOT imply 3โ‰ค23 \leq 2 โ†’ NOT symmetric โœ—

2.3.3 Transitive

Intuition: If aa relates to bb and bb relates to cc, then aa relates to cc. Like a chain. Definition: RR is transitive if whenever (a,b)โˆˆR(a,b) \in R and (b,c)โˆˆR(b,c) \in R, then (a,c)โˆˆR(a,c) \in R. Examples:
  • << on R\mathbb{R}: a<ba < b and b<cb < c implies a<ca < c โ†’ transitive โœ“
  • divides on N\mathbb{N}: aโˆฃba \mid b and bโˆฃcb \mid c implies aโˆฃca \mid c โ†’ transitive โœ“
  • "is a parent of": NOT transitive (my parent's parent is my grandparent, not my parent) โœ—

2.3.4 Antisymmetric

Intuition: If aa relates to bb and bb relates to aa, then aa and bb must be the same. No distinct two-way relationships. Definition: RR is antisymmetric if whenever (a,b)โˆˆR(a,b) \in R and (b,a)โˆˆR(b,a) \in R, then a=ba = b. Examples:
  • โ‰ค\leq on R\mathbb{R}: if aโ‰คba \leq b and bโ‰คab \leq a, then a=ba = b โ†’ antisymmetric โœ“
  • divides on N\mathbb{N}: if aโˆฃba \mid b and bโˆฃab \mid a, then a=ba = b โ†’ antisymmetric โœ“
  • a - b = 2 on N\mathbb{N}: neither symmetric nor antisymmetric โœ— (Diagram)

2.3.5 Worked Example: Classifying Relations

Example 2.1: R={(a,b)โˆฃa,bโˆˆN,ย aโ‰คb}R = \{(a,b) \mid a,b \in \mathbb{N},\ a \leq b\}. Classify RR.
PropertyCheckResult
Reflexiveaโ‰คaa \leq a for all aa ? โœ“ Yesโœ“
SymmetricIf 2โ‰ค32 \leq 3 , does 3โ‰ค23 \leq 2 ? Noโœ—
TransitiveIf aโ‰คba \leq b and bโ‰คcb \leq c , then aโ‰คca \leq c ? โœ“ Yesโœ“
AntisymmetricIf aโ‰คba \leq b and bโ‰คab \leq a , then a=ba = b ? โœ“ Yesโœ“
Reflexive,ย Transitive,ย Antisymmetric\boxed{\text{Reflexive, Transitive, Antisymmetric}}
Example 2.2: R={(a,b)โˆฃa,bโˆˆZ,ย โˆฃaโˆ’bโˆฃ=2}R = \{(a,b) \mid a,b \in \mathbb{Z},\ |a - b| = 2\}. Classify RR.
PropertyCheckResult
Reflexive$a - a
Symmetric$a - b
Transitive(0,2)โˆˆR(0,2) \in R and (2,4)โˆˆR(2,4) \in R , but (0,4)โˆ‰R(0,4) \notin R since $0-4
Onlyย Symmetric\boxed{\text{Only Symmetric}}

2.4 Equivalence Relations

2.4.1 Intuition: Grouping Similar Things

An equivalence relation captures the idea of "sameness" under some criterion. If we group integers by "remainder when divided by 5", all numbers with remainder 2 are equivalent (like 2, 7, 12, 17, ...). They behave the same way modulo 5.
๐Ÿ’ก Why this matters: Equivalence relations partition data into buckets. In clustering, "same cluster" is an equivalence relation. In cryptography, "same residue class mod n" is fundamental.

2.4.2 Formal Definition

A relation RR on a set AA is an equivalence relation if it is:
  1. Reflexive: (a,a)โˆˆR(a,a) \in R for all aโˆˆAa \in A
  2. Symmetric: (a,b)โˆˆRโ€…โ€ŠโŸบโ€…โ€Š(b,a)โˆˆR(a,b) \in R \iff (b,a) \in R
  3. Transitive: (a,b)โˆˆR(a,b) \in R and (b,c)โˆˆRโ€…โ€ŠโŸนโ€…โ€Š(a,c)โˆˆR(b,c) \in R \implies (a,c) \in R

2.4.3 Equivalence Classes

An equivalence relation partitions AA into disjoint subsets called equivalence classes. The equivalence class of aโˆˆAa \in A is:
[a]={bโˆˆAโˆฃ(a,b)โˆˆR}[a] = \{b \in A \mid (a,b) \in R\}
Properties:
  • Every element belongs to exactly one equivalence class
  • [a]=[b][a] = [b] iff (a,b)โˆˆR(a,b) \in R
  • Different equivalence classes are disjoint
  • The union of all equivalence classes equals AA

2.4.4 Worked Examples

Example 3.1 (Easy): Define RR on Z\mathbb{Z} by: aโ€‰Rโ€‰ba\,R\,b if aโ€Šmodโ€Š5=bโ€Šmodโ€Š5a \bmod 5 = b \bmod 5. Check reflexive: aโ€Šmodโ€Š5=aโ€Šmodโ€Š5a \bmod 5 = a \bmod 5 โ†’ โœ“ Check symmetric: If aโ€Šmodโ€Š5=bโ€Šmodโ€Š5a \bmod 5 = b \bmod 5, then bโ€Šmodโ€Š5=aโ€Šmodโ€Š5b \bmod 5 = a \bmod 5 โ†’ โœ“ Check transitive: If aโ€Šmodโ€Š5=bโ€Šmodโ€Š5a \bmod 5 = b \bmod 5 and bโ€Šmodโ€Š5=cโ€Šmodโ€Š5b \bmod 5 = c \bmod 5, then aโ€Šmodโ€Š5=cโ€Šmodโ€Š5a \bmod 5 = c \bmod 5 โ†’ โœ“ Equivalence classes (remainders 0, 1, 2, 3, 4):
  • [0]={โ€ฆ,โˆ’10,โˆ’5,0,5,10,โ€ฆ}[0] = \{\ldots, -10, -5, 0, 5, 10, \ldots\}
  • [1]={โ€ฆ,โˆ’9,โˆ’4,1,6,11,โ€ฆ}[1] = \{\ldots, -9, -4, 1, 6, 11, \ldots\}
  • [2]={โ€ฆ,โˆ’8,โˆ’3,2,7,12,โ€ฆ}[2] = \{\ldots, -8, -3, 2, 7, 12, \ldots\}
  • [3]={โ€ฆ,โˆ’7,โˆ’2,3,8,13,โ€ฆ}[3] = \{\ldots, -7, -2, 3, 8, 13, \ldots\}
  • [4]={โ€ฆ,โˆ’6,โˆ’1,4,9,14,โ€ฆ}[4] = \{\ldots, -6, -1, 4, 9, 14, \ldots\}
Equivalenceย relationย withย 5ย classes\boxed{\text{Equivalence relation with 5 classes}}
Example 3.2 (Medium): Let A={1,2,3,4,5,6}A = \{1,2,3,4,5,6\}. Define R={(a,b)โˆฃa,bโˆˆA,ย aโ‰กb(mod3)}R = \{(a,b) \mid a,b \in A,\ a \equiv b \pmod{3}\}. Find the equivalence classes. Step 1: Numbers with same remainder modulo 3:
  • Remainder 0: {3,6}\{3,6\}
  • Remainder 1: {1,4}\{1,4\}
  • Remainder 2: {2,5}\{2,5\} Step 2: Verify: every element of AA appears in exactly one class. โœ“
{[3,6],[1,4],[2,5]}\boxed{\{[3,6], [1,4], [2,5]\}}
Example 3.3 (Hard): Is "same parity" (both even or both odd) an equivalence relation on Z\mathbb{Z}? Step 1 โ€” Reflexive: Every integer has the same parity as itself (evenร—even or oddร—odd). โœ“ Step 2 โ€” Symmetric: If aa and bb have same parity, then bb and aa do too. โœ“ Step 3 โ€” Transitive: If a,ba,b have same parity and b,cb,c have same parity, then a,ca,c have same parity. โœ“ Equivalence classes:
  • Even numbers: {โ€ฆ,โˆ’4,โˆ’2,0,2,4,โ€ฆ}\{\ldots, -4, -2, 0, 2, 4, \ldots\}
  • Odd numbers: {โ€ฆ,โˆ’3,โˆ’1,1,3,5,โ€ฆ}\{\ldots, -3, -1, 1, 3, 5, \ldots\}
Yes,ย itย isย anย equivalenceย relationย withย 2ย classesย (evensย andย odds)\boxed{\text{Yes, it is an equivalence relation with 2 classes (evens and odds)}}

2.5 Representing Relations

2.5.1 Matrix Representation

For a relation RR on a finite set A={a1,a2,โ€ฆ,an}A = \{a_1, a_2, \ldots, a_n\}, build an nร—nn \times n matrix MRM_R where:
MR[i][j]={1ifย (ai,aj)โˆˆR0otherwiseM_R[i][j] = \begin{cases} 1 & \text{if } (a_i, a_j) \in R \\ 0 & \text{otherwise} \end{cases}
Example: A={1,2,3}A = \{1,2,3\}, R={(1,1),(1,2),(2,3),(3,1)}R = \{(1,1), (1,2), (2,3), (3,1)\}
MR=[110001100]M_R = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix}
Properties visible from matrix:
  • Reflexive: All diagonal entries are 1
  • Symmetric: Matrix is symmetric (MR=MRTM_R = M_R^T)
  • Antisymmetric: If MR[i][j]=1M_R[i][j] = 1 and iโ‰ ji \neq j, then MR[j][i]=0M_R[j][i] = 0

2.5.2 Graph Representation (Directed Graphs)

A relation RR on AA can be drawn as a directed graph where:
  • Elements of AA are vertices
  • Each (a,b)โˆˆR(a,b) \in R is a directed edge aโ†’ba \rightarrow b (Diagram) This graph corresponds to the matrix above.

๐Ÿ“ Key Formulas โ€” Summary Table

ConceptFormula/DefinitionWhen to Use
Cartesian productAร—B={(a,b)โˆฃaโˆˆA,bโˆˆB}A \times B = \{(a,b) \mid a \in A, b \in B\}Generating all ordered pairs
Size of product$\A \times B\
Binary relationRโІAร—BR \subseteq A \times BModeling connections
Reflexiveโˆ€aโˆˆA:(a,a)โˆˆR\forall a \in A: (a,a) \in RCheck diagonal in matrix
Symmetric(a,b)โˆˆRโ€…โ€ŠโŸนโ€…โ€Š(b,a)โˆˆR(a,b) \in R \implies (b,a) \in RTwo-way relationships
Transitive(a,b),(b,c)โˆˆRโ€…โ€ŠโŸนโ€…โ€Š(a,c)โˆˆR(a,b),(b,c) \in R \implies (a,c) \in RChain relationships
Antisymmetric(a,b),(b,a)โˆˆRโ€…โ€ŠโŸนโ€…โ€Ša=b(a,b),(b,a) \in R \implies a = bPartial orders
Equivalence relationReflexive + Symmetric + TransitiveGrouping/classification
Equivalence class[a]={bโˆฃ(a,b)โˆˆR}[a] = \{b \mid (a,b) \in R\}Partition of a set
Matrix entryMR[i][j]=1M_R[i][j] = 1 if (ai,aj)โˆˆR(a_i,a_j) \in RComputing properties

โš ๏ธ Common Pitfalls

Pitfall 1: Confusing Symmetric with Antisymmetric

Mistake: Thinking a relation cannot be both symmetric and antisymmetric. Why: A relation CAN be both โ€” but only if it's a subset of the identity relation. Example: R={(1,1),(2,2)}R = \{(1,1), (2,2)\} on {1,2}\{1,2\} is both symmetric (each pair has its reverse, which is itself) and antisymmetric (if (a,b)(a,b) and (b,a)(b,a) are in RR, then a=ba=b). Most relations are neither symmetric nor antisymmetric. Eg: R={(1,2),(1,3)}R = \{(1,2), (1,3)\} is neither.

Pitfall 2: Forgetting That Transitive Requires ALL Chains

Mistake: Checking only one chain and concluding transitivity. Correct approach: You must check every pair (a,b),(b,c)(a,b),(b,c). If ANY chain exists without its corresponding (a,c)(a,c), the relation is NOT transitive. Example: R={(1,2),(2,3),(1,3),(3,4)}R = \{(1,2), (2,3), (1,3), (3,4)\}. Is (1,2),(2,3)โ†’(1,3)(1,2),(2,3) \to (1,3) โœ“. But (1,2),(2,4)(1,2),(2,4)? (2,4)โˆ‰R(2,4) \notin R, so no check needed. However (1,3),(3,4)โ†’(1,4)(1,3),(3,4) \to (1,4)? (1,4)โˆ‰R(1,4) \notin R โ†’ NOT transitive!

Pitfall 3: Thinking {(1,1),(2,2)}\{(1,1), (2,2)\} is Reflexive on {1,2,3}\{1,2,3\}

Mistake: Reflexive requires (a,a)(a,a) for every aโˆˆAa \in A. If A={1,2,3}A = \{1,2,3\}, then (3,3)(3,3) must be present. Without it, the relation is not reflexive. Correct: Check each element in the set AA, not just those that appear in RR.

Pitfall 4: Confusing "divides" Relation Domain

Mistake: Thinking 0โˆฃ50 \mid 5 (0 divides 5) is valid. Correct: Division by zero is undefined. So the divides relation is defined only on positive integers or non-zero integers. aโˆฃba \mid b requires aโ‰ 0a \neq 0.

๐Ÿ“ Practice Questions

Q1: Let A={x,y}A = \{x, y\}, B={1,2,3}B = \{1, 2, 3\}. Compute Aร—BA \times B.
Strategy Hint: List all ordered pairs where first coordinate is from A, second from B.
{(x,1),(x,2),(x,3),(y,1),(y,2),(y,3)}\boxed{\{(x,1), (x,2), (x,3), (y,1), (y,2), (y,3)\}} Q2: Does R={(a,b)โˆฃa,bโˆˆN,ย a<b}R = \{(a,b) \mid a,b \in \mathbb{N},\ a < b\} satisfy reflexivity?
Strategy Hint: Check if any natural number is less than itself.
Solution: a<aa < a is false for all aa. So RR is NOT reflexive.
No\boxed{\text{No}} Q3: Is "is a sibling of" an equivalence relation?
Strategy Hint: Check reflexivity, symmetry, transitivity.
Reflexive: A person is not their own sibling โ†’ Not reflexive. Symmetric: If X is sibling of Y, then Y is sibling of X โ†’ Yes. Transitive: If X is sibling of Y and Y is sibling of Z, then X is sibling of Z โ†’ Yes (assuming full siblings).
But since it's not reflexive, it's NOT an equivalence relation.
Noย โ€”ย notย reflexive\boxed{\text{No โ€” not reflexive}} Q4: Find the equivalence classes of R={(a,b)โˆฃa,bโˆˆZ,ย aโ‰กb(mod4)}R = \{(a,b) \mid a,b \in \mathbb{Z},\ a \equiv b \pmod{4}\}.
Strategy Hint: Group by remainder when dividing by 4.
[0]={โ€ฆ,โˆ’8,โˆ’4,0,4,8,โ€ฆ},ย [1]={โ€ฆ,โˆ’7,โˆ’3,1,5,9,โ€ฆ},ย [2]={โ€ฆ,โˆ’6,โˆ’2,2,6,10,โ€ฆ},ย [3]={โ€ฆ,โˆ’5,โˆ’1,3,7,11,โ€ฆ}\boxed{[0] = \{\ldots,-8,-4,0,4,8,\ldots\},\ [1] = \{\ldots,-7,-3,1,5,9,\ldots\},\ [2] = \{\ldots,-6,-2,2,6,10,\ldots\},\ [3] = \{\ldots,-5,-1,3,7,11,\ldots\}} Q5: Is R={(a,b)โˆฃa,bโˆˆR,ย a2=b2}R = \{(a,b) \mid a,b \in \mathbb{R},\ a^2 = b^2\} an equivalence relation?
Strategy Hint: Check the three properties.
Reflexive: a2=a2a^2 = a^2 โ†’ โœ“ Symmetric: a2=b2โ€…โ€ŠโŸนโ€…โ€Šb2=a2a^2 = b^2 \implies b^2 = a^2 โ†’ โœ“ Transitive: a2=b2a^2 = b^2 and b2=c2โ€…โ€ŠโŸนโ€…โ€Ša2=c2b^2 = c^2 \implies a^2 = c^2 โ†’ โœ“
Yes! Equivalence classes are {x,โˆ’x}\{x, -x\} for each xโˆˆRx \in \mathbb{R}.
Yesย โ€”ย equivalenceย classesย areย pairsย {x,โˆ’x}\boxed{\text{Yes โ€” equivalence classes are pairs } \{x, -x\}} Q6: Let A={1,2,3}A = \{1,2,3\}. How many relations exist on AA?
Strategy Hint: Any relation is a subset of Aร—AA \times A.
Step 1: โˆฃAร—Aโˆฃ=3ร—3=9|A \times A| = 3 \times 3 = 9 Step 2: Number of subsets = 29=5122^9 = 512
512ย relations\boxed{512 \text{ relations}} Q7: Draw the directed graph for R={(1,2),(2,3),(3,1),(1,1)}R = \{(1,2), (2,3), (3,1), (1,1)\} on {1,2,3}\{1,2,3\}.
Strategy Hint: Vertices = 1,2,3. Edges = the pairs.
pseudo
1 โ†’ 2 โ†’ 3
โ†‘    โ†“
โ””โ”€โ”€โ”€โ”€โ”˜
With a self-loop at 1.
Graphย representation:ย 1โ†’2โ†’3โ†’1,ย plusย 1โ†’1\boxed{\text{Graph representation: } 1 \to 2 \to 3 \to 1 \text{, plus } 1 \to 1} Q8: If โˆฃAโˆฃ=3|A| = 3 and โˆฃBโˆฃ=4|B| = 4, what is โˆฃAร—Bร—Aโˆฃ|A \times B \times A|?
Strategy Hint: Multiply cardinalities.
โˆฃAร—Bร—Aโˆฃ=3ร—4ร—3=36|A \times B \times A| = 3 \times 4 \times 3 = 36
36\boxed{36} Q9: Let R={(1,1),(1,2),(2,1),(2,2),(3,3)}R = \{(1,1), (1,2), (2,1), (2,2), (3,3)\} on {1,2,3,4}\{1,2,3,4\}. Is RR reflexive?
Strategy Hint: Reflexive requires (4,4)(4,4).
(4,4)โˆ‰R(4,4) \notin R, so NOT reflexive.
No\boxed{\text{No}} Q10: Find the matrix representation of R={(a,b)โˆฃa,bโˆˆ{1,2,3},ย aโˆฃb}R = \{(a,b) \mid a,b \in \{1,2,3\},\ a \mid b\}.
Strategy Hint: aa divides bb means bb is a multiple of aa.
(a,b)123
11 (1|1)1 (1|2)1 (1|3)
201 (2|2)0
3001 (3|3)
>MR=[111010001]>> M_R = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} >
>MR=[111010001]>> \boxed{M_R = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}} >
Q11: If RR is symmetric and antisymmetric, prove RโІ{(a,a)โˆฃaโˆˆA}R \subseteq \{(a,a) \mid a \in A\}.
Strategy Hint: Take any (a,b)โˆˆR(a,b) \in R and deduce a=ba = b.
Proof: Let (a,b)โˆˆR(a,b) \in R. By symmetry, (b,a)โˆˆR(b,a) \in R. Since RR is antisymmetric, (a,b),(b,a)โˆˆRโ€…โ€ŠโŸนโ€…โ€Ša=b(a,b),(b,a) \in R \implies a = b. Thus every pair in RR has the form (a,a)(a,a).
Proved\boxed{\text{Proved}} Q12: Show that "same birthday month" is an equivalence relation on the set of all people. How many equivalence classes are there?
Strategy Hint: The three properties are straightforward. Classes = 12 months.
Reflexive: A person has the same birthday month as themselves. โœ“ Symmetric: If A and B share a month, B and A do too. โœ“ Transitive: If AโˆผB (same month) and BโˆผC (same month), then AโˆผC. โœ“
12 equivalence classes (January through December), possibly with empty classes if no one in the set has that month.
Yes,ย 12ย equivalenceย classes\boxed{\text{Yes, 12 equivalence classes}}

๐Ÿ”— Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.