Question about unity and composition of morphisms (Category theory) I am reading Awodey's book of category theory and I have some confusion regarding the definitions. Maybe these are very basic questions but I feel I am missing something. This question has helped me, especially Qiaochu Yuan's answer, and probably during this question I will answer myself but I won't notice... So, if any of you can help me, I would appreciate that.
My first doubt comes from the $1_{A}$ morphism. I have the mental image of the identity function and it messes my head up. The only thing we know is that there exists such morphism $1_{A}: A\longrightarrow A$ (it doesn't have to be the only morphism in $Hom(A,A)$) and that it holds the "Unity" property, i.e. $f\circ 1_{A} = f$, for any $f$ such that $Dom(f) = A$, or $1_{A}\circ g = g$ if $Cod(g)=A$. But I have two questions: 


*

*What meaning does the equality have here? Or should I think of the category as I think of a formal language and the interpretation should come later? It is confusing to me the fact that sometimes when we talk of functions equality means that $f(a) = g(a)\;\forall a \in A$, but in other situations we can't say that and I can't grasp it.

*The unity is unique, isn't it? My thought is that if $1_{A}$ and $1_{A}'$ are such morphisms, then $1_{A}'=1_{A}\circ 1_{A}'=1_{A}$ depending on where you "start" (sorry for the ambiguity, but I think the idea is clear).


The second doubt has the same questions but regarding the composition $f\circ g$. So, what I am saying is that there is a mapping between morphisms $Hom(A,B)$ and $Hom(B,C)$ into $Hom(A,C)$. Again, is $f\circ g$ unique, only because of the associativity property? And again, should I understand it as purely formal definition and give it an interpretation when I think of a particular category?
I am sorry if the questions are stupid or don't make sense, but as I said, I have the feeling that I don't understand something. Thank you.
 A: You seem to have essentially the correct ideas (for example, your proof that the identity morphism is unique is a correct one).
In a general category, each $\operatorname{Hom}(A,B)$ is an abstract set, and its elements need not be "functions from $A$ to $B$", which only makes sense if $A$ and $B$ are sets anyway. However, equality still makes sense the same way it does in any other set - if you pick two elements at random, they are either equal or they are not, and in this abstract setting you don't need to do anything to work out which! As an example, think of the equality relation on integers: you know immediately what it means without having to check anything.
If anything, the confusing case is when the morphisms really are functions - defining equality of functions in this case by $f=g$ if $f(a)=g(a)$ for all $a\in A$ is just helping us understand what we really mean by the set of functions. It is necessary to separate this set from the set of "descriptions of functions"; to write down a function between sets, we inevitably give some description, and need some way of telling when two descriptions describe functions that we would like to think of as the same. In an abstract category, the functions often have no descriptions, so this problem simply doesn't arise!
The uniqueness of $f\circ g$ is not to do with associativity, but to do with the fact that $\circ\colon\operatorname{Hom}(A,B)\times\operatorname{Hom}(B,C)\to\operatorname{Hom}(A,C)$ is a well-defined map of sets (I'm composing left to right here). Each point $(f,g)$ in the domain must have a uniquely defined image $f\circ g$ in the codomain.
I wouldn't describe the definition of $\circ$ as formal, but it might be abstract. Ultimately it is just a collection of maps between sets, which is something that you should understand, but doesn't necessarily have a nice interpretation in an arbitrary category. In categories which arise "in practice", the definition should always be a familiar one though.
