TITLE: Can small categories be thought of as semigroups with an absorbing element?
QUESTION [2 upvotes]: Suppose $C$ is a small category, I think the following semigroup $S$ captures the category $C$:
The elements of $S$ are the morfisms of $C$ plus a new absorbing element we call $0$.
We define the multiplication in $S$ as follows:
If $a$ and $b$ are in $S$ then $ab$ is $a\circ b$ if $a$ and $b$ are composable morfisms in $C$ and $0$ otherwise.
I believe this makes $S$ into a semigroup. If we know a semigroup was obtained this way it should be easy to obtain the objects as equivalence classes of the relation $ab\neq 0$ defined on elements such that $a^2\neq 0$ (which correspond to endomorphisms). One can then find the domain and codomain of each morfism rather easily.
Although I am guessing if the semigroup with an absorbing element is arbitrary this procedure will not work (for example in $\mathbb Z_8$ with multiplication $0$ is an absorbing element and $2$ satisfies $2^2\neq 0$ but $2^3=0$ which would make the above process break)
Does this observation seem interesting at all? I'm guessing it must be somewhat trivial but I thought it was interesting. Has anyone seen it before? Can more things be said along this line that could seem interesting? Something that may seem kind of interesting (I don't know) Is that we can show semigroups of this kind can be viewed as a subsemigroup of the set of functions $S^S$ (by doing the same thing as in Cayley's theorem), so in particular this tells us the same can be said about small categories.

REPLY [1 votes]: I have seen something similar in algebras. You can make an algebra over a field $k$ from the category $C$ taking $k[S_C]$, where $S_C$ is the semigroup you defined. In my view, this is the the analogue of the group ring when you have a category instead of a group, so the representation theory of $C$ over $k$ can be thought as the representation theory of $k[S_C]$. When you have a functor from $C$ to the category of vector spaces, if you take the "total object" $\oplus_{c \in C} F(c) $ you will get a representation for $k[S_C]$.
Now if you don't like linear algebra, you could be interested in study just the actions of categories, exactly as some people does with groups. In this case you are interested in functors to sets. As $k[S_C]$ is the "universal object" for studying representation theory of $C$, your $S_C$ is the universal object of action theory. Indeed, if you have a functor from $C$ to sets,  the "total object" $\cup_{c \in C} F(c) $ inherits an action of the semigroup $S_C$.
Whoops.. Not exactly! When you have vector space, you can compose say a map $V \to W \to V \oplus W $ with itself, and you will get zero. You can't do the same in sets, so you have to adjoin an "absorbing element" * which will be preserved by all maps, and moreover when you don't know what to give as a result just return "*". This the only way of making sense of a "total object" in sets!
Well, as you can see... This is the same as an action of your semigroup! In other words, your observation boils down to say that "action theory" of a category is equivalent to the (pointed) action theory of its total object. It's a good point, actually. But I think that representing things is easier to see: given the total object $A$, you can recover where the object $c$ is sent as $\{a \in A: 1_c(a) = a \}$
Edit. Since we have shown that
$$ [C, Sets] \simeq S_C - Sets_*$$
Using the (co)yoneda embedding we also have a canonical embedding
$$C \hookrightarrow S_C-sets$$
Which shows that we can always think a category as a subcategory of an "action" category. It's nice.
Let me finally remark that I think there could be size issues in what you are doing, as I thought while I was defining the total objects. Is your semigroup a set?
{"set_name": "stack_exchange", "score": 2, "question_id": 4079874}