Sub topic 3
Even and Odd in Products
This chapter assumes you know the definition of even and odd integers (an even integer is a multiple of 2, an odd integer is one more than a multiple of 2) and how sums behave. It also assumes you are comfortable with negative numbers and with writing an expression like 2k for "some even integer."
All the rules below apply to integers only. A product like 0.5 × 3 has no parity, because 1.5 is neither even nor odd.
The core rule
A product of integers is even if at least one factor is even. It is odd only if every factor is odd.
| Factor 1 | Factor 2 | Product |
|---|---|---|
| even | even | even |
| even | odd | even |
| odd | even | even |
| odd | odd | odd |
Three of the four rows give an even result, so "even" is the default outcome. Odd is the special case that needs every factor to cooperate.
The table is easy to check by running every combination of parities. Use 0 for even and 1 for odd:
for a in (0, 1):
for b in (0, 1):
print(a, b, (a + b) % 2, (a * b) % 2)The last column is the parity of the product. It is 1 (odd) only on the row 1 1. The third column is the parity of the sum, which follows a different pattern. Do not mix the two up.
Why the rule holds
You can derive the rule instead of memorizing it. Write an even integer as 2k and an odd integer as 2m + 1, where k and m are integers.
- Even times anything. (2k)(n) = 2(kn). The result is 2 times an integer, so it is even, whatever n is.
- Odd times odd. (2a + 1)(2b + 1) = 4ab + 2a + 2b + 1 = 2(2ab + a + b) + 1. The result is 2 times an integer plus 1, so it is odd.
The first line explains why one even factor is enough. A factor of 2 is already inside the product, and no other factor can remove it. The second line explains why odd times odd stays odd. The extra terms all carry a factor of 2, and only the final 1 is left over.
Products with more than two factors
Apply the rule to the whole list of factors, not pair by pair.
- 3 × 5 × 7 × 9 is odd, because every factor is odd.
- 3 × 5 × 7 × 10 is even, because one factor is even.
- 3 × 5 × 7 × 0 is 0, which is even, because 0 is an even integer (0 = 2 × 0).
Zero is the factor most often forgotten. If any factor is 0, the product is 0, which is even. It also has no sign, a point the chapters on signs cover.
Negative integers follow the same parity rules as positive ones. −3 is odd (−3 = 2(−2) + 1) and −4 is even. So (−3)(−5) = 15 is odd, and (−3)(4) = −12 is even. The sign of a product never affects its parity.
Reading the rule backwards
GRE questions often give you the parity of a product and ask what you can conclude. Two directions matter, and only one of them gives you strong information.
- Product is odd. Then every factor is odd. If xyz is odd, you know x, y and z are each odd. This is a strong conclusion.
- Product is even. Then at least one factor is even. You do not know which one, and you do not know whether the others are even or odd. This is a weak conclusion.
The second direction causes many wrong answers. If xy is even, all of these are possible: both even (2 × 4), x even and y odd (2 × 3), or x odd and y even (3 × 2). The statement "x must be even" is false. The third code example in this chapter's plan searches for exactly this kind of counterexample:
cases = [(x, y) for x in range(-3, 4) for y in range(-3, 4)
if (x * y) % 2 == 0 and x % 2 != 0]
print(cases[0])It prints (-3, -2). The product is 6, which is even, but x = −3 is odd. One counterexample is enough to show that "an even product forces x to be even" is not a valid claim.
Worked examples
Example 1: forward direction
If n is an integer, is n(n + 1) even or odd?
The two factors are consecutive integers, so one of them is even. By the core rule the product is even. You can confirm it with n = 4 (4 × 5 = 20), n = 5 (5 × 6 = 30), and n = −3 (−3 × −2 = 6). All are even. Consecutive integers are covered in detail in a later chapter, but the product rule is what makes this fact work.
Example 2: backward direction with odd
The integers a and b satisfy: ab is odd. Must a + b be even?
An odd product forces both a and b to be odd. An odd plus an odd is even. So yes, a + b must be even.
Example 3: a hidden even factor
For any integer n, is (n + 3)(n + 6) even or odd?
You do not know the parity of n, but you can look at the two factors. They differ by 3, which is odd. Two integers that differ by an odd number have opposite parity, so one of them is even. The product is even for every integer n.
A quick test confirms this. With n = 1 you get 4 × 7 = 28. With n = 2 you get 5 × 8 = 40. With n = 0 you get 3 × 6 = 18. In every case the product is even.
Example 4: when you cannot conclude
If x is odd and xy is even, is y even?
x is odd, so it cannot be the factor that makes the product even. At least one factor must be even, so y must be even. This works because you were told x is odd. Compare it with the earlier case where you knew nothing about x.
Beyond even or odd: counting factors of 2
Sometimes the question asks for more than evenness, such as divisibility by 4. Each even factor contributes at least one factor of 2.
- Two even factors give a product divisible by 4, as in 2 × 6 = 12 and 4 × 10 = 40.
- A product of an even number and an odd number is even, but it may not be divisible by 4. Compare 2 × 3 = 6 with 4 × 3 = 12.
So "xy is even" is weaker than "xy is divisible by 4." Check which one the question asks about.
Common errors
- Assuming an even product means both factors are even. Only one has to be even. If the product is even, only the case "all factors odd" is excluded.
- Forgetting that 0 is even. If you list integers for a "must be even" problem and 0 is allowed, include it as an even value.
- Applying the rule to division. Parity is not preserved by division. 12 ÷ 4 = 3, where even divided by even gives odd. 6 ÷ 2 = 3, where even divided by even gives odd again, and 10 ÷ 5 = 2, where even divided by odd gives even. If the quotient is not guaranteed to be an integer, it has no parity.
- Applying the rule to non-integers. If x = 0.5 and y = 4, the product is 2, but x is not an integer, so "x is odd or even" is meaningless. When a problem says "integer," keep that in mind. When it does not, check whether fractions are allowed.
- Confusing the product rule with the sum rule. An odd plus an odd is even, but an odd times an odd is odd. Say the operation out loud before you pick the rule.
Quick checks you can run
When you are unsure whether a "must be even" claim is true, test it. A short loop tests a claim on many integers, including negatives and zero.
claim = lambda n: ((n + 3) * (n + 6)) % 2 == 0
print(all(claim(n) for n in range(-10, 11)))This prints True. A claim that fails at even one value is not a "must be true" statement. The skill of choosing which values to test is developed in a later chapter.
Summary
- Even × anything = even. Odd × odd = odd.
- A product is odd only when every factor is odd.
- An odd product tells you every factor is odd. An even product tells you only that at least one factor is even.
- Zero and negative integers follow the same rules, and 0 is even.
- Parity is defined for integers only, so be careful with division and fractions.
Exercise
The integers p, q and r satisfy the condition that pqr is odd. Which of p + q, p + q + r, and pq + r must be even?
Show answer
Since pqr is odd, p, q and r are all odd. Then p + q is odd + odd = even, so it must be even. p + q + r is even + odd = odd, so it is not even. pq is odd × odd = odd, and pq + r is odd + odd = even, so it must be even. The answers are p + q and pq + r.
Exercise
The integers x and y satisfy the condition that xy is even. Is it true that x + y must be odd? Give a counterexample or a proof.
Show answer
No, it need not be odd. Take x = 2 and y = 4. The product 8 is even, but the sum 6 is also even. A sum is odd only when exactly one addend is odd, and an even product allows both addends to be even.
Exercise
For every integer n, is (2n + 1)(n + 4) odd, even, or can it be either? Explain.
Show answer
It can be either. The factor 2n + 1 is always odd, so the parity of the product is the parity of n + 4, which is the parity of n. If n = 1 the product is 3 × 5 = 15, which is odd. If n = 2 the product is 5 × 6 = 30, which is even.