Category of relations
A morphism (or arrow) R : A → B in this category is a relation between the sets A and B, so R ⊆ A × B.
The composition of two relations R: A → B and S: B → C is given by:
The involutory operation of taking the inverse (or converse) of a relation, where (b, a) ∈ R−1 : B → A if and only if (a, b) ∈ R : A → B, induces a contravariant functor Relop → Rel that leaves the objects invariant but reverses the arrows and composition. This makes Rel into a dagger category. In fact, Rel is a dagger compact category.
- Allegory (category theory). The category of relations is the paradigmatic example of an allegory.
- Lane, S. Mac (1988). Categories for the working mathematician (1st ed.). New York: Springer-Verlag. p. 26. ISBN 0-387-90035-7.