Example 8: on : one-one but not onto
Show that the function , given by , is one-one but not onto.
One-one: Let with . Then
Thus is one-one.
Not onto: Take . If , then , so . So 1 has no pre-image in . Thus is not onto.
Hence is one-one but not onto.
Want the reason behind every step, the basics and the checks?
Doubling never sends two different numbers to the same place, because we can always undo it by halving: if , halve both sides and . So is one-one. But the outputs of doubling a natural number are only the even numbers To land on an odd number such as 1 we would need , which is not in the domain . So is not onto. Whether a function is onto depends on the sets it is defined between, not only on its formula.
- Given
- The rule , with domain and codomain .
- To show
- (a) is one-one: forces . (b) is not onto: some element of the codomain is not an image.
- Plan
- (1) Confirm really maps into and list a few values. (2) Prove one-one for arbitrary . (3) Disprove onto with one explicit element, 1, and show why nothing maps to it. (4) Describe the full range, to see exactly what is missed.
Basics you need
In , the domain is the set of allowed inputs and the codomain is the set in which outputs are allowed to land. Here both are , so inputs like or are not allowed. Basics: what a function is
is one-one if for every , implies . In words: different inputs always give different outputs. Basics: one-one and onto
is onto if for every there is some with . Equivalently, the range of equals the whole codomain. To show onto fails, it is enough to find one that no input reaches.
A "for every" claim (like one-one) is proved with arbitrary letters, never with a few examples. A "for every" claim (like onto) is disproved by one counterexample. Basics: proving and disproving
A natural number is even when it equals for some . The odd numbers are exactly those that are not of this form. Basics: integers, even and odd
Solution
Check that maps into , and list some values
If is a natural number, then is a natural number too, so every output lies in the codomain . Each input gives exactly one output, so is a genuine function . A few values:
1 2 3 4 5 6 2 4 6 8 10 12 Two things stand out: the outputs never repeat, and the odd numbers never appear.
Each input sends one arrow to . No output receives two arrows (one-one), but every odd output, shown in rose, receives none (not onto). Computing a few values first shows what to expect before we try to prove anything: the table already suggests "one-one: yes" and "onto: no". The check that outputs lie in matters because the question names the codomain ; if some output fell outside it, would not be a function at all.is closed under addition: the sum of two natural numbers is a natural number. Since , doubling stays inside .One-one: equal outputs force equal inputs
Take arbitrary and suppose . Then
(The second implication divides both sides by 2.)
So whenever two inputs have the same image, they are the same input. Hence is one-one.
Definition 5 is a statement about every pair , so we use letters that could stand for any natural numbers. We start from the hypothesis and derive the conclusion . Dividing by 2 is valid because : if two numbers are equal, half of one equals half of the other.Cancellation: if and , then . Here . This is exactly the step that would fail for a constant function like , which is not one-one.Not onto: nothing maps to 1
To be onto, every element of the codomain must be an image. Look at . If some had , then
But is not a natural number, so it is not in the domain. The equation has only this one solution, so no satisfies . Hence 1 is not the image of any element of the domain, and is not onto.
"Onto" says for every in the codomain there is a preimage. One without a preimage destroys that claim, so a single counterexample is a complete proof. We must show the preimage is missing, not just that we failed to find one: solving gives the only possible candidate, , and it lies outside . (A different argument works too: for every , .)When solving to test onto, always check that the solution belongs to the domain. The algebra happily produces ; the domain is what rules it out. Basics: one-one and ontoDescribe the range exactly
The range of is the set of all its outputs:
the set of even natural numbers. Every even number is reached (by ), and no odd number is reached, because for an odd the only solution of is , which is not a whole number. So the range is a proper part of , and by the Remark after Definition 6 ( is onto exactly when the range equals the codomain), is not onto. Infinitely many elements of the codomain are missed, not just 1.
Stating the range shows the full picture behind the single counterexample. It also explains which change of sets would make onto: if the codomain were the set of even natural numbers, would be onto (and then a bijection).Range versus codomain: the codomain is declared in the question (); the range is what the rule actually produces. Onto means they coincide.Conclude, and compare with Example 9
is one-one (Step 2) and not onto (Step 3). So is one-one but not onto.
The very next example in the book, Example 9, uses the same formula on instead of . There, is allowed, becomes onto, and the function is a bijection. The formula is the same; the sets changed the answer.
This example is also the textbook's evidence, in the Remark after Example 14, that on an infinite set a one-one function from the set to itself need not be onto. For finite sets that cannot happen (Examples 13 and 14).
from to is one-one, since , and not onto, since would need the preimage . Its range is the set of even natural numbers .
Balloon Pop, in the chapter’s Games tab. Machine 1 is f(x) = 2x: hunt for a balloon nothing can hit. Play Balloon Pop ↗
Take the inputs . Their images are 100 different numbers, as one-one predicts. Among the numbers , exactly the 100 odd ones are never hit, and the smallest of them is 1, as the counterexample says. Also , and has no other preimage: only for .
- Writing and declaring onto. That is the argument for (Example 9). On the preimage must itself be a natural number, and for odd it is not.
- Proving one-one with examples. ", , all different" checks a few pairs only. The proof must use arbitrary .
- Running the implication backwards. One-one is . The direction is true for every function and proves nothing.
- Forgetting that here. The book's starts at 1. That does not change this answer, but it matters in other questions.
- One-one: assume and work towards . For with , cancelling does it in one line.
- Not onto: name one element of the codomain and show that the only candidate preimage lies outside the domain.
- One-one and onto are properties of the triple (rule, domain, codomain). Change the sets and the answer can change.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Definition of one-one (injective) | Step 2 | Definition 5, Section 1.3 (Lesson: types of functions) |
| Definition of onto (surjective) | Steps 3, 4 | Definition 6, Section 1.3 |
| onto range of = codomain | Step 4 | Remark after Definition 6, Section 1.3 |
| closed under addition, so | Step 1 | Properties of natural numbers |
| Cancelling a non-zero factor: | Step 2 | Arithmetic |
| , and | Step 3 | Solving a linear equation |
| Infinite sets: one-one need not imply onto | 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 →