Topic 2.7B
Composition of Functions
In 2.7A we evaluated compositions one number at a time: first the inside value, then the outside function. That works, but if you need for many inputs, it is better to build one formula that does both steps at once. This note builds those formulas, finds where they are defined, and runs the process in reverse by breaking a complicated function into simpler pieces.
9 MIN READ6 IDEAS33 PROBLEMS10 flashcards
Building a Formula for f(g(x))
CONCEPT
Substitute the Whole Inside Function
To find , take the formula for and replace every with the entire expression , in parentheses.
Then simplify. The result is a single function that does and then .
Worked example
With and from 2.7A, find formulas for and .
- 01
: replace in with :
- 02
: replace in with ( − 3):
- 03
Check against 2.7A: ✓, and ✓. Two different formulas, as expected, because order matters.
Remember from 2.4: Nova's weekly model was exactly this. With and , .
COMMON MISTAKE
“ with stuck on: .”
The whole inside function must go in parentheses before squaring: , not . Without parentheses only the 1 gets squared. Check with : the wrong version gives 2, but is 22.
The Domain of a Composition
CONCEPT
Two Conditions
is in the domain of exactly when is in the domain of , AND (2) the value is in the domain of .
Remember from 2.7A: was undefined because was outside g's domain. The same thing happens with formulas.
Worked example
Example 1. and . Find the domains of and .
- 01
= √(). The square root needs , so . (For example, gives 0 and gives 2, but gives , not real.)
- 02
. Here the inside function needs first. After that, 5 − (anything) is fine. Domain: .
- 03
Same two functions, opposite orders, different domains: versus .
Worked example
Example 2. and . Find and its domain.
- 01
Substitute:
- 02
can't take the input 3, so exclude every with : gives , so or . Remember from 2.1 and 2.5A: an even power has two roots, and here BOTH must be excluded.
- 03
Domain: all real except 2 and −2. Check a value that works: .
A hidden restriction. Let and . Then , which simplifies to . But the simplified formula hides a restriction: only accepts , so is defined only for .

The formulas look the same after simplifying, but the composition keeps the domain of the inside function.
COMMON MISTAKE
“, so the domain of is all real numbers.”
Find the domain BEFORE simplifying. The inside function already throws out every negative input, and simplifying afterward can't bring them back. (Compare √(): at it gives 3, not −3, so it is not either.)
Quick check
Let and . What is the domain of ?
Decomposing a Function
Sometimes you need to go backwards: given one function, find an inside function and an outside function so that . Ask yourself: what is calculated FIRST, and what is done to it?
| h(x) | inside g(x) | outside f(x) |
|---|---|---|
| 3x − 1 | ||
| √( + 9) | + 9 | √x |
| w/4 |
There is usually more than one correct decomposition. For you could also use and . What doesn't help is the trivial split , : it is correct, but it says nothing.
Worked example
Example 3. Decompose and .
- 01
Ask: if I plug in a number, what do I calculate FIRST? For at : first , then . So the inside is and the outside is .
- 02
For at : first , then . Inside , outside .
- 03
Check by composing back: = √() ✓ and ✓.
Quick check
Write as with the inner function.
Transformations Are Compositions
CONCEPT
Composing With a Linear Function
A change to the OUTPUT happens after , so it is a linear function on the outside: with .
A change to the INPUT happens before , so it is a linear function on the inside: with , and with .
The identity function changes nothing: .
Remember from 2.4: “If Nova had launched 2 months earlier” was , an input change, and it equaled , which is an output change (a vertical stretch). The same function can be seen as either composition.
In 2.8 you will meet pairs of functions that undo each other, so that : composition with the result being the identity.
Worked example
Example 4. Let . Write as a composition, and find its formula.
- 01
Inside (acts first on x): , a shift right by 2.
- 02
Outside (acts on the output of f): , a vertical stretch by 3 and a shift up 1. So : three functions in a row.
- 03
Formula: . Check: (the vertex moved to ) and .
Worked example
Try it yourself. (a) , . Find and , and check both at . (b) , . Find and its domain. (c) Decompose .
Answers: (a) and . At : 5 and 25. (b) , domain . (c) , .
Practice
Worked example
P1. and . Find and .
Answer: . .
Worked example
P2. and . Find and its domain.
Answer: . can't take 0, so exclude with : all real except 6.
Worked example
P3. Decompose into .
Answer: (inside) and (outside).
Worked example
P4. and . Find and its domain.
Answer: = √( − 4). Need . The boundary has two roots, , so the domain is or . ( fails: is not real; and both give .)
Common slips
“ with stuck on: .”
The whole inside function must go in parentheses before squaring: , not . Without parentheses only the 1 gets squared. Check with : the wrong version gives 2, but is 22.
“, so the domain of is all real numbers.”
Find the domain before simplifying. The inside function already throws out every negative input, and simplifying afterward can't bring them back. (Compare √(): at it gives 3, not −3, so it is not either.)
Lock it in
Try the flashcards
10 cards · Composition and inverses
Recap card
6 lines to re-read the night before.
- 01
To build , substitute the whole expression , in parentheses, for in . Then simplify.
- 02
Domain of : must be in the domain of And must be in the domain of . Find it before simplifying.
- 03
When excluding values, solve = (bad input) completely; an even power gives two values to exclude.
- 04
Decomposing: the inside function is what is computed first. Several decompositions can be correct.
- 05
Output changes are compositions on the outside, input changes on the inside. changes nothing.
- 06
Next, in 2.8: inverse functions, functions that undo each other, so that .