Relations are hard to model in category theory
0fps.net
0fps.net
To describe a ternary relation on three objects/sets/spaces/etc. A,B,C of some category, you pick an object R and three maps pi_A : R -> A, pi_B : R -> B, pi_C : R -> C. In a concrete category, we can then say that elements/points/etc. a in A, b in B, c in C are related by R, if there is some element r in R such that pi_A(r) = a, pi_B(r) = b, and pi_C(r) = c.
The above approach gives a reasonable way to define the relations which are "compatible with" a given category. If you apply it in the category of sets, you basically get the ordinary sort of relations (with a bit of extra fluff if the map R -> A×B×C is not injective), but if you apply it in categories with more algebraic structure, then you get relations which respect that extra structure.
(Of course, as usual, category theory is only being used here to state things more clearly - I didn't find this perspective to be particularly helpful for actually proving the things I was interested in proving.)