# 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:

1. 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.
2. 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.

• It is good to see lots of examples. Sometimes it is helpful to think of "elements" and "functions", but sometimes not. For example, consider the category with one object for each real number, and, given $r,s\in\mathbb{R}$, there is exactly one morphism $r\to s$ if and only if $r\geq s$. Then the identity morphism $1_r$ is the reflexive property, and composition is transitivity. Categories are very, very general beasts, and it's good to respect them as such. – Slade Oct 24 '13 at 10:18

## 1 Answer

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.

• Okay, the well-defined part I had not seen in Awodey's first chapter, maybe it comes later. And I see what do you mean when you say that the confusing case are the functions, you convinced me. Still, all this dance of categories is making me feel dizzy! Thank you – bernatguillen Oct 24 '13 at 10:16
• @Duronman The feeling should eventually wear off! The well-definedness will probably not be mentioned explicitly - he told you there was a map, so implicitly it is well-defined. So the uniqueness of $f\circ g$ is an assumption, not something you can prove (although of course in any example where you need to define $\circ$ yourself, you would need to check it was well-defined!). – mdp Oct 24 '13 at 10:24
• The image $f\circ g$ is unique when defined. But can it be undefined? I mean is it assumed in category theory that the composition of morphisms is always a morphism? – velut luna Jan 27 '15 at 10:24
• @Kyson $\circ$ is a function $\operatorname{Hom}(A,B)\times\operatorname{Hom}(B,C)\to\operatorname{Hom}(A,C)$, so by definition, $f\circ g$ is uniquely defined when $f\in\operatorname{Hom}(A,B)$ and $g\in\operatorname{Hom}(B,C)$. This is just part of the data of the category. (This is analagous to a requirement that groups are "closed" under the operation; which is not really a requirement at all once you have defined the operation to be a map $G\times G\to G$.) – mdp Jan 27 '15 at 11:42