Definition Let R be a ring and let G be a monoid. The monoid ring or monoid algebra of G over R, denoted R[G] or RG, is the set of formal sums , where for each and rg = 0 for all but finitely many g, equipped with coefficient-wise addition, and the multiplication in which the elements of R commute with the elements of G. More formally, R[G] is the free R-module on the set G, endowed with R-linear multiplication defined on the base elements by g·h := gh, where the left-hand side is understood as the multiplication in R[G] and the right-hand side is understood in G.
Definition Let R be a ring and let G be a monoid The monoid ring or monoid algebra of G over R denoted R[G] or RG is the set of formal sums  where for each and rg = 0 for all but finitely many g equipped with coefficient-wise addition and the multiplication in which the elements of R commute with the elements of G More formally R[G] is the free R-module on the set G endowed with R-linear multiplication defined on the base elements by g·h = gh where the left-hand side is understood as the multiplication in R[G] and the right-hand side is understood in G