Zolotarev's lemma

Multiplication by 2 on the nonzero numbers mod 7 has the cycle decomposition (1,2,4)(3,6,5), so the sign of this permutation is 1, which is (2|7).

The jth power of a primitive root modulo p will have index the greatest common divisor The condition for a nonzero number mod p to be a quadratic non-residue is to be an odd power of a primitive root.

, p − 1} arranged as a matrix of two rows such that the sum of the two elements in any column is zero mod p, say: Apply the permutation

: The columns still have the property that the sum of two elements in one column is zero mod p. Now apply a permutation V which swaps any pairs in which the upper member was originally a lower member: Finally, apply a permutation W which gets back the original matrix: We have W−1 = VU.

This lemma was introduced by Yegor Ivanovich Zolotarev in an 1872 proof of quadratic reciprocity.