Example 13: Onto on {1, 2, 3} forces one-one
Show that an onto function is always one-one.
Since is onto, its range is the whole codomain:
Suppose is not one-one. Then two different elements of have . So the range has at most two elements, and is not onto. This is a contradiction.
Hence is one-one.
Want the reason behind every step, the basics and the checks?
Count the outputs. Three inputs can produce at most three different outputs. To be onto, must produce all three elements of the codomain, so it needs three different outputs, and therefore no two inputs may share one. If two inputs did share an output, only two values would be left at most, and one element of the codomain would be missed. The proof is this counting argument, written as a proof by contradiction.
- Given
- A function from to that is onto: each of 1, 2, 3 is of something.
- To show
- is one-one: different inputs have different images.
- Plan
- (1) Note that the range is , so it has at most three elements. (2) Suppose, for contradiction, that is not one-one. (3) Show the range then has at most two elements. (4) That contradicts onto, so must be one-one. (5) Confirm by listing all 27 functions.
Basics you need
For on , the range is the set of images . Repeated values are listed once, so this set has 3, 2 or 1 elements. Basics: what a function is
is onto exactly when its range is all of (Remark after Definition 6). Here that means . Basics: one-one and onto
is not one-one exactly when there are two different inputs with .
To prove a statement, assume it is false and deduce something impossible. Then the assumption must be wrong, so the statement is true. Basics: proving and disproving
A function from a 3-element set to a 3-element set chooses one of 3 images for each of 3 inputs, so there are such functions. Basics: counting choices
Solution
What onto means here
The domain has only three elements, so is completely described by the three values , and
Since is onto, this range must equal the whole codomain:
In particular the range must contain three different elements.
Translating "onto" into a statement about the set of images turns the question into counting: how many different values can three inputs produce? A set written as lists each value once, even if, say, , so its size is the number of different images.is onto if and only if the range of equals the codomain (Remark after Definition 6, Section 1.3).Assume the opposite: is not one-one
Suppose, for contradiction, that is not one-one. Then there are two different elements of the domain with the same image. Call them and , with and , and let be the third element of . (The book takes , , as an illustration; the argument below does not depend on which pair it is.)
We want to prove "onto one-one". Proof by contradiction assumes "onto" (given) together with "not one-one" and looks for something impossible. Naming the pair instead of fixing makes it clear that every possible pair is covered: there are three possible pairs (), and the same reasoning works for each."Not one-one" is the negation of "for all : ". It says: there exist with . Basics: proving and disprovingThen the range has at most two elements
The range is . Because , the first two entries are the same element, so
This set has at most two elements (exactly two if , one if ). The image of can be only one element, so nothing else is added.
Left: when two inputs share an image (here , ), only two outputs are used and the codomain element 3 is missed. Right: an onto function (, , ) uses all three outputs, so each receives exactly one arrow. This is the counting heart of the proof. Three arrows leave the domain, and two of them land on the same point, so at most two points of the codomain are hit. This is the textbook's sentence "the image of 3 under can be only one element", made general.A function assigns exactly one image to each input, so contributes exactly one element to the range. Basics: what a function isContradiction, so is one-one
A set with at most two elements cannot equal , which has three. So at least one element of the codomain is not in the range, and is not onto. This contradicts the given fact that is onto. The assumption of Step 2 must therefore be false: is one-one.
The assumption "not one-one" led to "not onto", which is impossible because is onto. In a proof by contradiction, the only way out is to reject the assumption. Equivalently, we have shown the contrapositive: "not one-one not onto", which is logically the same as "onto one-one".A statement and its contrapositive are always both true or both false.Confirm by listing every function
There are only functions from to itself, so we can sort all of them by the size of their range:
Size of range Number of functions Onto? One-one? 3 6 yes yes 2 18 no no 1 3 no no Total 27 6 onto 6 one-one The 6 onto functions are exactly the 6 one-one functions (the six ways of arranging 1, 2, 3, counted ). Every one of the other 21 functions repeats a value and misses an element. This agrees with the proof.
A finite set allows a complete check, which is a good habit when it is small. It does not replace the proof, because the proof explains why it must be so, and the same argument extends to any finite set, while a list does not.Range sizes: 3 functions are constant (range size 1); use all three values; the remaining use exactly two. Basics: counting choices
If an onto were not one-one, two inputs would share an image and the range would have at most two elements, so would not be onto, a contradiction. Hence every onto function from to itself is one-one. (By the Remark after Example 14, the same holds for every finite set and .)
Brute force over all 27 functions (Step 5): exactly 6 are onto, and all 6 are one-one. Try a specific non-one-one function: . Its range is , which misses 2, so it is not onto, just as Step 3 predicts.
- Checking a single example. Showing one onto function is one-one proves nothing about the others. The argument must work for every onto , which is why we use arbitrary .
- Fixing the pair as 1 and 2 without comment. The shared pair could be or . Either say "say 1 and 2, the other cases are identical" (as the book does) or use letters.
- Extending the result to infinite sets. It is false there: Example 10 gives an onto function that is not one-one.
- Confusing domain and codomain sizes. The argument uses that both have three elements. For , onto functions exist and none of them is one-one.
- For functions between finite sets, think in terms of counting: inputs produce at most different outputs, and fewer if any two collide.
- Proof by contradiction (or the contrapositive) is natural here: "not one-one" quickly gives "not onto".
- For a finite set and , onto one-one. Example 14 proves the other direction. For infinite sets both directions can fail: Example 8 is one-one but not onto, and Example 10 is onto but not one-one.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Definition of one-one, and its negation | Steps 2, 4 | Definition 5, Section 1.3 (Lesson: types of functions) |
| Onto range = codomain | Steps 1, 4 | Definition 6 and the Remark after it, Section 1.3 |
| Each input has exactly one image | Step 3 | Definition of a function |
| Proof by contradiction; contrapositive | Steps 2, 4 | Logic |
| 27 functions: 6 with range size 3, 18 with size 2, 3 with size 1 | Step 5 | Multiplication principle (Lesson: counting functions and relations) |
| Same result for any finite set | Result | 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 →