Lesson 10 +30 XP

Relations & Properties of Binary Relations

1. Binary Relations

A binary relation R from A to B is a subset of A × B. We write a R b when (a, b) ∈ R. A relation on A is a subset of A × A.

  • If n(A) = m and n(B) = n, there are 2mn relations from A to B (every subset of A × B).
  • On a set with n elements there are 2n² relations.

Domain = set of first components, range = set of second components. The inverse relation is R⁻¹ = {(b, a) : (a, b) ∈ R}.

2. Representing Relations

Example. A = {1, 2, 3, 4, 6}, a R b iff a ∣ b (a divides b). R = {(1,1),(1,2),(1,3),(1,4),(1,6),(2,2),(2,4),(2,6),(3,3),(3,6),(4,4),(6,6)}

Digraph and 0-1 matrix of the divisibility relation on {1, 2, 3, 4, 6}Digraph and 0-1 matrix of the divisibility relation on {1, 2, 3, 4, 6}

Matrix MR: entry mij = 1 if (aᵢ, aⱼ) ∈ R.

12346
111111
201011
300101
400010
600001

Digraph: a vertex per element and an arrow a → b for each pair (a loop for (a, a)).

  • Out-degree (row sums): 1 → 5, 2 → 3, 3 → 2, 4 → 1, 6 → 1
  • In-degree (column sums): 1 → 1, 2 → 2, 3 → 2, 4 → 3, 6 → 4

3. Properties of a Relation R on A

PropertyDefinitionMatrix testDigraph test
Reflexive(a, a) ∈ R for all a ∈ Aall diagonal entries 1loop on every vertex
Irreflexive(a, a) ∉ R for all aall diagonal entries 0no loops
Symmetric(a, b) ∈ R ⇒ (b, a) ∈ RM = Mᵀevery arrow has a reverse
Antisymmetric(a, b), (b, a) ∈ R ⇒ a = bmij = 1 ⇒ mji = 0 for i ≠ jno pair of opposite arrows
Asymmetric(a, b) ∈ R ⇒ (b, a) ∉ Rantisymmetric and irreflexiveno opposite arrows, no loops
Transitive(a, b), (b, c) ∈ R ⇒ (a, c) ∈ RM² ≤ M (Boolean)every 2-step path has a shortcut

Digraph patterns for reflexive, symmetric, antisymmetric and transitive relationsDigraph patterns for reflexive, symmetric, antisymmetric and transitive relations

🟣 Important

- "Not reflexive" ≠ "irreflexive". On {1, 2, 3}, {(1,1),(2,2)} is neither. - Symmetric and antisymmetric are not opposites. The identity relation is both; {(1,2),(2,1),(1,3)} is neither. - Every asymmetric relation is antisymmetric, but not conversely (≤ is antisymmetric but not asymmetric). - The empty relation φ is irreflexive, symmetric, antisymmetric, asymmetric and transitive (all conditions are vacuous).

Classic examples

RelationRefl.Sym.Antisym.Trans.
≤ on R✅❌✅✅
< on R❌ (irreflexive)❌✅✅
a ∣ b on Z⁺✅❌✅✅
x − y is an integer (on R)✅✅❌✅
x − y is odd (on Z)❌✅❌❌
perpendicular lines❌✅❌❌

Solved PYQ

On A = {1, 2, 3, 4}:

  • R₁ = {(1,1),(1,2),(2,3),(1,3),(4,4)}
  • R₂ = {(1,1),(1,2),(2,1),(2,2),(3,3),(4,4)}
  • R₃ = {(1,3),(2,1)}
  • R₄ = φ
  • R₅ = A × A
ReflexiveSymmetricAntisymmetricTransitive
R₁❌ (no (2,2))❌✅✅
R₂✅✅❌✅
R₃❌❌✅❌ ((2,1),(1,3) but no (2,3))
R₄❌✅✅✅
R₅✅✅❌✅

> {(1,1),(1,2),(2,1)} is not transitive: (2,1) and (1,2) require (2,2), which is missing.

4. Counting Relations with a Property (on an n-element set)

PropertySmallestLargestNumber of such relations
Reflexiven pairsn²2n²-n
Irreflexive0n² − n2n²-n
Symmetric0n²2n(n+1)/2
Antisymmetric0n(n + 1)/22n · 3(n²-n)/2
Asymmetric0(n² − n)/23(n²-n)/2

Why reflexive = 2n²-n? The n diagonal pairs are forced in; each of the other n² − n pairs is free (in or out). For A = {1, 2}: 2² = 4 reflexive relations; for 3 elements 2⁶ = 64; for 4 elements 2¹² = 4096.

Why antisymmetric = 2n · 3(n²-n)/2? Each diagonal pair: 2 choices. Each unordered off-diagonal pair {a, b}: 3 choices-neither, (a, b) only, or (b, a) only.

5. Composition of Relations

If R ⊆ A × B and S ⊆ B × C, then S ∘ R = {(a, c) : ∃b with (a, b) ∈ R and (b, c) ∈ S}. In matrices, MS∘R = MR ⊙ MS (Boolean product). Rⁿ is R composed with itself n times.

🎯 END-TERM EXAM PREP

📝 IPU End-Term Exam Corner (5-10 Marks)

  • Q1. Let A = {1, 2, 3, 4, 6} and a R b iff a ∣ b. Write R, draw its digraph, give its matrix and the in/out-degree of each vertex. (10 Marks)
  • Q2. Determine which of R₁…R₅ above are reflexive, symmetric, antisymmetric, transitive. (5 Marks)
  • Q3. Define reflexive, symmetric, antisymmetric, asymmetric and transitive relations with examples; how many reflexive relations are there on a 3-element set? (5 Marks) → 64.