Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2005 | Question 43

  • Last Updated : 28 Jun, 2021

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


Answer: (B)

Explanation: A function f: X → Y is called on-to function if for every value in set Y, there is a value in set X.

Given that, f: B → C and g: A → B and h = f o g.  

Note that the sign o represents composition. 

h is basically f(g(x)). So h is a function from set A
to set C.

It is also given that h is an onto function which means
for every value in C there is a value in A. 

We map from C to A using B. So for every value in C, there must be a value in B. It means f must be onto.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

But g may or may not be onto as there may be some values in B which don’t map to A.



Example :

Let us consider following sets
A : {a1, a2, a3}
B : {b1, b2}
C : {c1}

And following function values
f(b1) = c1
g(a1) = b1, g(a2) = b1, g(a3) = b1

Values of h() would be,
h(a1) = c1, h(a2) = c1, h(a3) = c1

Here h is onto, therefore f is onto, but g is 
onto as b2 is not mapped to any value in A.

Given that, f: B → C and g: A → B and h = f o g.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :