C
CraftExam
medium difficulty9 min

Composition of Functions and Compatibility Conditions

For functions f: A to B and g: B to C, the composition g∘f is defined by (g∘f)(x) = g(f(x)) for x in A. The output of f must be suitable as an input for g.

In one line: In g∘f, the function nearest x works first.

Practice This Concept

Understand it

  • Composition means applying one function after another in the correct order.
  • In g∘f, f acts first and g acts second.
  • The order matters; in general, g∘f and f∘g are not the same.
  • Composition is associative when the functions are compatible, but it is not generally commutative.

Example

If f(x) = x + 2 and g(x) = x2, then (g∘f)(x) = g(x + 2) = (x + 2)2, while (f∘g)(x) = f(x2) = x2 + 2. These are not equal in general.

Formula and rule

Composition rule: (g∘f)(x) = g(f(x)).

Compatibility condition: if f: A to B and g: B to C, then g∘f: A to C.

Associativity: h∘(g∘f) = (h∘g)∘f when all compositions are defined.

In general, g∘f is not equal to f∘g.

See it worked out

Follow the example line by line, then use the same method on new questions.

Worked example

Let f: R to R be f(x) = 3x + 1 and g: R to R be g(x) = x2 - 2.

  1. 1Then (g∘f)(x) = g(f(x)) = g(3x + 1) = (3x + 1)2 - 2 = 9x2 + 6x + 1 - 2 = 9x2 + 6x - 1.
  2. 2Also (f∘g)(x) = f(x2 - 2) = 3(x2 - 2) + 1 = 3x2 - 5.
  3. 3Therefore the two compositions are different.

Method you can reuse

  1. 1Identify which composition is asked.
  2. 2Start with the inner function on the right.
  3. 3Substitute the full expression into the outer function.
  4. 4Simplify carefully.
  5. 5Check domain and codomain compatibility if functions are defined between sets rather than only by formulas.

Check yourself

Answer the question in your head before opening the answer.

Try it yourself

If f(x) = 2x - 1 and g(x) = x2 + 3, find (g∘f)(x).

Think first, then show answer
(g∘f)(x) = g(2x - 1) = (2x - 1)2 + 3 = 4x2 - 4x + 4.

Common wrong answer

Writing (g∘f)(x) = f(g(x)) because the symbols are read left to right instead of applying the rightmost function first.

Don't mix this up

Students often reverse the order and compute f(g(x)) when the question asks for g(f(x)).

Exam tip

Read g∘f from right to left for calculation: first f, then g. Also check whether the range of the first function fits the domain of the second.

Write it in the exam

Each point is worth about one mark. Write point 1 for a 1-mark question and keep adding points as the marks go up.

How CBSE asks it

Exam questions ask students to compute g∘f and f∘g, find a missing function from a composition, or verify associativity for given functions.
  1. 1

    Enough for 1 mark

    For functions f: A to B and g: B to C, the composition g∘f is defined by (g∘f)(x) = g(f(x)) for x in A. The output of f must be suitable as an input for g.

  2. 2

    Add for 2 marks

    Example: If f(x) = x + 2 and g(x) = x2, then (g∘f)(x) = g(x + 2) = (x + 2)2, while (f∘g)(x) = f(x2) = x2 + 2. These are not equal in general.

  3. 3

    Add for 3 marks

    Composition means applying one function after another in the correct order.

MCQ Quiz

Practice this concept with focused MCQs

Open the concept quiz intro first, review the test details, and then start a focused MCQ set from this concept only. Instant score and answer review are live now.

10 MCQs5 MinutesInstant Results
Practice This Concept

Help improve this page

Found something confusing, incorrect, or missing?