Some relations behave especially well. “Is equal to”, “has the same remainder mod 3” and “is parallel to” share three properties that make them act like a kind of equality. Recognising these properties is essential for databases (keys), compilers (type equivalence) and graph algorithms.
Definition 1.19 · Reflexive, symmetric, transitive
A relation R R R on a set A A A is
reflexive if ( a , a ) ∈ R (a, a) \in R ( a , a ) ∈ R for every a ∈ A a \in A a ∈ A ;
symmetric if ( a , b ) ∈ R (a, b) \in R ( a , b ) ∈ R implies ( b , a ) ∈ R (b, a) \in R ( b , a ) ∈ R , for all a , b ∈ A a, b \in A a , b ∈ A ;
transitive if ( a , b ) ∈ R (a, b) \in R ( a , b ) ∈ R and ( b , c ) ∈ R (b, c) \in R ( b , c ) ∈ R imply ( a , c ) ∈ R (a, c) \in R ( a , c ) ∈ R , for all a , b , c ∈ A a, b, c \in A a , b , c ∈ A .
Property Test on the matrix Test on the digraph To show it FAILS, give Reflexive every diagonal entry is 1 a loop at every vertex one a a a with ( a , a ) ∉ R (a, a) \notin R ( a , a ) ∈ / R Symmetric M R M_R M R equals its transposeevery arrow has a reverse arrow one ( a , b ) ∈ R (a, b) \in R ( a , b ) ∈ R with ( b , a ) ∉ R (b, a) \notin R ( b , a ) ∈ / R Transitive (check all paths) every two-step path a → b → c a \to b \to c a → b → c has a shortcut a → c a \to c a → c one ( a , b ) , ( b , c ) ∈ R (a, b), (b, c) \in R ( a , b ) , ( b , c ) ∈ R with ( a , c ) ∉ R (a, c) \notin R ( a , c ) ∈ / R
Intuition
Think of “lives in the same city as”. Everyone lives in the same city as themselves (reflexive). If I live in your city, you live in mine (symmetric). If I live in your city and you live in Ravi’s city, I live in Ravi’s city (transitive). Relations with all three properties sort people into non-overlapping groups — here, cities.
Examples
Relation Set Reflexive Symmetric Transitive a = b a = b a = b any set yes yes yes a ≤ b a \leq b a ≤ b R \mathbb{R} R yes no (2 ≤ 3 2 \leq 3 2 ≤ 3 , 3 ≰ 2 3 \not\leq 2 3 ≤ 2 ) yes a < b a < b a < b R \mathbb{R} R no no yes line a a a is parallel to line b b b (a line counts as parallel to itself) lines in a plane yes yes yes line a a a meets line b b b (not parallel) lines in a plane — yes no a a a divides b b b N \mathbb{N} N yes no yes
Equivalence relations
Definition 1.20 · Equivalence relation and equivalence class
A relation on A A A is an equivalence relation if it is reflexive, symmetric and transitive. The equivalence class of a a a is [ a ] = { x ∈ A ∣ x R a } [a] = \{x \in A \mid x \mathrel{R} a\} [ a ] = { x ∈ A ∣ x R a } .
The equivalence classes of an equivalence relation split A A A into non-empty, non-overlapping pieces that together cover A A A (a partition ). For example, "a ≡ b ( m o d 3 ) a \equiv b \pmod 3 a ≡ b ( mod 3 ) " (3 divides a − b a - b a − b ) on Z \mathbb{Z} Z has three classes: [ 0 ] = { … , − 3 , 0 , 3 , 6 , … } [0] = \{\dots, -3, 0, 3, 6, \dots\} [ 0 ] = { … , − 3 , 0 , 3 , 6 , … } , [ 1 ] = { … , − 2 , 1 , 4 , … } [1] = \{\dots, -2, 1, 4, \dots\} [ 1 ] = { … , − 2 , 1 , 4 , … } and [ 2 ] = { … , − 1 , 2 , 5 , … } [2] = \{\dots, -1, 2, 5, \dots\} [ 2 ] = { … , − 1 , 2 , 5 , … } .
Example 1.21 Checking an equivalence relation
Goal. Show that R = { ( a , b ) ∈ Z × Z ∣ 3 divides a − b } R = \{(a, b) \in \mathbb{Z} \times \mathbb{Z} \mid 3 \text{ divides } a - b\} R = {( a , b ) ∈ Z × Z ∣ 3 divides a − b } is an equivalence relation.
Step. Reflexive: a − a = 0 = 3 ⋅ 0 a - a = 0 = 3 \cdot 0 a − a = 0 = 3 ⋅ 0 , so ( a , a ) ∈ R (a, a) \in R ( a , a ) ∈ R for every integer a a a .
Step. Symmetric: if a − b = 3 k a - b = 3k a − b = 3 k , then b − a = 3 ( − k ) b - a = 3(-k) b − a = 3 ( − k ) , so ( b , a ) ∈ R (b, a) \in R ( b , a ) ∈ R .
Step. Transitive: if a − b = 3 k a - b = 3k a − b = 3 k and b − c = 3 l b - c = 3l b − c = 3 l , then a − c = ( a − b ) + ( b − c ) = 3 ( k + l ) a - c = (a - b) + (b - c) = 3(k + l) a − c = ( a − b ) + ( b − c ) = 3 ( k + l ) , so ( a , c ) ∈ R (a, c) \in R ( a , c ) ∈ R .
Result. R R R is reflexive, symmetric and transitive, so it is an equivalence relation, with classes [ 0 ] [0] [ 0 ] , [ 1 ] [1] [ 1 ] , [ 2 ] [2] [ 2 ] .
Example 1.22 Testing a small relation with a program
Goal. Test R = { ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 1 , 2 ) , ( 2 , 1 ) , ( 2 , 3 ) } R = \{(1,1), (2,2), (3,3), (1,2), (2,1), (2,3)\} R = {( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 1 , 2 ) , ( 2 , 1 ) , ( 2 , 3 )} on A = { 1 , 2 , 3 } A = \{1, 2, 3\} A = { 1 , 2 , 3 } for the three properties.
Step. Write each definition as a check over all elements:
Python · relation_props.py Copy A = { 1 , 2 , 3 }
R = {( 1 , 1 ), ( 2 , 2 ), ( 3 , 3 ), ( 1 , 2 ), ( 2 , 1 ), ( 2 , 3 )}
reflexive = all ((a, a) in R for a in A)
symmetric = all ((b, a) in R for (a, b) in R)
transitive = all ((a, d) in R
for (a, b) in R for (c, d) in R if b == c)
print ( "reflexive:" , reflexive)
print ( "symmetric:" , symmetric)
print ( "transitive:" , transitive)
Output Copy reflexive: True
symmetric: False
transitive: False
Step. By hand: symmetric fails because ( 2 , 3 ) ∈ R (2, 3) \in R ( 2 , 3 ) ∈ R but ( 3 , 2 ) ∉ R (3, 2) \notin R ( 3 , 2 ) ∈ / R ; transitive fails because ( 1 , 2 ) , ( 2 , 3 ) ∈ R (1, 2), (2, 3) \in R ( 1 , 2 ) , ( 2 , 3 ) ∈ R but ( 1 , 3 ) ∉ R (1, 3) \notin R ( 1 , 3 ) ∈ / R .
Result. R R R is reflexive but neither symmetric nor transitive, so it is not an equivalence relation.
Correction · The relation 'loves' in E21
Study material says: The answer to E21 (§1.7) concludes that ”a a a loves b b b ” on the set of all people is reflexive “because everyone loves herself or himself”.
Correct version: Whether every person loves himself or herself is not a mathematical fact, so reflexivity cannot be proved this way. A relation must be defined precisely before its properties can be tested. The non-symmetric and non-transitive conclusions are fine as examples : one pair where a a a loves b b b but b b b does not love a a a shows symmetry fails.
Why: To prove a property “for all” elements we need a definition that settles every case; to disprove it, one clear counterexample is enough (Block 1, Unit 2). Exam answers are safer with a well-defined relation such as ”a a a divides b b b ” or "a ≡ b ( m o d n ) a \equiv b \pmod n a ≡ b ( mod n ) ".
Common mistake
Checking symmetry or transitivity on only one pair. Each property is a “for all” statement: one failing case breaks it, but to confirm it you must check every pair (or give a general proof).
Common mistake
Forgetting the elements that appear in no pair. { ( 1 , 1 ) , ( 2 , 2 ) } \{(1,1), (2,2)\} {( 1 , 1 ) , ( 2 , 2 )} on A = { 1 , 2 , 3 } A = \{1, 2, 3\} A = { 1 , 2 , 3 } is not reflexive, because ( 3 , 3 ) (3, 3) ( 3 , 3 ) is missing.
Key idea
A relation is an equivalence relation when it is reflexive, symmetric and transitive; such a relation sorts the set into disjoint equivalence classes, and acts like “is the same as” in some respect.
TEE Exam note
“Check whether the relation … is reflexive, symmetric, transitive. Is it an equivalence relation?” Treat each property separately: give a general proof if it holds, a specific counterexample if it fails. For ≤ \leq ≤ on R \mathbb{R} R : reflexive (x ≤ x x \leq x x ≤ x ), not symmetric (2 ≤ 3 2 \leq 3 2 ≤ 3 but 3 ≰ 2 3 \not\leq 2 3 ≤ 2 ), transitive; hence not an equivalence relation.
Key takeaways
Reflexive: every ( a , a ) (a, a) ( a , a ) ; symmetric: every pair has its reverse; transitive: every two-step path has a shortcut.
One counterexample is enough to show a property fails.
Equivalence relation = reflexive + symmetric + transitive.
Equivalence classes partition the set (e.g. remainders mod 3).
Practice questions Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 1 · multiple choice On A = { 1 , 2 , 3 } A = \{1, 2, 3\} A = { 1 , 2 , 3 } , which relation is reflexive?
A { ( 1 , 1 ) , ( 2 , 2 ) } \{(1,1), (2,2)\} {( 1 , 1 ) , ( 2 , 2 )} B { ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 1 , 3 ) } \{(1,1), (2,2), (3,3), (1,3)\} {( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 1 , 3 )} C { ( 1 , 2 ) , ( 2 , 3 ) , ( 1 , 3 ) } \{(1,2), (2,3), (1,3)\} {( 1 , 2 ) , ( 2 , 3 ) , ( 1 , 3 )} D ∅ \emptyset ∅ Check answer
Show answer Answer: B. { ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 1 , 3 ) } \{(1,1), (2,2), (3,3), (1,3)\} {( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 1 , 3 )}
All of ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) (1,1), (2,2), (3,3) ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) are present. Option 1 misses ( 3 , 3 ) (3,3) ( 3 , 3 ) .
Question 2 · multiple choice Which property does ≤ \leq ≤ on R \mathbb{R} R NOT have?
A Reflexive B Transitive C Symmetric D It has all three
Check answer
Show answer Answer: C. Symmetric
2 ≤ 3 2 \leq 3 2 ≤ 3 but 3 ≰ 2 3 \not\leq 2 3 ≤ 2 . Option 4 is wrong, so ≤ \leq ≤ is not an equivalence relation.
Question 3 · multiple choice The relation R = { ( 1 , 2 ) , ( 2 , 3 ) } R = \{(1,2), (2,3)\} R = {( 1 , 2 ) , ( 2 , 3 )} on { 1 , 2 , 3 } \{1, 2, 3\} { 1 , 2 , 3 } is not transitive. Which pair must be added to fix this?
A ( 1 , 3 ) (1, 3) ( 1 , 3 ) B ( 3 , 1 ) (3, 1) ( 3 , 1 ) C ( 2 , 1 ) (2, 1) ( 2 , 1 ) D ( 1 , 1 ) (1, 1) ( 1 , 1 ) Check answer
Show answer Answer: A. ( 1 , 3 ) (1, 3) ( 1 , 3 )
( 1 , 2 ) (1,2) ( 1 , 2 ) and ( 2 , 3 ) (2,3) ( 2 , 3 ) require ( 1 , 3 ) (1,3) ( 1 , 3 ) . Option 2 is the reverse direction; transitivity needs ( a , c ) (a, c) ( a , c ) , not ( c , a ) (c, a) ( c , a ) .
Question 4 · multiple choice How many equivalence classes does “congruence modulo 5” have on Z \mathbb{Z} Z ?
A 4 B infinitely many C 1 D 5
Check answer
Show answer Answer: D. 5
The classes are the possible remainders 0 , 1 , 2 , 3 , 4 0, 1, 2, 3, 4 0 , 1 , 2 , 3 , 4 . Option 2 is tempting because each class is infinite, but the number of classes is 5.
Question 5 · multiple choice A relation’s matrix equals its transpose. Which property does the relation have?
A Reflexive B Symmetric C Transitive D Equivalence
Check answer
Show answer Answer: B. Symmetric
m i j = m j i m_{ij} = m_{ji} m ij = m j i means ( a i , a j ) ∈ R (a_i, a_j) \in R ( a i , a j ) ∈ R exactly when ( a j , a i ) ∈ R (a_j, a_i) \in R ( a j , a i ) ∈ R . A symmetric matrix says nothing about the diagonal, so it need not be reflexive.
Question 6 · short answer
On Z \mathbb{Z} Z define a R b a \mathrel{R} b a R b if a + b a + b a + b is even. Is R R R an equivalence relation? Give its classes.
Show worked answer Reflexive: a + a = 2 a a + a = 2a a + a = 2 a is even. Symmetric: a + b = b + a a + b = b + a a + b = b + a . Transitive: if a + b a + b a + b and b + c b + c b + c are even, then a + c = ( a + b ) + ( b + c ) − 2 b a + c = (a + b) + (b + c) - 2b a + c = ( a + b ) + ( b + c ) − 2 b is even. So R R R is an equivalence relation. a + b a + b a + b is even exactly when a a a and b b b have the same parity, so the classes are [ 0 ] [0] [ 0 ] = the even integers and [ 1 ] [1] [ 1 ] = the odd integers.