Let a function be defined bythen, is
- Option A: One-one and onto
- Option B: One-one but not onto
- Option C: Onto but not one-one
- Option D: Neither one-one nor onto
Solution
Core idea. A piecewise function is one-one and onto when its pieces are one-one with disjoint images that fill the codomain.
Concept refresher. A function is one-one when
forces , and onto when its range is the whole of .
Picture the situation. The inputs fall into three classes: the even numbers, the numbers 3, 7, 11 and so on, and the numbers 1, 5, 9 and so on. Each class has its own rule. The function is one-one and onto if each rule is one-one, the three images are disjoint, and the images together fill .
Approach. Find the image of each piece and check that the images split the natural numbers.
Step 1: The three images
Even gives , the multiples of 4. Inputs give , the numbers 2, 6, 10 and so on. Inputs give , the odd numbers.
Step 2: The conclusion
Each rule is one-one on its class, the three images have no common element, and together they contain every natural number. So is one-one and onto.
Answer. (A) One-one and onto
Sanity check. The first values are , , , , , and , with no repeats, and 1, 2, 3, 4 all occur.
Why the other options are wrong
- (B) The function is onto: an odd number comes from , a multiple of 4 from an even number, and from .
- (C) The function is one-one: each rule is one-one, and outputs of different rules lie in different classes.
- (D) Both properties hold, since the three images split the natural numbers without overlap.
Key takeaway
The trap. A piece that halves its input can still be one-one on its own class of inputs.
How toppers think. They write each class of inputs with a parameter and read the image at once.
Remember. Images: , ,