Square Modulo 4
Jump to navigation
Jump to search
Theorem
Let $x \in \Z$ be an integer.
Then $x$ is:
- even if and only if $x^2 \equiv 0 \pmod 4$
- odd if and only if $x^2 \equiv 1 \pmod 4$
Proof
\(\ds x\) | \(=\) | \(\ds 2 k\) | ||||||||||||
\(\ds \leadstoandfrom \ \ \) | \(\ds x^2\) | \(=\) | \(\ds \paren {2 k}^2\) | |||||||||||
\(\ds \) | \(=\) | \(\ds 4 k^2\) | ||||||||||||
\(\ds \) | \(\equiv\) | \(\ds 0\) | \(\ds \pmod 4\) |
$\Box$
\(\ds x\) | \(=\) | \(\ds 2 k + 1\) | ||||||||||||
\(\ds \leadstoandfrom \ \ \) | \(\ds x^2\) | \(=\) | \(\ds \paren {2 k + 1}^2\) | |||||||||||
\(\ds \) | \(=\) | \(\ds 4 \paren {k^2 + k} + 1\) | ||||||||||||
\(\ds \) | \(\equiv\) | \(\ds 1\) | \(\ds \pmod 4\) |
$\blacksquare$
Also see
Sources
- 1980: David M. Burton: Elementary Number Theory (revised ed.) ... (previous) ... (next): Chapter $2$: Divisibility Theory in the Integers: $2.1$ The Division Algorithm