---
tag: 0SK90238BH
kind: definition
name: Sign of a permutation
aliases: [sgn]
msc: [20B30]
defines: 02DKV69ZH0
uses: [0XK6FECMW5]
sources:
  - url: https://en.wikipedia.org/wiki/Parity_of_a_permutation
    locator: lead section
---

## Definition

Let $n \geq 2$ and let $\sigma \in S_n$.
Write $\sigma = \tau_1 \tau_2 \cdots \tau_m$ as a product of [[transpositions|0FWVRHBRWM]].
The sign of $\sigma$ is $\operatorname{sgn}(\sigma) = (-1)^m$.

## Remarks

The parity of $m$ does not depend on the decomposition, so the sign is well defined.
Equivalently, $\operatorname{sgn}(\sigma) = (-1)^{N(\sigma)}$, where $N(\sigma)$ is the number of pairs $i < j$ with $\sigma(i) > \sigma(j)$.
The sign of a permutation is the determinant of its permutation matrix.

## Explanations

### L1 human

Each permutation is a product of swaps, and the number of swaps is always even or always odd.
The sign records this: $+1$ for an even number and $-1$ for an odd number.
A single swap has sign $-1$.
