Mathwords logoMathwords

Parity — Definition, Formula & Examples

Parity is the property of an integer that describes whether it is even or odd. An integer is even if it is divisible by 2, and odd if it is not.

An integer nn has even parity if n0(mod2)n \equiv 0 \pmod{2}, and odd parity if n1(mod2)n \equiv 1 \pmod{2}. Equivalently, nn is even when n=2kn = 2k for some integer kk, and odd when n=2k+1n = 2k + 1 for some integer kk.

Key Formula

nr(mod2),r{0,1}n \equiv r \pmod{2}, \quad r \in \{0, 1\}
Where:
  • nn = Any integer whose parity you want to determine
  • rr = The remainder: 0 means even, 1 means odd

How It Works

To find the parity of a number, divide it by 2. If the remainder is 0, the number is even; if the remainder is 1, the number is odd. Parity follows predictable rules when you combine numbers: even + even = even, odd + odd = even, and even + odd = odd. For multiplication, any product involving an even number is even; the only way to get an odd product is to multiply odd numbers together. These rules let you determine the parity of a result without computing the actual value.

Worked Example

Problem: Without calculating the exact value, determine whether the sum 1 + 2 + 3 + 4 + 5 + 6 + 7 is even or odd.
List parities: Write the parity of each number in the sum.
odd, even, odd, even, odd, even, odd\text{odd, even, odd, even, odd, even, odd}
Count the odd numbers: There are 4 odd numbers (1, 3, 5, 7) and 3 even numbers (2, 4, 6). Even numbers do not change the parity of a sum, so focus on the odd ones.
Apply the addition rule: Adding two odd numbers gives an even result. Pair up the four odd numbers: odd + odd = even, and another odd + odd = even. Two even results added together remain even.
odd + odd + odd + odd=even + even=even\text{odd + odd + odd + odd} = \text{even + even} = \text{even}
Answer: The sum is even. (You can verify: 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28.)

Why It Matters

Parity arguments are one of the most common proof techniques in math competitions and number theory courses. They let you rule out impossible outcomes quickly — for instance, proving that a certain equation has no integer solutions because the two sides would have different parities. In computer science, parity bits are used in error detection for data transmission.

Common Mistakes

Mistake: Forgetting that zero is even.
Correction: Zero is divisible by 2 (since 0 = 2 × 0), so it has even parity.