Neural Sync Active
Relations and Their Properties
Registry Synced
Relations and Their Properties
3249 words
16 min read
Reading compass
Now · 🎯 Learning Objectives
Relations and Their Properties
🎯 Learning Objectives
By the end of this topic, you will be able to:
- Compute the Cartesian product of two or more sets
- Define a binary relation as a subset of a Cartesian product
- Classify relations as reflexive, symmetric, transitive, antisymmetric
- Identify equivalence relations and partition sets into equivalence classes
- 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} and B={Pizza,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×B. The order matters: (Alice, Pizza) is different from (Pizza, Alice) — the first element always comes from A, the second from B.
💡 Why this matters: In databases, theCROSS JOINof 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}.
2.1.2 Formal Definition
The Cartesian product of sets A and B is:
Each element (a,b) is an ordered pair — the position matters.
Key properties:
- ∣A×B∣=∣A∣×∣B∣
- A×B=B×A (unless A=B or one is empty)
- A×(B×C)=(A×B)×C (triples vs. nested pairs)
- ∅×A=A×∅=∅ For three sets:
This generalizes to n sets (ordered n-tuples).
2.1.3 Worked Examples
Example 1.1 (Easy): Let A={1,2}, B={3,4}. Compute A×B and B×A.
Step 1: A×B pairs each element of A with each element of B:
Step 2: B×A pairs each element of B with each element of A:
Example 1.2 (Medium): How many elements are in A×B×C if ∣A∣=3, ∣B∣=4, ∣C∣=5?
Step 1: ∣A×B×C∣=∣A∣×∣B∣×∣C∣=3×4×5=60
Example 1.3 (Exam-style): Let A={1}, B={2,3}. List all elements of A×B×A.
Step 1: First coordinates from A, second from B, third from A.
A×B×A={(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 R from set A to set B is a subset of A×B:
If (a,b)∈R, we write aRb (read: "a is related to b").
- Domain of R: {a∈A∣∃b∈B, (a,b)∈R}
- Range of R: {b∈B∣∃a∈A, (a,b)∈R}
- If A=B, we say R is a relation on A. (Diagram)
2.2.3 Examples of Relations
| Set A | Set B | Relation R | R⊆A×B |
|---|---|---|---|
| Teachers | Courses | t teaches c | {(t,c)∣t teaches c} |
| N | N | a∣b ( a divides b ) | {(a,b)∣a∣b} |
| R | R | a<b | {(a,b)∣a<b} |
| Students | GPAs | ≤8.5 GPA | {(s,g)∣GPA(s)≤8.5} |
Pythagorean triples as a relation:
Example triples: (3,4,5), (5,12,13), (6,8,10).
2.3 Properties of Relations (on a Set)
When R is a relation on a set A (i.e., R⊆A×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: R is reflexive if for every a∈A, (a,a)∈R.
Examples:
- ≤ on R: a≤a for all a → reflexive ✓
divideson N: a∣a for all a>0 → reflexive ✓- < on R: a<a is false → NOT reflexive ✗
2.3.2 Symmetric
Intuition: If a relates to b, then b relates back to a. Like a two-way street.
Definition: R is symmetric if whenever (a,b)∈R, then (b,a)∈R.
Examples:
=on R: a=b⟹b=a → symmetric ✓gcd(a,b) = 1on N: gcd(a,b)=1⟺gcd(b,a)=1 → symmetric ✓$\leq$on R: 2≤3 does NOT imply 3≤2 → NOT symmetric ✗
2.3.3 Transitive
Intuition: If a relates to b and b relates to c, then a relates to c. Like a chain.
Definition: R is transitive if whenever (a,b)∈R and (b,c)∈R, then (a,c)∈R.
Examples:
- < on R: a<b and b<c implies a<c → transitive ✓
divideson N: a∣b and b∣c implies a∣c → transitive ✓- "is a parent of": NOT transitive (my parent's parent is my grandparent, not my parent) ✗
2.3.4 Antisymmetric
Intuition: If a relates to b and b relates to a, then a and b must be the same. No distinct two-way relationships.
Definition: R is antisymmetric if whenever (a,b)∈R and (b,a)∈R, then a=b.
Examples:
- ≤ on R: if a≤b and b≤a, then a=b → antisymmetric ✓
divideson N: if a∣b and b∣a, then a=b → antisymmetric ✓a - b = 2on N: neither symmetric nor antisymmetric ✗ (Diagram)
2.3.5 Worked Example: Classifying Relations
Example 2.1: R={(a,b)∣a,b∈N, a≤b}. Classify R.
| Property | Check | Result |
|---|---|---|
| Reflexive | a≤a for all a ? ✓ Yes | ✓ |
| Symmetric | If 2≤3 , does 3≤2 ? No | ✗ |
| Transitive | If a≤b and b≤c , then a≤c ? ✓ Yes | ✓ |
| Antisymmetric | If a≤b and b≤a , then a=b ? ✓ Yes | ✓ |
Example 2.2: R={(a,b)∣a,b∈Z, ∣a−b∣=2}. Classify R.
| Property | Check | Result |
|---|---|---|
| Reflexive | $ | a - a |
| Symmetric | $ | a - b |
| Transitive | (0,2)∈R and (2,4)∈R , but (0,4)∈/R since $ | 0-4 |
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 R on a set A is an equivalence relation if it is:
- Reflexive: (a,a)∈R for all a∈A
- Symmetric: (a,b)∈R⟺(b,a)∈R
- Transitive: (a,b)∈R and (b,c)∈R⟹(a,c)∈R
2.4.3 Equivalence Classes
An equivalence relation partitions A into disjoint subsets called equivalence classes. The equivalence class of a∈A is:
Properties:
- Every element belongs to exactly one equivalence class
- [a]=[b] iff (a,b)∈R
- Different equivalence classes are disjoint
- The union of all equivalence classes equals A
2.4.4 Worked Examples
Example 3.1 (Easy): Define R on Z by: aRb if amod5=bmod5.
Check reflexive: amod5=amod5 → ✓
Check symmetric: If amod5=bmod5, then bmod5=amod5 → ✓
Check transitive: If amod5=bmod5 and bmod5=cmod5, then amod5=cmod5 → ✓
Equivalence classes (remainders 0, 1, 2, 3, 4):
- [0]={…,−10,−5,0,5,10,…}
- [1]={…,−9,−4,1,6,11,…}
- [2]={…,−8,−3,2,7,12,…}
- [3]={…,−7,−2,3,8,13,…}
- [4]={…,−6,−1,4,9,14,…}
Example 3.2 (Medium): Let A={1,2,3,4,5,6}. Define R={(a,b)∣a,b∈A, a≡b(mod3)}. Find the equivalence classes.
Step 1: Numbers with same remainder modulo 3:
- Remainder 0: {3,6}
- Remainder 1: {1,4}
- Remainder 2: {2,5} Step 2: Verify: every element of A appears in exactly one class. ✓
Example 3.3 (Hard): Is "same parity" (both even or both odd) an equivalence relation on Z?
Step 1 — Reflexive: Every integer has the same parity as itself (even×even or odd×odd). ✓
Step 2 — Symmetric: If a and b have same parity, then b and a do too. ✓
Step 3 — Transitive: If a,b have same parity and b,c have same parity, then a,c have same parity. ✓
Equivalence classes:
- Even numbers: {…,−4,−2,0,2,4,…}
- Odd numbers: {…,−3,−1,1,3,5,…}
2.5 Representing Relations
2.5.1 Matrix Representation
For a relation R on a finite set A={a1,a2,…,an}, build an n×n matrix MR where:
Example: A={1,2,3}, R={(1,1),(1,2),(2,3),(3,1)}
Properties visible from matrix:
- Reflexive: All diagonal entries are 1
- Symmetric: Matrix is symmetric (MR=MRT)
- Antisymmetric: If MR[i][j]=1 and i=j, then MR[j][i]=0
2.5.2 Graph Representation (Directed Graphs)
A relation R on A can be drawn as a directed graph where:
- Elements of A are vertices
- Each (a,b)∈R is a directed edge a→b (Diagram) This graph corresponds to the matrix above.
📐 Key Formulas — Summary Table
| Concept | Formula/Definition | When to Use |
|---|---|---|
| Cartesian product | A×B={(a,b)∣a∈A,b∈B} | Generating all ordered pairs |
| Size of product | $\ | A \times B\ |
| Binary relation | R⊆A×B | Modeling connections |
| Reflexive | ∀a∈A:(a,a)∈R | Check diagonal in matrix |
| Symmetric | (a,b)∈R⟹(b,a)∈R | Two-way relationships |
| Transitive | (a,b),(b,c)∈R⟹(a,c)∈R | Chain relationships |
| Antisymmetric | (a,b),(b,a)∈R⟹a=b | Partial orders |
| Equivalence relation | Reflexive + Symmetric + Transitive | Grouping/classification |
| Equivalence class | [a]={b∣(a,b)∈R} | Partition of a set |
| Matrix entry | MR[i][j]=1 if (ai,aj)∈R | Computing 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)} on {1,2} is both symmetric (each pair has its reverse, which is itself) and antisymmetric (if (a,b) and (b,a) are in R, then a=b).
Most relations are neither symmetric nor antisymmetric. Eg: 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). If ANY chain exists without its corresponding (a,c), the relation is NOT transitive.
Example: R={(1,2),(2,3),(1,3),(3,4)}. Is (1,2),(2,3)→(1,3) ✓. But (1,2),(2,4)? (2,4)∈/R, so no check needed. However (1,3),(3,4)→(1,4)? (1,4)∈/R → NOT transitive!
Pitfall 3: Thinking {(1,1),(2,2)} is Reflexive on {1,2,3}
Mistake: Reflexive requires (a,a) for every a∈A. If A={1,2,3}, then (3,3) must be present. Without it, the relation is not reflexive.
Correct: Check each element in the set A, not just those that appear in R.
Pitfall 4: Confusing "divides" Relation Domain
Mistake: Thinking 0∣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∣b requires a=0.
📝 Practice Questions
Q1: Let A={x,y}, B={1,2,3}. Compute A×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)} Q2: Does R={(a,b)∣a,b∈N, a<b} satisfy reflexivity?Strategy Hint: Check if any natural number is less than itself.Solution: a<a is false for all a. So R is NOT reflexive.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 Q4: Find the equivalence classes of R={(a,b)∣a,b∈Z, a≡b(mod4)}.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,…} Q5: Is R={(a,b)∣a,b∈R, a2=b2} an equivalence relation?Strategy Hint: Check the three properties.Reflexive: a2=a2 → ✓ Symmetric: a2=b2⟹b2=a2 → ✓ Transitive: a2=b2 and b2=c2⟹a2=c2 → ✓Yes! Equivalence classes are {x,−x} for each x∈R.Yes — equivalence classes are pairs {x,−x} Q6: Let A={1,2,3}. How many relations exist on A?Strategy Hint: Any relation is a subset of A×A.Step 1: ∣A×A∣=3×3=9 Step 2: Number of subsets = 29=512512 relations Q7: Draw the directed graph for R={(1,2),(2,3),(3,1),(1,1)} on {1,2,3}.Strategy Hint: Vertices = 1,2,3. Edges = the pairs.pseudo1 → 2 → 3 ↑ ↓ └────┘With a self-loop at 1.Graph representation: 1→2→3→1, plus 1→1 Q8: If ∣A∣=3 and ∣B∣=4, what is ∣A×B×A∣?Strategy Hint: Multiply cardinalities.∣A×B×A∣=3×4×3=3636 Q9: Let R={(1,1),(1,2),(2,1),(2,2),(3,3)} on {1,2,3,4}. Is R reflexive?Strategy Hint: Reflexive requires (4,4).(4,4)∈/R, so NOT reflexive.No Q10: Find the matrix representation of R={(a,b)∣a,b∈{1,2,3}, a∣b}.Strategy Hint: a divides b means b is a multiple of a.
| (a,b) | 1 | 2 | 3 |
|---|---|---|---|
| 1 | 1 (1|1) | 1 (1|2) | 1 (1|3) |
| 2 | 0 | 1 (2|2) | 0 |
| 3 | 0 | 0 | 1 (3|3) |
>MR=100110101>
>MR=100110101>
Q11: If R is symmetric and antisymmetric, prove R⊆{(a,a)∣a∈A}.Strategy Hint: Take any (a,b)∈R and deduce a=b.Proof: Let (a,b)∈R. By symmetry, (b,a)∈R. Since R is antisymmetric, (a,b),(b,a)∈R⟹a=b. Thus every pair in R has the form (a,a).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
🔗 Cross-References
- Previous topic: Sets and Set Operations
- Next topic: Functions and Their Types — a function is a special type of relation
- Across courses: BSMA1003 Maths 2 (linear transformations are relations with special properties); BSMA1002 Stats 1 (random variables are functions from sample space to reals) Join Discord Previous1.1 Sets & OperationsNext1.3 Functions