Composition of Functions
Open the lesson
Composition of functions for JEE: what g∘f means and why f acts first, why fog and gof are usually different, the domain of a composite and the trap of simplifying first, the rules (associative, identity, one-one and onto), and two solved problems, including f composed 2025 times.
Chapters
Transcript
0:00Introduction
Hello everyone! Let's play one small game before we start. Take the number one. First square it, then double it and add one. One squared is one, double it, plus one: three. Now the same two steps, in the other order. Double and add one: three. Then square it: nine. Same steps, same number, different answers! But why? Today we learn composition of functions, putting one function after another, and why the order matters so much. And look, in JEE, composition is everywhere: domain questions, one-one and onto, inverse functions. So, let's begin.
0:42First f, then g
So, let's set it up. f is a function from set A to set B, and g is a function from set B to set C, the three ovals on screen, okay? Pick any x in set A, and follow the blue arrow: f sends it to f of x, which sits in B, right? Now, f of x is in B, and B is exactly where g starts. So g acts on it, along the orange arrow, and we land on g of f of x, in set C, okay? This new function goes straight from A to C, and we call it the composite, g circle f, with the small circle on screen. Many of you read it as g o f. g circle f, of x, equals g of f of x. Now tell me. In g circle f, which function acts first? g is written first, so g acts first, right? No, no, careful! This is the first trap of today. Look at g of f of x. Which function sits right next to x? f! So f acts first, and then g acts on its output. Read it from the right: the function closest to x works first, just like the long green arrow in the figure. Got it?
1:50When is g∘f defined?
Alright, now a deeper question. When does g of f of x actually make sense? First, x must be in the domain of f, otherwise f of x does not exist. Second, f of x must land inside the domain of g, otherwise g cannot act on it, right? So, the domain of g circle f is the set of all x in the domain of f, such that f of x is in the domain of g, okay? Both conditions, together. Write this down. Now let's test it. Take f of x equals root x, and g of x equals one minus x squared. So g of f of x is one minus root x, whole squared. Root x, squared, is just x, so this is one minus x. Beautiful. And one minus x works for every real x, so the domain is all real numbers, right? Hmm, wait. No! Before g can act, f must act first, and root x exists only when x is greater than or equal to zero. So the domain is x greater than or equal to zero only, not all of R, the double-struck R on screen, which means all real numbers. See, simplifying hid the domain. In JEE, always find the domain first, and simplify after.
3:08Rules of composition
Alright, now the rules of composition. Rule one, and you already saw it in our game: composition is not commutative. Usually, g circle f is not equal to f circle g. Order matters, okay? Rule two: composition is associative. h circle, bracket g circle f, equals bracket h circle g, circle f. Both mean first f, then g, then h. So in a long chain, the brackets do not matter, clear? Rule three: the identity function, capital I, sends every x to itself, so it changes nothing, right? So f circle I, and I circle f, are both just f. We will need this soon. Rule four. The double arrow on screen means implies, okay? If f and g are both one-one, then g circle f is one-one. If both are onto, then g circle f is onto. So bijections compose to bijections. Makes complete sense, doesn't it? Now the reverse direction, and this is where JEE sets traps. Suppose g circle f is one-one. Which one must be one-one, f or g? f, of course! If f sent two different inputs to the same point, g would carry them to the same final point, and g circle f would not be one-one. And if g circle f is onto, then g must be onto, because every final output comes out of g, right? But the converses fail, so never reverse these arrows in the exam, okay?
4:37Example 1: fog and gof for x squared and 2x + 1
Now, remember our game from the start? f of x equals x squared, and g of x equals two x plus one, on all real numbers. Find f circle g, and g circle f. Are they equal? Pause the video, and try it first. Done? Okay, let's check. f circle g first. Which function acts first? g, the one next to x! So g gives two x plus one, and then f squares it. Two x plus one, whole squared, is four x squared, plus four x, plus one. Now g circle f. This time f acts first and gives x squared; then g doubles it and adds one. So, two x squared plus one. Clear? Are they equal? No! Put x equals one: the first gives nine, the second gives three. See, exactly the nine and three from our game. Mystery solved: square first, then double and add one, is g circle f; the other order is f circle g. Different order, different function.
5:42Example 2: f composed with itself 2025 times
Now a harder one, JEE level. f of x equals x minus one, over x plus one. Find f circle f, then f composed four times, and hence f composed two thousand and twenty five times. Don't worry. Pause the video and try. Hint: find f circle f first. Done? Okay, let's check. f of f of x means: put x minus one over x plus one in place of x. So on top, that fraction minus one; at the bottom, that fraction plus one. Multiply top and bottom by x plus one. On top, x minus one, minus the bracket x plus one: minus two. At the bottom, x minus one, plus x plus one: two x. So f of f of x is just minus one over x. Really neat, right? Now, four times. Composition is associative, so f four times is f circle f, done twice, okay? And f circle f sends x to minus one over x. So what do you get if you apply this rule twice? That's right! Minus one over x goes to minus one, over minus one over x, which is x itself. Small note: the little two and four on top of f count compositions, not powers, okay? So f composed four times gives back x: it is the identity function. Remember rule three? Composing with the identity changes nothing. Now the topper's trick. Never compose two thousand times; find when the chain comes back to x. Here, every four steps. Two thousand and twenty five is four times five hundred and six, plus one. So the first two thousand and twenty four steps give the identity, and one f is left over. So f composed two thousand and twenty five times is just f itself: x minus one, over x plus one. Huge number, two line answer. Got it?
7:44Quick revision: order, domain and cycles in composition
So, quick revision. g circle f means first f, then g, and usually the order changes the answer. For the domain, x must be in the domain of f, and f of x in the domain of g; find it before you simplify. Composition is associative, with the identity I doing nothing; and for long chains, look for the cycle back to x. That's it, that's composition. Now go and try the practice problems on this page. You can do it. All the best!
More videos in Unit 1 · Sets, Relations & Functions
- What is a Set?
- Representation of Sets
- Types of Sets
- Subsets, Intervals and Power Set
- Universal Set and Venn Diagrams
- Operations on Sets
- Laws of the Algebra of Sets
- Counting: Number of Elements in Unions
- Ordered Pairs and Cartesian Product
- Chapter Summary: Mixed Solved Problems on Sets
- What is a Relation?
- Inverse of a Relation
- Types of Relations
- Equivalence Relations
- Equivalence Classes and Partitions
- Composition of Relations and Partial Orders
- Chapter Summary: Mixed Solved Problems on Relations
- What is a Function?
- Domain of Real Functions
- Finding the Range
- Standard Real Functions and Their Graphs
- Algebra of Real Functions
- One-one and Many-one Functions
- Onto and Into Functions; Bijections
- Counting Special Functions
- Inverse of a Function
- Even and Odd Functions
- Simple Functional Equations
- Overview
- Part A: Sets
- Part B: Relations
- Part C: Functions
- Part D: Assertion–Reason and Concept Checks