Example 10: Onto but not one-one on
Show that the function , given by and , for every , is onto but not one-one.
Not one-one: but . Thus is not one-one.
Onto: Let . If , then . If , then , , and
So every has a pre-image. Thus is onto.
Hence is onto but not one-one.
Want the reason behind every step, the basics and the checks?
The rule "subtract 1" shifts every number from 3 onwards down by one step: That covers every output from 2 upwards. The only output left to cover is 1, and the rule sends two inputs there, 1 and 2. So every output is reached (onto), but the output 1 is reached twice (not one-one). This is the mirror image of Example 8: there, a function from to itself was one-one but not onto.
- Given
- A function from to defined in two pieces: , and when .
- To show
- (a) is not one-one. (b) is onto.
- Plan
- (1) Check the pieces cover every natural number and give outputs in . (2) Disprove one-one with one explicit pair. (3) Prove onto for an arbitrary , in two cases: and . (4) Conclude.
Basics you need
Each input must be covered by exactly one piece, and each output must lie in the codomain. To evaluate , first decide which piece belongs to. Basics: what a function is
One-one: . Onto: for every in the codomain there is an in the domain with . Basics: one-one and onto
One pair with disproves one-one. Onto, a "for every " claim, needs an argument for an arbitrary . Basics: proving and disproving
If every is either or at least , proving the claim separately for these two cases proves it for all . The cases must cover everything.
Solution
Check that is a well-defined function
Every natural number is either 1, or 2, or greater than 2, and exactly one of these holds. So exactly one rule applies to each input. The outputs lie in : , and if then , so is a natural number. A few values:
1 2 3 4 5 6 7 rule used 1 1 2 3 4 5 6 Inputs 1 and 2 (rose) both go to 1; every input moves one place left to . Every output receives an arrow (onto), but the output 1 receives two (not one-one). The two special values and are there for a reason: the rule cannot be used at , because . Checking that each piece stays inside shows the definition makes sense. The table and diagram then suggest the answer before we prove it.In this book does not contain 0. That is exactly why needs its own definition.Not one-one: 1 and 2 share an image
From the definition, and . So
Two different inputs have the same image, so is not one-one.
One-one claims that for every pair , equal images force equal inputs. A single pair that violates this is a complete disproof, so no general argument is needed. Here the pair is handed to us by the definition itself."Many-one" is the book's name for a function that is not one-one (Definition 5). This is many-one.Onto, case : use the input
Take an arbitrary with , so . We want with . Only the piece produces values , so solve , giving the candidate . Check it:
- , and , so the piece is the one that applies to it.
- . ✓
So every is an image.
The check "" is essential and easy to skip. The formula is only valid for , so before using it on we must confirm that is in that piece. It is, because . (The book chooses and checks .)With a piecewise function, the candidate preimage must fall in the piece whose formula you used to find it.Onto, case : use the input 1
The remaining element of the codomain is . The recipe of Step 3 would give , but 2 is not in the piece , so we cannot use that formula. Instead, the definition gives directly
(So does .) Hence 1 is also an image. Every is either 1 or at least 2, and both cases are done, so is onto.
The two cases and together cover all of , so proving each one proves onto for every . The value 1 needs separate treatment for the same reason and needed separate definitions: the general formula does not reach it.Proof by cases: split the possibilities into cases that cover everything, then prove each. Basics: proving and disprovingConclude, and compare with Examples 8, 13 and 14
is onto (Steps 3 and 4) and not one-one (Step 2). So is onto but not one-one.
For a function from a finite set to itself this could never happen: Example 13 shows that onto forces one-one on . The textbook's Remark after Example 14 points to this example and Example 8 as proof that on an infinite set like , onto and one-one can come apart.
Why the infinite set allows it: "wastes" one input by sending both 1 and 2 to 1, yet still has infinitely many inputs left to cover the infinitely many outputs A finite set has no such spare supply.
is onto: , and every equals . It is not one-one: with .
Apply to the inputs . The outputs are : every number from 1 to 100 appears (onto, as far as these inputs reach), and 101 inputs give only 100 different outputs, so some output must repeat (it is 1). For a single value: should come from , and indeed , so . ✓
- Using for as well. It gives , and the formula does not apply at 2. The answer happens to be right, but by the special rule, not by the formula.
- Forgetting the case entirely. Then onto has only been shown for .
- Thinking "onto" needs one-one. Onto only asks that every output be reached at least once; reaching one output twice is allowed.
- Writing . The formula is only for , and 0 is not in anyway.
- For a piecewise function, prove onto piece by piece, checking that each candidate input lies in the piece whose formula you used.
- This example (onto, not one-one) and Example 8 (one-one, not onto) show that on infinite sets the two properties are independent.
- Pictures help: an arrow diagram shows at a glance which outputs get no arrow and which get two.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| ; | Step 1 | Natural numbers |
| Definition of one-one; "many-one" | Step 2 | Definition 5, Section 1.3 (Lesson: types of functions) |
| Definition of onto | Steps 3, 4 | Definition 6, Section 1.3 |
| One counterexample disproves a "for all" statement | Step 2 | Logic of quantifiers |
| Proof by cases ( or ) | Steps 3, 4 | Logic |
| Infinite sets: onto need not imply one-one | Step 5 | Remark after Example 14, Section 1.3 |
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 →