‹ Class 12 · Ch 1
Relations and Functions · Principle 9 of 10

One machine after another

Composition gof: f first, then g.

Stuck? Ask Guru

NCERT: 1.4 Composition of Functions and Invertible Function

Think

Follow the arrows

f sends 2 to 3. Then g sends 3 to 7.

Where does 2 end up after f and then g?

What this lesson covers

The idea

For f : A → B and g : B → C, the composition gof : A → C is given by gof(x) = g(f(x)) for all x ∈ A: apply f first, then g.

Follow the arrows

f sends 2 to 3. Then g sends 3 to 7.

Where does 2 end up after f and then g?

  • At 3
  • At 7
  • At 11

Trace gof

These are the book's f : {2, 3, 4, 5} → {3, 4, 5, 9} and g : {3, 4, 5, 9} → {7, 11, 15}. Tap each element of the first set.

Composition

For f : A → B and g : B → C, the composition gof : A → C is gof(x) = g(f(x)) for all x ∈ A: apply f first, then g.

So gof(2) = g(3) = 7, gof(3) = g(4) = 7, gof(4) = g(5) = 11 and gof(5) = g(5) = 11.

Notes

gof(x) = g(f(x)): f acts first, then g. In general gof ≠ fog.

Check yourself

With these f and g, what is gof(4)?

Answer: 11

f(4) = 5, then g(5) = 11. So gof(4) = 11.

f(x) = cos x and g(x) = 3x² on R. What is gof(x)?

For f(x) = cos x and g(x) = 3x², is gof = fog?

  • 3 cos² x — correct. Yes. gof(x) = g(cos x) = 3(cos x)².
  • cos 3x². That is fog(x) = f(3x²). In gof, f acts first.
  • 3x² cos x. Composition is not a product. Feed cos x into g.
  • Yes. At x = 0: gof(0) = 3 cos² 0 = 3, but fog(0) = cos 0 = 1.
  • No — correct. Right. 3 cos² x and cos 3x² are different; at x = 0 they are 3 and 1.