# Condition or deduction? "composition is associative:" under the statement "such that the following properties are satisfied:"

According to nLab,

https://ncatlab.org/nlab/show/category#OneCollectionOfMorphisms

such that the following properties are satisfied:

Does this mean

A: condition (requirement from the definition)

B: deduction (automatically satisfied under the definition above)

Which is correct?

The reason I ask is there is

which claims

Category laws There are three laws that categories need to follow. Firstly, and most simply, the composition of morphisms needs to be associative.

However, I understand, even in Category theory, composition of functions is always associative.

Therefore, I believe the statement of “Category laws” is false.

What do you think? Thanks.

• Associativity is a requirement of the definition. Morphisms in category theory aren't functions, or at least they don't start out as functions. They're just a bunch of arrows and composition is just some function defined on them, to start with. Sep 1, 2020 at 11:19
• Please take a look at some tips for how to format and write your question. In particular, your question should be immediately understandable without forcing someone to click on an external link. I can't understand at all what you are asking in your first question. Sep 1, 2020 at 11:27
• @QiaochuYuan Thanks. I know it's not functions, but composition of relations is also always associative. So you say, morphism in fact is broader than binary relations? I think if the morphism froms composition, it is at least binary relation. Am i worng? Sep 1, 2020 at 11:28
• @smooth_writing: consider the case of one object. Then we just have a collection of morphisms from that object to itself and composition is just some binary operation on these. Many binary operations aren't associative so requiring that it be associative is a nontrivial condition. Sep 1, 2020 at 20:49
• Ok, thanks! I undertand now as I comment in your answer. Sep 1, 2020 at 21:26

Qiaochu Yuan's comment already answers the question, but perhaps an example will help to elaborate.

The following example is illustrative of a category in which morphisms are not like functions or relations. The category $$\mathbf{Mat}$$ of matrices is defined as the category for which:

• objects are natural numbers,
• morphims from $$n \to m$$ are $$(n \times m)$$-matrices,
• identities are identity matrices,
• composition is given by matrix multiplication.

The fact that composition is associative and unital has to be proven in order to show that $$\mathbf{Mat}$$ actually defined a well-formed category. Furthermore, composition in $$\mathbf{Mat}$$ is not given by composition of functions or relations. Therefore, associativity and unitality are important constraints, which do not automatically follow from the rest of the definition of category.

• Thank you. I understand, having said that "morphims from n→m are (n×m)-matrices," To me this looks a binary operation of (n, m) that is actually a higher order function: n -> m -> (n × m). What do I miss? Thanks. Sep 1, 2020 at 20:28
• @smooth_writing: you could represent an $(n \times m)$-matrix by a function $\{ 1, \ldots, n \} \times \{ 1, \ldots, m \} \to \mathbb Z$, yes. However, matrix composition will still not be given by function composition, so there's not an advantage to doing this (at least from the perspective of describing the category $\mathbf{Mat}$). Generally, it's less convenient to encode everything explicitly using sets and functions. Sep 1, 2020 at 20:51
• Thanks. Ok, I found a list ncatlab.org/nlab/show/database+of+categories which makes it clear. Thank you again. Sep 1, 2020 at 21:14