# In category theory, is there any such thing as “compatibility” for arrow composition?

Is this a properly defined category?

1. Objects $\{P, R, S\}$
2. Arrows
• $f_{1} : P \rightarrow R$
• $f_{2} : P \rightarrow R$
• $g : R \rightarrow S$
• $h_{1} : P \rightarrow S$
• $h_{2} : P \rightarrow S$
• $id_{P} : P \rightarrow P$
• $id_{R} : R \rightarrow R$
• $id_{S} : S \rightarrow S$
3. Composition
• $g \circ f_{1} = h_{1}$
• $f_{1} \circ id_{P} = f_{1} = id_{R} \circ f_{1}$
• $f_{2} \circ id_{P} = f_{2} = id_{R} \circ f_{2}$
• $g \circ id_{R} = g = id_{S} \circ g$
• $h_{1} \circ id_{P} = h_{1} = id_{S} \circ h_{1}$
• $h_{2} \circ id_{P} = h_{2} = id_{S} \circ h_{2}$

I have 2 particular questions about it:

1. Is there any problem with omitting $h_{2}$ from composition? This seems ok because there are no arrows with domain $S$.

2. It seems like $g \circ f_{2}$ requires a composition rule, which is omitted here. But it's unclear to me whether $f_{1}$ can be thought of as "compatible" with $f_{2}$, having matching domain and codomain, such that $g \circ f_{1} = h$ would be sufficient to complete the category. Is there any such "compatibility", or does the category require a composition rule for $g \circ f_{2}$?

You need another composition rule for $g \circ f_2$. There are two possible arrows it could be ($h_1$ or $h_2$), and the two choices of which arrow it is give rise to two different categories. More importantly, have you checked (this could be painstaking) that the compositions you have defined are associative? If not, you don't have a category.
EDIT: I just noticed that it's not hard to check that associativity holds for either assignment to $g \circ f_2$, just because there aren't very many arrows in the category to cause associativity to fail. So those are two different categories!