Groups in GAP are written multiplicatively. The elements from which a group can be generated must permit multiplication and multiplicative inversion (see Useful Categories of Elements).
gap> a:=(1,2,3);;b:=(2,3,4);; gap> One(a); () gap> Inverse(b); (2,4,3) gap> a*b; (1,3)(2,4) gap> Order(a*b); 2 gap> Order( [ [ 1, 1 ], [ 0, 1 ] ] ); infinity
gap> Order( [ [ 1, 1 ], [ 0, 1 ] ] * Indeterminate( Rationals ) ); #I Order: warning, order of <mat> might be infiniteThis last example might run into an infinite loop because the given matrix in fact has infinite order.
Since groups are domains, the recommended command to compute the order
of a group if Size (see Size).
For convenience, group orders can also be computed with Order.
The operation Comm (see Comm) can be used to compute the commutator of
two elements, the operation LeftQuotient (see LeftQuotient) computes the
product x-1y.
GAP 4 manual