Another way of putting this: a permutation on a set of items is a bijection of that set onto itself.

Therefore, we can apply function composition to permutations: if p and s are permutations, so is its composition p.s ('p after s'). This operation on permutations forms a permutation group.

A swap is a permutation that exchanges two items, leaving the rest onto itself. Every permutation can be written as a composition of swaps; it turns out that every permutation can either be composed from an odd number of swaps, or an even number of swaps, but not both. (Need proof?) The 'even permutations' form a subgroup of the permutation group, called an alternating group. The equally large set of odd permutations does not form a group, lacking the identity permutation.