I know that there are several posts on the same question. They all ask for examples for morphisms that are not functions. So, morphisms are more general than functions; they are the arrows connecting the objects of a category. However, I still cannot avoid the idea that they are functions.
By function, I mean exactly that the relation is well-defined. If $(a, b_1), (a, b_2)$ are inside the graph of $f: A \to B$, then $b_1 = b_2$. Therefore, if a morphism, say $g: A \to B$, is not a function, then I am allowed to have $(a, b_1), (a, b_2)$ inside the graph of $g$.
But, without the condition that they are well-defined, I do not see how associativity holds. For example, let:
- The graph of $f: A \to B$ contains $(a, b)$;
- The graph of $g: B \to C$ contains $(b, c_1), (b, c_2)$;
- The graph of $h: C \to D$ contains $(c_1, d_1), (c_2, d_2)$.
- The graph of $f': A \to D$ contains $(a, d_1), (a, d_2)$
So, $h((g \circ f)(a)) = d_1$ or $d_2$? Similarly, $(h \circ g)(f(a)) = d_1$ or $d_2$? This is what I mean; if I am forced to choose either $(a, d_1)$ or $(a, d_2)$, then indeed I am dealing with functions ....
2 Answers
First, you're making too many assumptions. Why should morphisms be relations? Why should they have a graph? Why should A and B have elements?
Second, even with these assumptions, morphisms still don't need to be functions. Consider the category of Sets with arrows reversed. Then each morphism is like the reverse of a function. In particular, there are 2 distinct morphisms from {x,y} to {x} even though there is only one such function.
Morphisms, as already pointed out, could not be functions, or relations at all. In my category algebra class we saw morphisms as "arrows" between objects of the category. If we are in a concrete cathegory, as in the cathegory of sets or groups, a morphism is reasonably a function, a homomorphism, or something like this. However in an abstract category, such as in a category with two natural numbers $n, m$ as objects and morphisms are given by $n\times m$ matrices, relations don't play any role. You still want to assure that the morphisms are componible.