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

Exercise 1.2 · Q6: A function from {1, 2, 3} to {4, 5, 6, 7}

Exercise 1.2Types of functions · Exercise 1.2
The question

Let A={1,2,3}A = \{1, 2, 3\}⁠, B={4,5,6,7}B = \{4, 5, 6, 7\} and let f={(1,4),(2,5),(3,6)}f = \{(1, 4), (2, 5), (3, 6)\} be a function from AA to BB⁠. Show that ff is one-one.

Exam answer

f(1)=4f(1) = 4⁠, f(2)=5f(2) = 5⁠, f(3)=6f(3) = 6⁠.

The distinct elements 1, 2, 3 have distinct images: 4≠54 \ne 5⁠, 4≠64 \ne 6⁠, 5≠65 \ne 6⁠. So f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2⁠.

Hence ff is one-one.

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

The one idea this problem is built on

Here the function is given as a list of ordered pairs: (1,4)(1,4) means f(1)=4f(1) = 4⁠, and so on. On a finite set, "one-one" can be checked completely by inspection: the domain has only three elements, so there are only three pairs of different inputs, and we can look at every one. The three images 4,5,64, 5, 6 are all different, so no two inputs share an output, and ff is one-one.

Given, to show, and the plan
Given
A={1,2,3}A = \{1,2,3\}⁠, B={4,5,6,7}B = \{4,5,6,7\}⁠, and f={(1,4),(2,5),(3,6)}f = \{(1,4),(2,5),(3,6)\}⁠.
To show
ff is one-one: distinct elements of AA have distinct images.
Plan
(1) Read off f(1),f(2),f(3)f(1), f(2), f(3) and confirm ff is a function from AA to BB⁠. (2) List every pair of distinct inputs and compare their images. (3) Conclude. (4) As a side remark, see why ff is not onto, and why that does not matter here.

Basics you need

1A function as a set of ordered pairs

A function ff from AA to BB can be written as a set of pairs (a,b)(a, b) with a∈Aa\in A⁠, b∈Bb\in B⁠. The pair (a,b)(a,b) means f(a)=bf(a) = b⁠. For this to be a function, every element of AA must appear as a first entry exactly once. Basics: what a function is

2Ordered pairs and A×BA\times B

A×BA\times B is the set of all ordered pairs (a,b)(a,b) with a∈Aa\in A and b∈Bb\in B⁠. A function from AA to BB is a particular subset of A×BA\times B⁠. Basics: sets, ordered pairs and A × B

3One-one (injective)

ff is one-one if the images of distinct elements are distinct: x1≠x2⇒f(x1)≠f(x2)x_1 \ne x_2 \Rightarrow f(x_1) \ne f(x_2)⁠, or equivalently f(x1)=f(x2)⇒x1=x2f(x_1)=f(x_2) \Rightarrow x_1=x_2 (Definition 5). Basics: one-one and onto

4Counting pairs

From 3 elements, the number of ways to choose 2 different ones (order not mattering) is (32)=3\binom{3}{2} = 3⁠. So there are exactly three pairs of distinct inputs to check. Basics: counting choices

