Example 7: Roll numbers: one-one but not onto
Let A be the set of all 50 students of Class X in a school. Let be function defined by . Show that is one-one but not onto.
One-one: Let with . Then the students and have the same roll number. Two different students of a class cannot have the same roll number, so . Thus is one-one.
Not onto: Without loss of generality, let the roll numbers be . Then is not the roll number of any student, so 51 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?
One-one asks: do different inputs always get different outputs? Onto asks: is every element of the codomain used? Roll numbers are issued so that no two students share one, so is one-one. But 50 students can use up at most 50 natural numbers, while has infinitely many, so some natural numbers (such as 51) are nobody's roll number, and is not onto. The codomain is simply far too big to be filled.
- Given
- A = the 50 students of Class X; , = the roll number of student .
- To show
- (a) is one-one; (b) is not onto.
- Plan
- (1) Note why is a function at all. (2) One-one: take two different students and show their images differ. (3) Not onto: exhibit one natural number that is not the image of any student, and explain why such a number must exist whatever the roll numbers are.
Basics you need
assigns to each exactly one . A is the domain, B the codomain, and the range is the set of outputs actually produced, , which is a subset of B. Basics: what a function is
Definition 5: is one-one if the images of distinct elements are distinct, that is . Equivalently, . Basics: one-one and onto
Definition 6: is onto if every is the image of some . By the Remark after Definition 6, is onto exactly when range of = Y. To show it is not onto, one that is never an output is enough.
A function on a set with 50 elements produces at most 50 different outputs. is infinite, so such a function can never have range equal to . Basics: counting choices
Solution
really is a function from A to
Each student of the class is given exactly one roll number, and roll numbers are natural numbers. So every is assigned exactly one value , which is what a function requires.
Before asking whether is one-one or onto, it is worth confirming that is a function. Here that is a fact about how schools work: no student is left without a roll number, and no student has two.A function assigns exactly one output to each input (Basic 1).One-one: different students have different roll numbers
Take any two students with . A roll number is issued to identify one student, so no two different students of the class share a roll number. Hence
Equivalently, if , the two students have the same roll number, so they are the same student: . Therefore is one-one.
One-one is a claim about every pair of different inputs, so we take an arbitrary pair . The mathematical content is just Definition 5; the fact that makes it true comes from the situation described (the purpose of a roll number is to tell students apart). The contrapositive form "" is the form the textbook writes after "i.e." in Definition 5, so we show that both forms give the same conclusion."" and "" say the same thing (one is the contrapositive of the other). Basics: how to prove and disproveNot onto: 51 is nobody's roll number
As the textbook says, we may assume the roll numbers are (see Step 4 for why this assumption costs nothing). Then the range of is
The natural number is in the codomain but not in this set: no student has roll number 51, so there is no with . Hence is not onto. (So are ; one is enough.)
Each student sends exactly one arrow, and no two arrows land on the same number: one-one. But only 50 numbers ever receive an arrow, and every number from 51 on receives none: not onto. "Onto" is a "for every in the codomain" claim, so to deny it we need one that is missed. The textbook's solution writes "image of any element of X under "; the domain in this example is called A, so read X as A there (it is a slip in the book's wording, not a change in the mathematics).Remark after Definition 6: is onto if and only if range of = Y. Here range .Why "without loss of generality" is safe
Suppose the school used any other 50 different natural numbers as roll numbers, say . Then the range of is , and the natural number is larger than every roll number, so it is not a roll number at all. Again some element of is not an image, and is not onto.
More simply: a set of 50 students has at most 50 images, and is infinite, so the range can never be all of .
The phrase "without loss of generality" means "the special case we pick does not affect the conclusion". This step shows why: the argument does not depend on which 50 numbers are used. Only the particular missing number (51, or ) changes.A function defined on a set of elements has at most different outputs (Basic 4). Every finite set of natural numbers has a largest element, and one more than it is a natural number not in the set.Conclude
is one-one (Step 2) and not onto (Steps 3 and 4). So is one-one but not onto, and in particular it is not bijective (Definition 7).
One-one and onto are separate properties. Here the first holds and the second fails, purely because the codomain is much larger than the domain. If we shrank the codomain to , the same rule would be a bijection : the properties depend on the codomain, not just on the rule.Bijective means one-one and onto (Definition 7). Lesson: types of functions
No two students share a roll number, so different students have different images: is one-one. Only 50 natural numbers are roll numbers, so, for example, is not the image of any student: is not onto.
With roll numbers 1 to 50: the range has elements and contains no number from to (or beyond). If instead the roll numbers were 50 random different numbers below 10000, the largest one plus 1 is always missing; the verification script tries 200 such random choices and finds the missing number every time. A function on 50 inputs never has more than 50 different outputs.
- Confusing range and codomain. The codomain is (stated in ); the range is the set of roll numbers actually used. Onto means these two are equal.
- Proving one-one with one pair of students. "Aman has 1 and Bina has 2" checks one pair; the argument must hold for every pair of different students.
- Thinking "not onto" needs the roll numbers to be 1 to 50. Any 50 roll numbers leave infinitely many natural numbers unused.
- Writing "51 is not in A". The point is that 51 is in the codomain but not in the range; A is a set of students, not numbers.
- One-one: different inputs, different outputs. Onto: every codomain element is an output.
- A function from a finite set to an infinite set can be one-one but is never onto.
- Whether a function is onto depends on the codomain: the same rule onto would be onto.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Function, domain, codomain, range | Steps 1, 3 | Class XI; Section 1.3 (Basics: what a function is) |
| One-one (injective) | Step 2 | Definition 5, Section 1.3 (Lesson: types of functions) |
| Onto (surjective); onto ⇔ range = codomain | Steps 3, 4 | Definition 6 and the Remark after it, Section 1.3 |
| Bijective | Step 5 | Definition 7, Section 1.3 |
| No two students share a roll number; each has one | Steps 1, 2 | The situation described in the example |
| inputs give at most outputs; is infinite | Step 4 | Counting (Basics: counting choices) |
| Next example: one-one but not onto with a formula | Comparison | Example 8 |
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 →