# Constructing a semigroup from a small category

The following was given as an example for a semigroup without an identity:

Finite sets of matrices of varying dimensions, where the product $A*B=\{PQ \mid P \in A, Q \in B \text{ and } dim(Q)=codim(P)\}$, where $dim$ and $codim$ are the dimensions of the source and the target spaces of a matrix.

Editor clarification: $dim(Q)$ is actually the dimension of the target space of the matrix $Q$, $codim(P)$ is the dimension of the source space of the matrix $P$ in the citation.

It took me some seconds before I understood what is meant by that example. And then I thought that this construction could be applied to any small category, not just matrices.

So for a small category $C$, let $S_C:=\{M\subset\operatorname{hom}(C):|M|<\infty \}$ and for $A,B\in S_C$ define $A*B:=\{f\circ g:f\in A, g\in B,\operatorname{source}(f)=\operatorname{target}(g)\}$. Then $S_C$ together with the operation $*$ is a semigroup. (The identity would be $E=\{\operatorname{id}_A:A\in\operatorname{ob}(C)\}$. If the category $C$ has only a finite number of objects, we have $E\in S_C$.)

What I find even more interesting is that $S_c:=\{A\in S_C:|A|\leq1\}$ is a sub-semigroup of $S_C$. Because $S_c=\{\varnothing\}\cup\{\{f\}:f\in\operatorname{hom}(C)\}$, we have a "natural" correspondence between the semigroup $S_c$ and $\operatorname{hom}(C)\cup\{0\}$. Here $0\notin\operatorname{hom}(C)$ is an absorbing element corresponding to the empty set $\varnothing\in S_c$. The semigroup operation of $S_c$ is just the composition of the corresponding morphisms if this is defined, or the empty set otherwise.

Given that this construction was extracted from an answer to a question about interesting semigroups, it can't be totally unknown. However, I would like to know whether this construction has a special name, where it is described, and whether it has "interesting" applications.

• Where you say «without an obvious identity element» you can in fact write «without an identity element»: the empty set is a zero, so there is no identity element (unless there are no objects in the category...) – Mariano Suárez-Álvarez Jan 6 '12 at 19:45
• @MarianoSuárez-Alvarez Well, I guess I found out now what the identity element looks like, if it exists: $\{\operatorname{id}_A:A\in \operatorname{ob}(C)\}$. So for a category with a finite number of objects, $S_C$ has an identity. And for a category with just one object, even $S_c$ has an identity. And even in the general case, the semigroup $S_C$ is the sub-semigroup of an "obvious" monoid. So the statement "without an obvious identity element" is false, at least in the sense which I had in mind. – Thomas Klimpel Jan 6 '12 at 20:18
• Dear Thomas, the point of my comment above is that except in the silly situation in which the category C does not have any object at all, your semigroup does not have an identity element. – Mariano Suárez-Álvarez Jan 6 '12 at 20:24
• My memory here is unreliable, but I think I've seen a construction like this in a recent Banach-algebras paper, where the authors take a small category and define some kind of convolution algebra associated to it. However, that is almost certainly not the first occurrence of the construction, even if my memory is correct – user16299 Jan 8 '12 at 8:52
• @MarianoSuárez-Alvarez, I'm not sure what you are getting at. It is certainly possible to have semigroups with an identity element and a zero element; $\{0,1\}$ with multiplication is the obvious example. – user16299 Jan 8 '12 at 10:00