In mathematics, when X is a finite set with at least two elements, the permutations of X (that is, the bijective functions from X to itself) fall into two classes of equal size: the even permutations and the odd permutations. If any total ordering of X is fixed, the parity (oddness or evenness) of a permutation σ {\displaystyle \sigma } of X can be defined as the parity of the number of inversions for σ, i.e., of pairs of elements x, y of X such that x < y and σ(x) > σ(y). The sign, signature, or signum of a permutation σ is denoted sgn(σ) and defined as +1 if σ is even and −1 if σ is odd. The signature defines the alternating character of the symmetric group Sn. Another notation for the sign of a permutation is given by the more general Levi-Civita symbol (εσ), which is defined for all maps from X to X, and has value zero for non-bijective maps. The sign of a permutation can be explicitly expressed as
sgn(σ) = (−1)N(σ) where N(σ) is the number of inversions in σ. Alternatively, the sign of a permutation σ can be defined from its decomposition into the product of transpositions as
sgn(σ) = (−1)m where m is the number of transpositions in the decomposition. Although such a decomposition is not unique, the parity of the number of transpositions in all decompositions is the same, implying that the sign of a permutation is well-defined.
Example Consider the permutation σ of the set {1, 2, 3, 4, 5} defined by σ ( 1 ) = 3 , {\displaystyle \sigma (1)=3,} σ ( 2 ) = 4 , {\displaystyle \sigma (2)=4,} σ ( 3 ) = 5 , {\displaystyle \sigma (3)=5,} σ ( 4 ) = 2 , {\displaystyle \sigma (4)=2,} and σ ( 5 ) = 1. {\displaystyle \sigma (5)=1.} In one-line notation, this permutation is denoted 34521. It can be obtained from the identity permutation 12345 by three transpositions: first exchange the numbers 2 and 4, then exchange 3 and 5, and finally exchange 1 and 3. This shows that the given permutation σ is odd. Following the method of the cycle notation article, this could be written, composing from right to left, as
σ = ( 1 2 3 4 5 3 4 5 2 1 ) = ( 1 3 5 ) ( 2 4 ) = ( 1 3 ) ( 3 5 ) ( 2 4 ) . {\displaystyle \sigma ={\begin{pmatrix}1&2&3&4&5\\3&4&5&2&1\end{pmatrix}}={\begin{pmatrix}1&3&5\end{pmatrix}}{\begin{pmatrix}2&4\end{pmatrix}}={\begin{pmatrix}1&3\end{pmatrix}}{\begin{pmatrix}3&5\end{pmatrix}}{\begin{pmatrix}2&4\end{pmatrix}}.}
There are many other ways of writing σ as a composition of transpositions, for instance
σ = (1 5)(3 4)(2 4)(1 2)(2 3), but it is impossible to write it as a product of an even number of transpositions.
Properties The identity permutation is an even permutation. An even permutation can be obtained as the composition of an even number (and only an even number) of exchanges (called transpositions) of two elements, while an odd permutation can be obtained by (only) an odd number of transpositions. The following rules follow directly from the corresponding rules about addition of integers:
the composition of two even permutations is even the composition of two odd permutations is even the composition of an odd and an even permutation is odd From these it follows that
the inverse of every even permutation is even the inverse of every odd permutation is odd Considering the symmetric group Sn of all permutations of the set {1, ..., n}, we can conclude that the map
sgn: Sn → {−1, 1} that assigns to every permutation its signature is a group homomorphism. Furthermore, we see that the even permutations form a subgroup of Sn. This is the alternating group on n letters, denoted by An. It is the kernel of the homomorphism sgn. The odd permutations cannot form a subgroup, since the composite of two odd permutations is even, but they form a coset of An (in Sn). If n > 1, then there are just as many even permutations in Sn as there are odd ones; consequently, An contains n!/2 permutations. (The reason is that if σ is even then (1 2)σ is odd, and if σ is odd then (1 2)σ is even, and these two maps are inverse to each other.) A cycle is even if and only if its length is odd. This follows from formulas like
… excerpt ends here. Continue reading the full article.

