# What is a composition in category theory?

I'm just beginning to learn category theory. So far, the basic examples (like **Set**) are making sense. But I'm having a little trouble getting my head around the fundamentals.

Suppose I try to define a category with objects **A, B,** and **C**. There's an arrow (f) from A to B, an arrow (g) from B to C, and *two* arrows (h1 and h2) from A to C (in addition to the identity arrows).

Now it must obey the composition axiom:

For any two arrows f : A → B, g : B → C, where src(g) = tar (f), there exists an arrow g ◦ f : A → C, ‘g following f’, which we call the composite of f with g.

It seems we have two choices for g ◦ f. Since we're not trying to give the category any meaning, it shouldn't matter which we pick. But does the choice matter in *identifying* the category? Does picking h1 give a "different" category than picking h2? If so, shouldn't it be part of the category's definition? If not, then is it meaningless to ask "which one is the composite?" Perhaps another way of asking this is: does *composition* have to *mean* any (one) thing?

My question probably doesn't make a lot of sense, but hopefully there are enough clues in here for someone to correct my confusion.

Edit: Perhaps restating the axiom in these different ways clarifies my confusion.

a) For any two arrows f : A → B, g : B → C, where src(g) = tar (f), there exists

at least onearrow g ◦ f : A → C, ‘g following f’, which wecouldcall the composite of f with g.b) For any two arrows f : A → B, g : B → C, where src(g) = tar (f), there exists an arrow g ◦ f : A → C, ‘g following f’,

that isthe composite of f with g.

## Leonard-

2019-11-14

To define a category, you have to

specifywhat composition is in that category. It's like the multiplication operation in a group: to define a group, it's not enough to just say you have a set and it is possible to multiply elements of the set; you have to actually say what you mean by "multiply" as part of the definition of the group.So you might define one operation $\circ_1$ for which $g\circ_1 f=h_1$, and a different operation $\circ_2$ for which $g\circ_2 f=h_2$, and these define two

differentcategories with the same sets of objects and morphisms. (As Qiaochu commented though, these two categories are isomorphic, by just switching $h_1$ and $h_2$.)