Math Lab
Home/Class XII/Ch 1/Types of functions: one-one, onto, bijective

Types of functions: one-one, onto, bijective

A function f:ABf : A \to B associates to each aAa \in A a unique b=f(a)Bb = f(a) \in B. That definition is silent about whether different inputs may share an output or whether every output of BB is actually hit. Class XII makes these questions central. A function is one-one (injective) if no two inputs collide; it is onto (surjective) if every output is achieved; it is bijective if both. Only bijections admit inverses, so this classification is the gatekeeper for the rest of the chapter.

Definitions

Let f:ABf : A \to B be a function.

  • ff is one-one (injective) if for all x1,x2Ax_1, x_2 \in A, f(x1)=f(x2)    x1=x2.f(x_1) = f(x_2) \implies x_1 = x_2.
  • ff is onto (surjective) if for every yBy \in B there exists xAx \in A with f(x)=yf(x) = y. Equivalently, the range of ff equals BB.
  • ff is bijective (one-one and onto) if both hold.

The contrapositive of injectivity is often more usable: x1x2f(x1)f(x2)x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2).

Tests in practice

Algebraic test for one-one. Set f(x1)=f(x2)f(x_1) = f(x_2) and try to deduce x1=x2x_1 = x_2. If you can, ff is injective. If you find x1x2x_1 \neq x_2 producing the same output, ff is not injective.

Algebraic test for onto. Pick an arbitrary yBy \in B, solve f(x)=yf(x) = y for xx, and check xAx \in A.

Graphical test. A function f:RRf : \mathbb{R} \to \mathbb{R} is injective iff every horizontal line meets the graph in at most one point. It is surjective iff every horizontal line meets the graph in at least one point. It is bijective iff every horizontal line meets the graph exactly once.

Calculus test. A differentiable function with f(x)>0f'(x) > 0 (or <0< 0) everywhere on an interval is one-one on that interval, because it is strictly monotonic. We will exploit this constantly in inverse trigonometric functions and in calculus.

Detailed example

Consider f:RRf : \mathbb{R} \to \mathbb{R}, f(x)=2x+3f(x) = 2x + 3.

One-one? If 2x1+3=2x2+32x_1 + 3 = 2x_2 + 3 then 2x1=2x22x_1 = 2x_2 so x1=x2x_1 = x_2. Yes.

Onto? Take any yRy \in \mathbb{R}, set x=(y3)/2Rx = (y - 3)/2 \in \mathbb{R} and verify f(x)=yf(x) = y. Yes.

Now consider g:RRg : \mathbb{R} \to \mathbb{R}, g(x)=x2g(x) = x^2.

One-one? g(1)=g(1)=1g(1) = g(-1) = 1, so no.

Onto? Take y=1y = -1. There is no real xx with x2=1x^2 = -1. So no.

Restricting codomain and domain can change everything. The map g:[0,)[0,)g : [0, \infty) \to [0, \infty), g(x)=x2g(x) = x^2, is bijective.

A worked theorem

Theorem. A function f:ABf : A \to B between finite sets of the same cardinality is one-one iff it is onto.

Proof. Suppose A=B=n|A| = |B| = n.

(\Rightarrow) If ff is one-one, the image f(A)f(A) contains nn distinct elements. Since f(A)Bf(A) \subseteq B and B=n|B| = n, we must have f(A)=Bf(A) = B. So ff is onto.

(\Leftarrow) If ff is onto, every element of BB has a preimage. If two distinct elements x1,x2x_1, x_2 of AA shared an image, then f(A)f(A) would have at most n1n - 1 elements, contradicting surjectivity. So ff is one-one. \blacksquare

The theorem fails for infinite sets: f:NNf : \mathbb{N} \to \mathbb{N}, f(n)=2nf(n) = 2n is injective but not surjective.

Worked examples

Example 1. Is f:RRf : \mathbb{R} \to \mathbb{R}, f(x)=x3f(x) = x^3, bijective?

One-one: If x13=x23x_1^3 = x_2^3 then x1=x2x_1 = x_2 (cube root is single-valued on R\mathbb{R}). Onto: every real yy has cube root y1/3y^{1/3}. So yes.

Example 2. Is f:NNf : \mathbb{N} \to \mathbb{N}, f(n)=n2+1f(n) = n^2 + 1, one-one? Onto?

One-one: n12+1=n22+1n1=n2n_1^2 + 1 = n_2^2 + 1 \Rightarrow n_1 = n_2 (since N\mathbb{N} is positive). Yes. Onto: f(N)={2,5,10,17,}f(\mathbb{N}) = \{2, 5, 10, 17, \dots\}, missing 1,3,4,6,1, 3, 4, 6, \dots. So no.

Example 3. f:RRf : \mathbb{R} \to \mathbb{R} given by f(x)=x1+xf(x) = \tfrac{x}{1 + |x|}. Show ff is one-one and find its range.

