If is a regular category, then its category of internal binary relations is an allegory. The objects of an allegory may, but do not need to be, internal relations in some ambient category.
Let be a category. An internal binary relation from an object to an object is an object and a pair of maps and that are jointly monic, that is such that, given any object and morphism , if and , then it must be that .
Now suppose that has binary products. Then we can simply the definition; an internal binary relation from to is simply a subobject . The and above may be recovered as the composites
called the projections of the relation .
A relation from to is also said to be an internal binary relation on .
As with relations in general, we can extend from binary to arbitrary internal relations by generalising from the pair to an arbitrary family of objects. If this family has a product in , then the internal relation is simply a subobject of that product; in general, the internal relation is given by a jointly monic family of morphisms.
Kinds of internal relations
The various kinds of relations described at relation can often be interpreted internally.
For example, an internal relation on is said to be reflexive if it contains the diagonal subobject of ; this can even be stated if does not exist in the category.