What this les­son cov­ers

Some func­tions never send two inputs to the same out­put; some reach every ele­ment of the co-domain; the best do both. This les­son defines one-one, many-one, onto and into func­tions, gives work­ing rules and count­ing for­mu­las for each, then uses bijec­tions to define the inverse of a func­tion and lists the prop­er­ties of com­pos­ite func­tions.

One-one func­tion (injec­tion)

A func­tion f:A→Bf : A \to B is one-one (an injec­tion) if dis­tinct ele­ments of AA have dis­tinct images in BB.

Many-one func­tion

A func­tion f:A→Bf : A \to B is many-one if at least two dis­tinct ele­ments of AA have the same image. In other words, a func­tion that is not one-one is many-one.

Count­ing.

  1. For f:A→Bf : A \to B to be one-one we need n(A)≤n(B)n(A) \le n(B).
  2. If n(A)=mn(A) = m and n(B)=nn(B) = n, the num­ber of one-one func­tions from AA to BB is nPm{}^{n}P_{m} if n≥mn \ge m, and 00 if n<mn < m.
  3. If n(A)≤n(B)n(A) \le n(B), the num­ber of many-one func­tions from AA to BB is [n(B)]n(A)−n(B)Pn(A)[n(B)]^{n(A)} - {}^{n(B)}P_{n(A)}.

Work­ing rules for one-one or many-one

  1. Take x1,x2x_1, x_2 in the domain. If x1≠x2⇒f(x1)≠f(x2)x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2) for every such pair, ff is one-one; oth­er­wise it is many-one.
  2. Equiv­a­lently, put f(x1)=f(x2)f(x_1) = f(x_2) and solve. If this forces x1=x2x_1 = x_2, ff is one-one.
  3. If the func­tion is given as ordered pairs, it is one-one when all the sec­ond entries are dif­fer­ent.
  4. Hor­i­zon­tal line test. If every line par­al­lel to the xx-axis meets the graph at most once, ff is one-one; if some such line meets it at two or more points, ff is many-one.
  5. Every even func­tion is many-one (since f(−x)=f(x)f(-x) = f(x)).
  6. A func­tion that is con­tin­u­ous and strictly increas­ing, or strictly decreas­ing, on its whole domain is one-one.
  7. Every peri­odic func­tion is many-one.
  8. f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=ax+bf(x) = ax + b (a≠0a \neq 0) is one-one.
  9. f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=ax2+bx+cf(x) = ax^2 + bx + c (a≠0a \neq 0) is not one-one.

Onto func­tion (sur­jec­tion)

f:A→Bf : A \to B is onto (a sur­jec­tion) if every ele­ment of BB has at least one pre-image in AA. Equiv­a­lently, the range equals the co-domain: f(A)=Bf(A) = B.

Count­ing.

  1. For f:A→Bf : A \to B to be onto we need n(A)≥n(B)n(A) \ge n(B).
  2. If n(A)=n≥2n(A) = n \ge 2 and n(B)=2n(B) = 2, the num­ber of onto func­tions is 2n−22^n - 2.
  3. If n(A)=rn(A) = r and n(B)=n≥2n(B) = n \ge 2, the num­ber of onto func­tions is

nr−nC1(n−1)r+nC2(n−2)r−nC3(n−3)r+⋯+(−1)n−1 nCn−1⋅1r.n^r - {}^{n}C_1 (n-1)^r + {}^{n}C_2 (n-2)^r - {}^{n}C_3 (n-3)^r + \dots + (-1)^{n-1}\,{}^{n}C_{n-1} \cdot 1^r.

  1. If n(A)<n(B)n(A) < n(B), there are no onto func­tions.

Into func­tion

If f:A→Bf : A \to B is not onto, it is called an into func­tion: at least one ele­ment of BB has no pre-image in AA.

Work­ing rules for onto or into

  1. Let y∈By \in B and y=f(x)y = f(x); solve for xx in terms of yy. If for every y∈By \in B there is at least one x∈Ax \in A, ff is onto; oth­er­wise it is into. In short, if the range equals BB, ff is onto.
  2. Hor­i­zon­tal line test. If every hor­i­zon­tal line through a point of the co-domain meets the graph at least once, ff is onto. If some such line misses the graph, ff is into.

Bijec­tion

If f:A→Bf : A \to B is both one-one and onto, it is called a bijec­tion.

  1. If A,BA, B are finite and f:A→Bf : A \to B is a bijec­tion, then n(A)=n(B)n(A) = n(B).
  2. The iden­tity func­tion on any non-empty set is a bijec­tion.
  3. If A,BA, B are finite with n(A)=n(B)n(A) = n(B), the num­ber of bijec­tions from AA to BB is (n(A))!(n(A))!.
  4. A con­stant func­tion is a bijec­tion only if n(A)=n(B)=1n(A) = n(B) = 1.
  5. Hor­i­zon­tal line test. If every hor­i­zon­tal line through a point of the co-domain meets the graph exactly once, ff is a bijec­tion.

Inverse func­tion

If f:A→Bf : A \to B is one-one and onto, we define the inverse func­tion f−1:B→Af^{-1} : B \to A by

