• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Discrete Mathematics

Let f : B -> C and g : A -> B be two functions and let h = f o g. Given that h is an onto function, which one of the following is TRUE? A. f and g should both be onto functions B. f should be onto but g need not be onto C. g should be onto but f need not be onto D. both f and g need not be onto

GATE 2005 · Discrete Mathematics · Functions · medium

Answer: f must be onto while g need not be onto, so the answer is Option B.

  1. Onto composition forces f onto: Every output of h equals f(g(a)), which is a value of f, so range(h) subseteq range(f). Since h is onto, range(h) = C, giving C subseteq range(f) subseteq C, i.e. range(f) = C. Therefore f must be onto.
  2. Show g need not be onto: Take A = {1}, B = {p, q}, C = {x}. Let g(1) = p (so g misses q, g is NOT onto) and f(p) = f(q) = x (f is onto C). Then h(1) = f(g(1)) = f(p) = x, so h is onto C. Here h is onto and f is onto, yet g is not onto. Hence onto-ness of g is not required.