π Table of Contents
1. Introduction to Binary Relations
A binary relation R from a set A to a set B is a subset R β A Γ B.
In other words, a binary relation from A to B is a set of ordered pairs where the first element comes from A and the second element comes from B.
Notation
β’ If (a,b) β R, we write: a RΜΈ b (read as "a is not related to b")
β’ Alternative phrases: "a relates to b under relation R"
Let A = {1, 2, 3} represent students
Let B = {a, b} represent courses
R = {(1,a), (1,b), (2,a), (3,b)}
This means:
- Student 1 is registered in courses a and b
- Student 2 is registered in course a
- Student 3 is registered in course b
Special Relation: Identity Relation
The identity relation on a set A is: IA = {(a,a) | a β A}
Every element is only related to itself.
If A = {1, 2, 3, 4}, then:
IA = {(1,1), (2,2), (3,3), (4,4)}
Ways to Represent Relations
- Roster Notation: List of ordered pairs {(1,2), (3,4), ...}
- Set Builder Notation: {(a,b) | condition}
- Graph/Digraph: Visual representation with dots and arrows
- Table/Matrix: Zero-one matrix representation
2. Properties of Relations
Relations on a set A (where R: A β A) can have special properties:
Property 1: Reflexivity
Reflexive Relation
A relation R on A is reflexive if (a,a) β R for every element a β A
In other words: Every element is related to itself.
Irreflexive Relation
A relation R on A is irreflexive if (a,a) β R for every element a β A
In other words: No element is related to itself.
- A relation can be neither reflexive nor irreflexive
- Example: R = {(1,2), (2,1), (1,1)} on A = {1,2} is NOT reflexive (missing (2,2)) and NOT irreflexive (has (1,1))
Rβ = {(a,b) | a β€ b} - REFLEXIVE (every number β€ itself)
Rβ = {(a,b) | a > b} - IRREFLEXIVE (no number > itself)
Rβ = {(a,b) | a = b or a = -b} - REFLEXIVE
Rβ = {(a,b) | a = b} - REFLEXIVE
Property 2: Symmetry
Symmetric Relation
A relation R on A is symmetric if:
(a,b) β R β (b,a) β R for all a, b β A
When (a,b) is present, (b,a) MUST also be present.
Antisymmetric Relation
A relation R on A is antisymmetric if:
(a,b) β R β§ (b,a) β R β a = b
Alternative: If (a,b) is there with a β b, then (b,a) should NOT be there.
- A relation can have both properties (e.g., R = {(a,b) | a = b})
- A relation can have neither property
- A relation CANNOT be both symmetric AND antisymmetric if it contains some pair (a,b) where a β b
Rβ = {(a,b) | a = b} - SYMMETRIC and ANTISYMMETRIC
Rβ = {(a,b) | a > b} - NOT SYMMETRIC, ANTISYMMETRIC
Rβ = {(a,b) | a = b+1} - NOT SYMMETRIC, ANTISYMMETRIC
Property 3: Transitivity
Transitive Relation
A relation R is transitive if:
(a,b) β R β§ (b,c) β R β (a,c) β R for all a, b, c
If there's a path from a to b and from b to c, there must be a direct connection from a to c.
A = {1, 2}
Rβ = {(1,1), (1,2), (2,1), (2,2)} - TRANSITIVE
Check: (1,2) and (2,1) are in Rβ, and (1,1) is in Rβ β
Rβ = {(1,1), (1,2), (2,1)} - NOT TRANSITIVE
Why? (1,2) and (2,1) are in Rβ, but (1,1) is missing... wait, it's there!
Actually, we need to check: (2,1) and (1,2) β need (2,2), which is missing β
Summary Table
| Property | Definition | Visual Check |
|---|---|---|
| Reflexive | βa: (a,a) β R | All diagonal elements in matrix are 1 |
| Irreflexive | βa: (a,a) β R | All diagonal elements in matrix are 0 |
| Symmetric | (a,b) β R β (b,a) β R | Matrix is symmetric (M = MT) |
| Antisymmetric | (a,b) β R β§ (b,a) β R β a = b | All 1's across diagonal are from 0's |
| Transitive | (a,b) β R β§ (b,c) β R β (a,c) β R | Complete all triangles in digraph |
3. Representing Relations
Method 1: Zero-One Matrices
To represent a relation R by a matrix MR = [mij]:
mij = 1 if (ai, bj) β R
mij = 0 if (ai, bj) β R
A = {1, 2, 3}, B = {1, 2}
R = {(2,1), (3,1), (3,2)}
Matrix MR:
| 1 | 2 | |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 1 | 0 |
| 3 | 1 | 1 |
Identifying Properties from Matrices
Reflexive:
All 1's on the main diagonal (top-left to bottom-right)
Irreflexive:
All 0's on the main diagonal
Symmetric:
Matrix equals its transpose: M = MT
All 1's are mirrored across the diagonal
Antisymmetric:
If mij = 1 and i β j, then mji = 0
All 1's across from each other (not on diagonal) must face 0's
Method 2: Directed Graphs (Digraphs)
A directed graph G = (VG, EG) where:
- VG is the set of vertices (nodes) - represents elements of set A
- EG is the set of edges (arcs) - represents ordered pairs in R
- Draw an arrow from vertex a to vertex b if (a,b) β R
R = {(1,1), (2,2), (3,3), (4,4), (1,3), (1,2), (1,4), (2,4)}
on set {1, 2, 3, 4}
Visual: Each number has a loop to itself (reflexive), plus arrows from 1 to 2, 3, 4 and from 2 to 4.
Identifying Properties from Digraphs
Reflexive:
Every vertex has a loop (self-edge)
Irreflexive:
No vertex has a loop
Symmetric:
Every edge has a corresponding edge in the opposite direction (bidirectional arrows)
Antisymmetric:
No two distinct vertices have edges in both directions
Transitive:
Whenever there's a path from x to y and y to z, there must be a direct edge from x to z
4. Combining Relations
Operation 1: Union and Intersection
MRββͺRβ = MRβ β¨ MRβ
Element-wise OR: mij = 1 if element is in Rβ OR Rβ
MRββ©Rβ = MRβ β§ MRβ
Element-wise AND: mij = 1 if element is in Rβ AND Rβ
A = {1, 2, 3}
Rβ = {(1,1), (2,2), (1,2), (3,1), (2,3), (3,2)}
Rβ = {(1,1), (1,2), (1,3), (1,4)}
Rβ βͺ Rβ = {(1,1), (2,2), (1,2), (3,1), (2,3), (3,2), (1,3), (1,4)}
Rβ β© Rβ = {(1,1), (1,2)}
Operation 2: Composition
If R: A β B and S: B β C, then S β R: A β C
(a,c) β S β R if there exists b such that (a,b) β R and (b,c) β S
Matrix: MSβR = MR β MS (Boolean product)
Order matters in composition!
Like matrix multiplication, but:
β’ Use β¨ (OR) instead of + (addition)
β’ Use β§ (AND) instead of Γ (multiplication)
R = {(1,1), (1,2), (2,5), (3,4)}
S = {(1,6), (2,1), (4,0)}
S β R:
- (1,1) in R and (1,6) in S β (1,6) in SβR
- (1,2) in R and (2,1) in S β (1,1) in SβR
- (3,4) in R and (4,0) in S β (3,0) in SβR
S β R = {(1,6), (1,1), (3,0)}
Operation 3: Powers of Relations
RΒΉ = R
Rn+1 = Rn β R
Matrix: MRn = MR[n] (Boolean power)
R = {(1,1), (2,1), (3,2), (4,3)}
RΒ² = R β R = {(1,1), (2,1), (3,1), (4,2)}
RΒ³ = RΒ² β R = {(1,1), (2,1), (3,1), (4,1)}
5. Closure of Relations
For any property X, the "X closure" of a set A is the smallest superset of A that has property X.
We add the minimum number of elements to R to make it satisfy the property.
1. Reflexive Closure
Reflexive Closure of R:
Add (a,a) to R for each a β A not already in R
Formula: R βͺ IA
where IA = {(a,a) | a β A} is the identity relation
R = {(1,1), (1,2), (2,1), (3,2)} on A = {1, 2, 3}
Missing: (2,2) and (3,3)
Reflexive Closure = {(1,1), (1,2), (2,1), (3,2), (2,2), (3,3)}
2. Symmetric Closure
Symmetric Closure of R:
Add (b,a) to R for each (a,b) in R where (b,a) is not already in R
Formula: R βͺ R-1
where R-1 = {(b,a) | (a,b) β R} is the inverse relation
R = {(1,1), (2,2), (1,2), (3,1), (2,3), (3,2)}
Missing reverse pairs: (2,1) and (1,3)
Symmetric Closure = {(1,1), (2,2), (1,2), (3,1), (2,3), (3,2), (2,1), (1,3)}
3. Transitive Closure
Transitive Closure of R:
Repeatedly add (a,c) to R for each (a,b) and (b,c) in R where (a,c) is not already present
Formula: R* = R βͺ RΒ² βͺ RΒ³ βͺ ... βͺ Rn
where n = |A| (size of set A)
Matrix: MR* = MR β¨ MR[2] β¨ ... β¨ MR[n]
R = {(1,1), (1,2), (2,1), (3,2)} on A = {1, 2, 3}
RΒ² = R β R = {(1,1), (1,2), (2,1), (2,2), (3,1)}
RΒ³ = RΒ² β R = {(1,1), (1,2), (2,1), (2,2), (3,1), (3,2)}
Transitive Closure R* = R βͺ RΒ² βͺ RΒ³
= {(1,1), (1,2), (2,1), (3,2), (2,2), (3,1)}
Summary: Computing Closures
| Closure Type | Formula | What to Add |
|---|---|---|
| Reflexive | R βͺ IA | All (a,a) pairs |
| Symmetric | R βͺ R-1 | Reverse of each pair |
| Transitive | R βͺ RΒ² βͺ ... βͺ Rn | All paths of length β₯ 2 |
6. Equivalence Relations
An equivalence relation on a set A is any binary relation on A that is:
- Reflexive
- Symmetric
- Transitive
R = {(a,b) | a - b is an integer} on the set of real numbers
Check Reflexive: a - a = 0, which is an integer β
Check Symmetric: If a - b is an integer, then b - a = -(a-b) is also an integer β
Check Transitive: If a - b and b - c are integers, then a - c = (a-b) + (b-c) is also an integer β
Conclusion: R is an equivalence relation!
R = {(a,b) | a β‘ b (mod n)} - "a congruent to b modulo n"
This means n divides (a - b)
This is an equivalence relation and partitions integers into n equivalence classes:
- [0] = {..., -6, -3, 0, 3, 6, ...} (for mod 3)
- [1] = {..., -5, -2, 1, 4, 7, ...}
- [2] = {..., -4, -1, 2, 5, 8, ...}
Applications of Equivalence Relations
Common Examples:
- Equality (=): The most basic equivalence relation
- Same age: People with the same age are equivalent
- Same birthday: People born on the same day
- Congruence modulo n: Numbers with same remainder when divided by n
- Similar triangles: Triangles with same angles
Quick Check for Equivalence Relations
β Reflexive: (a,a) for all a?
β Symmetric: If (a,b) then (b,a)?
β Transitive: If (a,b) and (b,c) then (a,c)?
If ALL THREE are YES β Equivalence Relation!
π Quick Reference Guide
Property Quick Check
| To Check If... | Matrix Check | Graph Check |
|---|---|---|
| Reflexive | All 1's on diagonal | Loop at every vertex |
| Symmetric | M = MT | All edges bidirectional |
| Transitive | Check M[2] β M | Complete all triangles |
| Equivalence | Reflexive + Symmetric + Check RΒ² β R | All three properties |
Common Mistakes to Avoid
- Don't confuse "not reflexive" with "irreflexive"
- Don't confuse "not symmetric" with "antisymmetric"
- Remember: Composition order matters! S β R β R β S
- For transitive closure, you may need multiple powers (up to Rn)
- Boolean operations: β¨ is OR, β§ is AND (not regular +, Γ)
Formulas to Remember
β’ Reflexive Closure: R βͺ IA
β’ Symmetric Closure: R βͺ R-1
β’ Transitive Closure: R* = R βͺ RΒ² βͺ RΒ³ βͺ ... βͺ Rn
β’ Composition: MSβR = MR β MS
β’ Union: MRββͺRβ = MRβ β¨ MRβ
β’ Intersection: MRββ©Rβ = MRβ β§ MRβ