Example 6: Same parity on {1, …, 7}
Let be the relation defined in the set by both and are either odd or even. Show that is an equivalence relation. Further, show that all the elements of the subset are related to each other and all the elements of the subset are related to each other, but no element of the subset is related to any element of the subset .
Reflexive: For any , and are both odd or both even, so . Thus is reflexive.
Symmetric: Let . Then are both odd or both even, so are both odd or both even and . Thus is symmetric.
Transitive: Let . If is odd, then and are both odd. If is even, then and are both even. In both cases . Thus is transitive.
Hence is an equivalence relation.
All elements of are odd, so they are all related to each other. All elements of are even, so they are all related to each other.
An element of is odd and an element of is even, so they are not related.
No element of is related to any element of . Hence proved.
Want the reason behind every step, the basics and the checks?
"Both and are either odd or even" means and have the same parity: both odd, or both even. Every number has exactly one parity, so the relation is really "parity of = parity of ". A relation that says two things share a label is always an equivalence relation, because equality of labels is reflexive, symmetric and transitive. Its equivalence classes are the groups with the same label: the odd numbers and the even numbers .
- Given
- and exactly when are both odd or both even.
- To show
- (i) is reflexive, symmetric and transitive. (ii) Within every element is related to every other, and the same within . (iii) No element of is related to any element of .
- Plan
- Rewrite the rule as , where is the parity of . Prove the three properties for arbitrary elements using properties of equality. Then read off the two subsets and check the "related" and "not related" claims.
Basics you need
A whole number is even if it is and odd if it is for a whole number . Every integer is exactly one of the two. In : odd numbers are 1, 3, 5, 7 and even numbers are 2, 4, 6. Basics: integers, even and odd
Reflexive: for every . Symmetric: . Transitive: . An equivalence relation has all three (Definition 4). Basics: reflexive, symmetric, transitive
; ; and . These hold for any kind of label, including the words "odd" and "even".
The class of is the set of all elements related to . The classes of an equivalence relation do not overlap and together make up the whole set. Basics: equivalence classes
Part (i): is an equivalence relation
Rewrite the rule as an equation
For let be its parity: or . The phrase "both and are either odd or even" means "both odd, or both even", that is
For example (both odd), (both even), but (one odd, one even).
Each number has exactly one parity (Basic 1), so "both odd or both even" is the same as "same parity". Writing it as an equation lets us use the three properties of equality directly, which makes each step a one-line argument instead of a case split.Every integer is either even or odd, and never both (Basic 1).Reflexive
Take any . Clearly : has the same parity as itself. So for every , and is reflexive.
This is the textbook's "both and must be either odd or even". If is odd then "both" are odd; if is even then "both" are even. Either way the pair satisfies the rule.Equality is reflexive (Basic 3).Symmetric
Suppose , so . Then , which says . Hence is symmetric.
The condition " and have the same parity" does not depend on the order in which we name them. Equality read backwards is still equality.Equality is symmetric (Basic 3).Transitive
Suppose and . Then and , so , that is . Hence is transitive.
In words: if is odd then is odd (same as ) and is odd (same as ); if is even then both and are even. In either case and share a parity.
The middle element fixes one parity, and both and must agree with it. This is the textbook's "all elements must be either even or odd simultaneously". Two things that match the same thing match each other.Equality is transitive (Basic 3).Conclude part (i)
is reflexive, symmetric and transitive, so by Definition 4 is an equivalence relation on .
This is Example 5 restricted to a small set: two integers have the same parity exactly when their difference is even, so this is the relation "2 divides " on . Restricting an equivalence relation to a subset always gives an equivalence relation, since the three properties only talk about elements of the set.
Part (ii) and (iii): the two subsets
Within , and within , everything is related
Take any (they may be equal). Both are odd, so and . That gives pairs. Similarly, any are both even, so , giving more pairs.
"All elements related to each other" is a claim about every pair from the subset. One reason covers all of them at once: every element of the subset has the same parity.No element of is related to any element of
Take any and . Then is odd and is even, so and . By symmetry (or the same argument) as well. That rules out pairs in each direction, 24 in all.
So contains exactly of the pairs in , and the other are the mixed-parity pairs.
Left: the whole of , with the 25 pairs of shaded. The checkerboard pattern appears because exactly when is even. Right: the same information as two equivalence classes. Every number is related to every number in its own group and to nothing in the other group. A pair with one odd and one even entry can never satisfy "same parity". This is part (iii) of the question. Together with part (ii) it says that and are exactly the equivalence classes of .Equivalence classes of an equivalence relation are disjoint and their union is the whole set (Section 1.2, after Example 5). Here and . Basics: equivalence classes
relates two numbers exactly when they have the same parity, so it is reflexive, symmetric and transitive: an equivalence relation. All elements of are related to each other (all odd), all elements of are related to each other (all even), and no odd element is related to an even one. These two subsets are the equivalence classes and .
Class Catcher, in the chapter’s Games tab. Level 1 is this example: sort 1 to 7 into the two baskets {1, 3, 5, 7} and {2, 4, 6}. Play Class Catcher ↗
Count the pairs: odd-odd plus even-even gives pairs in , and mixed pairs outside . Transitivity sample: and , and indeed (both odd). Cross check: is odd, so , matching "no odd element is related to an even one". The verification script checks reflexivity, symmetry and transitivity by brute force over all ways of choosing two pairs of .
- Misreading the rule. "Both and are either odd or even" does not mean " is odd or is even". It means both odd, or both even.
- Forgetting pairs like and . "Related to each other" includes each element with itself and both orders.
- Proving transitivity with one triple. is an example, not a proof. Argue with arbitrary , as in Part (i) Step 4.
- Calling and "relations". They are subsets of A (the equivalence classes); the relation is the set of 25 pairs.
- "Same label" relations (same parity, same remainder, same length) are always equivalence relations, by the properties of equality.
- The equivalence classes are the groups of elements sharing a label. They never overlap and they fill the set.
- This example is Example 5 ("2 divides ") on the finite set , where every claim can also be checked by listing pairs.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Every integer is exactly one of odd, even | Part (i) Step 1 | Definition of odd and even (Basics: even and odd) |
| Equality is reflexive, symmetric, transitive | Part (i) Steps 2–4 | Basic properties of equality |
| Reflexive, symmetric, transitive; equivalence relation | Part (i) Steps 2–5 | Definitions 3 and 4, Section 1.2 (Lesson: types of relations) |
| Same parity even | Part (i) Step 5 | Example 5 |
| Equivalence classes are disjoint and cover the set | Part (ii) and (iii) Steps 1, 2 | Section 1.2, after Example 5 (Lesson: equivalence relations) |
| Pair counts 16, 9, 25, 24 | Part (ii) and (iii) Steps 1, 2; Check | Counted by brute force in the site's verification script |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →