Group codes can be constructed by special generator matrices which resemble generator matrices of linear block codes except that the elements of those matrices are endomorphisms of the group instead of symbols from the code's alphabet. For example, considering the generator matrix
the elements of this matrix are 2 × 2 {\displaystyle 2\times 2} matrices which are endomorphisms. In this scenario, each codeword can be represented as g 1 m 1 g 2 m 2 . . . g r m r {\displaystyle g_{1}^{m_{1}}g_{2}^{m_{2}}...g_{r}^{m_{r}}} where g 1 , . . . g r {\displaystyle g_{1},...g_{r}} are the generators of G {\displaystyle G} .