If x0x \ge 0, f(x)=x/(1+x)[0,1)f(x) = x/(1 + x) \in [0, 1). If x<0x < 0, f(x)=x/(1x)(1,0)f(x) = x/(1 - x) \in (-1, 0). Strictly increasing on each piece and continuous, with matching value 00 at x=0x = 0. Range is (1,1)(-1, 1). One-one because strictly increasing.

Example 4. Define f:{1,2,3}{4,5,6}f : \{1, 2, 3\} \to \{4, 5, 6\}, f(1)=4,f(2)=5,f(3)=6f(1) = 4, f(2) = 5, f(3) = 6. Is ff bijective?

Yes , both sets have size 33 and ff is clearly one-one and onto.

Example 5. f:R{2}R{1}f : \mathbb{R} \setminus \{2\} \to \mathbb{R} \setminus \{1\}, f(x)=x1x2f(x) = \tfrac{x - 1}{x - 2}. Show ff is bijective.

One-one: (x11)(x22)=(x21)(x12)(x_1 - 1)(x_2 - 2) = (x_2 - 1)(x_1 - 2) expands to x2=x1-x_2 = -x_1 (algebra). Yes.

Onto: Given y1y \neq 1, solve y=(x1)/(x2)y = (x - 1)/(x - 2). Cross-multiply: y(x2)=x1y(x - 2) = x - 1, so x(y1)=2y1x(y - 1) = 2y - 1, x=(2y1)/(y1)x = (2y - 1)/(y - 1). Defined since y1y \neq 1. So ff is onto.

Example 6. f:RRf : \mathbb{R} \to \mathbb{R}, f(x)=sinxf(x) = \sin x. One-one? Onto?

Not one-one: f(0)=f(π)=0f(0) = f(\pi) = 0. Not onto: range is [1,1][-1, 1], not all of R\mathbb{R}.

Restricting domain to [π/2,π/2][-\pi/2, \pi/2] and codomain to [1,1][-1, 1] makes ff a bijection. This restriction is the foundation of arcsin\arcsin in the next chapter.

Try it yourself

  1. Is f:ZZf : \mathbb{Z} \to \mathbb{Z}, f(n)=n+7f(n) = n + 7, bijective?
  2. Is f:RRf : \mathbb{R} \to \mathbb{R}, f(x)=x2+1f(x) = x^2 + 1, one-one?
  3. Is f:[0,π][1,1]f : [0, \pi] \to [-1, 1], f(x)=cosxf(x) = \cos x, bijective?
  4. Show f:NNf : \mathbb{N} \to \mathbb{N}, f(n)=2n1f(n) = 2n - 1, is one-one but not onto.
  5. Count the one-one functions from {1,2,3}\{1, 2, 3\} to {a,b,c,d}\{a, b, c, d\}.
  6. Count the onto functions from {1,2,3,4}\{1, 2, 3, 4\} to {a,b}\{a, b\}. (Hint: 242=142^4 - 2 = 14.)
  7. Show that f:RRf : \mathbb{R} \to \mathbb{R}, f(x)=ax+bf(x) = ax + b (a0a \neq 0), is bijective.
  8. Is f:RRf : \mathbb{R} \to \mathbb{R} given by f(x)=exf(x) = e^x one-one? Onto?
  9. Find the range of f:RRf : \mathbb{R} \to \mathbb{R}, f(x)=11+x2f(x) = \tfrac{1}{1 + x^2}. Is ff onto?
  10. Show f:ZZf : \mathbb{Z} \to \mathbb{Z}, f(n)=n3f(n) = n^3, is one-one but not onto.
  11. Prove: if f:ABf : A \to B and g:BCg : B \to C are both injective, then gfg \circ f is injective.
  12. Prove: if gfg \circ f is one-one, must ff be one-one? Must gg?
  13. Construct a function NN\mathbb{N} \to \mathbb{N} which is onto but not one-one.
  14. The greatest integer function x:RZ\lfloor x \rfloor : \mathbb{R} \to \mathbb{Z}. Is it one-one? Onto?

Pitfalls / Tricks

  • A function from R\mathbb{R} to R\mathbb{R} that is monotonic on intervals is not necessarily one-one globally; check the entire domain.
  • Surjectivity depends crucially on the codomain. Changing the codomain to the range always makes a function onto.
  • For finite sets of the same size, one-one and onto are equivalent. For infinite sets they are not , every Hilbert hotel argument depends on this gap.
  • The number of one-one functions from A=m|A| = m to B=n|B| = n (mnm \le n) is n!(nm)!\tfrac{n!}{(n - m)!}. The number of onto functions from a set of size mm to a set of size nn (mnm \ge n) is k=0n(1)k(nk)(nk)m\sum_{k = 0}^{n} (-1)^k \binom{n}{k}(n - k)^m , useful in JEE counting problems.

The next subtopic builds on bijections to define composition and inverses.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Types of functions
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6