Negative Number is Congruent to Modulus minus Number

From ProofWiki
Jump to navigation Jump to search


$\forall m, n \in \Z: -m \equiv n - m \pmod n$

where $\bmod n$ denotes congruence modulo $n$.


Let $-m = r + k n$.

Then $-m + n = r + \paren {k + 1} n$

and the result follows directly by definition.

Also see

$-1 \equiv \paren {p - 1}! \pmod p \iff \text {$p$ is prime}$