Are the sets of morphisms of a category always disjoint? Suppose we have the category of Sets. Suppose we have $f \in Hom(A, B).$ Now consider $Hom(C, D)$ where $A \subset C, B \subset D.$ We can construct a function $g \in Hom(C, D)$ such that $g|_A = f.$ My question is whether or not $g$ and $f$ are actually different functions. I know that $Hom(A, B)$ and $Hom(C, D)$ should be disjoint but it seems like we can create these similar functions where they behave the same in a set of morphisms.  
 A: Perhaps unsatisfactorially, this depends on how you choose to define categories. With regard to your question, there are two possible approaches:


*

*Approach A. A category $\mathcal{C}$ consists of a set $\mathcal{C}_0$ of objects and a set $\mathcal{C}_1$ of morphisms, together with functions $\mathrm{dom},\mathrm{cod} : \mathcal{C}_1 \to \mathcal{C}_0$ assigning to each morphism a domain and codomain (+ other data and axioms).

*Approach B. A category $\mathcal{C}$ consists of a set $\mathcal{C}_0$ of objects and, for each pair of objects $A,B$, a set $\mathrm{Hom}_{\mathcal{C}}(A,B)$ of morphisms from $A$ to $B$ (+ other data and axioms).


These approaches appear to be equivalent at first sight. To go from Approach A to Approach B, take $\mathrm{Hom}_{\mathcal{C}}(A,B)$ to be the subset of $\mathcal{C}_1$ consisting of all those $f \in \mathcal{C}_1$ such that $\mathrm{dom}(f) = A$ and $\mathrm{cod}(f)=B$. However, going from Approach B to Approach A isn't necessarily possible, since if the hom sets are not disjoint, then $\mathrm{dom}$ and $\mathrm{cod}$ might not be well-defined.
So to answer your question, the answer is 'yes' if you take Approach A, and 'not necessarily' if you take Approach B.
In Approach A, the domain and codomain of a morphism are intrinsic to the morphism itself: if you say that $f$ is a morphism, then it has a specified domain and codomain. In Approach B, morphisms are specified relative to a domain and codomain, so a particular $f$ might be a morphism $A \to B$ and a morphism $C \to D$.
This manifests itself in set theoretic (ZFC) foundations, in that there are two commonplace ways of defining a function:


*

*A function is a triple $(A,B,f)$, where $A$ and $B$ are sets and $f \subseteq A \times B$ is a set such that $\forall a \in A,\, \exists ! b \in B,\, (a,b) \in f$

*Given sets $A$ and $B$, a function from $A$ to $B$ is a set $f \subseteq A \times B$ such that $\forall a \in A,\, \exists ! b \in B,\, (a,b) \in f$.


The first of these aligns with Approach A, since the domain and codomain are part of the data defining the function. Thus, functions with different domains and/or codomains cannot be equal.
The second of these aligns with Approach B, since we don't define 'function'; we only define 'function from $A$ to $B$'. And, indeed, the set $f = \{ (0, 0) \}$ is a function $\{ 0 \} \to \{ 0 \}$ and a function $\{ 0 \} \to \mathbb{R}$ (and so on). So in this case, the same set can define many different morphisms.
Which approach you take is a matter of taste. Personally, I prefer Approach A, for a few reasons, two of which are: (1) definitions relative to domains and codomains (e.g. totality and surjectivity) are properties of morphisms, not morphisms relative to particular domains and codomains; and (2) I do a lot of work with internal categories and that definition is easier to internalise.

Footnote: I should add that I'm consciously ignoring issues of size here (i.e. large vs. locally small vs. small categories) because I don't think they're relevant to the question.
