This lesson explains composition and inverse functions with clear formulas, worked examples, and common traps. You will learn to evaluate f(g(x)), find inverses, verify them, and apply shortcuts safely.
Composition and inverse functions are two fundamental operations on functions. Composition combines two functions by feeding the output of one into another: (f∘g)(x)=f(g(x)). The inverse function reverses a one-to-one function: if f(a)=b, then f⁻¹(b)=a. Mastery requires careful attention to domains, ranges, and order of operations. This lesson builds from definitions to worked examples, shortcuts, and common mistakes, with structured visuals to reinforce learning.
| Aspect | Composition (f∘g) | Inverse f⁻¹ |
|---|---|---|
| Definition | f(g(x)) | Reverses f: f(a)=b ⇒ f⁻¹(b)=a |
| Existence | Always defined if domains allow | Only if f is one-to-one |
| Domain | x in Dom(g) and g(x) in Dom(f) | Range of f |
| Range | Subset of Range(f) | Domain of f |
| Key Property | Not commutative | f(f⁻¹(x))=x |
A function f maps each input x to exactly one output f(x). Composition (f∘g)(x) means apply g first, then f. The notation f(g(x)) is read 'f of g of x'. The domain of f∘g consists of all x in the domain of g such that g(x) is in the domain of f. Composition is not commutative: f(g(x)) and g(f(x)) are generally different. For example, if f(x)=2x+3 and g(x)=x², then f(g(2))=f(4)=11, while g(f(2))=g(7)=49.
To evaluate f(g(a)) for a specific number a: first compute g(a), then substitute that result into f. If g(a) is undefined, the composite is undefined at a. For algebraic evaluation, replace every x in f(x) with the entire expression g(x). For example, if f(x)=2x+3 and g(x)=x², then f(g(x))=2(x²)+3=2x²+3. To evaluate at x=2, substitute: 2(2²)+3=8+3=11. Always simplify carefully and watch for domain restrictions.
A function f has an inverse f⁻¹ if and only if f is one-to-one (injective). A function is one-to-one if f(a)=f(b) implies a=b. Graphically, it passes the horizontal line test. The inverse reverses the mapping: if f(a)=b, then f⁻¹(b)=a. The domain of f⁻¹ is the range of f, and the range of f⁻¹ is the domain of f. The composition of a function and its inverse yields the identity: f(f⁻¹(x))=x and f⁻¹(f(x))=x, for x in the appropriate domains.
To find f⁻¹(x) for a one-to-one function f: 1) Write y=f(x). 2) Swap x and y. 3) Solve for y. 4) Replace y with f⁻¹(x). For example, f(x)=2x+3. Write y=2x+3. Swap: x=2y+3. Solve: y=(x-3)/2. So f⁻¹(x)=(x-3)/2. Verify: f(f⁻¹(x))=2((x-3)/2)+3=x-3+3=x. Also f⁻¹(f(x))=((2x+3)-3)/2=x. Always state domain restrictions if any.
The identity function I(x)=x satisfies f∘I=I∘f=f. The inverse function satisfies f∘f⁻¹=I and f⁻¹∘f=I on the appropriate domains. This property is used to verify inverses and to simplify expressions. For example, if f(x)=2x+3, then f⁻¹(x)=(x-3)/2. Then f(f⁻¹(5))=f(1)=5, and f⁻¹(f(5))=f⁻¹(13)=5. This cancellation property is a powerful shortcut when solving equations involving functions and their inverses.
The domain of f∘g is {x | x∈Dom(g) and g(x)∈Dom(f)}. For inverses, Dom(f⁻¹)=Range(f) and Range(f⁻¹)=Dom(f). When finding f⁻¹, if f has a restricted domain, the inverse may have a restricted range. For example, f(x)=x² is not one-to-one on all real numbers, but if we restrict to x≥0, then f⁻¹(x)=√x with domain x≥0. Always check these conditions to avoid invalid evaluations.
For linear functions f(x)=ax+b with a≠0, the inverse is f⁻¹(x)=(x-b)/a. For composition of linear functions, (f∘g)(x)=a(cx+d)+b=acx+ad+b. For simple functions like f(x)=x² (restricted), inverse is square root. When solving f(g(x))=h(x), if f is invertible, apply f⁻¹ to both sides: g(x)=f⁻¹(h(x)). This avoids expanding complex expressions. Also, if g(x)=f⁻¹(x), then f(g(x))=x directly.
Trap 1: Confusing f(g(x)) with g(f(x)). Always apply inner function first. Trap 2: Forgetting domain restrictions, leading to invalid inverses. Trap 3: Assuming all functions have inverses; only one-to-one functions do. Trap 4: Misplacing parentheses, e.g., f(g(x)) vs f(x)g(x). Trap 5: Not verifying inverse by composition. Trap 6: Ignoring that f⁻¹(x) does not mean 1/f(x). These mistakes are avoidable with careful step-by-step work and verification.
Compute g(2)=2²=4. Then f(4)=2(4)+3=8+3=11.
Compute f(2)=2(2)+3=7. Then g(7)=7²=49.
Write y=2x+3. Swap x and y: x=2y+3.
Solve for y: 2y=x-3 ⇒ y=(x-3)/2. So f⁻¹(x)=(x-3)/2. Verify: f(f⁻¹(x))=2((x-3)/2)+3=x.
g(9)=√9=3. f(3)=3²=9. So f(g(9))=9. f(9)=9²=81. g(81)=√81=9. So g(f(9))=9.
(f∘g)(x)=f(g(x))=f(x+2)=3(x+2)-1=3x+6-1=3x+5. (g∘f)(x)=g(f(x))=g(3x-1)=(3x-1)+2=3x+1.
Method 1: Find inverse: f⁻¹(x)=(x-2)/5. Then f⁻¹(12)=(12-2)/5=10/5=2. Method 2: Solve f(x)=12: 5x+2=12 ⇒ 5x=10 ⇒ x=2. So f⁻¹(12)=2.
f(g(x)) applies g first, then f. g(f(x)) applies f first, then g. They are generally different. For example, if f(x)=2x+3 and g(x)=x², f(g(2))=11 but g(f(2))=49.
A function has an inverse if and only if it is one-to-one (injective). Graphically, it must pass the horizontal line test. If any horizontal line intersects the graph more than once, the function is not one-to-one and has no inverse unless you restrict its domain.
No. f⁻¹(x) denotes the inverse function, which reverses the mapping of f. 1/f(x) is the reciprocal. For example, if f(x)=2x+3, f⁻¹(x)=(x-3)/2, while 1/f(x)=1/(2x+3). They are completely different.
The domain of f(g(x)) consists of all x in the domain of g such that g(x) is in the domain of f. So you must check both conditions: x must be valid for g, and the output g(x) must be valid for f.
Yes. Verify by composition: compute f(f⁻¹(x)) and f⁻¹(f(x)). Both should simplify to x. If they do, your inverse is correct. Also check that the domain and range match appropriately.
For f(x)=ax+b with a≠0, the inverse is f⁻¹(x)=(x-b)/a. This is found by swapping x and y and solving for y. Always ensure a≠0, otherwise the function is constant and not one-to-one.