Define a group algebra as follows: G={g1,g2,...,gn} = basis vectors of a n dimensional vector space.
Sum(cigi)= a general element of the vector space.
(Sum(cigi))(Sum(digi)) is well defined... just use the group multiplication.