Let A→B and B→C denote two functions. If the function

Let f: A→B and g: B→C denote two functions. If the function gof: A→C is a surjective then

  1. A.

    g is into but f is onto

  2. B.

    Both must be into

  3. C.

    g is onto but f need not to be onto

  4. D.

    f is onto but g need not to be onto

Attempted by 69 students.

Show answer & explanation

Correct answer: C

Key fact: If g∘f is surjective, then g must be surjective.

Reason: For any element c in C, since g∘f is surjective there exists an a in A with g(f(a)) = c. Let b = f(a) in B. Then g(b) = c, so every element of C has a preimage in B. Hence g is surjective.

About f: f need not be surjective. A counterexample makes this clear.

  • Take A = {1}, B = {1,2}, C = {x}.

  • Define f by f(1) = 1 (so f is not onto B because 2 has no preimage). Define g by g(1) = x and g(2) = x (so g is onto C).

  • Then for the only a = 1 we have g(f(1)) = g(1) = x, so g∘f is onto C even though f is not onto B.

Conclusion: The correct statement is that the second function is onto, but the first function need not be onto.

Explore the full course: Dsssb Tgt Computer Science Paper 2