Class 12 Maths, Worked in Full Past papersGet updates
Chapter 1 · Relations and Functions

Example 14: One-one on {1, 2, 3} forces onto

ExamplesTypes of functions · Section 1.3
The question

Show that a one-one function f:{1,2,3}→{1,2,3}f : \{1, 2, 3\} \to \{1, 2, 3\} must be onto.

Exam answer

Since ff is one-one, f(1),f(2),f(3)f(1), f(2), f(3) are three different elements of {1,2,3}\{1, 2, 3\}⁠.

So the range {f(1),f(2),f(3)}\{f(1), f(2), f(3)\} is a subset of {1,2,3}\{1, 2, 3\} with three elements, that is

{f(1),f(2),f(3)}={1,2,3}\{f(1), f(2), f(3)\} = \{1, 2, 3\}

Hence the range of ff is its codomain, so ff is onto.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Three different things placed in three slots fill every slot. Because ff is one-one, the images f(1),f(2),f(3)f(1), f(2), f(3) are three different elements of the codomain. But the codomain {1,2,3}\{1, 2, 3\} has only three elements, so these three images must be all of them. Every element of the codomain is therefore an image, which is exactly what onto means. This is the converse of Example 13.

Given, to show, and the plan
Given
A function f:{1,2,3}→{1,2,3}f : \{1, 2, 3\} \to \{1, 2, 3\} that is one-one.
To show
ff is onto: each of 1, 2, 3 is the image of some input.
Plan
(1) Use one-one to show the three images are pairwise different. (2) Show that three different elements of {1,2,3}\{1, 2, 3\} must be all of {1,2,3}\{1, 2, 3\}⁠. (3) Conclude that the range equals the codomain. (4) Confirm by listing all six one-one functions, and contrast with infinite sets.

Basics you need

1One-one in "distinct" form

Definition 5 says the images of distinct elements are distinct: if x1≠x2x_1 \ne x_2 then f(x1)≠f(x2)f(x_1) \ne f(x_2)⁠. This is the contrapositive of f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2⁠, so the two forms say the same thing. Basics: one-one and onto

2Range and onto

The range of ff on {1,2,3}\{1, 2, 3\} is {f(1),f(2),f(3)}\{f(1), f(2), f(3)\}⁠. ff is onto exactly when this equals the codomain. Basics: what a function is

3Subsets of a finite set

If S⊆{1,2,3}S \subseteq \{1, 2, 3\} and SS has 3 elements, then S={1,2,3}S = \{1, 2, 3\}⁠. (If SS left out some element, it would sit inside a 2-element set and could have at most 2 elements.) Basics: sets, ordered pairs and A × B

4Counting arrangements

The number of ways to give 1,2,31, 2, 3 three different images from {1,2,3}\{1, 2, 3\} is 3×2×1=63 \times 2 \times 1 = 6⁠. Basics: counting choices

