Square Modulo n Congruent to Square of Inverse Modulo n

From ProofWiki
Jump to navigation Jump to search

Theorem

Let $n \in \Z_{>0}$ be a (strictly) positive integer.

Then:

$a^2 \equiv \paren {n - a}^2 \pmod n$

where the notation denotes congruence modulo $n$.


Proof

\(\ds \paren {n - a}^2\) \(=\) \(\ds n^2 - 2 n - a^2\)
\(\ds \) \(\equiv\) \(\ds a^2\) \(\ds \pmod n\)

$\blacksquare$