Canonical: https://knowlpedia.com/shared-foundations/permutation-sign/

# Permutation sign

The sign of a finite permutation, determined by the parity of its inversions.

Let \(\sigma\) be a [finite permutation](https://knowlpedia.com/shared-foundations/finite-permutation/) of \([n]\). An **inversion** is a pair of indices \(1\le i<j\le n\) for which \(\sigma(i)>\sigma(j)\). Write \(\operatorname{inv}(\sigma)\) for the number of these pairs.
The **sign** of \(\sigma\) is
\[
\operatorname{sgn}(\sigma)=(-1)^{\operatorname{inv}(\sigma)}\in\{+1,-1\}.
\]

## Parity

Thus a permutation is even when its inversion number is even and odd otherwise. The empty permutation has sign +1.

## Reference

[Konarovskyi, Mathematics 2, §6.1](https://www.math.uni-leipzig.de/~konarovskyi/teaching/2019/Math2/pdf/notes/notes.pdf).