Solution

  1. One-one makes the three images different

    The inputs 1,2,31, 2, 3 are pairwise distinct: 1≠21 \ne 2⁠, 1≠31 \ne 3⁠, 2≠32 \ne 3⁠. Since ff is one-one, distinct inputs have distinct images, so

    f(1)≠f(2),f(1)≠f(3),f(2)≠f(3).\begin{gathered} f(1) \ne f(2), \quad f(1) \ne f(3), \\ f(2) \ne f(3). \end{gathered}

    So f(1),f(2),f(3)f(1), f(2), f(3) are three different elements of the codomain.

    We use one-one in its "distinct inputs give distinct images" form, which is how Definition 5 first states it. Applying it to each of the three pairs of inputs gives all three inequalities. Nothing about which one-one function ff is was used, so this holds for every one-one ff on {1,2,3}\{1, 2, 3\}⁠.
    The contrapositive of "f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2" is "x1≠x2⇒f(x1)≠f(x2)x_1 \ne x_2 \Rightarrow f(x_1) \ne f(x_2)". A statement and its contrapositive are always equivalent. Basics: proving and disproving
  2. Three different elements of {1,2,3}\{1, 2, 3\} are all of it

    Let S={f(1),f(2),f(3)}S = \{f(1), f(2), f(3)\}⁠, the range of ff⁠. Every image lies in the codomain, so S⊆{1,2,3}S \subseteq \{1, 2, 3\}⁠. By Step 1, SS has exactly three elements.

    Suppose some k∈{1,2,3}k \in \{1, 2, 3\} were missing from SS⁠. Then SS would be contained in {1,2,3}\{1, 2, 3\} with kk removed, a set of only two elements, so SS would have at most two elements. That contradicts SS having three. So no element is missing:

    {f(1), f(2), f(3)}={1,2,3}.\{f(1),\ f(2),\ f(3)\} = \{1, 2, 3\}.
    This is the textbook's sentence "three elements of {1,2,3}\{1, 2, 3\} must be taken to 3 different elements of the co-domain", with the final counting step written out. The intuition is seating three people on three chairs with no two sharing a chair: no chair can be left empty.
    A subset of a finite set with the same number of elements as the set is the whole set. This is the step that fails for infinite sets (see Step 4).
  3. Conclude: ff is onto

    Step 2 says the range of ff is the whole codomain {1,2,3}\{1, 2, 3\}⁠. Equivalently, every y∈{1,2,3}y \in \{1, 2, 3\} equals f(x)f(x) for some x∈{1,2,3}x \in \{1, 2, 3\}⁠. So ff is onto.

    By the Remark after Definition 6, onto means range = codomain, which is exactly what Step 2 established. Since ff was an arbitrary one-one function, every one-one f:{1,2,3}→{1,2,3}f : \{1, 2, 3\} \to \{1, 2, 3\} is onto. Combined with Example 13, such a function is one-one if and only if it is onto, and in that case it is bijective.
    f:X→Yf : X \to Y is onto if and only if Range of ff = YY⁠.
  4. Confirm by listing all one-one functions, and compare with N\N

    A one-one ff has 3 choices for f(1)f(1)⁠, then 2 for f(2)f(2) (it must differ from f(1)f(1)⁠), then 1 for f(3)f(3)⁠: 3×2×1=63 \times 2 \times 1 = 6 functions. All six are drawn below, and in each one every output receives exactly one arrow, so each is onto.

    f(1), f(2), f(3) = 1, 2, 3112233f(1), f(2), f(3) = 1, 3, 2112233f(1), f(2), f(3) = 2, 1, 3112233f(1), f(2), f(3) = 2, 3, 1112233f(1), f(2), f(3) = 3, 1, 2112233f(1), f(2), f(3) = 3, 2, 1112233
    The six one-one functions from {1,2,3}\{1, 2, 3\} to itself, labelled by their images f(1),f(2),f(3)f(1), f(2), f(3)⁠. In every diagram each element on the right receives exactly one arrow: each one-one function is also onto.

    For an infinite set the conclusion can fail. In Example 8, f(x)=2xf(x) = 2x from N\N to N\N is one-one, yet the range {2,4,6,… }\{2, 4, 6, \dots\} misses every odd number. Step 2 has no analogue there: a subset of N\N can be "as large as" N\N (infinite) without being all of N\N⁠.

    Listing all six functions confirms the proof completely for this small set. The comparison with N\N is the point of the textbook's Remark after this example: for every finite set XX⁠, a function X→XX \to X is one-one exactly when it is onto, and this "characteristic difference between a finite and an infinite set" is why Examples 8 and 10 exist.
    For a finite set XX with nn elements, a one-one f:X→Xf : X \to X has nn different images in an nn-element set, so by the same counting it is onto. Basics: counting choices
Result

Because ff is one-one, f(1),f(2),f(3)f(1), f(2), f(3) are three different elements of {1,2,3}\{1, 2, 3\}⁠; a 3-element subset of a 3-element set is the whole set, so the range is {1,2,3}\{1, 2, 3\} and ff is onto. There are exactly 6 such functions, and all 6 are bijections.

Check it with numbers

Go through all 33=273^3 = 27 functions from {1,2,3}\{1, 2, 3\} to itself: exactly 6 are one-one, and every one of those 6 has range {1,2,3}\{1, 2, 3\}⁠. Take one of them, f(1)=3, f(2)=1, f(3)=2f(1) = 3,\ f(2) = 1,\ f(3) = 2⁠: the images 3,1,23, 1, 2 are different, and together they are {1,2,3}\{1, 2, 3\}⁠. ✓ Now break one-one, say f(3)=1f(3) = 1 instead: the images 3,1,13, 1, 1 give range {1,3}\{1, 3\}⁠, and 2 is missed.

Common mistakes
  1. Stopping at "the images are different". That is one-one restated. The proof needs the second step: three different elements inside a three-element set fill it.
  2. Proving it for one example. Showing that f(1)=2,f(2)=3,f(3)=1f(1) = 2, f(2) = 3, f(3) = 1 is onto does not cover the other five one-one functions. The argument must use an arbitrary one-one ff⁠.
  3. Applying the result to infinite sets. On N\N⁠, one-one does not imply onto (Example 8).
  4. Using sets of different sizes. A one-one f:{1,2}→{1,2,3}f : \{1, 2\} \to \{1, 2, 3\} is never onto: two images cannot fill three slots. The argument needs domain and codomain of the same finite size.
What to take away
  1. On a finite set XX⁠, for f:X→Xf : X \to X⁠: one-one   ⟺  \iff onto   ⟺  \iff bijective. Proving either property proves both.
  2. The finite case rests on counting: nn different images in an nn-element set must be all of it.
  3. On infinite sets the two properties are independent: Example 8 is one-one but not onto, Example 10 is onto but not one-one.

Every fact used, and where it comes from

FactUsed inSource
One-one: images of distinct elements are distinctStep 1Definition 5, Section 1.3 (Lesson: types of functions)
Statement   ⟺  \iff contrapositiveStep 1Logic
A 3-element subset of a 3-element set is the whole setStep 2Counting elements of finite sets
Onto   ⟺  \iff range = codomainStep 3Definition 6 and the Remark after it, Section 1.3
6 one-one functions on {1,2,3}\{1, 2, 3\}⁠, out of 27Step 4Multiplication principle (Lesson: counting functions and relations)
Finite XX⁠: one-one   ⟺  \iff onto; false for infinite setsStep 4Remark after Example 14, Section 1.3
Found an error, or want more?

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 →