MCS-212 · Block 2 Unit 1

Sets, Relations and Functions

Section 8 of 9

Block 2 · Unit 1Sets, Relations and Functions11 min · Section 8 of 9

1.8One-one, onto and inverse functions

Covers IGNOU MCS-212 §1.5.1, E26–E28

Some functions lose information (two inputs give the same output), and some miss part of their codomain. Functions that do neither can be “undone”: they have inverses. Encryption and decryption, compression and decompression, and ID numbers all depend on these ideas.

FunctionOne-one?Onto?
f:Z→Zf: \mathbb{Z} \to \mathbb{Z}, f(x)=x+1f(x) = x + 1yesyes (pre-image of yy is y−1y - 1)
f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2x+1f(x) = 2x + 1yesyes (pre-image y−12\frac{y - 1}{2})
f:Z→Zf: \mathbb{Z} \to \mathbb{Z}, f(x)=2xf(x) = 2xyesno (3 has no pre-image)
f:Z→Zf: \mathbb{Z} \to \mathbb{Z}, f(x)=x2f(x) = x^2no (f(−1)=f(1)f(-1) = f(1))no (−1-1, 2 have no pre-image)
f:R→[0,∞)f: \mathbb{R} \to [0, \infty), f(x)=∣x∣f(x) = \lvert x \rvertnoyes

How to prove the properties

  • One-one: assume f(x1)=f(x2)f(x_1) = f(x_2) and show x1=x2x_1 = x_2. To disprove, give x1≠x2x_1 \neq x_2 with f(x1)=f(x2)f(x_1) = f(x_2).
  • Onto: take an arbitrary y∈By \in B and solve f(x)=yf(x) = y for x∈Ax \in A. To disprove, give one yy with no solution in AA.

Permutations and inverses

A bijection from a finite set AA to itself is called a permutation of AA. We write it in two-row form, with each element above its image:

f=(123231)(f(1)=2, f(2)=3, f(3)=1).f = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 3 & 1 \end{pmatrix} \quad (f(1) = 2,\ f(2) = 3,\ f(3) = 1).

For a permutation, swap the two rows and reorder the columns: f−1=(123312)f^{-1} = \begin{pmatrix} 1 & 2 & 3 \\ 3 & 1 & 2 \end{pmatrix}.

Recipe for a formula: (1) write y=f(x)y = f(x); (2) solve for xx in terms of yy; (3) swap the names: f−1(x)=f^{-1}(x) = that expression; (4) check f(f−1(x))=xf(f^{-1}(x)) = x.

Key takeaways

  • One-one: f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2; onto: every yy in the codomain has a pre-image.
  • Bijective = one-one + onto; only bijections have inverses.
  • Find f−1f^{-1} by solving y=f(x)y = f(x) for xx, then check.
  • A permutation is a bijection of a finite set to itself; invert it by swapping the rows.

Practice questions

Answer on paper first, then check. The explanation matters more than the letter you chose.

Question 1 · multiple choice

Which function f:Z→Zf: \mathbb{Z} \to \mathbb{Z} is one-one but NOT onto?

Show answer

Answer: B. f(x)=3xf(x) = 3x

3x1=3x23x_1 = 3x_2 gives x1=x2x_1 = x_2, but 1 is not a multiple of 3. Options 1 and 4 are bijections; option 3 is not one-one.

Question 2 · multiple choice

Why is f(x)=x2f(x) = x^2 on Z\mathbb{Z} not one-one?

Show answer

Answer: C. Because f(−3)=f(3)f(-3) = f(3)

Two different inputs give the same output. Option 2 is true, but it shows that ff is not onto.

Question 3 · multiple choice

What is the inverse of f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2x+3f(x) = 2x + 3?

Show answer

Answer: D. x−32\frac{x - 3}{2}

y=2x+3⇒x=y−32y = 2x + 3 \Rightarrow x = \frac{y - 3}{2}. Option 1 is the reciprocal, not the inverse.

Question 4 · multiple choice

What is the inverse of the permutation (12343142)\begin{pmatrix} 1 & 2 & 3 & 4 \\ 3 & 1 & 4 & 2 \end{pmatrix}?

Show answer

Answer: A. (12342413)\begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 1 & 3 \end{pmatrix}

ff sends 1→31 \to 3, 2→12 \to 1, 3→43 \to 4, 4→24 \to 2, so f−1f^{-1} sends 3→13 \to 1, 1→21 \to 2, 4→34 \to 3, 2→42 \to 4, i.e. 1↦21 \mapsto 2, 2↦42 \mapsto 4, 3↦13 \mapsto 1, 4↦34 \mapsto 3. Option 2 is ff itself.

Question 5 · multiple choice

A function between two finite sets with 5 elements each is one-one. What else must be true?

Show answer

Answer: C. It is onto, hence bijective

Five different outputs inside a 5-element codomain must use every element. Option 4 contradicts one-one, which gives 5 distinct outputs.

Question 6 · short answer

Show that f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=5x−7f(x) = 5x - 7 is a bijection and find f−1f^{-1}.

Show worked answer

One-one: if 5x1−7=5x2−75x_1 - 7 = 5x_2 - 7, then 5x1=5x25x_1 = 5x_2, so x1=x2x_1 = x_2. Onto: for any y∈Ry \in \mathbb{R}, x=y+75x = \frac{y + 7}{5} is real and f(x)=5⋅y+75−7=yf(x) = 5 \cdot \frac{y + 7}{5} - 7 = y. So ff is a bijection, and f−1(x)=x+75f^{-1}(x) = \frac{x + 7}{5}. Check: f−1(f(2))=f−1(3)=105=2f^{-1}(f(2)) = f^{-1}(3) = \frac{10}{5} = 2.

↑ ↓ move↵ openTab switch type