Composition of relations is associative
https://ncatlab.org/nlab/show/relation#binary_relations
https://en.wikipedia.org/wiki/Binary_relation
https://en.wikipedia.org/wiki/Composition_of_relations#Properties
On the other hand, in a category
https://ncatlab.org/nlab/show/category#OneCollectionOfMorphisms
for every pair of morphisms f and g, where t(f)=s(g), a morphism g∘f, called their composite (also written gf or sometimes f;g— see diagrammatic order);
If composition of morphism (and associativity) is required to form a cateogory, are morphisms in category equivalent to binary relation?
Or, is there anything else than binary relation that is composable which can also be a morphism of cateogry?
Thanks.
It is not quite the case that every category can be represented by a relation, but every (small) category can be represented by a categorified relation, known as a profunctor.
Consider a category with object-set $C_0$. A reflexive transitive endo-relation $R : C_0 \times C_0 \to 2$ on $C_0$ describes whether two objects $X, Y \in C_0$ are connected by a morphism, i.e. $R(X, Y) \implies \exists f : X \to Y$. However, note that such categories are necessary thin/posetal: we may have at most one morphism between any two objects. These relations turn out to be monads in the 2-category $\mathbf{Rel}$ of relations.
To represent categories, we may instead move to profunctors, which are categorified relations (i.e. we replace the two-element set $2$ with the category of sets $\mathbf{Set}$). An endo-profunctor on a small discrete category $C_0$ (i.e. a set), which is a monad in the bicategory $\mathbf{Prof}$ of profunctors, is exactly a category with object-set $C_0$. (Monads in $\mathbf{Prof}$ are sometimes called "promonads".)