y=f(x)  ⟺  f−1(y)=x,∀x∈A, ∀y∈B.y = f(x) \iff f^{-1}(y) = x, \quad \forall x \in A,\ \forall y \in B.

  1. A func­tion is invert­ible exactly when it is a bijec­tion.
  2. If the inverse exists, it is unique.
  3. The graphs of y=f(x)y = f(x) and y=f−1(x)y = f^{-1}(x) are mir­ror images in the line y=xy = x. Where they inter­sect on that line, f(x)=f−1(x)=xf(x) = f^{-1}(x) = x.

Work­ing rule to find the inverse. Let f:X→Yf : X \to Y be a bijec­tion. Put f(x)=yf(x) = y, solve for xx in terms of yy, then inter­change xx and yy.

Prop­er­ties of com­pos­ite func­tions

  1. If f:A→Bf : A \to B and g:B→Cg : B \to C are one-one, then g∘f:A→Cg \circ f : A \to C is one-one.
  2. If ff and gg are onto, then g∘fg \circ f is onto.
  3. If g∘fg \circ f is one-one, then ff is one-one.
  4. If g∘fg \circ f is onto, then gg is onto.
  5. If f:A→Bf : A \to B, then f∘IA=IB∘f=ff \circ I_A = I_B \circ f = f.
  6. If f:A→Bf : A \to B and g:B→Cg : B \to C are bijec­tions, then g∘fg \circ f is a bijec­tion and (g∘f)−1=f−1∘g−1(g \circ f)^{-1} = f^{-1} \circ g^{-1}.
  7. If f:A→Bf : A \to B is a bijec­tion, then f∘f−1=IBf \circ f^{-1} = I_B and f−1∘f=IAf^{-1} \circ f = I_A.
  8. If f:A→Bf : A \to B and g:B→Ag : B \to A sat­isfy g∘f=IAg \circ f = I_A and f∘g=IBf \circ g = I_B, then g=f−1g = f^{-1}.
  9. If f:A→Af : A \to A is a bijec­tion, then f∘f−1=f−1∘f=IAf \circ f^{-1} = f^{-1} \circ f = I_A.
  10. In gen­eral f∘g≠g∘ff \circ g \neq g \circ f.
  11. Com­po­si­tion is asso­cia­tive: if f:A→Bf : A \to B, g:B→Cg : B \to C and h:C→Dh : C \to D, then h∘(g∘f)=(h∘g)∘fh \circ (g \circ f) = (h \circ g) \circ f.

Exam­ple 1

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

One-one: 3x1−5=3x2−5⇒x1=x23x_1 - 5 = 3x_2 - 5 \Rightarrow x_1 = x_2. Onto: for any y∈Ry \in \mathbb{R}, x=y+53∈R\displaystyle x = \frac{y + 5}{3} \in \mathbb{R} gives f(x)=yf(x) = y. Hence ff is a bijec­tion, and f−1(x)=x+53\displaystyle f^{-1}(x) = \dfrac{x + 5}{3}.

Exam­ple 2

How many onto func­tions are there from a set of 4 ele­ments to a set of 3 ele­ments?

34−3C1 24+3C2 14=81−48+3=36.3^4 - {}^{3}C_1\, 2^4 + {}^{3}C_2\, 1^4 = 81 - 48 + 3 = 36.

Prac­tice

  1. How many one-one func­tions are there from a set of 3 ele­ments to a set of 5 ele­ments?
  2. How many many-one func­tions are there from a set of 3 ele­ments to a set of 5 ele­ments?
  3. How many onto func­tions are there from a set of 5 ele­ments to {0,1}\{0, 1\}?
  4. How many bijec­tions are there from {a,b,c,d}\{a, b, c, d\} to {1,2,3,4}\{1, 2, 3, 4\}?
  5. Is f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2+1f(x) = x^2 + 1 one-one? Is it onto?
  6. Find the inverse of f(x)=2x+13\displaystyle f(x) = \dfrac{2x + 1}{3}.
  7. If f(x)=x+1f(x) = x + 1 and g(x)=2xg(x) = 2x, find (g∘f)−1(x)(g \circ f)^{-1}(x) and check it equals (f−1∘g−1)(x)(f^{-1} \circ g^{-1})(x).

Answers

Show answers
  1. 5P3=60{}^{5}P_{3} = 60.
  2. 53−60=655^3 - 60 = 65.
  3. 25−2=302^5 - 2 = 30.
  4. 4!=244! = 24.
  5. Nei­ther: f(1)=f(−1)f(1) = f(-1), and 00 has no pre-image since the range is [1,∞)[1, \infty).
  6. y=2x+13⇒x=3y−12\displaystyle y = \frac{2x+1}{3} \Rightarrow x = \frac{3y - 1}{2}, so f−1(x)=3x−12\displaystyle f^{-1}(x) = \dfrac{3x - 1}{2}.
  7. (g∘f)(x)=2x+2(g \circ f)(x) = 2x + 2, whose inverse is x−22\displaystyle \frac{x - 2}{2}; also f−1(g−1(x))=x2−1=x−22\displaystyle f^{-1}(g^{-1}(x)) = \frac{x}{2} - 1 = \frac{x - 2}{2}.