Closure of Relations: Reflexive, Symmetric, and Transitive Closures

Sometimes a relation RR on a set AA is missing a property we want it to have. The closure of RR with respect to a property PP is the smallest relation SS such that R⊆SR \subseteq S and SS has property PP. 'Smallest' means we add only the pairs the property forces, never more, and we never remove a pair of RR.

Directed graph of the relation R=\{(1,2),(2,3),(3,1),(3,4)\} on A=\{1,2,3,4\}, used to build its closures.

Directed graph of the relation R={(1,2),(2,3),(3,1),(3,4)}R=\{(1,2),(2,3),(3,1),(3,4)\} on A={1,2,3,4}A=\{1,2,3,4\}, used to build its closures.

Reflexive Closure

To make RR reflexive we must guarantee (a,a)(a,a) for every a∈Aa \in A:


r(R)=R∪{(a,a):a∈A}r(R) = R \cup \{(a,a) : a \in A\}

Symmetric Closure

To make RR symmetric we must include the reverse of every pair:


s(R)=R∪R−1,where R−1={(b,a):(a,b)∈R}s(R) = R \cup R^{-1}, \quad \text{where } R^{-1} = \{(b,a) : (a,b) \in R\}

Transitive Closure

Transitivity says: if (a,b)(a,b) and (b,c)(b,c) are in RR, then (a,c)(a,c) must be too. This can cascade through chains, so:


t(R)=R∪R2∪R3∪⋯t(R) = R \cup R^2 \cup R^3 \cup \cdots


where RnR^n is the set of pairs joined by a path of exactly nn arrows. Equivalently, (x,y)∈t(R)(x,y) \in t(R) exactly when there is a directed path of length ≥1\ge 1 from xx to yy in the digraph of RR.


On a finite set with |A|=m, the union through R^m suffices: for x≠y, any reachable pair has a simple-path witness of length at most m−1, while a positive-length return path from x to itself has a simple-cycle witness of length at most m.

Reflexive and Symmetric Are One Pass; Transitive Is Not

Adding the diagonal cannot create a new missing diagonal pair, and adding (b,a)(b,a) cannot create a new missing reverse, so rr and ss each finish in a single sweep. Transitivity is different: a pair you add can immediately combine with an existing pair to force another.


Warshall's algorithm is the systematic way to run that cascade to completion, sweeping once per element of AA and asking, for each kk, whether a path can now be routed through kk.

Worked Example

Let A={1,2,3}A=\{1,2,3\} and R={(1,2),(2,3)}R=\{(1,2),(2,3)\}.


  • r(R)={(1,2),(2,3),(1,1),(2,2),(3,3)}r(R) = \{(1,2),(2,3),(1,1),(2,2),(3,3)\}, three pairs added.
  • s(R)={(1,2),(2,3),(2,1),(3,2)}s(R) = \{(1,2),(2,3),(2,1),(3,2)\}, two pairs added.
  • t(R)={(1,2),(2,3),(1,3)}t(R) = \{(1,2),(2,3),(1,3)\}, one pair added, because 1→2→31 \to 2 \to 3.



Which statement correctly describes the reflexive closure r(R)r(R) of a relation RR on a set AA?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

For the same relation R={(1,2),(2,3),(3,1),(3,4)}R = \{(1,2),(2,3),(3,1),(3,4)\} on A={1,2,3,4}A=\{1,2,3,4\} shown in the figure, how many new ordered pairs are added when forming the reflexive closure r(R)r(R)?

Give your answer in pairs.

Directed graph of the relation R=\{(1,2),(2,3),(3,1),(3,4)\} on A=\{1,2,3,4\}, used to build its closures.

Directed graph of the relation R={(1,2),(2,3),(3,1),(3,4)}R=\{(1,2),(2,3),(3,1),(3,4)\} on A={1,2,3,4}A=\{1,2,3,4\}, used to build its closures.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Let A={a,b,c,d}A = \{a,b,c,d\} and R={(a,b),(b,c),(c,d)}R = \{(a,b),(b,c),(c,d)\}. What is the transitive closure t(R)t(R)?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors