Composition of Functions MCQs: 10 Solved Questions with Explanations

Solve 10 composition of functions MCQs step by step. Learn the right-to-left order, domain checks, associativity, and injective and onto implications.

KnowledgeGate Team

Exam prep & CS education

Updated 3 Aug 20267 min read

Composition questions rarely fail because of arithmetic. They go wrong when you reverse the order, ignore whether the inner output fits the outer domain, or overgeneralise a one-to-one or onto property.

Write the inside function first, simplify fully, and only then compare with the options. All ten questions here sit in the Composition of Functions practice set, which holds more than 15 questions on the topic, and Discrete Mathematics MCQs covers the neighbouring chapters.

Two habits decide most of these attempts. Where a stem restricts the domain, carry the restriction into the final answer, because a factor you cancel still bans the value that made it zero. And when an option claims a property always transfers, reach for a two-element counterexample before you accept it.

1. Composition order: the inner function acts first

If f: A -> B and g: B -> C, then (g o f)(x) = g(f(x)). The right-hand function acts first, and g must accept every output of f.

For f(x)=2x+3, g(x)=x^2, and x=4, calculate f(4)=11, then g(11)=121, so (g o f)(4)=121. Reversing the order gives g(4)=16, then f(16)=35, so (f o g)(4)=35. Since 121 != 35, composition need not commute.

Composition is associative. Injective after injective stays injective; onto after onto stays onto. If g o f is onto, g must be onto, but f need not be. If g o f is injective, f must be injective, but g need not be one-to-one outside the image of f. Review Set Theory and Relations for GATE for the terminology.

Flow diagram carrying x = 4 through f(x) = 2x + 3 to 11 and then g(x) = x squared to 121, with the reversed order giving 16 and then 35, so composition need not commute.

2. Questions 1-2: definition and a direct numerical composition

Question 1. Identify what composition means

What is the composition of functions?

  • A. A function that applies one function after the other

  • B. A function that applies two functions at the same time

  • C. A function that reverses the application of another function

  • D. A function that undoes the application of another function

Answer: A. Composition feeds the output of one function into the next, so the applications are sequential. For example, if f(3)=7 and g(7)=49, then (g o f)(3)=49. Option B wrongly suggests simultaneous action. Options C and D describe ideas associated with an inverse function, not composition.

Question 2. Apply the inside function first

If f:Z->Z is defined as f(n)=11n and g:Z->Z is defined as g(n)=nmod7, then (gof)(4) is,

  • A. 4

  • B. 7

  • C. 44

  • D. 2

Answer: D. 2. Apply the right-hand function first: f(4)=11x4=44, then g(44)=44 mod 7=2. The traps are stopping at 44, reversing the order, or treating 7 as the remainder.

3. Questions 3-4: composition order and non-commutativity

Question 3. Compare both orders for a square and a shift

Let two functions f: R->R, g: R->R are defined as

f(a) = a^2

g(a) = a+1

then choose the correct option.

  • A. Composition of f(a), g(a) is commutative

  • B. Composition of f(a), g(a) is not commutative

  • C. Composition of f(a), g(a) is commutative and equivalent to f(a^2 + 1)

  • D. Composition of f(a), g(a) is commutative and equivalent to (a^2 + 1)

Answer: B. (f o g)(a)=f(a+1)=(a+1)^2=a^2+2a+1, while (g o f)(a)=g(a^2)=a^2+1. At a=2, the values are 9 and 5, so the functions do not commute. One unequal input disproves the general claim.

Question 4. Keep the ordered pair of affine compositions straight

UGC NET 2013, Computer Science, Paper 2 (December).

Let f and g be the functions from the set of integers to the set integers defined by

f(x) = 2x + 3 and g(x) = 3x + 2

Then the composition of f and g and g and f is given as

  • A. 6x + 7, 6x + 11

  • B. 6x + 11, 6x + 7

  • C. 5x + 5, 5x + 5

  • D. None of the above

Answer: A. f(g(x))=2(3x+2)+3=6x+7; then g(f(x))=3(2x+3)+2=6x+11. At x=1, the outputs are 13 and 17. Option B reverses them. See the solved page.

4. Questions 5-6: rational and three-function compositions

Question 5. Simplify both rational compositions before dividing

GATE 2015, Computer Science, Set 1.

If g(x) = 1 - x and h(x) = x/(x - 1), then g(h(x))/h(g(x)) is:

  • A. h(x)/g(x)

  • B. -1/x

  • C. g(x)/h(x)

  • D. x/(1 - x)²

Answer: A. g(h(x))=1-[x/(x-1)]=-1/(x-1) and h(g(x))=(1-x)/((1-x)-1)=(x-1)/x, so their ratio is -x/(x-1)^2. Also, h(x)/g(x)=x/[(x-1)(1-x)]=-x/(x-1)^2, matching A. Retain x!=0,1. See the solved page.

Question 6. Build a three-function composition from the inside out

UGC NET 2017, Computer Science, Paper 2 (January).

The functions mapping R into R are defined as :

f(x) = x³ - 4x, g(x) = 1/(x² + 1), h(x) = x⁴

Then find the value of the following composite functions :

(h ∘ g)(x) and (h ∘ g ∘ f)(x)

  • A. (x² + 1)⁴ and [(x³ - 4x)² + 1]⁴

  • B. (x² + 1)⁴ and [(x³ - 4x)² + 1]⁻⁴

  • C. (x² + 1)⁻⁴ and [(x² - 4x)² + 1]⁴

  • D. (x² + 1)⁻⁴ and [(x³ - 4x)² + 1]⁻⁴

Answer: D. h(g(x))=[1/(x^2+1)]^4=(x^2+1)^(-4). Set u=f(x)=x^3-4x; then g(u)=1/(u^2+1) and h(g(u))=(u^2+1)^(-4). Substitution gives [(x^3-4x)^2+1]^(-4). Option C writes x^2 for x^3 inside the bracket and leaves the outer exponent at +4 instead of -4. See the solved page.

5. Questions 7-8: associativity, domain, and range

Question 7. Verify associativity with actual formulas

UGC NET 2014, Computer Science, Paper 2 (December).

If we define the functions f, g and h that map R into R by :

f(x) = x⁴, g(x) = √(x² + 1), h(x) = x² + 72, then the value of the composite functions ho(gof) and (hog)of are given as

  • A. x⁸ - 71 and x⁸ - 71

  • B. x⁸ - 73 and x⁸ - 73

  • C. x⁸ + 71 and x⁸ + 71

  • D. x⁸ + 73 and x⁸ + 73

Answer: D. g(f(x))=sqrt(x^8+1), so h(g(f(x)))=x^8+1+72=x^8+73. Also, h(g(t))=(sqrt(t^2+1))^2+72=t^2+73; putting t=x^4 gives x^8+73. This verifies associativity, not commutativity. See the solved page.

Question 8. Track the composite function before its range

Let f(x) = 2x and g(x) = sin x. The domain and range of the composite function gof are:

  • A. Domain is all real x and range is -1 <= y <= 1

  • B. Domain is all real x and range is -2 <= y <= 2

  • C. Domain is -1 <= x <= 1 and range is -1 <= y <= 1

  • D. Domain is all positive real values and range is -1/2 <= y <= 1/2

Answer: A. (g o f)(x)=sin(2x). Both functions accept the needed real inputs, so the domain is all real numbers. The factor 2 changes frequency, not amplitude, so the range remains [-1,1]. At x=pi/4, the value is 1.

6. Questions 9-10: onto and one-to-one implications

Question 9. Infer what must be onto

If gof is onto then,

  • A. f and g must be onto

  • B. f must be and g maybe onto

  • C. f may be and g must be onto

  • D. Neither is onto

Answer: C. Every final value has the form g(f(a)), so g must be onto. But take A={1,2}, B={a,b,c}, C={X,Y}, with f(1)=a, f(2)=b, g(a)=X, g(b)=Y, and g(c)=Y. The composite reaches X and Y although f misses c.

Question 10. Find the false injectivity claim

Let g be a function from B to C and f be a function from A to B, then which property of function composition is INCORRECT?

  • A. If f and gof are onto, then g is also onto.

  • B. If f and gof both are one to one function, then g is also one to one.

  • C. If f and g both are onto function, then gof is also onto.

  • D. If f and g both are one to one function, then gof is also one to one.

Answer: B. Take A={1}, B={1,2}, C={a}; let f(1)=1, g(1)=a, and g(2)=a. Both f and g o f are one-to-one on A, but g is not. A holds because onto g o f makes g onto. C holds because onto f reaches B and onto g reaches C. D holds because g(f(x))=g(f(y)) forces f(x)=f(y) through injective g, and that forces x=y through injective f.

Two set-mapping panels: in the first the composite reaches both X and Y although f misses element c, in the second the composite stays one-to-one although g sends both 1 and 2 to a.

7. The short version and the next practice step

Answer key: 1-A, 2-D, 3-B, 4-A, 5-A, 6-D, 7-D, 8-A, 9-C, 10-B.

Mistake

What went wrong

Repair

Reversed g o f

Applied g first

Write g(f(x)); use f(4)=44, then 44 mod 7=2

Stopped after the inner function

Accepted 44 as final

Feed 44 into g; answer 2

Assumed composition commutes

Expected both orders to match

Question 3 gives 9 versus 5 at a=2

Ignored domain restrictions

Cancelled without checking existence

Retain x!=0,1 in Question 5

Extended a property beyond the inner image

Judged all of g from f's image

Question 10 has g(1)=g(2)=a, but f reaches only 1

For a 15-minute redo, answer all 10 in 7 minutes, rewrite every miss as nested parentheses in 5, and prove or disprove one property with a finite-set mapping in 3. Retest only the misses the next day.

Evaluate right to left, check domains, retain restrictions, and test strong one-to-one or onto claims with a counterexample. Continue with Set Theory and Relations MCQs. Work through the Discrete Mathematics module for structured revision and GATE Guidance by Sanchit Sir for broader preparation.