The product of two permutations is defined as their
composition as functions, so \sigma \cdot \pi is the function that maps any element
x of the set to \sigma (\pi (x)). Note that the rightmost permutation is applied to the argument first, because of the way function composition is written. Some authors prefer the leftmost factor acting first, but to that end permutations must be written to the
right of their argument, often as a
superscript, so the permutation \sigma acting on the element x results in the image x ^{\sigma}. With this convention, the product is given by x ^{\sigma \cdot \pi} = (x ^{\sigma})^{\pi}. However, this gives a
different rule for multiplying permutations. This convention is commonly used in the permutation group literature, but this article uses the convention where the rightmost permutation is applied first. Since the composition of two bijections always gives another bijection, the product of two permutations is again a permutation. In two-line notation, the product of two permutations is obtained by rearranging the columns of the second (leftmost) permutation so that its first row is identical with the second row of the first (rightmost) permutation. The product can then be written as the first row of the first permutation over the second row of the modified second permutation. For example, given the permutations, :P = \begin{pmatrix}1 & 2 & 3 & 4 & 5 \\2 & 4 & 1 & 3 & 5 \end{pmatrix}\quad \text{ and } \quad Q = \begin{pmatrix}1 & 2 & 3 & 4 & 5 \\ 5 & 4 & 3 & 2 & 1 \end{pmatrix}, the product
QP is: :QP =\begin{pmatrix}1 & 2 & 3 & 4 & 5 \\ 5 & 4 & 3 & 2 & 1 \end{pmatrix}\begin{pmatrix}1 & 2 & 3 & 4 & 5 \\2 & 4 & 1 & 3 & 5 \end{pmatrix} = \begin{pmatrix} 2 & 4 & 1 & 3 & 5 \\ 4 & 2 & 5 & 3 & 1 \end{pmatrix} \begin{pmatrix}1 & 2 & 3 & 4 & 5 \\2 & 4 & 1 & 3 & 5 \end{pmatrix} = \begin{pmatrix}1 & 2 & 3 & 4 & 5 \\4 & 2 & 5 & 3 & 1 \end{pmatrix}. The composition of permutations, when they are written in cycle notation, is obtained by juxtaposing the two permutations (with the second one written on the left) and then simplifying to a disjoint cycle form if desired. Thus, the above product would be given by: :Q \cdot P = (1 5)(2 4) \cdot (1 2 4 3) = (1 4 3 5). Since function composition is
associative, so is the product operation on permutations: (\sigma \cdot \pi) \cdot \rho = \sigma \cdot(\pi \cdot \rho). Therefore, products of two or more permutations are usually written without adding parentheses to express grouping; they are also usually written without a dot or other sign to indicate multiplication (the dots of the previous example were added for emphasis, so would simply be written as \sigma \pi \rho). ==Neutral element and inverses==