In contrast to homogeneous relations, the composition of relations operation is only a partial function. The necessity of matching target to source of composed relations has led to the suggestion that the study of heterogeneous relations is a chapter of category theory as in the category of sets, except that the morphisms of this category are relations. The of the category Rel are sets, and the relation-morphisms compose as required in a category.
in coNTraSt to homogENEoUS RELaTIoNS, the compOsitIoN Of RelaTIons opErAtIon is onLy A pArtial fuNctIon. tHe nECesSitY of MaTChiNg tArgeT To soUrCe of cOMPosED reLaTIons hAS LeD to the SUgGesTiON That THe stUdy of heTeRogeneOus relatioNs iS a chaPter OF catEGoRY theorY As in THe catEgorY oF Sets, ExcepT that ThE morphiSmS Of this catEgory arE relaTiONs. tHe of ThE CaTegOry rEl Are seTs, aNd THe RELATIon-moRphisms compoSe as rEquired in a catEGoRy.