Parity just means whether an integer is even or odd. It is a property of an integer. For example, we say that 0 has even parity, and 1 has odd parity.
Even integers: ..., -4, -2, 0, 2, 4, ...
Odd integers: ..., -3, -1, 1, 3, ...
You should be able to tell quickly if an integer is even or odd. Just look at the last digit. If the last digit is even (0, 2, 4, 6, 8), the integer is even. If the last digit is odd (1, 3, 5, 7, 9), the integer is odd. When looking at the examples below, don't actually perform the operations! Try to sense quickly whether the integers are even or odd, and if the result should be even or odd.
You need to know how parity behaves when two integers are added, subtracted, multiplied, or divided. A special case of multiplication is taking powers. In this post, I will go over the rules for these. Problems can get harder when variables or other complications are involved--I will write on this later.
Addition and Subtraciton
The same rules hold for both addition and subtraction, so I will just show the ones for addition.
even + even = even
even + odd = odd
odd + odd = even
Put another way:
Sum of two integers with the same parity (both even or both odd) = even
Sum of two integers with different parity = odd
Examples:
24 + 88 = even
-2 + 34 = even
51 - 28 = odd
Multiplication
even * even = even
even * odd = even
odd * odd = odd
Put another way:
even * (any integer, even or odd) = even
odd * odd = odd (is only way to get odd result)
Examples:
2 * 9 = even
-2 * 6 = even
5 * 7 = odd
-5 * 3 = odd
Division
You need to be careful about division when it comes to integers and parity.
First of all, when you divide two integers, the result is not always an integer. You can't tell if the result is an integer only by knowing the parity of the two integers you are dividing!
0 / 0 = undefined
0 / (non-zero integer) = 0
For the following, assume division gives an integer:
even / odd = even
even / even = could be even or odd
odd / odd = odd
Examples:
45 / 1 = 45 odd
45 / 3 = 15 odd
45 / 7 = not an integer
12 / 2 = 6 even
12 / 4 = 3 odd
Powers
even ^ (any positive integer not 0) = even
odd ^ (any positive integer) = odd
Focus on the base, not the exponent! The result has the same parity as the base.
Examples:
2^4 = even
3^4 = odd
(-48)^23 = even
(-513)^4 = odd
Related facts
- 2 is the only even prime number; all other prime numbers are odd