# Sign function whose argument is an element of a group?

Let $G$ be the group of the permutation of $N$ particles, $P\in G$. Therefore, there are $N!$ elements in $G$. For its subgroup, e.g., even permutation, we can calculate $\text{sign}(P)$ and get $\text{sign}(P)=+1$. Could you please explain the meaning of the the function $\text{sign}(P)$ and the formula as follows

$$P'' = P P' \to \text{sign}(P'') = \text{sign}(P)\text{sign}(P')$$?

PS: The sign function, in which the argument is a operator,i.e., an element of a group) is hard to me. As I know the sign function $\text{sign}(x)$ is defined as a function of numbers. That is: the sign function of a real number $x$ is defined as

\begin{align} \text{sign}(x) = \left\{ \begin{array}{lr} 1 & : 0 < x < \infty\\ 0 & : x=0 \\ -1 & : -\infty <x<0 \end{array} \right. \end{align}

$$\text{abcde}\to \text{cbade}$$
Every permutation $p$ can be written as a product (composition) of consecutive transpositions.
There are many such decompositions for a fixed permutation. However, changing the decomposition, the number of these transpositions is always odd or always even, depending only on the considered $p$.
This way the sign of a permutation $p$ is defined: $\mathrm{sign}(p)=-1$ if $p$ can be decomposed as an odd number of transpositions, otherwise $sign(p)=1$. With that definition it turns out that $$\mathrm{sign}(pp') =\mathrm{sign}(p)\: \mathrm{sign}(p')\:.$$