Example
Let g : {1, 2, 3, 4} -> {1, 2, 3, 4} be the permutation with
and let h : {1, 2, 3, 4} -> {1, 2, 3, 4} be the permutation with
Then gh is the permutation with
(so h is applied first), whereas hg is the permutation
In particular, gh and hg are not the same. The official terminology is that g and h do not commute.
The inverse of g is the map that sends 1 to 3, 2 to 1, 3 to 2, 4 to 4.
We will shortly describe notations for permutations that are more convenient for our purposes: matrix notation, list notation and disjoint cycles notation.