Follow a composition through tables
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.
- 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.
A composition is defined only when both lookups exist.
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.
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 |
.1Read 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.
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.
- The column under 1 in g gives g(1) = 3.g receives the original input.
- The column under 3 in f gives f(3) = 3.The first output selects the outer input.
- Read the inner output before moving to the other input row.
.2Read 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.
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.
- Read f(4) = 1 under input 4 in f.f is inner in this order.
- Read g(1) = 3 under input 1 in g.The first answer 1 is the new input.
- Restart at the original input when you reverse the order.
.3Build 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.
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.
- For f ∘ g, starting at 1 gives g(1) = 3, then f(3) = 3. Starting at 3 gives g(3) = 2, then f(2) = 8.Both intermediate answers appear as accepted f inputs.
- Starting at 2 gives g(2) = 5, and starting at 4 gives g(4) = 7. Both paths stop before f.The complete f table accepts neither 5 nor 7.
- For g ∘ f, starting at 3 gives f(3) = 3, then g(3) = 2. Starting at 4 gives f(4) = 1, then g(1) = 3.Both intermediate answers appear as accepted g inputs.
- Starting at 1 gives f(1) = 6, and starting at 2 gives f(2) = 8. 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.
- Write the intermediate input before deciding whether a path can finish.
.4The 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.
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.
- p(3) = 0.The innermost p acts on 3 first.
- p(p(3)) = p(0) = 2.The same function receives a new input, 0, on the second pass.
- Write both lookups even when the function names match.
- 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.
Evaluate or solve a composition from complete tables
- 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.
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.
- For f(g(3)), read the column under 3 in the g picture: g(3) = 2.g is the inner function in this expression.
- Move to the column under 2 in the f picture: f(2) = 8.The intermediate answer 2 becomes the outer input.
- For g(f(3)), read the column under 3 in the f picture: f(3) = 3.The reversed composition starts with f.
- Move to the column under 3 in the g picture: g(3) = 2.The intermediate answer happened to equal the original input this time.
- f(g(3)) = 8.
- g(f(3)) = 2.
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.
- q(0) = 1.The inner function q receives the starting 0.
- p(q(0)) = p(1) = 4.The output 1 from q selects the column under 1 in p.
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.
- p(0) = 2.p is inner in q(p(0)).
- q(p(0)) = q(2) = 0.The first output 2 becomes the input of q.
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.
- p(3) = 0.The innermost p acts on 3 first.
- p(p(3)) = p(0) = 2.The same function receives a new input, 0, on the second pass.
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.
- p(1) = 4.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.
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.
- Only p(1) = 4, 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 x = 0: q(0) = 1 and p(1) = 4. Check x = 3: q(3) = 1 and p(1) = 4.Forward evaluation verifies that both claimed inputs give the requested final output.
- x = 0 or x = 3.
- Solution set: {0, 3}.
- 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.