Groupoid algebra

In mathematics, the concept of groupoid algebra generalizes the notion of group algebra.
Definition.
Given a groupoid formula_1 (in the sense of a category with all arrows invertible) and a field formula_2, it is possible to define the groupoid algebra formula_3 as the algebra over formula_2 formed by the vector space having the elements of (the arrows of) formula_5 as generators and having the multiplication of these elements defined by formula_6, whenever this product is defined, and formula_7 otherwise. The product is then extended by linearity.
Examples.
Some examples of groupoid algebras are the following: