Follow a composition through tables
Quick review (2 minutes)
Picture a row of labeled drawers.
To evaluate f(g(a)) from tables, read g(a), then use that output as the input for the f lookup.
A composition is defined only when both lookups exist.
1. Read the nested notation and choose the inner table.
2. Find the column labeled with the original input in that table.
3. Read its output and write it as the intermediate value.
4. Find that value among the input labels of the outer table, which may be a different column.
5. Read the outer output. If either required input is absent from a complete table, the composition is undefined there.
The two pictures list every input accepted by f and g. Find f(g(3)) and g(f(3)). You start at input 3 and find the final output in each order. Plan: read the inner table first, write its answer, and use that answer as an input in the outer table.
f(g(3)) = 8.
g(f(3)) = 2.
Reading the same input column in both pictures. The outer lookup uses the inner output, which can move you to a new column.
1. Rewrite the composition with parentheses. Identify the function nearest the starting input.
2. For an evaluation, find the input in the inner table and read down to its output.
3. Locate that in-between number in the outer input row and read down again.
4. For a solve question, start from the requested final output, read up to every matching outer input, then find which inner inputs produce those numbers.
5. Check by reading each claimed path forward. If a lookup is missing, distinguish a complete definition from selected samples.
Function
A rule that gives exactly one output for each input it accepts.
Input
The starting value you give a function. It goes inside the parentheses in function notation.
Output
The answer a function produces from an accepted input.
Evaluate
Find the output of a function or the value of an expression for a given input.
Domain
All inputs for which a function is defined.
Undefined
Having no permitted output under the rule being used, as with division by zero or a negative real square-root radicand.
Inner function
The function evaluated first in a composition. Its output becomes the next function's input.
Outer function
The function evaluated second in a two-function composition. It receives the inner function's output.
Table
An organized display of matching values. In a function table, each input and its output share a column or row.
Intermediate answer
The in-between output of the first function, which becomes the next function’s input.
Nested
Placed inside another expression, like one pair of parentheses inside another.
Solve
Find every input that makes a stated equality or inequality true. This differs from evaluating at a given input.
1 In plain words
Picture a row of labeled drawers. The label tells you which drawer to open, and the number inside is its answer. A table records those labels and answers in matching columns. For two jobs in a row, open a drawer in the first table, take its number, and use that number as the drawer label in the second table. You may move to a different column. Here each table lists every input its function accepts. An unlisted input therefore has no answer. A table showing only selected samples would leave other inputs unknown instead. The in-between answer selects the second drawer; it is not automatically the starting label.
2 Picture it
Reminder
Reminder: Table reading, Composition order, Domain, Listing separate inputs
- Table reading. Read one column downward: the f picture's input 2 has output 8.
- Composition order. f(g(3)) starts in g, then uses its answer in f.
- Domain. When a table lists every accepted input, its input row gives the complete domain; these pictures accept only 1, 2, 3, and 4.
- Listing separate inputs. {1, 3} lists only 1 and 3. The interval [1, 3] also includes every number between them, so it describes a different set.
3 Why
Each column states one input-output pair. In f(g(3)), the first lookup is the output beneath input 3 in the g table. That value becomes the input label for the f table. Reading both outputs beneath 3 would instead give f(3) and g(3), two independent evaluations. The two-stage lookup also explains the composite domain. Some allowed starting inputs produce intermediate numbers that do not appear among the next function's accepted inputs, so those starts cannot finish the composition.
4 The rule
To evaluate f(g(a)) from tables, read g(a), then use that output as the input for the f lookup.
A composition is defined only when both lookups exist.
The same idea, five ways
f of g of three; f after g at three
Look up g at 3, then look up f at the number g returns.
- f(g(3)) = f(2) = 8
- (f ∘ g)(3) = 8
- 3 → g → 2 → f → 8
One drawer gives you the label of the next drawer.
The same idea, other ways
Open drawer 3 in g. It contains 2. Open drawer 2 in f. It contains 8. The second drawer number comes from the first drawer's contents.
Write only the numbers along the path: 3 to 2 to 8. Then label the first arrow g and the second arrow f. This keeps the meaning attached to each lookup.
| x | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| f(x) | 6 | 8 | 3 | 1 |
| g(x) | 3 | 5 | 2 | 7 |
Part 1: Read f after g
Start in g because it is inner. Its answer tells you where to look in f. The outer table's output is the final answer.
- f(g(3)) uses g(3) first.
- The outer input is g’s output, which may differ from the starting input.
Worked example
One more f-after-g path
Using the two complete tables beside this example, find f(g(1)). The input is 1; find its final answer after g and then f. Plan: read g under 1, then use its output as the next input in f.
Show the steps and the answer
- The column under 1 in g gives .g receives the original input.
- The column under 3 in f gives .The first output selects the outer input.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Read the inner output before moving to the other input row.
Part 2: Read g after f
Reversing the composition changes which table receives the starting input. You must restart the path rather than reverse the digits of the first answer.
- g(f(4)) uses f(4) first.
- A repeated final answer does not imply the paths match.
Worked example
A g-after-f path
Using the two complete tables beside this example, find g(f(4)). The input is 4; find the final answer after f and then g. Plan: read f under 4, then read g under the number f returns.
Show the steps and the answer
- Read under input 4 in f.f is inner in this order.
- Read under input 1 in g.The first answer 1 is the new input.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Restart at the original input when you reverse the order.
Part 3: Build tables of composite outputs
Collect every successful two-stage path in a new table. Include only starting inputs that finish both stages. Here both original tables list every accepted input. A missing second lookup means the composition is undefined at that start. Braces list separate inputs: {1, 3} means only 1 and 3, rather than the entire stretch from 1 to 3.
- The composite f ∘ g accepts only inputs 1 and 3.
- The composite g ∘ f accepts only inputs 3 and 4.
- If a table lists selected samples rather than a complete function, an unlisted lookup is unknown from that table, not proven undefined.
Worked example
Collect both composite functions
Build complete tables for f ∘ g and g ∘ f from the two complete function tables pictured here. Try each starting input and keep the paths that finish. Plan: record both lookups for each of the four inputs, then draw a new table containing only successful paths.
Show the steps and the answer
- For , starting at 1 gives , then . Starting at 3 gives , then .Both intermediate answers appear as accepted f inputs.
- Starting at 2 gives , and starting at 4 gives . Both paths stop before f.The complete f table accepts neither 5 nor 7.
- For , starting at 3 gives , then . Starting at 4 gives , then .Both intermediate answers appear as accepted g inputs.
- Starting at 1 gives , and starting at 2 gives . Both paths stop before g.The complete g table accepts neither 6 nor 8.
- f ∘ g accepts exactly {1, 3}, meaning only inputs 1 and 3; its complete output table is pictured.
- g ∘ f accepts exactly {3, 4}, meaning only inputs 3 and 4; its complete output table is pictured.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the intermediate input before deciding whether a path can finish.
Part 4: The same function can receive its own answer
You can visit the same drawer system twice. In p(p(3)), the first p receives 3. The second p receives the number from that first drawer. The two visits can use different columns. This is composition with the same function, rather than squaring its first output.
- p(p(a)) means apply p to a, then apply p to the resulting output.
- The second lookup must use an accepted p input.
Worked example
Use the same table twice
Find p(p(3)) in this complete p table. You put the first answer through p again. Plan: read p under 3, then move to p under the number it returns.
Show the steps and the answer
- .The innermost p acts on 3 first.
- .The same function receives a new input, 0, on the second pass.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write both lookups even when the function names match.
5 How
- Read the nested notation and choose the inner table.
- Find the column labeled with the original input in that table.
- Read its output and write it as the intermediate value.
- Find that value among the input labels of the outer table, which may be a different column.
- Read the outer output. If either required input is absent from a complete table, the composition is undefined there.
Evaluate or solve a composition from complete tables
- Rewrite the composition with parentheses. Identify the function nearest the starting input.
- For an evaluation, find the input in the inner table and read down to its output.
- Locate that in-between number in the outer input row and read down again.
- For a solve question, start from the requested final output, read up to every matching outer input, then find which inner inputs produce those numbers.
- Check by reading each claimed path forward. If a lookup is missing, distinguish a complete definition from selected samples.
6 Worked example
Worked example
Both orders from the tables at input 3
The two pictures list every input accepted by f and g. Find f(g(3)) and g(f(3)). You start at input 3 and find the final output in each order. Plan: read the inner table first, write its answer, and use that answer as an input in the outer table.
Show the steps and the answer
- For f(g(3)), read the column under 3 in the g picture: .g is the inner function in this expression.
- Move to the column under 2 in the f picture: .The intermediate answer 2 becomes the outer input.
- For g(f(3)), read the column under 3 in the f picture: .The reversed composition starts with f.
- Move to the column under 3 in the g picture: .The intermediate answer happened to equal the original input this time.
- f(g(3)) = 8.
- g(f(3)) = 2.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 5
One successful two-table path
The pictured p and q tables list every accepted input. Find p(q(0)). You start at 0 and want the final answer. Plan: read q under 0, then p under its answer.
Show the steps and the answer
- .The inner function q receives the starting 0.
- .The output 1 from q selects the column under 1 in p.
Rung 2 of 5
Reverse the table order
Use these complete p and q tables to find q(p(0)). You start at 0 again, but p goes first. Plan: read p under 0, then q under the in-between answer.
Show the steps and the answer
- .p is inner in q(p(0)).
- .The first output 2 becomes the input of q.
Rung 3 of 5
Use the same table twice
Find p(p(3)) in this complete p table. You put the first answer through p again. Plan: read p under 3, then move to p under the number it returns.
Show the steps and the answer
- .The innermost p acts on 3 first.
- .The same function receives a new input, 0, on the second pass.
Rung 4 of 5
A path cannot finish
Find q(p(1)) from the complete tables pictured here. Determine whether both stages have an answer. Plan: find p(1), then look for that number in q’s input row.
Show the steps and the answer
- .p is the inner function.
- q(4) is undefined in this complete table.The input row of q contains only 0, 1, 2, and 3, so it does not accept 4.
Rung 5 of 5
Solve backward for every start
Which starting inputs x satisfy p(q(x)) = 4 in these complete tables? The final output 4 is given; find every starting input producing it. Plan: read upward from 4 in p, then upward from the needed number in q.
Show the steps and the answer
- Only , so q(x) must equal 1.The outer function must receive input 1 to return the requested output 4.
- The output 1 in q occurs under inputs 0 and 3.Solving from a table requires every match, rather than only the first one.
- Check : and . Check : and .Forward evaluation verifies that both claimed inputs give the requested final output.
- x = 0 or x = 3.
- Solution set: {0, 3}.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Put one finger on the inner output and another on the matching outer input.
- Draw every table as an input row above an output row; use the intermediate answer to select the next column.
- Rebuild, do not memorize: find the inner input on top, read down, then carry the number to the other table.
7 The trap
Reading the same input column in both pictures. The outer lookup uses the inner output, which can move you to a new column.
Problems marked OpenStax come from Precalculus 2e by Jay Abramson, published by OpenStax, under the CC BY-NC-SA 4.0 licence. Access for free at https://openstax.org/books/precalculus-2e/pages/1-introduction-to-functions.