If an operator * has left cancellation then xy = xz implies y = z. Right cancellation is defined similarly.
If * is associative, with left and right cancellation, and for every x in S the powers of x form a finite set, then we have a group.
Given x, xn eventually repeats an earlier value, say xm. If m were 2, or anything larger, we would cancel an x from each side, so let m = 1. Thus xn = x.
Let e (the identity) = xn-1. For any y, yx = yxn = yex, and by cancellation, y = ye. Do the same on the left to show y = ey, hence e is an identity element. There can only be one such element e, for if there were two, ef = e and ef = f, whence e = f.
Recall that every x in S leads to e eventually. If xn-1 = e, then xn-2 is the inverse of x. This breaks down if n = 2, but in that case xx = x, and x is in fact the identity element. So we have found an identity and inverses, and the set becomes a group.
The order of x is n if n is the smallest positive integer satisfying xn = e. If the powers of x go on forever, x has zero order. We sometimes use the notation |x| for the order of x.
An involution is an element with order two (its own inverse).
The order of the group G, written |G|, is the size of G, i.e. the cardinality of its underlying set. A finite group has finite order. If x generates the entire group, then |x| = |G|. The group is cyclic, with generator x.