In category theory, a field of mathematics, a category algebra is an associative algebra, defined for any locally finite category and commutative ring with unity. It generalizes the notions of group algebra and incidence algebra, just as category generalizes the notions of group and partially ordered set.
If the given category is finite (has finitely many objects and morphisms), then the following two definitions of the category algebra agree.
Given a group G and a commutative ring R, one can construct RG, known as the group algebra; it is an R-module equipped with a multiplication. A group is the same as a category with a single object such that all morphisms are isomorphisms (where the elements of the group correspond to the morphisms of the category). So the following construction generalizes the definition of the group algebra from groups to arbitrary categories.
Let C be a category and R be a commutative ring with unit. Define RC (or R[C]) to be the free R-module with basis consisting of the maps of C. In other words, RC consists of formal linear combinations (which are finite sums) of the form , where fi are maps of C, and ai are elements of the ring R. Define a multiplication operation on RC as follows, using the composition operation in the category: