← 🔗 Sets, Relations & Functions
Subtopic 3 of 7

2.3Closures and counting relations

The idea

The closure of a relation is the smallest extension that gains a property. Reflexive closure adds the missing (a, a), symmetric closure adds reverses, transitive closure adds all the missing shortcuts (Warshall). Counting how many relations have a property uses the formulas for pairs that are forced or free.

Think of it like this: Filling in a family tree: start with parent-of pairs and keep adding ancestor-of until nothing new appears.

Why it exists

GATE loves "how many reflexive / symmetric / antisymmetric relations exist on an n-set" and "what is the size of the transitive closure".

How it works

  1. Reflexive closure R ∪ I; symmetric closure R ∪ Rᵀ.
  2. Transitive closure: keep adding (a, c) whenever (a, b) and (b, c) exist (Warshall, O(n³)).
  3. Count relations on an n-set: all 2^(n²), reflexive 2^(n²−n), symmetric 2^(n(n+1)/2).
  4. Antisymmetric 2ⁿ·3^(n(n−1)/2), asymmetric 3^(n(n−1)/2), equivalence Bell(n).

Worked example: Reflexive and symmetric relations on a 4-set

The 4 diagonal pairs are forced; the 6 off-diagonal pairs are chosen in mirrored couples, so 2⁶ = 64.

Now play with it

  • →Load the cycle 1 → 2 → 3 → 1 and read its transitive closure.
  • →Raise n in the count table to see how fast the numbers grow.

Click a matrix cell to add or remove a pair. Row = first element, column = second.

123
1010
2001
3000
Pairs in R2
Reflexive closure5 pairs
Symmetric closure4 pairs
Transitive closure (Warshall)3 pairs
Smallest equivalence containing R9 pairs
Closures to rememberR∪I, R∪Rᵀ, R∪R²∪…
Transitive closure: (1,2) (1,3) (2,3)
Kind of relation on an n-setFormulaFor n = 3
All relations2^(n²)512
Reflexive2^(n²−n)64
Irreflexive2^(n²−n)64
Symmetric2^(n(n+1)/2)64
Antisymmetric2^n · 3^(n(n−1)/2)216
Asymmetric3^(n(n−1)/2)27
Reflexive and symmetric2^(n(n−1)/2)8
Equivalence relationsBell number B(n)5
Functions A → Anⁿ27
Bijections A → An!6

Check yourself

How many symmetric relations exist on a 3-element set?

Remember: Symmetric: 2^(n(n+1)/2). Reflexive: 2^(n²−n). Antisymmetric: 2ⁿ·3^(n(n−1)/2).
Exam notes (the dense version)

Reflexive closure R ∪ I; symmetric closure R ∪ Rᵀ; transitive closure R ∪ R² ∪ … ∪ Rⁿ (Warshall in O(n³)). Counting on an n-set: all 2^(n²); reflexive 2^(n²−n); symmetric 2^(n(n+1)/2); antisymmetric 2ⁿ·3^(n(n−1)/2); asymmetric 3^(n(n−1)/2); equivalence relations Bell(n).

Previous year questions: Sets, Relations & Functions (20)

PYQs are grouped by topic, so this is the full set for Sets, Relations & Functions; try the ones that match this subtopic. Open all 20 on the topic page.