Solution

  1. Read off the function and check it is a function from AA to BB

    Each ordered pair (a,b)(a, b) in ff says f(a)=bf(a) = b⁠:

    f(1)=4,f(2)=5,f(3)=6.f(1) = 4, \qquad f(2) = 5, \qquad f(3) = 6.

    Each element of A={1,2,3}A = \{1,2,3\} appears as a first entry exactly once, and every second entry 4,5,64, 5, 6 belongs to B={4,5,6,7}B = \{4,5,6,7\}⁠. So ff really is a function from AA to BB⁠, as the question says.

    Before testing a property of a function, make sure you are reading it correctly. The first entry of each pair is the input and the second is the output. Checking that every input occurs exactly once confirms that ff gives each element of AA one and only one image; checking that the outputs lie in BB confirms that BB is a legitimate codomain.
    A function is a set of ordered pairs in which each element of the domain is a first entry exactly once (Basic 1). Basics: what a function is
  2. Compare the images of every pair of distinct inputs

    There are only three pairs of different inputs (Basic 4). We check all of them:

    Inputs x1≠x2x_1 \ne x_2ImagesDifferent?
    1, 21,\ 2f(1)=4, f(2)=5f(1) = 4,\ f(2) = 54≠54 \ne 5 ✓
    1, 31,\ 3f(1)=4, f(3)=6f(1) = 4,\ f(3) = 64≠64 \ne 6 ✓
    2, 32,\ 3f(2)=5, f(3)=6f(2) = 5,\ f(3) = 65≠65 \ne 6 ✓

    In every case, distinct inputs have distinct images.

    A B f 1 2 3 4 5 6 7 no arrow arrives at 7 4, 5, 6 get one arrow each
    The arrow diagram of ff⁠. Each element of BB receives at most one arrow, which is exactly what one-one means. The element 7 receives none, so ff is not onto, but the question does not ask about onto.
    Definition 5 is a "for all" statement: every pair of distinct inputs must have distinct images. On an infinite domain we would need an algebraic argument. Here the domain is finite and tiny, so we can do something even more convincing: check every single pair. Because the list of pairs is complete, the check is a full proof, not just evidence.
    One-one: distinct elements of the domain have distinct images (Definition 5). Checking all cases of a finite list proves a "for all" statement about that list. Basics: proving and disproving
  3. Conclude

    The three images 4,5,64, 5, 6 are pairwise different, so no two elements of AA share an image. Hence ff is one-one.

    A quick way to say the same thing: AA has 3 elements, and the set of images {4,5,6}\{4, 5, 6\} also has 3 elements. If two inputs had shared an image, there would be fewer than 3 distinct images.

    The counting argument is a useful shortcut for finite sets: a function on a finite set is one-one exactly when the number of distinct images equals the number of elements in the domain. Both arguments say the same thing; the table makes every comparison visible.
  4. A side remark: ff is not onto, and that is fine

    The element 7∈B7\in B is not a second entry of any pair in ff⁠, so no element of AA maps to 7. So ff is not onto, and therefore not bijective. The question only asks us to show one-one, and that is what we have proved.

    In fact no function from AA to BB can be onto: three inputs can produce at most three distinct images, but BB has four elements.

    This remark guards against a common confusion. "One-one" is about inputs not colliding; "onto" is about outputs not being missed. They are independent properties, and here one holds while the other fails. The textbook's Examples 13 and 14 show that for a function from a finite set to itself the two come together, but AA and BB here are different sets of different sizes, so that result does not apply.
    Onto: every element of the codomain is the image of some element of the domain (Definition 6). Basics: one-one and onto
Result

f(1)=4f(1) = 4⁠, f(2)=5f(2) = 5⁠, f(3)=6f(3) = 6⁠. All three pairs of distinct inputs have distinct images (4≠54\ne5⁠, 4≠64\ne6⁠, 5≠65\ne6⁠), so ff is one-one, as required. (It is not onto, since 7∈B7\in B has no preimage, but the question does not ask about that.)

Check it with numbers

Count: the domain {1,2,3}\{1,2,3\} has 3 elements and the set of images {4,5,6}\{4,5,6\} also has 3 elements, so no image is repeated ✓. For contrast, the set g={(1,4),(2,4),(3,6)}g = \{(1,4),(2,4),(3,6)\} is also a function from AA to BB⁠, but it has only 2 distinct images, because g(1)=g(2)=4g(1) = g(2) = 4⁠; it is not one-one.

Common mistakes
  1. Reading the pairs backwards. In (1,4)(1,4) the input is 1 and the output is 4, not the other way round.
  2. Thinking an unused element of BB spoils one-one. The element 7 having no arrow affects onto, not one-one.
  3. Checking only one pair of inputs. One-one is about every pair. On a finite set, check them all (here, three).
  4. Calling ff bijective. It is one-one but not onto, so it is not bijective.
What to take away
  1. For a function given as ordered pairs, one-one means no second entry is repeated.
  2. On a finite domain, a "for all" property can be proved by checking every case.
  3. One-one and onto are separate questions; a function from a 3-element set to a 4-element set can be one-one but can never be onto.

Every fact used, and where it comes from

FactUsed inSource
A function as a set of ordered pairs, each domain element a first entry onceStep 1Class XI; recalled at the start of Sections 1.1 and 1.3
f(1)=4f(1) = 4⁠, f(2)=5f(2) = 5⁠, f(3)=6f(3) = 6Steps 1, 2Read off from the given pairs
Definition of one-oneSteps 2, 3Definition 5, Section 1.3 (Lesson: types of functions)
Definition of ontoStep 4Definition 6, Section 1.3
(32)=3\binom{3}{2} = 3 pairs of distinct inputsStep 2Counting choices
Finite set to itself: one-one ⇔ onto (not applicable here)Step 4 remarkExamples 13, 14 and the Remark after them
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 →