| |||||||||
In mathematics, the transitive closure of a binary relation R on a set X is the smallest transitive relation on X that contains R.
For any relation R the transitive closure of R always exits. To see this note that the intersection of any family of transitive relations is again transitive. Furthermore, there exists at least one transitive relation containing R, namely the trivial one: X × X. The transitive closure of R is then given by the intersection of all transitive relations containing R.
We can describe the transitive closure of R in more concrete terms as follows. Define a relation T on X by saying xTy iff there exists a finite sequence of elements (xi) such that x = x0 and
It is easily to check that the relation T is transitive and contains R. Furthermore, any transitive relation containing R must also contain T, so T is the transitive closure of R.
Note that the union of two transitive relations need not be transitive. In order to preserve transitivity one must take the transitive closure. This occurs, for example, when taking the union of two equivalence relations or two preorders. In order to obtain a new equivalence relation or preorder one must take the transitive closure (reflexitivity and symmetry—in the case of equivalence relations—are automatic).