**2. Category Algebras**

We introduce the notion of rig, module over rig, and algebra over rig in order to study category algebras in sufficient generality for various future applications in noncommutative probability, quantum physics and other regions of mathematical sciences such as tropical mathematics.

**Definition 1** (Rig)**.** *A rig R is a set with two binary operations called addition and multiplication such that*


**Definition 2** (Module over Rig)**.** *A commutative monoid M under addition with unit* 0 *together with a left action of R on M* (*r*, *m*) → *rm is called a left module over R if the action satisfies the following:*


*Dually we can define the notion of right module over R. Let M is left and right module over R. M is called R-bimodule if*

$$r'(mr) = (r'm)r$$

*holds for any <sup>r</sup>*,*r* ∈ *R and m* ∈ *M.*

> *The left/right action above is called the scalar multiplication.*

**Definition 3** (Algebra over Rig)**.** *A bimodule A over R is called an algebra over R if it is also a rig with respect to its own multiplication which is compatible with scalar multiplication, i.e.,*

$$(r'a')(ar) = r'(a'a)r, \; (a'r)a = a'(ra)$$

*for any a*, *a* ∈ *A and <sup>r</sup>*,*r* ∈ *R.*

Usually the term "algebra" is defined on rings and algebras are supposed to have negative elements. In this paper, we use the term algebra to mean the module over rig with multiplication.

**Definition 4** (Category Algebra)**.** *Let* C *be a category and R be a rig. An R-valued function α defined on* C *is said to be of backward (resp. forward) finite propagation if for any object C there are at most finite number of arrows in the support of α whose codomain (resp. domain) is C. The module over R consisting of all R-valued functions of backward (resp. forward) finite propagation together with the multiplication defined by*

$$(\alpha'\alpha)(\mathfrak{c}^{\prime\prime}) = \sum\_{\{(\mathfrak{c}^{\prime},\mathfrak{c})\mid \mathfrak{c}^{\prime\prime} = \mathfrak{c}^{\prime}\text{cc}\}} \alpha'(\mathfrak{c}^{\prime})\alpha(\mathfrak{c}), \ \mathfrak{c}, \mathfrak{c}^{\prime}, \mathfrak{c}^{\prime\prime} \in \mathcal{C}$$

*becomes an algebra over R with unit defined by*

$$\epsilon(c) = \begin{cases} 1 & (c \in |\mathcal{C}|) \\ 0 & (otherwise) \end{cases}$$

*and is called the category algebra of backward (resp. forward) finite propagation <sup>R</sup>*0[C] *(resp.* <sup>0</sup>*R*[C]*) of* C *over R. The algebra* <sup>0</sup>*R*0[C] *over R defined as the intersection <sup>R</sup>*0[C] ∩ <sup>0</sup>*R*[C] *is called the category algebra of finite propagation of* C *over R.*

**Remark 1.** <sup>0</sup>*R*0[C] *coincide with the algebra studied in [15] if R is a ring.*

In the present paper, we focus on the category algebras *<sup>R</sup>*0[C],0*R*[C] and <sup>0</sup>*R*0[C] which are the same if |C| is finite, although other extensions or subalgebras of <sup>0</sup>*R*0[C] are also of interest (see Examples 4 and 7).

**Notation 2.** *In the following we use the term category algebra and the notation R*[C] *to denote either of category algebras <sup>R</sup>*0[C]*,*0*R*[C] *and* <sup>0</sup>*R*0[C]*.*

**Definition 5** (Indeterminates)**.** *Let R*[C] *be a category algebra and c* ∈ C*. The function χc* ∈ *R*[C] *defined as*

$$\chi^{\varepsilon}(c') = \begin{cases} 1 & (c'=c) \\ 0 & (otherwise) \end{cases}$$

*is called the indeterminate (See Example 2) corresponding to c.*

For indeterminates, it is easy to obtain the following:

**Theorem 1** (Calculus of Indeterminates)**.** *Let c*, *c* ∈ C*, χ<sup>c</sup>*, *χc be the corresponding indeterminates and r* ∈ *R. Then*

$$\chi^{\varepsilon'} \chi^{\varepsilon} = \begin{cases} \chi^{\varepsilon' \circ \varepsilon} & (\text{dom}(\mathfrak{c}') = \text{cod}(\mathfrak{c})), \\ 0 & (\text{otherwise}), \end{cases}$$

$$r \chi^{\varepsilon} = \chi^{\varepsilon} r.$$

In short, a category algebra *R*[C] is an algebra of functions on C equipped with the multiplication which reflects the compositionality structure of C. By the identification of *c* ∈ C → *χc* ∈ *<sup>R</sup>*[C], categories are included in category algebras.

Let us establish the basic notions for calculation in category algebras:

**Definition 6** (Column, Row, Entry)**.** *Let α* ∈ *R*[C] *and C*, *C* ∈ |C|*. The elements αC*, *<sup>C</sup>α*, *<sup>C</sup>αC* ∈ *R*[C] *defined as*

$$\mathfrak{a}\_{\mathbb{C}}(\mathfrak{c}) = \begin{cases} \mathfrak{a}(\mathfrak{c}) & (\mathfrak{c} \in \mathscr{C}\_{\mathbb{C}}) \\ 0 & (\mathfrak{c} \text{otherwise}), \end{cases}$$

$$\mathbb{C}'\mathfrak{a}(\mathfrak{c}) = \begin{cases} \mathfrak{a}(\mathfrak{c}) & (\mathfrak{c} \in \prescript{\circ}{}{\mathscr{C}}) \\ 0 & (\mathfrak{c} \text{otherwise}), \end{cases}$$

$$\mathbb{C}'\mathfrak{a}\_{\mathbb{C}}(\mathfrak{c}) = \begin{cases} \mathfrak{a}(\mathfrak{c}) & (\mathfrak{c} \in \prescript{\circ}{}{\mathscr{C}}\_{\mathbb{C}}) \\ 0 & (\mathfrak{c} \text{otherwise}), \end{cases}$$

*are called the C-column, C-row and* (*C*, *C*)*-entry of α, respectively.*

Please note that either of the data *<sup>α</sup>C*(*C* ∈ |C|) , *<sup>C</sup>α*(*C* ∈ |C|) or *<sup>C</sup>αC* (*C*, *C* ∈ |C|) determine *α*. Moreover, if |C| is finite,

$$\mathfrak{a} = \sum\_{\mathcal{C}, \mathcal{C}' \in |\mathcal{C}|} \, ^{\mathcal{C}'} \mathfrak{a}\_{\mathcal{C}}.$$

By definition, the following theorem holds:

**Theorem 2** (Polynomial Expression)**.** *For any α* ∈ *R*[C]

$$\chi^{C'} \mathfrak{a}\_{\mathbb{C}} = \sum\_{\mathfrak{c} \in \,^{C'}\mathcal{C}\_{\mathbb{C}}} \mathfrak{a}(\mathfrak{c}) \chi^{\mathfrak{c}} = \sum\_{\mathfrak{c} \in \,^{C'}\mathcal{C}\_{\mathbb{C}}} \chi^{\mathfrak{c}} \mathfrak{a}(\mathfrak{c}).$$

*If* |C| *is finite,*

$$\alpha = \sum\_{c \in \mathcal{C}} \mathfrak{a}(c) \chi^c = \sum\_{c \in \mathcal{C}} \chi^c \mathfrak{a}(c).$$

The formulae above clarify that category algebras are generalized polynomial algebra (see Example 2). On the other hand, the following theorem, which shows that category algebras are generalized matrix algebras (see Example 7), also follows by definition:

**Theorem 3** (Matrix Calculus)**.** *For any α*, *α* ∈ *<sup>R</sup>*[C]*, C*, *C* ∈ |C| *and r* ∈ *R, the followings hold:*

(*α* + *<sup>α</sup>*)*C* = *αC* + *αC*, *<sup>C</sup>*(*α* + *α*) =*C α* +*C α*, *<sup>C</sup>*(*α* + *<sup>α</sup>*)*C* =*C αC* +*C αC* (*rαr*)*C* = *r αCr*, *<sup>C</sup>*(*rαr*) = *r <sup>C</sup>αr*, *<sup>C</sup>*(*rαr*)*C* = *r <sup>C</sup>αC<sup>r</sup>* (*αα*)*C* = *α αC* = ∑ *C*∈|C| *<sup>α</sup>C <sup>C</sup>αC <sup>C</sup>*(*αα*) =*C α α* = ∑ *C*∈|C| *<sup>C</sup>αC <sup>C</sup>α <sup>C</sup>*(*αα*)*C* =*C α αC* = ∑ *C*∈|C| *<sup>C</sup>αC <sup>C</sup>αC*.

The theorem above implies the following: **Theorem 4.** *α* ∈ *R*[C] *is determined by its action on columns C/ rows C of the unit for all C*, *C* ∈ |C|*.*

**Proof.** Let *α* ∈ *R*[C] and be the unit of *<sup>R</sup>*[C]. Then by definition

$$
\alpha = \alpha \epsilon, \ a = \epsilon a
$$

holds and it implies *αC* = *αC*, *<sup>C</sup>α* = *C α*, which determines *α*.

**Remark 2.** *It is convenient to make use of a kind of "Einstein convention" in physics: Double appearance of object indices which do not appear elsewhere means the sum over all objects in the category. For instance,*

$$^{C'}(a'a)\_C = ^{C'}a'\_{C''} \, ^{C''}a\_C$$

*means*

$$^{C'}(\mathfrak{a}'\mathfrak{a})\_{\mathbb{C}} = \sum\_{\mathbb{C}'' \in |\mathcal{C}|} \,^{C'}\mathfrak{a}'\_{\mathbb{C}''} \,^{\mathbb{C}''}\mathfrak{a}\_{\mathbb{C}}.$$

*The notation is quite useful especially for category algebra R*[C] *where* |C| *is finite. In that case it is easy to show the decomposition of unit:*

$$
\epsilon = \epsilon\_C \, ^C \epsilon.
$$

*As a corollary,*

$$
\alpha' \alpha = \alpha' \epsilon \alpha = \alpha' \epsilon\_{\mathbb{C}} \, ^\complement \epsilon \alpha = \alpha'\_{\mathbb{C}} \, ^\complement \alpha\_{\prime}
$$

*holds, which means that the multiplication can be interpreted as inner product of columns and rows. Hence, you can insert C C in formulae when C does not appear elsewhere.*

### **3. Example of Category Algebras**

Let us see some important examples of category algebras.

**Example 1** (Function Algebra)**.** *Let* C *be a set as discrete category, i.e., a category whose arrows are all identities. Then R*[C] *is nothing but the R-valued function algebra on* |C|*, where the operations are defined pointwise.*

When the rig *R* is commutative such as *R* = C, the function algebra is also commutative. On the other hand, a category algebra is in general noncommutative even if the rig is commutative. In this sense, category algebras can be considered to be generalized (noncommutative) function algebras.

As we have noted, category algebras can also be considered to be generalized polynomial algebras:

**Example 2** (Monoid Algebra)**.** *Let* C *be a monoid, i.e., a category with only one object. Then R*[C] *is the monoid algebra of* C*. For example, in the case of* C = N *as additive monoid, R*[C] *is the polynomial algebra over R.*

Since a monoid C has only one object, any *α* ∈ *R*[C] can be presented as,

$$\alpha = \sum\_{c \in \mathcal{C}} \alpha(c) \chi^c$$

by Theorem 2 which make it clear that *R*[C] is a generalized polynomial algebra. As special cases of Example 2, we have group algebras.

**Example 3** (Group Algebra)**.** *Let* C *be a group, i.e., a monoid whose arrows are all invertible. Then R*[C] *coincides with the group algebra of* C*. For example, in the case of* C = Z*, R*[C] *is the Laurent polynomial algebra over R.*

By another generalization of Example 3 other than Example 2, we have groupoid algebras.

**Example 4** (Groupoid Algebra)**.** *Let* C *be a groupoid, i.e., a category whose arrows are all invertible. When* |C| *is finite, R*[C] *is nothing but the groupoid algebra of* |C|*. Otherwise R*[C] *is a unital extension of the groupoid algebra in conventional sense which is nonunital. R*[C] *is quite useful to treat certain algebras which appeared in quantum physics [17]. (See Example 5 also.)*

As special cases of the Example 4 we have matrix algebras:

**Example 5** (Matrix Algebra)**.** *Let* C *be an indiscrete category, i.e., a category such that for every pair of objects C*, *C there is exactly one arrow from C to C. Denote the cardinal of* |C| *is n. Then R*[C] *is isomorphic to the matrix algebra Mn*(*R*)*.*

Example 5 above shows that matrix algebras are category algebras. Conversely, any category algebra can be considered to be generalized matrix algebra (see Theorem 3). This point of view is also useful to study quivers [23], i.e., directed graphs with multiple edges and loops.

**Example 6** (Path Algebra)**.** *Let* C *be the free category of a quiver Q. R*[C] *coincides with the notion of path algebra when the quiver Q has finite number of vertices. Otherwise, the former includes the latter as a subalgebra.*

Another important origin of the notion of category algebra is that of incidence algebra ([8,10–14], for example) originally studied on posets [9].

**Example 7** (Incidence Algebra)**.** *Let* C *be a finely finite category [8], i.e., a category such that for any c* ∈ C *there exist finite number of pairs of arrows c*, *c* ∈ C *satisfying c* = *c* ◦ *<sup>c</sup>. Then R*<sup>C</sup> *, the set of all functions from* C *to R, becomes a unital algebra and called the incidence algebra of* C *over R.*

Let C be a category such that for any *C* ∈ C there exist at most finitely many arrows whose codomain is *C*. Then *<sup>R</sup>*0[C] coincides with the incidence algebra on C. (One of the most classical examples is the poset consisting of all positive integers ordered by divisibility). For the category satisfying the condition above, *R*[C] includes the zeta function *ζ* defined as

> *ζ*(*c*) = 1

for all *c*. The multiplicative inverse of *ζ* is denoted as *μ* and called Möbius function. The relation *μζ* = *ζμ* = is a generalization of the famous Möbius inversion formula, which has been considered to be the foundation of combinatorial theory since one of the most important papers in modern combinatorics [9].
