College Algebra / Composition of functions
Composition of functions
All 10 lessons, in order.
The unit at a glance
- Combine two functions with arithmetic
Imagine two pay envelopes for the same year.
- Composition passes one answer into the next function
Picture two machines standing in a row.
- Order changes the result, and units must fit
Picture a store applying a discount and a coupon.
- Follow a composition through tables
Picture a row of labeled drawers.
- Follow a composition across two graphs
A graph draws a function's input-output pairs as points.
- Evaluate formulas one number at a time
Keep two recipe cards on a counter.
- Substitute the whole inside expression
Before filling a form with letters, run the two machines with numbers.
- A composite domain has two gates
Picture a trip with two ticket checks.
- Square roots add boundary checks
Picture a square tile whose area you know.
- Decompose by naming the inside and outside jobs
Imagine receiving a finished sandwich and describing its preparation in two jobs: assemble it, then wrap it.
Rules (10)
- Combine two functions with arithmetic
(f + g)(x) = f(x) + g(x); (f − g)(x) = f(x) − g(x); (fg)(x) = f(x)·g(x); ()(x) = .
Use inputs allowed by both functions; for the quotient also require g(x) ≠ 0. - Composition passes one answer into the next function
(f ∘ g)(x) = f(g(x)). First apply g, then apply f to g's output.
The product (fg)(x) = f(x)·g(x) is a different operation. - Order changes the result, and units must fit
Usually f(g(x)) ≠ g(f(x)) as functions. Check both orders rather than assuming equality.
For a meaningful composition, the inner output must be an acceptable outer input, including its units. - Follow a composition through tables
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. - Follow a composition across two graphs
For f(g(a)): read the y-value of g at x = a; use that number as the x-value on f; read f's y-value.
A point (a, b) on g means g(a) = b. - Evaluate formulas one number at a time
For f(h(a)), calculate h(a) first; then substitute that entire numerical answer into every input slot of f.
The input-variable letter does not change the instructions. - Substitute the whole inside expression
To form f(g(x)), replace every input-variable occurrence in f with the whole parenthesized expression g(x).
(a + b = + 2ab + , because (a + b)(a + b) has two cross products ab. - A composite domain has two gates
The domain of f ∘ g consists of the x values allowed by g for which g(x) is allowed by f.
Keep original restrictions when simplifying the composite formula. - Square roots add boundary checks
requires A(x) ≥ 0. A denominator requires A(x) > 0.
For f(g(x)), apply every root requirement at its own stage and keep both gates. - Decompose by naming the inside and outside jobs
To write h(x) = f(g(x)), choose g as the inside job and f as the job applied to its output.
Check by substitution and preserve h's original domain.
Recipes (10)
- Combine two functions with arithmetic
- 1. Find the requested operation and its order. g − f means the g answer minus the f answer.
- 2. Use the same input in both original functions, because their outputs must refer to the same starting value.
- 3. Record where both formulas work and, for division, where the bottom output is nonzero.
- 4. Put each whole expression in parentheses before combining it. Simplify while keeping every original domain restriction.
- 5. Check one permitted input directly in the original functions.
- Composition passes one answer into the next function
- 1. Rewrite the circle notation as nested parentheses, meaning one pair of parentheses inside another: (f ∘ g)(x) = f(g(x)).
- 2. Name the inner function, which touches the original input.
- 3. Evaluate that function and write its output as a separate intermediate, or in-between, answer.
- 4. Put that whole intermediate answer into the outer function.
- 5. Check the path: original input, inner output, final output.
- Order changes the result, and units must fit
- 1. For each order, identify the function nearest the original input.
- 2. Evaluate or substitute that inner function into the other function.
- 3. Compare the resulting formulas and their domains. A different answer at one allowed input proves the functions differ.
- 4. For an application, label the starting input, intermediate output, and final output with units.
- 5. Check that the intermediate unit matches the outer function's expected input unit.
- Follow a composition through tables
- 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.
- Follow a composition across two graphs
- 1. Choose the inner graph from the function nearest the starting input.
- 2. Locate that input on the inner graph's x-axis and move vertically to its curve.
- 3. Read the curve's y-coordinate as the intermediate output.
- 4. Locate that number on the outer graph's x-axis and move vertically to its curve.
- 5. Read the outer y-coordinate as the final answer. Check each graph's own scale.
- Evaluate formulas one number at a time
- 1. Expand circle notation into parentheses if needed.
- 2. Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
- 3. Complete that arithmetic and write the intermediate output.
- 4. Copy the outer formula and replace every input letter with that output.
- 5. Complete the arithmetic and check by substituting into a combined formula.
- Substitute the whole inside expression
- 1. Copy the outer formula and identify every input slot.
- 2. Write the complete inner formula in parentheses in every slot.
- 3. Keep powers outside those parentheses so they act on the entire input.
- 4. Expand with distribution. For a square, multiply the two identical parentheses and keep both cross products.
- 5. Combine like terms, preserve any domain restrictions, and check a small allowed input by the two-stage route.
- A composite domain has two gates
- 1. Find the inner domain. Record inputs making an inner denominator zero or violating any other inner requirement.
- 2. Find what the outer function cannot accept. For an outer denominator, determine its forbidden input values.
- 3. Set g(x) equal to each forbidden outer input and solve. Exclude the solutions that are in the inner domain.
- 4. Keep only starting inputs passing both gates. For roots, use inequalities rather than only equations, as the next lesson explains.
- 5. Write the result in interval notation and check a permitted input and each excluded input using the original stages.
- Square roots add boundary checks
- 1. Write the inner radicand requirement before using the inner function's output.
- 2. Substitute the inner output into the outer radicand and require it to be nonnegative.
- 3. Use the inner range when possible. A real square root output is always at least zero.
- 4. Before squaring an inequality, check that both compared sides are nonnegative. Then square and solve while preserving the earlier requirements.
- 5. If a root is a denominator, replace its nonnegative condition with a greater than zero one.
- 6. Combine the bounds and test endpoints in the original two-stage formula.
- Decompose by naming the inside and outside jobs
- 1. Work out h at a permitted small input. The final job you perform suggests the outer function; everything before it suggests the inner function.
- 2. Define g(x) as that package, which will be calculated first.
- 3. Define f(x) as the operation applied to one input package.
- 4. Substitute g(x) into f and show that f(g(x)) recreates h(x).
- 5. Check the composite domain against the original domain. A formula match alone can hide a lost input.
- 6. If another split is requested, choose a different package and repeat the same checks.
Traps (10)
- Combine two functions with arithmetic
Subtracting only the first term of a function. ( − 1) − (x − 1) subtracts the entire second expression, so both of its signs change.
- Composition passes one answer into the next function
Starting with f because its name appears first. In f ∘ g, g receives the original input. Expand the circle notation before calculating.
- Order changes the result, and units must fit
Treating a valid arithmetic calculation as proof that an application makes sense. Label the units as well as the numbers.
- Follow a composition through tables
Reading the same input column in both pictures. The outer lookup uses the inner output, which can move you to a new column.
- Follow a composition across two graphs
Using the first graph's output as a height on the second graph. Move it to the second x-axis before finding the outer output.
- Evaluate formulas one number at a time
Replacing only the squared input in − t. The same input goes into both positions, so f(5) is − 5.
- Substitute the whole inside expression
Writing (2x + 1 = 4 + 1. The square multiplies two whole sums, so the two cross products must appear.
- A composite domain has two gates
Checking only the simplified final denominator. That can lose an inner restriction which disappeared during algebra.
- Square roots add boundary checks
Demanding a positive radicand for every square root. Ordinary roots allow zero; roots in denominators must avoid zero because of division.
- Decompose by naming the inside and outside jobs
Giving the two correct component formulas in the wrong order. Recompose f(g(x)) on paper before accepting your decomposition.
Lesson 1 of 10
Combine two functions with arithmetic
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
Imagine two pay envelopes for the same year. One person earned f(x) dollars and another earned g(x) dollars. To find their household income, you open both envelopes and add the amounts. You use the same year for both people. Algebraic operations on functions work this way: get two answers at the same input, then add, subtract, multiply, or divide those answers. You are making a new function from two old ones. A sum of functions adds the outputs. A difference of functions subtracts them. A product of functions multiplies them. A quotient of functions divides them, provided the bottom answer is not zero.
2 Picture it
Reminder
Reminder: Substitution, Subtracting parentheses, Factoring, Domain, Shared factor, Multiplying powers
- Substitution. Replace the input letter everywhere: − 1 at x = 3 gives − 1 = 8.
- Subtracting parentheses. A minus outside reverses every sign: −(x − 1) = −x + 1.
- Factoring. − 1 = (x − 1)(x + 1), because the middle terms cancel when multiplied.
- Domain. A denominator cannot be zero: excludes x = 1.
- Shared factor. − x = x·x − x·1 = x(x − 1). Distributing x rebuilds the two terms.
- Multiplying powers. x· = x·x·x = , because three copies of x are multiplied.
3 Why
Each original function gives exactly one output at an allowed input. Arithmetic then combines those two numbers into one new answer, so the result is another function. Both original answers must exist: an unavailable answer cannot be added or multiplied. Division needs one more check, because no number multiplied by zero can give a nonzero numerator. Units also matter. Two incomes measured in dollars can be added. Dollars and hours describe different things, so their sum would not represent a meaningful total.
4 The rule
; ; (fg); .
Use inputs allowed by both functions; for the quotient also require .
The same idea, five ways
f plus g of x; f times g of x; f divided by g of x
Put one input into both recipes, then combine their two outputs.
- (f + g)(x) = f(x) + g(x)
- (fg)(x) = f(x)·g(x)
- f + g names a recipe; (f + g)(2) names its output at 2
Two pay envelopes for the same year.
(f + g)(2) = f(2) + g(2)
(fg)(2) = f(2)·g(2)
The final parentheses hold the input 2
The same idea, other ways
At one year, open both pay envelopes. Adding their amounts gives the total for that year; using different years would answer a different question. At year 2, the two incomes are 38400 and 43600 dollars. Together they give 82000 dollars in the pictured household column.
If f(2) = 3 and g(2) = 4, the sum at 2 is 7 and the product at 2 is 12. You combine 3 and 4 after evaluating, rather than putting 3 through g.
Part 1: Sum of functions
A sum collects two amounts. If f and g represent incomes in the same currency and year, their sum is household income. Both amounts must exist before you can add them.
- (f + g)(x) = f(x) + g(x).
- The domain is the intersection of the original domains: inputs accepted by both.
- The shared input may be a date or an item name instead of a number; both outputs must be real numbers.
- Addition and subtraction need matching units or two unitless outputs. If two price rules for the same book give 12 dollars and 8 dollars, their sum is 20 dollars because the quantities match.
f(x) = x + 1
g(x) = 2x
(f + g)(x) = 3x + 1
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Sum of functions
A sum collects two amounts. If f and g represent incomes in the same currency and year, their sum is household income. Both amounts must exist before you can add them.
- (f + g)(x) = f(x) + g(x).
- The domain is the intersection of the original domains: inputs accepted by both.
- The shared input may be a date or an item name instead of a number; both outputs must be real numbers.
- Addition and subtraction need matching units or two unitless outputs. If two price rules for the same book give 12 dollars and 8 dollars, their sum is 20 dollars because the quantities match.
A sum collects two amounts. If f and g represent incomes in the same currency and year, their sum is household income. Both amounts must exist before you can add them.
f(x) = x + 1
g(x) = 2x
(f + g)(x) = 3x + 1
Worked example
Add formulas
For f(x) = x + 1 and g(x) = 2x, find (f + g)(x). You want one formula for the total output at any input. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- .A sum adds the original function outputs.
- .One x and two x amounts make three x amounts.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the input beside both function names before adding.
Part 2: Difference of functions
A difference compares two outputs at one input. Think of money earned minus money spent in one month. Subtract the whole second amount, including every term in its formula. In a cup-selling model, profit is revenue minus cost. If R(x) = 3x and C(x) = 0.75x + 18 dollars, profit is 2.25x − 18 dollars. At 24 cups, 72 dollars earned minus 36 dollars spent leaves 36 dollars.
- Subtraction order matters: a − b and b − a usually differ.
Reminder
Reminder: Pulling out a factor
- Pulling out a factor. − x = x·x − x·1 = x(x − 1), because both terms contain x.
The same idea, five ways
Difference of functions
A difference compares two outputs at one input. Think of money earned minus money spent in one month. Subtract the whole second amount, including every term in its formula. In a cup-selling model, profit is revenue minus cost. If R(x) = 3x and C(x) = 0.75x + 18 dollars, profit is 2.25x − 18 dollars. At 24 cups, 72 dollars earned minus 36 dollars spent leaves 36 dollars.
- Subtraction order matters: a − b and b − a usually differ.
A difference compares two outputs at one input. Think of money earned minus money spent in one month. Subtract the whole second amount, including every term in its formula. In a cup-selling model, profit is revenue minus cost. If R(x) = 3x and C(x) = 0.75x + 18 dollars, profit is 2.25x − 18 dollars. At 24 cups, 72 dollars earned minus 36 dollars spent leaves 36 dollars.
Worked example
Subtract the whole linear formula
Let f(x) = x − 1 and g(x) = − 1. Find (g − f)(x). You want the g output minus the whole f output. Plan: keep the second output in parentheses, change both of its signs, then collect matching terms.
Show the steps and the answer
- .The requested order is g minus f.
- .Subtracting x − 1 means adding its opposite, −x + 1.
- .The constants −1 and +1 cancel, and both remaining terms contain a factor x.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Put parentheses around the second function before distributing the subtraction.
Part 3: Product of functions
A product multiplies two outputs at the same input. If one output is a price per ticket and the other is the number of tickets, their product is the total price. Multiplication may change the units.
- (fg)(x) = f(x)·g(x).
- The product needs both functions defined, but an output of zero is allowed.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Product of functions
A product multiplies two outputs at the same input. If one output is a price per ticket and the other is the number of tickets, their product is the total price. Multiplication may change the units.
- (fg)(x) = f(x)·g(x).
- The product needs both functions defined, but an output of zero is allowed.
A product multiplies two outputs at the same input. If one output is a price per ticket and the other is the number of tickets, their product is the total price. Multiplication may change the units.
Worked example
Multiply a line by a square
Let f(x) = x + 2 and g(x) = . Find (fg)(x). You want to multiply their outputs at the same x. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- (fg).The product multiplies f(x) by g(x).
- .Distribution multiplies both terms, and x times contains three factors x.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- A multiplication dot belongs between the two output expressions.
Part 4: Quotient of functions
A quotient is a ratio: one output divided by another at the same input. The denominator is the bottom expression. It must not be zero, even if later cancellation makes the formula look harmless. The same cost model gives average cost per cup as , for x > 0 cups. At 24 cups, = dollars per cup. Zero cups cannot supply a cost per cup because division by zero fails.
- ()(x) = , with both functions defined and f(x) ≠ 0.
- Equal functions need matching domains and matching outputs, not only matching simplified formulas.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Quotient of functions
A quotient is a ratio: one output divided by another at the same input. The denominator is the bottom expression. It must not be zero, even if later cancellation makes the formula look harmless. The same cost model gives average cost per cup as , for x > 0 cups. At 24 cups, = dollars per cup. Zero cups cannot supply a cost per cup because division by zero fails.
- ()(x) = , with both functions defined and f(x) ≠ 0.
- Equal functions need matching domains and matching outputs, not only matching simplified formulas.
A quotient is a ratio: one output divided by another at the same input. The denominator is the bottom expression. It must not be zero, even if later cancellation makes the formula look harmless. The same cost model gives average cost per cup as , for x > 0 cups. At 24 cups, = dollars per cup. Zero cups cannot supply a cost per cup because division by zero fails.
Worked example
Cancel without restoring the forbidden input
For f(x) = x − 1 and g(x) = − 1, find ()(x). You want the g output divided by the f output and the inputs where that division works. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
= x + 1 only when x ≠ 1
- . Require .The original bottom x − 1 is zero at 1.
- .Multiplying these factors gives − x + x − 1, so the middle terms cancel.
- , while keeping .A common nonzero factor can be divided out; at 1 that factor is zero, so cancellation was never legal there.
- ()(x) = x + 1, with x ≠ 1.
- Domain: (−∞, 1) ∪ (1, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write excluded inputs before factoring.
5 How
- Find the requested operation and its order. g − f means the g answer minus the f answer.
- Use the same input in both original functions, because their outputs must refer to the same starting value.
- Record where both formulas work and, for division, where the bottom output is nonzero.
- Put each whole expression in parentheses before combining it. Simplify while keeping every original domain restriction.
- Check one permitted input directly in the original functions.
Combine two functions and keep their domains
- Write the accepted inputs of each original function. Keep inputs accepted by both.
- For a quotient, solve bottom function = 0 to locate the additional inputs to remove. Plug each proposed excluded input back into that bottom.
- Substitute the formulas with parentheses around the whole second expression.
- Simplify and keep all original exclusions. Check using the two original outputs.
6 Worked example
Worked example
The same input, four different combinations
Let f(x) = x + 1 and g(x) = 2x. Find their sum, difference f − g, product, and quotient f divided by g at input 2. The question asks you to get both outputs at 2, then combine those outputs in four ways. Plan: evaluate both functions at the same input 2, combine their outputs in four ways, then derive the four combined formulas.
Show the steps and the answer
Same input: 2
f(2) = 3; g(2) = 4
- and .Both functions receive input 2, so both answers describe that same input.
- .The sum adds the two outputs.
- .The written order puts the f output first.
- (fg).The product multiplies the outputs.
- .The quotient divides the f output by the nonzero g output.
- As formulas, and .Only matching x terms combine; the written subtraction order stays fixed.
- (fg), and , requiring .Distribution multiplies both terms. The quotient removes the input 0 that makes 2x zero.
- Sum: 7.
- Difference: −1.
- Product: 12.
- Quotient: .
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 6
Subtract one constant output
Let p(x) = x + 5 and q(x) = 2. This is a constant function: it returns the same output 2 for every input. Find (p − q)(x). You want the first output minus 2. Plan: write the original outputs with parentheses, record any forbidden input, then simplify and check.
Show the steps and the answer
- .Subtraction acts on the two outputs.
- .
Rung 2 of 6
Subtract a whole function: (g − f)(x)
Let f(x) = − 5x + 2 and g(x) = 3 + x − 5. Find (g − f)(x), simplify it, and state its domain. Then check your formula at x = 2 using the original functions.
Show the steps and the answer
- Find the operation and its order: means the g output minus the f output, .Subtraction does not commute: f − g would give the opposite of every value. Here f is listed first in the problem, but it must go second.
- Use the same input x in both original functions: and .(g − f)(x) subtracts two outputs that come from one starting value, so both formulas must use that same x.
- Record where both formulas work. f and g are polynomials, so each accepts every real number. This is a difference, not a quotient, so no bottom output has to be kept nonzero. Domain of : all real numbers, .An input is allowed in g − f exactly when it is allowed in both g and f. The extra nonzero condition applies only to division.
- Put each whole expression in parentheses: .The minus sign subtracts all of f(x), not just its first term. The parentheses keep the three terms of f(x) together.
- Distribute the minus sign to every term in the second parentheses: .Subtracting ( − 5x + 2) is the same as adding − + 5x − 2, so all three signs flip. Dropping the parentheses would subtract only the and give the wrong answer 2 − 4x − 3.
- Combine like terms: .Only terms with the same power of x combine. Neither f nor g had a restriction, so the domain is still all real numbers after simplifying.
- Check directly in the original functions: and , so . The formula gives , so they match.Working from f and g separately tests the order and every sign change. The dropped-parentheses answer would give −3 here, and the reversed order f − g would give −13.
- domain: all real numbers, (−∞, ∞).
Work to write
- Domain: all real numbers, (−∞, ∞), because f and g are polynomials and there is no division
- Check x = 2: g(2) − f(2) = 9 − (−4) = 13 and 2(2 + 6(2) − 7 = 13
Rung 3 of 6
Factor a difference of squares
Rewrite − 16 as a product. You want two factors whose multiplication recreates the original expression. Plan: recognize − , use the difference and sum of x and 4, then multiply to check.
Show the steps and the answer
- , so .This is a difference of two squares.
- .Expanding gives + 4x − 4x − 16; the middle terms cancel.
Rung 4 of 6
Factor and retain the hole
Let p(x) = − 16 and q(x) = x − 4. Find ()(x) and its domain. You want a quotient formula and every permitted input. Plan: write the original outputs with parentheses, record any forbidden input, then simplify and check.
Show the steps and the answer
- Start with and record .The original denominator must be nonzero.
- Factor the top: . − 16 is a difference of squares.
- Cancel the factor to obtain , still with .The cancellation divides by a factor known to be nonzero only on that restricted domain.
- Domain: (−∞, 4) ∪ (4, ∞).
Rung 5 of 6
A product and a quotient with two original exclusions
Let p(x) = x − 3 and q(x) = − 9. Find (pq)(x), ()(x), their domains, and whether they are the same function. You want to multiply the outputs, then divide them. Plan: identify the original bottom zeros before factoring or canceling.
Show the steps and the answer
- (pq).A product multiplies outputs at one shared input.
- .Every term in the first group multiplies every term in the second.
- .x· contains three x factors, and two negative factors make positive 27.
- For the quotient, start with . Solve , so and or .This finds both inputs that would make the original bottom zero, so both must be removed.
- Check: and . Exclude both 3 and .Substitution confirms that both original divisions fail.
- Factor . Then , with both exclusions retained.Canceling a common nonzero factor preserves outputs only where the original quotient existed.
- At , (pq) and .Two different outputs at one shared allowed input prove the functions are different.
- (pq)(x) = − 3 − 9x + 27, domain (−∞, ∞).
- ()(x) = , domain (−∞, −3) ∪ (−3, 3) ∪ (3, ∞).
- They are different functions.
Rung 6 of 6
The domains of the two ingredients differ
Let f(x) = and g(x) = . Find f + g, f − g, fg, f/g and g/f with their domains. You want formulas and the inputs each operation can accept. Plan: overlap the two original domains, then remove any zero bottom output for each quotient.
Show the steps and the answer
- f needs , so . g needs , so .The root requires a nonnegative inside, and the fraction requires a nonzero bottom.
- The overlap is .Arithmetic needs both original outputs at the same starting input.
- ; ; (fg).Apply the requested operation to the two complete outputs.
- For , g(x) never equals zero on its domain, since its top is 2. Thus .Division multiplies by the reciprocal of the nonzero bottom output.
- For , also require . It equals zero at , because . Remove .This finds and confirms the extra starting input that would make the quotient bottom zero.
- , with domain .The bottom combines the original fraction bottom and the root output; both must stay nonzero.
- (f + g)(x) = + , domain [−6, 5) ∪ (5, ∞).
- (f − g)(x) = − , domain [−6, 5) ∪ (5, ∞).
- (fg)(x) = , domain [−6, 5) ∪ (5, ∞).
- ()(x) = , domain [−6, 5) ∪ (5, ∞).
- ()(x) = , domain (−6, 5) ∪ (5, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Know cold.
Arithmetic gives both functions the same input. Memory cue: same input, two answers, one operation.
Composition runs the inner function first. Memory cue: read ∘ as after, so f ∘ g means f after g.
Replace every input slot with the whole expression. Memory cue: every slot gets the whole package.
Check both domain gates. Memory cue: gate 1 checks x, gate 2 checks the first answer.
An ordinary root permits zero; a denominator forbids it. Memory cue: root zero can stay, bottom zero goes away.
When decomposing, identify the last operation. Memory cue: the last calculator step is the outer function. - Understand, then rebuild when needed.
Expanded sums, products, factorizations, and composition formulas can be recreated with substitution and distribution. Do not memorize each final formula.
Rebuild a table or graph path by carrying the inner output to the outer input.
Rebuild domain intervals from the allowed points and the endpoint checks.
Rebuild a decomposition by identifying the final operation, then recomposing to check. - Put on the cheat sheet for study.
Arithmetic: (f + g)(x) = f(x) + g(x); (f − g)(x) = f(x) − g(x); (fg)(x) = f(x)·g(x); ()(x) = . Use the shared domain, with g(x) ≠ 0 for the quotient.
Composition: (f ∘ g)(x) = f(g(x)). Its domain keeps x allowed by g and g(x) allowed by f.
Roots: needs A ≥ 0; needs A > 0.
Square expansion: (a + b = + 2ab + . Difference of squares: − = (a − b)(a + b).
Intervals: brackets include finite endpoints, parentheses exclude them, and infinity always takes parentheses.
This is a study sheet. For a closed-book exam, practice recalling the short definitions and rebuilding the rest without looking. - A function name before parentheses means input: f(2) reads f of 2. A number before parentheses means multiplication: 3(2) = 6.
7 The trap
Subtracting only the first term of a function. ( − 1) − (x − 1) subtracts the entire second expression, so both of its signs change.
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.
Lesson 2 of 10
Composition passes one answer into the next function
Open this lessonLeans on 1Comes back in 0
Comes back in
No lesson links recorded.
1 In plain words
Picture two machines standing in a row. Put in 2. The first machine adds 1 and hands out 3. The second machine doubles that 3 and hands out 6. One machine hands its finished answer straight to the next. This handoff is composition of functions, also called function composition. The combined recipe is a composite function. You can use it when one question depends on the answer to another. To price heating for a day, first find the day’s temperature, then use that temperature to find the cost. One starting input travels through both jobs and produces one final answer.
2 Picture it
Reminder
Reminder: Function notation, Order of operations, Multiplication notation
- Function notation. f(3) means the f output at input 3; if f(x) = 2x, f(3) = 6.
- Order of operations. Finish parentheses first: 2(2 + 1) = 2 × 3 = 6.
- Multiplication notation. A dot multiplies numbers: f(2)·g(2) = 4 × 3 = 12.
3 Why
The parentheses show what input each function receives. In f(g(x)), f is waiting for the value written inside its parentheses, namely g(x). You must obtain that value before f can act. This is the same order of operations used when you calculate 2(3 + 1): finish the inner calculation first. Because each machine produces one answer from an allowed input, the connected machines also produce one final answer wherever both stages can run.
4 The rule
.
First apply g, then apply f to g's output.
The product (fg) is a different operation.
The same idea, five ways
f of g of x; f composed with g at x; f after g
Put x into g first, then put g’s answer into f. The inner function is the first job; the outer function is the last job.
- (f ∘ g)(x) = f(g(x))
- f ∘ g names the new recipe
- (f ∘ g)(2) names its output at 2
- x → g(x) → f(g(x))
Day becomes temperature, then temperature becomes heating cost.
The same idea, other ways
Follow the wire. The first machine g changes x into g(x). The second machine f changes that intermediate answer into f(g(x)).
To estimate a heating cost for a day, first find that day's temperature. Then use the temperature to find the cost. A day cannot go straight into a rule that expects a temperature. Descriptive variables are names chosen to remind you what they measure: d for day, T for temperature, C for cost. C(T(d)) says cost after temperature after day.
Start with 2. Add 1 to obtain 3. Double 3 to obtain 6. The intermediate answer is a new input, not a number to multiply by the original input.
In f(g(x)), the input slot of f contains g(x). Compute the contents of the slot first. Memory cue: inside first, outside last.
f( g(x) )
Finish g(x)
Then f receives that result
Part 1: Inner function
The inner function is the first job. It is closest to the starting input in the nested notation. The name of the function does not decide its role; its position does.
- In f(g(x)), g is inner.
- In g(f(x)), f is inner.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Inner function
The inner function is the first job. It is closest to the starting input in the nested notation. The name of the function does not decide its role; its position does.
- In f(g(x)), g is inner.
- In g(f(x)), f is inner.
The inner function is the first job. It is closest to the starting input in the nested notation. The name of the function does not decide its role; its position does.
Worked example
Find the intermediate answer
In f(g(2)) with g(x) = x + 1, find the first answer. You are not finding the final f output yet. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- Evaluate .g is next to the starting input inside the parentheses.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Point to the function directly touching the original input; that is the first job.
Part 2: Outer function
The outer function is the second job. Its input is the answer from the inner function. Think of a packing station receiving the item that a previous station finished.
- In f(g(x)), f is outer.
- An outer function must accept the intermediate output as its input.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Outer function
The outer function is the second job. Its input is the answer from the inner function. Think of a packing station receiving the item that a previous station finished.
- In f(g(x)), f is outer.
- An outer function must accept the intermediate output as its input.
The outer function is the second job. Its input is the answer from the inner function. Think of a packing station receiving the item that a previous station finished.
Worked example
Finish the second stage
The first stage gave 3. If f(x) = 2x, find f(3). The question asks for the final output after doubling the intermediate answer. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- .The input slot of f now holds 3.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the in-between answer inside the outer parentheses before calculating.
Part 3: Composition operator and Binary operation
The open circle ∘ is the composition operator: it connects two functions into one new function. A binary operation takes two starting objects and makes one result. Here the starting objects are functions. The word binary refers to the number of starting objects, rather than to a computer’s zeros and ones. A degree is an angle measure. Its symbol ° appears after a number, as in 30°; it does not connect two functions.
- Read (f ∘ g)(x) as f composed with g at x.
- Read f(g(x)) as f of g of x.
- Both notations describe the same handoff.
- f ∘ g is a function name; (f ∘ g)(x) is that function’s output at input x.
f · g: multiply the two outputs
f ∘ g: g acts first, then f
30°: angle of thirty degrees
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Composition operator and binary operation
The open circle ∘ is the composition operator: it connects two functions into one new function. A binary operation takes two starting objects and makes one result. Here the starting objects are functions. The word binary refers to the number of starting objects, rather than to a computer’s zeros and ones. A degree is an angle measure. Its symbol ° appears after a number, as in 30°; it does not connect two functions.
- Read (f ∘ g)(x) as f composed with g at x.
- Read f(g(x)) as f of g of x.
- Both notations describe the same handoff.
- f ∘ g is a function name; (f ∘ g)(x) is that function’s output at input x.
The open circle ∘ is the composition operator: it connects two functions into one new function. A binary operation takes two starting objects and makes one result. Here the starting objects are functions. The word binary refers to the number of starting objects, rather than to a computer’s zeros and ones. A degree is an angle measure. Its symbol ° appears after a number, as in 30°; it does not connect two functions.
f · g: multiply the two outputs
f ∘ g: g acts first, then f
30°: angle of thirty degrees
Worked example
Circle versus product
For f(x) = 2x and g(x) = x + 1, compare (f ∘ g)(2) and (fg)(2). You want to see what each symbol tells you to do. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- .Composition sends g(2) = 3 into f.
- (fg).The product uses two separate outputs at 2.
- Composition: 6.
- Product: 12.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Recognize binary operation as vocabulary for a two-object operation. The word does not add a calculation step.
- Read the open circle as after before deciding which function acts first.
5 How
- Rewrite the circle notation as nested parentheses, meaning one pair of parentheses inside another: (f ∘ g)(x) = f(g(x)).
- Name the inner function, which touches the original input.
- Evaluate that function and write its output as a separate intermediate, or in-between, answer.
- Put that whole intermediate answer into the outer function.
- Check the path: original input, inner output, final output.
Evaluate a two-stage composition
- Rewrite (f ∘ g)(a) as f(g(a)); read it as f after g at a.
- Find the inner function next to a and calculate g(a). Write that in-between answer on its own line.
- Use the whole in-between answer as the outer input. Find f of that answer.
- Check the path from original input to in-between answer to final output.
6 Worked example
Worked example
Add 1, then double
Let g(x) = x + 1 and f(x) = 2x. Find (f ∘ g)(2). The input is 2; add 1 first, then use that answer as the input to the doubling function. Plan: finish g first, then carry its whole answer into f.
Show the steps and the answer
- .The circle means composition, so g is the inner function.
- .The original input goes into g first.
- .The output 3 from g is the input to f.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Know cold: inside first, outside last. Write one intermediate answer so the order stays visible.
- Draw two boxes and a connecting arrow when the notation feels crowded.
- Know cold memory cue: read ∘ as after. f ∘ g says f after g, so g acts first.
7 The trap
Starting with f because its name appears first. In f ∘ g, g receives the original input. Expand the circle notation before calculating.
Lesson 3 of 10
Order changes the result, and units must fit
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
Picture a store applying a discount and a coupon. A 64-dollar price falls to 48 dollars after 25% off. An 8-dollar coupon then leaves 40 dollars. Reverse the jobs: the coupon leaves 56 dollars, and 25% off that amount leaves 42 dollars. The order changes what the second job receives. Composition can work the same way. Commutative means switching two jobs always preserves the result; composition does not have that property in general. Meaning matters too. If a driving rule gives miles from hours, a fuel rule accepting miles can follow it. The miles fit its input slot, the way a matching key fits a lock.
2 Picture it
Reminder
Reminder: Substitution, Distribution, Subtracting parentheses, Composition order, Function equality, Discount fractions, Divide a fraction by a whole number
- Substitution. Replacing x with 3 − x in 2x + 1 gives 2(3 − x) + 1.
- Distribution. 2(3 − x) = 6 − 2x, because 2 multiplies each term.
- Subtracting parentheses.
- Composition order. G(m(2)) starts with m(2), then puts that answer into G.
- Function equality. A formula accepting every x differs from the same formula restricted to x ≠ 1.
- Discount fractions. 25% off leaves 75%, so multiply the price by 0.75. At 64 dollars, 0.75 × 64 = 48 dollars.
- Divide a fraction by a whole number. ÷ 2 = × = . Likewise ÷ 8 = .
3 Why
The first function changes what the second function receives. Reversing them therefore changes the second input, which can change the final answer. Agreement at a single input is not enough to establish equal functions: they must have the same domain and agree at every input there. In an application, a unit tells you what a number measures. A number labeled gallons cannot fill an input slot labeled hours, even when the bare formulas permit the arithmetic.
4 The rule
Usually as functions.
Check both orders rather than assuming equality.
For a meaningful composition, the inner output must be an acceptable outer input, including its units.
The same idea, five ways
order matters; f after g may differ from g after f
Changing which job happens first can change the next input and the final output.
- f(g(x)) and g(f(x)) are usually different functions
- 2 + 3 = 3 + 2: addition is commutative
- 5 − 2 ≠ 2 − 5: subtraction is not commutative
- hours → miles → gallons
A discount and a coupon act on different intermediate prices when reversed.
The same idea, other ways
The first job sets up the second. Adding a coat after washing an object is a different process from washing after adding the coat.
First job changes the second input
Switching jobs can switch the answer
The inner function hands over a package with a label. If the label says miles, the next function must accept miles. A number alone does not tell you its meaning.
Part 1: Compare both orders
Composition can happen to commute for a particular pair. You still need to check. Two functions can also happen to agree at one input without being equal everywhere.
- One unequal output proves functions differ.
- One equal output does not prove functions equal.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Compare both orders
Composition can happen to commute for a particular pair. You still need to check. Two functions can also happen to agree at one input without being equal everywhere.
- One unequal output proves functions differ.
- One equal output does not prove functions equal.
Composition can happen to commute for a particular pair. You still need to check. Two functions can also happen to agree at one input without being equal everywhere.
Worked example
A coincidence is not function equality
For f(x) = x + 1 and g(x) = , compare both orders at 0 and at 1. You want to test whether one matching answer tells the whole story. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
One matching input: not enough
One differing input: functions differ
Compare + 1 with + 2x + 1
- At 0, and .Both paths happen to end at 1 for this input.
- At 1, and .The first stage now sends different numbers to the second stage.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Use a small test input to catch a difference, then use formulas and domains to establish equality.
Part 2: Interpret a composition with units
Read the composition as a sentence. If s takes minutes and returns sit-ups, and c takes sit-ups and returns calories, c(s(t)) is calories burned during t minutes of sit-ups.
- The inner s output counts sit-ups.
- The outer c output counts calories.
- The input and output letters are placeholders; the units explain their meaning.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Interpret a composition with units
Read the composition as a sentence. If s takes minutes and returns sit-ups, and c takes sit-ups and returns calories, c(s(t)) is calories burned during t minutes of sit-ups.
- The inner s output counts sit-ups.
- The outer c output counts calories.
- The input and output letters are placeholders; the units explain their meaning.
Read the composition as a sentence. If s takes minutes and returns sit-ups, and c takes sit-ups and returns calories, c(s(t)) is calories burned during t minutes of sit-ups.
Worked example
Minutes to sit-ups to calories
Use the illustrative models s(t) = 12t sit-ups and c(n) = calories. Interpret and evaluate c(s(4)). You want the calories assigned by this model to the sit-ups completed in 4 minutes. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- sit-ups.s accepts minutes and returns the exercise count.
- calories.c accepts the count produced by s.
- Interpretation: c(s(4)) is the modeled calories burned in 4 minutes of sit-ups.
- Value: c(s(4)) = 12 calories.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Read inside to outside, naming each quantity: minutes, sit-ups, calories.
- An interpretation question needs a sentence. A numerical value can be found only when the functions’ rules or values are supplied.
Part 3: Check whether the reverse order makes sense
A numerical formula may accept a number that its application cannot interpret. In the driving story, fuel use must follow distance. Feeding gallons into a driving-time rule gives the wrong kind of input.
- If m accepts hours and returns miles, and G accepts miles and returns gallons, G(m(h)) is meaningful.
- m(G(h)) does not match these units; G cannot start with hours and m cannot take gallons.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Check whether the reverse order makes sense
A numerical formula may accept a number that its application cannot interpret. In the driving story, fuel use must follow distance. Feeding gallons into a driving-time rule gives the wrong kind of input.
- If m accepts hours and returns miles, and G accepts miles and returns gallons, G(m(h)) is meaningful.
- m(G(h)) does not match these units; G cannot start with hours and m cannot take gallons.
A numerical formula may accept a number that its application cannot interpret. In the driving story, fuel use must follow distance. Feeding gallons into a driving-time rule gives the wrong kind of input.
Worked example
Hours to distance to fuel
Let m(h) = 45h miles and G(d) = gallons. Evaluate the meaningful composition at 2 hours and explain the order. You want gallons used for the distance driven in 2 hours. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- miles.The mileage rule accepts hours.
- gallons.The fuel rule accepts miles.
- Reject m(G(h)) as an interpretation for these models.G expects miles rather than hours, and m expects hours rather than G's gallon output.
- G(m(2)) = 3 gallons.
- The order is hours to miles to gallons.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the input and output unit under each function name before deciding which name goes inside.
Part 4: Both orders can be meaningful and can sometimes commute
When two rules both accept and return ordinary real numbers, you can often use either order. The outputs can still differ, as the earlier linear pair showed. Some particular pairs do give equal functions in both orders.
- Both orders can be meaningful when the input and output quantities match.
- A pair that commutes does not make composition commutative in general.
- For f(x) = x + 1 and g(x) = x + 2, both compositions give x + 3 on all real inputs.
f(x) = x + 1; g(x) = x + 2
f(g(x)) = (x + 2) + 1 = x + 3
g(f(x)) = (x + 1) + 2 = x + 3
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Both orders can be meaningful and can sometimes commute
When two rules both accept and return ordinary real numbers, you can often use either order. The outputs can still differ, as the earlier linear pair showed. Some particular pairs do give equal functions in both orders.
- Both orders can be meaningful when the input and output quantities match.
- A pair that commutes does not make composition commutative in general.
- For f(x) = x + 1 and g(x) = x + 2, both compositions give x + 3 on all real inputs.
When two rules both accept and return ordinary real numbers, you can often use either order. The outputs can still differ, as the earlier linear pair showed. Some particular pairs do give equal functions in both orders.
f(x) = x + 1; g(x) = x + 2
f(g(x)) = (x + 2) + 1 = x + 3
g(f(x)) = (x + 1) + 2 = x + 3
Worked example
A pair whose order does not change the function
Let f(x) = x + 1 and g(x) = x + 2, both with all real inputs. Find both compositions and compare them. You want to see a case where reversing two connected rules gives the same complete function. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- .g adds 2 first, then f adds 1.
- .f adds 1 first, then g adds 2.
- Both composite domains are all real numbers.Both component rules accept every real intermediate answer.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Functions with the same input and output units can permit both orders without giving equal answers.
Part 5: Distance to force to acceleration
A distance rule can return a force, and a force rule can return an acceleration. Acceleration measures how quickly speed or direction changes. To find acceleration from distance, hand the distance rule's force output to the acceleration rule. In this model, G names the force rule, F names its force input to a, and r names distance. The letters are labels for their quantities.
- For the scaled practice model below, the meaningful order is a(G(r)).
- The units pass from distance to force to acceleration.
- a(G(r)) means the modeled acceleration of a planet at distance r from the sun.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Distance to force to acceleration
A distance rule can return a force, and a force rule can return an acceleration. Acceleration measures how quickly speed or direction changes. To find acceleration from distance, hand the distance rule's force output to the acceleration rule. In this model, G names the force rule, F names its force input to a, and r names distance. The letters are labels for their quantities.
- For the scaled practice model below, the meaningful order is a(G(r)).
- The units pass from distance to force to acceleration.
- a(G(r)) means the modeled acceleration of a planet at distance r from the sun.
A distance rule can return a force, and a force rule can return an acceleration. Acceleration measures how quickly speed or direction changes. To find acceleration from distance, hand the distance rule's force output to the acceleration rule. In this model, G names the force rule, F names its force input to a, and r names distance. The letters are labels for their quantities.
Worked example
Choose a meaningful gravity-model composition
In an invented scaled model, G(r) = force units for r > 0 distance units, and a(F) = acceleration units for F ≥ 0 force units. Interpret and evaluate a(G(4)). You want acceleration obtained from the force at distance 4. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- force units.The distance input goes into the inner force model first.
- acceleration units.The outer model accepts the force output and divides it by 8.
- The reverse connection does not match the stated quantity labels.G expects distance, not the acceleration returned by a.
- a(G(4)) = acceleration units.
- It means the modeled acceleration at distance 4.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Read the input and output names before manipulating an application formula.
Part 6: A price example makes order visible
A percentage reduction changes with the price it receives. A coupon removes a fixed amount. This is why moving the coupon earlier changes the later percentage savings. Compare the numeric prices first, then write the two formulas.
- On starting prices x ≥ 11 dollars, both composed prices are nonnegative and both store instructions make sense.
- The reverse order in this example costs 2 dollars more.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
A price example makes order visible
A percentage reduction changes with the price it receives. A coupon removes a fixed amount. This is why moving the coupon earlier changes the later percentage savings. Compare the numeric prices first, then write the two formulas.
- On starting prices x ≥ 11 dollars, both composed prices are nonnegative and both store instructions make sense.
- The reverse order in this example costs 2 dollars more.
A percentage reduction changes with the price it receives. A coupon removes a fixed amount. This is why moving the coupon earlier changes the later percentage savings. Compare the numeric prices first, then write the two formulas.
Worked example
A store’s two orders
Let d(x) = 0.75x apply 25% off a price, and c(x) = x − 8 apply an 8-dollar coupon. Compare c(d(64)) and d(c(64)), then find both formulas. You want the price in each order. Plan: keep a separate line for each discount or coupon.
Show the steps and the answer
- ; .The percentage discount comes first in c(d(64)); the coupon acts on its remaining price.
- ; .In the reverse order, the percentage discount acts on the price after the coupon.
- ; .Substitute the whole inner price; distribution gives 0.75 × 8 = 6.
- Discount then coupon: 40 dollars.
- Coupon then discount: 42 dollars.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the current price after each instruction. Do not apply both instructions separately to the original price.
Part 7: Interpret a word-only composition
You can explain a composition even when no numerical formulas are given. Each function’s description tells you the kind of input and output. Follow those descriptions as you would follow labels on packages. The outside function names the final quantity.
- Interpret means state what the expression measures in words.
- A quantity description by itself does not supply a numerical rate.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Interpret a word-only composition
You can explain a composition even when no numerical formulas are given. Each function’s description tells you the kind of input and output. Follow those descriptions as you would follow labels on packages. The outside function names the final quantity.
- Interpret means state what the expression measures in words.
- A quantity description by itself does not supply a numerical rate.
You can explain a composition even when no numerical formulas are given. Each function’s description tells you the kind of input and output. Follow those descriptions as you would follow labels on packages. The outside function names the final quantity.
Worked example
Two orders of composition, and a pool hose with water cost
(a) Let f(x) = 3x − 4 and g(x) = . Find f(g(x)) and g(f(x)), give the domain of each, and decide whether they are the same function. (b) A hose fills a pool at a steady rate, so after t minutes the pool holds V(t) = 12t gallons. The water company charges W(v) = 0.005v dollars for v gallons. Decide which composition, W(V(t)) or V(W(t)), is meaningful. Find a formula for the meaningful one and evaluate it at t = 50. Label every quantity with its units.
Show the steps and the answer
- For f(g(x)), the inner function is g, because g acts on x first. For g(f(x)), the inner function is f.In a composition the function written closest to x is applied first. Its output becomes the input of the outer function.
- . The domain is .Replace x in f with . The inner root needs x ≥ 0, and f accepts any real number, so no further restriction is added.
- . The domain needs , so .Replace x in g with 3x − 4. A square root needs a non-negative input, so the inner output must be at least 0.
- Test , which is in both domains: , and . The values are 2 and , which differ.One allowed input that gives different outputs proves the two functions are different. The domains also differ, [0, ∞) against , ∞), which is a second reason.
- In part (b), label the units. V takes t in minutes and returns gallons. W takes v in gallons and returns dollars.A composition makes sense only when the inner output is an acceptable input for the outer function, units included.
- W(V(t)): the starting input is t minutes, the intermediate output V(t) is in gallons, and the final output W is in dollars. Gallons is exactly what W expects, so this order is meaningful.The intermediate unit (gallons) matches W's input unit (gallons).
- V(W(t)) would feed W's output, which is in dollars, into V, which expects minutes. This order is not meaningful.The intermediate unit (dollars) does not match V's input unit (minutes). The formula can be written, but it does not describe anything real.
- dollars. At : gallons, so dollars.Substitute the inner formula into the outer one, then evaluate. The result is the cost of the water after t minutes.
Work to write
- f(g(x)) = 3 − 4, domain x ≥ 0
- g(f(x)) = , domain x ≥
- At x = 4: f(g(4)) = 2 and g(f(4)) = , so f(g(x)) ≠ g(f(x))
- t (minutes) → V(t) (gallons) → W(V(t)) (dollars); gallons matches W's input
- V(W(t)) is not meaningful: dollars cannot be input as minutes
- W(V(t)) = 0.06t dollars
- W(V(50)) = W(600) = 3 dollars
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Answer template: starting input, inner quantity, final outer quantity.
Part 8: Units alone choose an order
No speed or fuel formula is needed to choose the meaningful order. The matching labels decide the connection, like matching a plug to its socket. Here hours enter f and miles leave it; those miles fit g, whose final output measures gallons.
- For these definitions, g(f(x)) is meaningful.
- Bare-number substitution does not prove that an applied interpretation matches its units.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Units alone choose an order
No speed or fuel formula is needed to choose the meaningful order. The matching labels decide the connection, like matching a plug to its socket. Here hours enter f and miles leave it; those miles fit g, whose final output measures gallons.
- For these definitions, g(f(x)) is meaningful.
- Bare-number substitution does not prove that an applied interpretation matches its units.
No speed or fuel formula is needed to choose the meaningful order. The matching labels decide the connection, like matching a plug to its socket. Here hours enter f and miles leave it; those miles fit g, whose final output measures gallons.
Worked example
Choose the textbook’s meaningful notation
f(x) gives miles driven in x hours, and g(y) gives gallons used for driving y miles. Which is meaningful: f(g(y)) or g(f(x))? You want the order whose handoff has the unit the second rule expects. Plan: label each input and output before choosing an order.
Show the steps and the answer
- f: hours miles; g: miles gallons.Each description names its input and output quantity.
- Choose g(f(x)): f(x) supplies miles, which g accepts.The quantity passed between functions matches.
- Reject f(g(y)): g(y) supplies gallons, while f needs hours.Gallons cannot fill the time slot in these definitions.
- g(f(x)) is meaningful: gallons used for the miles driven in x hours.
- f(g(y)) does not match these quantity definitions.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write hours → miles and miles → gallons, then join the repeated unit.
Part 9: Evaluate asks for output; solve asks for input
Two questions can use the same machines while searching in opposite directions. Evaluate supplies a starting input and asks what comes out. Solve supplies a desired output and asks which starting input gets there. The equation records that desired output, like finding how long a trip must take to reach a chosen destination.
- Evaluate c(s(4)) means start with time 4 and find calories.
- Solve c(s(t)) = 45 means start with desired calories 45 and find time t.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Evaluate asks for output; solve asks for input
Two questions can use the same machines while searching in opposite directions. Evaluate supplies a starting input and asks what comes out. Solve supplies a desired output and asks which starting input gets there. The equation records that desired output, like finding how long a trip must take to reach a chosen destination.
- Evaluate c(s(4)) means start with time 4 and find calories.
- Solve c(s(t)) = 45 means start with desired calories 45 and find time t.
Two questions can use the same machines while searching in opposite directions. Evaluate supplies a starting input and asks what comes out. Solve supplies a desired output and asks which starting input gets there. The equation records that desired output, like finding how long a trip must take to reach a chosen destination.
Worked example
Find the time from a requested calorie output
In an invented practice model, s(t) = 18t sit-ups and c(n) = calories. How many minutes give c(s(t)) = 45 calories? You are given the output 45 and must find the input time. Plan: form the combined formula, set it equal to the requested output, solve for time, then check both original functions.
Show the steps and the answer
- .s supplies the whole exercise count to c, and 18 ÷ 6 = 3.
- Solve 3t = 45. Divide both sides by 3: .This locates the starting time whose final calorie output is 45; division undoes multiplication by 3.
- Check sit-ups, then calories.The proposed time must produce the requested final output in the original two-stage calculation.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Given input: evaluate. Given output and a question asking when or which input: solve.
Part 10: A fresh interpretation to copy as a pattern
A printer first turns time into a page count. Ink use then depends on that count. This is the same handoff idea with different quantities, so you can rebuild the interpretation by reading labels rather than memorizing one story.
- w(p(t)) describes grams of ink used during t minutes of printing.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
A fresh interpretation to copy as a pattern
A printer first turns time into a page count. Ink use then depends on that count. This is the same handoff idea with different quantities, so you can rebuild the interpretation by reading labels rather than memorizing one story.
- w(p(t)) describes grams of ink used during t minutes of printing.
A printer first turns time into a page count. Ink use then depends on that count. This is the same handoff idea with different quantities, so you can rebuild the interpretation by reading labels rather than memorizing one story.
Worked example
Minutes to pages to ink
p(t) counts pages printed in t minutes, and w(n) counts grams of ink used for n pages. Interpret w(p(10)) and explain why p(w(10)) does not match these definitions. You want a sentence about quantities. Plan: read each expression from the inside outward.
Show the steps and the answer
- p(10) counts pages printed in 10 minutes.p accepts minutes and returns pages.
- w(p(10)) counts the grams of ink used for those pages.w accepts pages and returns grams.
- p(w(10)) would hand grams of ink to p, which needs minutes.The output of w cannot fill p’s time input slot under the stated definitions.
- w(p(10)) means grams of ink used in 10 minutes of printing.
- p(w(10)) does not match the stated quantity labels.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- The outside function names the final quantity in your answer.
5 How
- For each order, identify the function nearest the original input.
- Evaluate or substitute that inner function into the other function.
- Compare the resulting formulas and their domains. A different answer at one allowed input proves the functions differ.
- For an application, label the starting input, intermediate output, and final output with units.
- Check that the intermediate unit matches the outer function's expected input unit.
Choose an order and compare it
- Write each function as its input quantity → its output quantity. A unit is a named measure such as hours or miles.
- Start with the function accepting the given input quantity; put it inside the other name.
- Pass its output to a function accepting that output quantity.
- For pure-number functions, calculate both formulas and their domains. One different output proves they differ; equality requires the same outputs everywhere and the same domain.
6 Worked example
Worked example
Two orders of composition, and a unit check for fuel use
(a) Let f(x) = 2x + 5 and g(x) = . Find f(g(x)) and g(f(x)). Decide whether they are the same function. (b) A delivery van drives at a steady speed, so the distance it covers in t hours is D(t) = 60t miles. The van uses fuel according to G(d) = gallons for d miles driven. Find the meaningful composition that gives gallons used after t hours, and evaluate it at t = 3. Explain why the other order, D(G(d)), is not meaningful.
Show the steps and the answer
- For f(g(x)), the inner function is g, because it acts on x first. For g(f(x)), the inner function is f.In a composition, the function written nearest the input is applied first.
- Substitute g(x) = into f: .f doubles its input and adds 5, and here its input is .
- Substitute f(x) = 2x + 5 into g: .g squares its input, and here its input is the whole expression 2x + 5.
- Compare the two results at . and . Both functions have domain all real numbers.A single allowed input that gives different outputs proves the functions are different.
- In part (b), label the units. For D, the input t is in hours and the output is in miles. For G, the input d is in miles and the output is in gallons.A composition is meaningful only if the inner output can be used as the outer input.
- Use the order G(D(t)). The chain is t hours miles gallons. So gallons.D gives miles, and miles is the unit G expects as its input.
- Evaluate at . miles, and gallons.First find the intermediate output, then feed it into the outer function.
- Check the order D(G(d)). G(d) gives gallons, but D expects an input in hours.The intermediate unit (gallons) does not match the input unit D expects (hours), so this composition has no real-world meaning.
Work to write
- f(g(1)) = 7 ≠ 49 = g(f(1)), so f∘g ≠ g∘f
- t (hours) → D(t) (miles) → G(D(t)) (gallons)
- G(D(3)) = 6 gallons
- D(G(d)) is not meaningful: G outputs gallons, but D needs hours
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write input units above the first arrow and output units above each following arrow.
- Understand, then rebuild: the order from the parentheses or the units. Do not memorize which letter goes first; letters can change.
7 The trap
Treating a valid arithmetic calculation as proof that an application makes sense. Label the units as well as the numbers.
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.
Lesson 4 of 10
Follow a composition through tables
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
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.
Lesson 5 of 10
Follow a composition across two graphs
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
A graph draws a function's input-output pairs as points. Think of it as a map: the horizontal address is the input and the vertical address is the output. For one function, start at the input on the x-axis, find the graph directly above or below it, and read the height on the y-axis. A composition uses two maps. The height you read on the first map becomes a horizontal address on the second map. You do not carry the first point across unchanged. You carry its output number, then use that number as the next input.
2 Picture it
Reminder
Reminder: Ordered pair, Axes, Negative squares, Composition
- Ordered pair. (2, 4) means input 2 and output 4; the first coordinate is horizontal.
- Axes. The x-axis runs horizontally; the y-axis runs vertically.
- Negative squares.
- Composition. f(g(2)) uses g's output as f's input.
3 Why
An ordered pair (a, b) on a function graph means that input a produces output b. The first graph therefore turns the starting x-coordinate into an intermediate y-coordinate. The definition of composition makes this intermediate output the outer input, so it must be located along the second graph's horizontal axis. Reading the height there finishes the second function evaluation. The graphs can have different scales, so read their numbered axes instead of comparing the physical heights on the page.
4 The rule
For f(g(a)): read the y-value of g at ; use that number as the x-value on f; read f's y-value.
A point (a, b) on g means .
The same idea, five ways
f of g of two
Read g’s height at horizontal input 2, then use that number as f’s horizontal input.
- g(2) = 4
- f(4) = 16
- f(g(2)) = 16
- On g: (2, 4); on f: (4, 16)
Use the destination on one map as the starting address on a second map.
The same idea, other ways
The first map sends horizontal address 2 to vertical address 4. The second map starts at horizontal address 4 and sends it to vertical address 16.
The pair (2, 4) says g(2) = 4. The pair (4, 16) says f(4) = 16. The output coordinate of the first pair matches the input coordinate of the second.
On g: (2, 4)
On f: (4, 16)
Match the middle 4
Part 1: Read the inner graph
The inner graph handles the original input. An output can be below zero, and it still becomes a valid next input if the outer function accepts it. In this part, g(x) = x + 2 and f(x) = are the two rules you will connect.
- Read input horizontally and output vertically.
- A point below the x-axis gives a negative output.
Worked example
A negative intermediate output
Using g(x) = x + 2, find the first graph reading for f(g(−3)). You only need the output of g at input −3. Plan: read the inner curve at the starting horizontal input, then carry its height to the outer x-axis.
Show the steps and the answer
- Find on g, so .The point records input −3 and output −1.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- A point below the x-axis has a negative output. Keep its minus sign at the handoff.
Part 2: Move to the outer graph
The outer graph starts from the intermediate number on its own horizontal axis. Its height is the final answer. A negative input is a location to the left of zero, not a negative height you must keep.
- f(−1) is read at horizontal input −1.
- For the square graph, input −1 gives output 1.
Worked example
Finish the negative-input path
The inner graph gave −1, and f(x) = . Find the final output in f(g(−3)). You now read f at input −1. Plan: the first reading is already −1. Put −1 on the outer x-axis and read the curve’s height there.
Show the steps and the answer
- Locate on f's x-axis and read the point .The intermediate value is now the outer input.
- .The point's vertical coordinate is the final output.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Move the first output to the second x-axis before reading the next height.
Part 3: Read the unlabeled curve from the grid
An exam graph may give a grid with no printed answer beside its points. Count along the numbered x-axis to your input. Travel straight up or down to the curve. Then read across to the y-axis. A height of 0 means the curve is on the x-axis. It is an answer, rather than a failed lookup.
- A point’s horizontal coordinate is its input and its vertical coordinate is its output.
- Two graphs may use different scales. Read their numbers separately.
Worked example
Read both orders from the grid
Use these graphs of g(x) = 4 − x and f(x) = without labeled answer points. Find f(g(2)) and g(f(2)). You start at 2 in each order. Plan: find the first curve’s height from the grid, then carry that number to the other x-axis.
Show the steps and the answer
- At horizontal input 2 on g, the line meets height 2, so .The grid crossing pairs input 2 with output 2.
- At input 2 on f, the curve meets height 4, so .The first output 2 becomes the second input.
- For the reverse order, from the curve.The innermost f receives 2 first.
- At input 4 on g, the line meets the x-axis at height 0, so .A point on the x-axis has output 0, which is a valid numerical answer.
- f(g(2)) = 4.
- g(f(2)) = 0.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Pencil on the x-axis, vertically to the curve, then horizontally to the y-axis.
5 How
- Choose the inner graph from the function nearest the starting input.
- Locate that input on the inner graph's x-axis and move vertically to its curve.
- Read the curve's y-coordinate as the intermediate output.
- Locate that number on the outer graph's x-axis and move vertically to its curve.
- Read the outer y-coordinate as the final answer. Check each graph's own scale.
Read a two-graph composition
- Rewrite the request with nested parentheses and choose the graph nearest the starting input.
- Put your pencil at the starting input on that graph’s x-axis. Move vertically to the curve, then horizontally to read its y-axis value.
- Write the in-between answer on a separate line.
- Place that number on the outer graph’s x-axis. Move vertically to its curve and horizontally to read its output.
- Check each numbered scale. Give exact values at clear grid intersections and describe uncertain readings as estimates.
6 Worked example
Worked example
A line feeds a square graph
The first picture is g(x) = x + 2 and the second is f(x) = . Use the labeled points to find f(g(2)). The input is 2 on g; the resulting height selects the input on f. Plan: read the inner curve at the starting horizontal input, then carry its height to the outer x-axis.
Show the steps and the answer
- On g, find the labeled point (2, 4), so .The point's horizontal coordinate is the input and its vertical coordinate is the output.
- Move to input 4 on f's horizontal axis.g's output becomes f's input, rather than staying a height.
- Read the labeled point (4, 16), so .The outer graph gives the final output at the intermediate input.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 5
Two clear labeled points
The graphs show g(x) = x + 2 and f(x) = . Find f(g(0)). The starting input is 0; you want the final height after visiting both graphs. Plan: read the height on g first, then use that number as the horizontal input on f.
Show the steps and the answer
- At horizontal input 0, g has point (0, 2), so .The first coordinate is input, and the second coordinate is output.
- Move the output 2 to f’s horizontal axis. The point (2, 4) gives .Composition makes the first height the second input.
- .The second height is the final output.
Rung 2 of 5
Carry a height to a new horizontal position
Using g(x) = x + 2 and f(x) = , find f(g(2)) from the graphs. The input is 2; the first height tells you where to start on the second graph. Plan: read g at 2, carry the height across, then read f at that new input.
Show the steps and the answer
- On g, (2, 4) means .The graph’s height over input 2 is 4.
- On f, start at horizontal input 4. Its point (4, 16) gives .The handoff 4 becomes a horizontal coordinate, not a requested height.
- .The completed two-stage path ends at height 16.
Rung 3 of 5
A negative handoff can work
Using g(x) = x + 2 and f(x) = , find f(g(−3)). The input is negative, and the first output is also negative. You want the second graph’s output at that handoff. Plan: read g at −3, then start on f to the left of zero.
Show the steps and the answer
- On g, the point gives .A point below the horizontal axis has a negative output.
- Put on f’s horizontal axis. The point gives .Negative inputs are positions to the left of zero; their square is nonnegative.
- .The final output is the second graph’s height, not the first output’s sign.
Rung 4 of 5
Reverse which graph receives the start
Using g(x) = x + 2 and f(x) = , find g(f(2)) and compare it with the earlier f(g(2)). The same input now enters f first. Plan: restart at 2 on f, carry its height to g, and compare the final heights.
Show the steps and the answer
- On f, (2, 4) gives .f is now inside the parentheses and receives the starting input.
- On g, horizontal input 4 gives point (4, 6), so .The first output becomes g’s input.
- , while the earlier .Changing the first graph changes the route even when the first handoff happens to be 4 in both cases.
- g(f(2)) = 6.
- f(g(2)) = 16.
- The two orders differ at input 2.
Rung 5 of 5
Solve backward and keep every matching path
The graphs show g(x) = x + 2 and f(x) = , both accepting every real input. Solve f(g(x)) = 4. The final height is supplied; you want every starting input that leads to it. Plan: find every input where the outer f graph has height 4, then find the g inputs that produce those numbers.
Show the steps and the answer
- On f, height 4 meets the curve at and (2, 4). The outer input can be or 2.Both a negative and a positive number square to 4, so both intersections must be read.
- On g, output occurs at point , so one starting input is .The first function must produce the chosen outer input −2.
- On g, output 2 occurs at point (0, 2), so another starting input is 0.The second matching outer input requires another backward path.
- Check forward: and .Every claimed start must finish at the requested height after both graphs.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Say horizontal, vertical, horizontal, vertical as you trace a graphical composition.
- Use labeled points for exact values. If a graph reading is estimated, label the answer as an estimate.
- Know cold: across on the x-axis, up or down to the curve, read the height, then carry the height to the next x-axis.
7 The trap
Using the first graph's output as a height on the second graph. Move it to the second x-axis before finding the outer output.
Lesson 6 of 10
Evaluate formulas one number at a time
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
Keep two recipe cards on a counter. For a composition, follow the inner recipe first, write its answer, and then use that answer in the outer recipe. A formula is a recipe written with letters. Each input letter labels a place to insert a value. The names x, t, and u can label the same place. For example, f(u) = and f(x) = describe the same root recipe. Using u for an outer input helps you keep it separate from the x inside another formula. The function name tells you which recipe to use; the letter inside the parentheses tells you where its input belongs.
2 Picture it
Reminder
Reminder: Order of operations, Signed arithmetic, Substitution, Composition order, Input-slot names
- Order of operations. Square before subtracting: − 5 = 25 − 5 = 20.
- Signed arithmetic. (−4 = 16 and 16 − (−4) = 20.
- Substitution. Both slots in − t receive the same number: f(5) = − 5.
- Composition order. f(h(1)) starts with h(1), not f(1).
- Input-slot names. h(x) = 3x + 2 and h(t) = 3t + 2 both say multiply the input by 3 and add 2. They define the same function.
3 Why
A variable in a function formula marks where an input will be inserted. Its name can change without changing the function's instructions. For example, − t and − u both say to square the input and subtract that same input. A composition specifies two substitutions: the original number fills the inner slots, and its resulting output fills every outer slot. Doing the arithmetic after each substitution follows exactly the function-machine definition and makes mistakes easier to locate.
4 The rule
For f(h(a)), calculate h(a) first; then substitute that entire numerical answer into every input slot of f.
The input-variable letter does not change the instructions.
The same idea, five ways
f of h of one
Put 1 into h’s formula, then put its resulting number into f’s formula.
- h(x) = 3x + 2
- f(h(1)) = f(5) = 20
The first recipe makes the ingredient measured into the second recipe.
The same idea, other ways
Finish the first recipe before beginning the second. A finished intermediate value becomes the ingredient measured into the second recipe.
f(t) = − t has two blanks holding the same input. At input 5 the blanks become − 5. Calling the blanks u would not change either operation.
Part 1: Number into the inner formula
First evaluate the formula closest to the starting number. A zero intermediate answer is allowed unless the next function rejects zero.
- h(1) = 5 for h(x) = 3x + 2.
- The intermediate answer is a complete input for the next function.
Worked example
A first-stage negative input
With h(x) = 3x + 2, evaluate h(−2). The input is −2; find the first-stage output. Plan: substitute the entire signed number in parentheses, then multiply before adding.
Show the steps and the answer
- .Replace the input letter with −2 and keep its sign inside parentheses.
- .A positive times a negative is negative, and adding 2 moves two steps toward zero.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Keep a negative input inside parentheses until multiplication is complete.
Part 2: Intermediate answer into the outer formula
The outer recipe receives a new input. Insert that input in every position, even when it is negative. Parentheses show that the square acts on the negative number itself.
- The square happens before the subtraction.
Worked example
Finish a negative intermediate path
For f(t) = − t and h(x) = 3x + 2, find f(h(−2)). You want both stages completed. Plan: compute h(−2) = −4, then replace both t slots in f with that entire signed answer.
Show the steps and the answer
- , so .The inner output becomes the outer input.
- .A negative squared is positive, and subtracting a negative adds its opposite.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Circle every occurrence of the outer input letter before substituting.
5 How
- Expand circle notation into parentheses if needed.
- Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
- Complete that arithmetic and write the intermediate output.
- Copy the outer formula and replace every input letter with that output.
- Complete the arithmetic and check by substituting into a combined formula.
Evaluate formulas at a numerical input
- Expand circle notation into parentheses if needed.
- Copy the inner formula and replace every input letter with the original number, using parentheses for negative numbers.
- Complete that arithmetic and write the intermediate output.
- Copy the outer formula and replace every input letter with that output.
- Complete the arithmetic and check by substituting into a combined formula.
6 Worked example
Worked example
Both orders at input 1
Let f(t) = − t and h(x) = 3x + 2. Find f(h(1)) and h(f(1)). You start at 1 and want the final output in each order. Plan: finish the inner arithmetic, then insert its answer into every outer slot. The input letters t and x are slot names; their difference does not change the method.
Show the steps and the answer
- For f(h(1)), start with .h is the inner function for this order.
- .The output 5 replaces both occurrences of t in f.
- For h(f(1)), start with .f is the inner function for the reversed order.
- .The intermediate output 0 is a valid numerical input to h.
- f(h(1)) = 20.
- h(f(1)) = 2.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 4
One slot in each formula
Let g(x) = x + 1 and f(x) = 2x. Find (f ∘ g)(2). The input is 2; add 1 first, then use that answer as the input to the doubling function. Plan: finish g first, then carry its whole answer into f.
Show the steps and the answer
- .The circle means composition, so g is the inner function.
- .The original input goes into g first.
- .The output 3 from g is the input to f.
Rung 2 of 4
Fill every outer slot and reverse the order
Let f(t) = − t and h(x) = 3x + 2. Find f(h(1)) and h(f(1)). You start at 1 and want the final output in each order. Plan: finish the inner arithmetic, then insert its answer into every outer slot. The input letters t and x are slot names; their difference does not change the method.
Show the steps and the answer
- For f(h(1)), start with .h is the inner function for this order.
- .The output 5 replaces both occurrences of t in f.
- For h(f(1)), start with .f is the inner function for the reversed order.
- .The intermediate output 0 is a valid numerical input to h.
- f(h(1)) = 20.
- h(f(1)) = 2.
Rung 3 of 4
Carry a negative output
For f(t) = − t and h(x) = 3x + 2, find f(h(−2)). You want both stages completed. Plan: compute h(−2) = −4, then replace both t slots in f with that entire signed answer.
Show the steps and the answer
- , so .The inner output becomes the outer input.
- .A negative squared is positive, and subtracting a negative adds its opposite.
Rung 4 of 4
A fractional final answer
Let q(x) = 2x + 3 and p(u) = . Find p(q(1)). You start with 1 and want the output after the linear rule and then the fraction rule. Plan: compute q(1), replace both outer u slots with that answer, and divide only after computing the whole top and bottom.
Show the steps and the answer
- .The inner formula acts first, with multiplication before addition.
- .Both u slots receive the same whole inner answer 5.
- and , so .The top and bottom must each be completed before division; the bottom 3 is nonzero.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the intermediate output on its own line before the outer substitution.
- Name the function before reading its formula. The letters inside formulas can be different and still represent input slots.
- Know cold: one line per function, inner first. The output of the first line is the input of the second.
7 The trap
Replacing only the squared input in − t. The same input goes into both positions, so f(5) is − 5.
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.
Lesson 7 of 10
Substitute the whole inside expression
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
Before filling a form with letters, run the two machines with numbers. Let g multiply by 3 and add 2, and let f square its input and subtract 6. Input 0 goes to 2 and then −2. Input 1 goes to 5 and then 19. Input 2 goes to 8 and then 58. A formula records all these trips at once. Each input letter in the outer rule is a blank on the form. Put the whole inner expression into every blank. Parentheses hold its pieces together until you multiply and combine them. This replacement is substitution. You can run the same rule twice or connect three rules with the same method.
2 Picture it
Reminder
Reminder: Distribution, Expanding a square, Subtracting a package, Like terms, Nonzero denominator, Composition order, Multiplying powers
- Distribution. 2(x − 4) = 2x − 8, because the factor multiplies both terms.
- Expanding a square.
- Subtracting a package.
- Like terms. 2x + 2x = 4x, while and x are different kinds of terms.
- Nonzero denominator. 2x − 1 ≠ 0 means x ≠ .
- Composition order. f(g(x)) replaces the input slots in f with g(x), not the other way around.
- Multiplying powers. x × = x × (x × x) = . The exponent counts three multiplied copies of x.
3 Why
A formula describes what to do to its input, regardless of whether the input is a number or an expression. If f squares its input, then f(g(x)) must square all of g(x). Squaring a sum multiplies the sum by itself, creating middle terms as well as squares. Those terms come from distributing each part across the other package. Parentheses preserve the intended input until this multiplication is finished, so they prevent lost signs and missing terms.
4 The rule
To form f(g(x)), replace every input-variable occurrence in f with the whole parenthesized expression g(x).
, because has two cross products ab.
The same idea, five ways
f of g of x; replace every outer input with the whole inner expression
The outer formula acts on the entire expression produced by the inner formula.
- f(u) = − 6: u is the outer input place
Put the same wrapped package into every blank on a form.
The same idea, other ways
The outer formula − x has two boxes. If the inner output is x + 2, fill both boxes with that package: (x + 2 − (x + 2).
f(input) = (input − (input)
Input = x + 2
Parentheses are the wrapper. A square outside the wrapper applies to every part of the input. A minus outside the wrapper subtracts every part.
Square the package: (x + 2
Subtract the package: −(x + 2)
Squaring 3x + 2 places that same group along both rectangle sides. Four products fill it: 9, 6x, 6x, and 4. Both middle rectangles contribute, so their total is 12x.
At x = 1, the inner expression 3x + 2 gives 5, whose square is 25. The expansion gives 9 + 12 + 4 = 25. Dropping the middle term gives 13, so this test catches that mistake.
Part 1: A linear outside formula
If the outer function multiplies its input by a number, that number multiplies the whole inner expression. Put in the package first, then distribute.
- For f(x) = 3x and g(x) = x − 4, f(g(x)) = 3(x − 4).
Worked example
Triple the whole inside
Let f(x) = 3x and g(x) = x − 4. Find f(g(x)). You want to triple the entire g output. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .The outer input slot receives x − 4.
- .3 multiplies x and −4.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Draw one multiplication arrow from the outside factor to each term inside.
Part 2: A square outside formula
A square means multiplying the input by itself. If the input is a sum, both copies of the whole sum must be multiplied. The middle term comes from two cross products.
- A square does not distribute over addition.
Worked example
A first square composition
Let f(x) = and g(x) = x + 1. Find f(g(x)). You want to square the complete inner output. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .Squaring multiplies the whole input by itself.
- .The four products include two matching middle terms.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Multiply two written copies if the square formula is hard to remember.
Part 3: A fraction outside formula
A fraction's denominator may also contain an input slot. Replace that slot with the complete inner expression. Then check when the new denominator would be zero.
- For f(x) = , f(g(x)) = .
- The original and intermediate restrictions still matter; the next lesson develops both gates.
g(x) = 3x + 1
Require x ≠
Worked example
A linear output enters a denominator
Let f(x) = and g(x) = 3x + 1. Find f(g(x)). You want to subtract 2 from the g output, then take the reciprocal. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .The whole inner expression replaces x in the denominator.
- .The constants 1 − 2 combine to −1.
- Find the forbidden starting input by solving : add 1 to get , then divide by 3 to get . Check: . Exclude that input.This finds and confirms the one start that makes the new denominator zero. The inner linear function itself accepts every real input.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Copy the entire fraction first, then replace its input places.
Part 4: Compose a function with itself
A machine can send its answer back through the same rule. The second trip uses the first answer as its input. In j(j(x)), the two j names mean two separate applications of the same instructions. This operation is different from multiplying the first answer by itself.
- (j ∘ j)(x) = j(j(x)).
- j(j(x)) uses the output as a new input; j(x squares the output instead.
Worked example
The same formula can receive its own output
Let j(x) = 4x + 5. Find j(j(x)) and its value at x = 1. You run j twice, using a new input the second time. Plan: put the whole first output 4x + 5 into j, distribute 4, and check with two separate number evaluations.
Show the steps and the answer
- .The outer copy of j receives 4x + 5 as its whole input.
- .Distribution multiplies both inner terms by 4, then combines the added constants.
- At .The composed formula gives the final output for starting input 1.
- j(j(x)) = 16x + 25.
- j(j(1)) = 41.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Know cold: same name means same instructions again, with a new input.
Part 5: Connect three functions
Think of three stations in a kitchen. The first prepares something for the second, and the second prepares something for the third. In p(q(v(x))), v acts first, q second, and p last. Each completed answer replaces the next input. More functions mean more stages, while the inside-first method stays the same.
- p(q(v(x))) runs v, then q, then p.
- A chain is defined only when every stage accepts the answer handed to it.
Worked example
Connect three formulas in order
Let v(x) = x + 3, q(x) = , and p(x) = 2x − 7. Find p(q(v(2))) and p(q(v(x))). You run three jobs, starting with the deepest parentheses. Plan: add 3, square the result, then double and subtract 7.
Show the steps and the answer
- .v touches the starting input, so it acts first.
- .The output 5 is now the input to the square.
- .The final rule receives 25, rather than the original 2.
- .The inner expression is squared in full and handed to the last rule.
- .All four products belong to the square.
- .The outside factor multiplies each term, then the constants combine.
- p(q(v(2))) = 43.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write one line for every function, starting with the innermost parentheses.
5 How
- Copy the outer formula and identify every input slot.
- Write the complete inner formula in parentheses in every slot.
- Keep powers outside those parentheses so they act on the entire input.
- Expand with distribution. For a square, multiply the two identical parentheses and keep both cross products.
- Combine like terms, preserve any domain restrictions, and check a small allowed input by the two-stage route.
Build one formula for a composition
- Copy the outer formula and identify every input slot.
- Write the complete inner formula in parentheses in every slot.
- Keep powers outside those parentheses so they act on the entire input.
- Expand with distribution. For a square, multiply the two identical parentheses and keep both cross products.
- Combine like terms, preserve any domain restrictions, and check a small allowed input by the two-stage route.
6 Worked example
Worked example
A square makes the middle term
Let f(x) = − 6 and g(x) = 3x + 2. Find (f ∘ g)(x) and (g ∘ f)(x). You want one formula for each order. Plan: put the complete inner formula into the outer input place, multiply out any square using four products, and collect matching terms.
Show the steps and the answer
- .The outer f squares its whole input before subtracting 6.
- .Each of the two terms in one copy multiplies each term in the other copy.
- .The two middle products add to 12x, and 4 − 6 = −2.
- .Now g multiplies f’s entire output by 3 and adds 2.
- .The factor 3 multiplies both and −6, then −18 + 2 = −16.
- Both domains are all real numbers.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 7
A constant inner answer
Let g(x) = 4 and f(x) = x + 1. Find f(g(x)). Whatever input you start with, the first machine returns 4. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .The inner output is always 4.
- .The outer function adds 1 to its input.
Rung 2 of 7
Distribute over an inner line
Let f(x) = 2x + 3 and g(x) = x − 4. Find f(g(x)). You want to double the complete inner answer and add 3. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .x − 4 replaces the outer input slot.
- .Distribute 2 and then combine the constants.
Rung 3 of 7
Fill repeated slots
Let f(x) = − x and g(x) = x + 2. Find f(g(x)). You must use the whole g output twice. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .Both occurrences of the outer input receive x + 2.
- .Multiplying the square produces four terms, and subtracting the last package changes both signs.
- .4x − x = 3x and 4 − 2 = 2.
Rung 4 of 7
A square with a negative term
Let f(x) = + 1 and g(x) = 3x − 2. Find f(g(x)). You want to square the whole difference and then add 1. Plan: wrap the inner expression in parentheses in every outer input place, then distribute and collect matching terms.
Show the steps and the answer
- .The square acts on all of g's output.
- .Each cross product contains one negative factor, while (−2)(−2) is positive.
- .The cross products add to −12x and 4 + 1 = 5.
Rung 5 of 7
Slots on both sides of a fraction
Let f(x) = and g(x) = 2x. Find f(g(x)). You replace the input on both top and bottom. Plan: put 2x into both places, then find the starting input that makes the entire denominator zero.
Show the steps and the answer
- .Each x slot in f receives the full expression 2x.
- Solve to locate the forbidden input: , so . Plug it back in: . Exclude .The denominator must not be zero. This equation finds the starting input at which that failure would occur; g itself has no restrictions.
Rung 6 of 7
The same function twice
Let j(x) = 4x + 5. Find j(j(x)) and its value at x = 1. You run j twice, using a new input the second time. Plan: put the whole first output 4x + 5 into j, distribute 4, and check with two separate number evaluations.
Show the steps and the answer
- .The outer copy of j receives 4x + 5 as its whole input.
- .Distribution multiplies both inner terms by 4, then combines the added constants.
- At .The composed formula gives the final output for starting input 1.
- j(j(x)) = 16x + 25.
- j(j(1)) = 41.
Rung 7 of 7
A three-stage symbolic chain
Let v(x) = x + 3, q(x) = , and p(x) = 2x − 7. Find p(q(v(2))) and p(q(v(x))). You run three jobs, starting with the deepest parentheses. Plan: add 3, square the result, then double and subtract 7.
Show the steps and the answer
- .v touches the starting input, so it acts first.
- .The output 5 is now the input to the square.
- .The final rule receives 25, rather than the original 2.
- .The inner expression is squared in full and handed to the last rule.
- .All four products belong to the square.
- .The outside factor multiplies each term, then the constants combine.
- p(q(v(2))) = 43.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Know cold: every slot gets the whole package. Circle each input-variable occurrence before replacing it.
- Understand, then rebuild: the expanded formula. Parentheses and distribution can recreate it; memorizing the numbers in front of its variable terms is unnecessary.
- Use x = 1 to check for a missing middle term. At x = 0 that term becomes zero and may hide the error.
7 The trap
Writing (2x + 1 = 4 + 1. The square multiplies two whole sums, so the two cross products must appear.
Lesson 8 of 10
A composite domain has two gates
Open this lessonLeans on 1Comes back in 0
Leans on
Comes back in
No lesson links recorded.
1 In plain words
Picture a trip with two ticket checks. The first gate checks your starting ticket. The second checks the ticket you receive after the first stage. Passing the first gate does not promise that you can pass the second. A composite domain is the list of starts that pass both checks. First, the inner function must accept your starting number x. Then the outer function must accept the answer g(x). These are the starts for which neither calculation stops. In the heating model, a day outside the calendar fails first; a temperature outside the cost chart fails second. Keep both checks before simplifying, because a shorter formula can hide a failed first stage.
2 Picture it
Reminder
Reminder: Domain of a fraction, Solving a linear equation, Fraction equation, Interval notation, Dividing fractions, Composition order
- Domain of a fraction. requires 3x − 2 ≠ 0, so x ≠ .
- Solving a linear equation. 4 = 3x − 2 becomes 6 = 3x, then x = 2.
- Fraction equation. = 1 permits multiplying by 3x − 2 only after requiring it nonzero.
- Interval notation. Removing 2 gives (−∞, 2) ∪ (2, ∞); parentheses exclude the point.
- Dividing fractions. 1 ÷ = 4, because division multiplies by the reciprocal.
- Composition order. f(g(x)) checks g at x first and f at the resulting number second.
3 Why
You cannot evaluate f(g(x)) if g gives no answer. You also cannot finish when g gives an answer that f cannot accept. These are separate ways the path can stop. The outer restriction applies to the in-between answer g(x), not directly to x. Solving for starts that produce forbidden answers converts the second gate into a restriction on x. Simplifying afterward does not create an answer at an earlier failed stage. This is why a composition can accept an x that f alone rejects, provided g changes it into an input f accepts.
4 The rule
The domain of consists of the x values allowed by g for which g(x) is allowed by f.
Keep original restrictions when simplifying the composite formula.
The same idea, five ways
x must get through g, then g of x must get through f.
The domain of f after g is every starting input that both stages can use in order.
- (f ∘ g)(x) = f(g(x))
- {x | x is in the domain of g and g(x) is in the domain of f}
Two ticket gates check different tickets.
The same idea, other ways
A valid starting ticket gets you through gate 1. Gate 2 checks a new ticket made by gate 1. You must check both, because they examine different things.
Ask: can I calculate g(x)? Then ask: can I calculate f at that answer? If either answer is no, the starting input is outside the composite domain.
Does g accept x?
Does f accept g(x)?
Keep x only if both answers are yes
At , the inner fraction has bottom zero. At 2, the inner fraction works and returns 1, but the outer fraction has bottom zero. These failures occur at different gates.
x = : g fails
x = 2: g(2) = 1, then f fails
If g(x) = and f(x) = , the composite simplifies to x. But the first machine still cannot start at zero, so the composite is x with x ≠ 0.
| start x | g(x) | f(g(x)) | what happens |
|---|---|---|---|
| 0 | both stages work | ||
| 1 | 4 | both stages work | |
| undefined | undefined | inner bottom is 0 | |
| 2 | 1 | undefined | outer bottom is 0 |
Part 1: Watch each gate before solving
Try a few starting tickets first. Input 0 passes through −2 to −. Input 1 passes through 4 to . Input stops in the first machine. Input 2 produces 1, then stops in the second. Solving finds every start that stops, beyond the ones you happen to try.
- These pictures use f(x) = and g(x) = .
- Undefined means a stage has no permitted answer.
Worked example
Four starting tickets
Trace starts 0, 1, , and 2 through the two functions. You want to see which stage succeeds or fails. Plan: calculate g first and calculate f only if g gives an answer.
Show the steps and the answer
- ; .Both bottoms are nonzero.
- ; .The in-between input 4 is allowed by f.
- At , g has bottom , so stop.A failed first stage gives no answer to hand over.
- , then f(1) has bottom 0, so stop.An existing in-between answer can still be forbidden by the outer function.
- 0 works.
- 1 works.
- fails at gate 1.
- 2 fails at gate 2.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- The pictures show the handoff. Solving finds every starting input that creates a failed handoff.
Part 2: Gate 1: the inner function accepts x
Begin with the original inner formula. Its accepted inputs are the starting territory for the composition. A failure here means there is no intermediate answer to hand over.
- Every composite input must be in the inner domain.
- An unrestricted outer function cannot rescue a failed inner stage.
Worked example
An unrestricted outer rule still needs an inner answer
Let g(x) = and f(x) = x + 2. Find the domain of f(g(x)). You want starting inputs that make the inner fraction exist. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- Set to locate the failed inner start. Add 5: . Plug back in: . Therefore require .The equation finds the input that would make the inner bottom zero, so we exclude it.
- There are no further restrictions from f.Adding 2 accepts every real intermediate answer.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Begin with the original inner formula, even if the outer operation looks unrestricted.
Part 3: Gate 2: the outer function accepts g(x)
The outer function's forbidden numbers are intermediate outputs. Find which starting inputs would produce those numbers. The starting number itself may be allowed by the outer formula or forbidden by it; that alone does not decide the composition.
- For f(x) = , the second gate requires g(x) ≠ 1.
- Do not merely intersect the two original domains as if both received x.
Worked example
A forbidden outer input changes its starting location
Let f(x) = and g(x) = 2x. Find the domain of f(g(x)). You want to avoid starting inputs whose doubled value is 1. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- g accepts every real starting input.Doubling has no denominator or square root restriction.
- Find starts that hand f the forbidden input 1: solve . Divide by 2: . Plug back in: and . Exclude .The solve step translates the outer forbidden input into the failed starting input.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write g(x) beside the outer input requirement before solving.
Part 4: Record the domain before simplifying
A shorter formula can conceal the first gate. Keep the original restrictions next to the simplified answer. The formula together with its domain describes the function.
- Simplification keeps outputs equal on the original domain.
- It does not add starting inputs that the original composition rejected.
Worked example
Two reciprocals hide a hole
Let f(x) = and g(x) = . Find f(g(x)) and its domain. You want the result of taking the reciprocal twice, while respecting the first division. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- Require for g(x).The inner reciprocal cannot divide by zero.
- The outer function requires ; this holds for every . cannot equal zero when its denominator is nonzero.
- , with .Dividing by a nonzero fraction multiplies by its reciprocal.
- f(g(x)) = x with x ≠ 0.
- Domain: (−∞, 0) ∪ (0, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- A function answer includes its formula and the original allowed inputs.
Part 5: The inner range can settle the second gate
The range is the list of answers a machine can produce. If every answer on that list is accepted by the next machine, gate 2 needs no extra exclusions. If some answers fail, keep only starts that avoid them.
- For g(x) = , its outputs are [0, ∞). The root f(x) = accepts every one of them.
- If g(x) = x − 5, its outputs include negatives, so an outer root requires x ≥ 5.
Worked example
All square outputs fit the root
Let g(x) = and f(x) = . Find f(g(x)) and its domain. You want to know whether every square answer can enter the root. Plan: compare g’s outputs with f’s accepted inputs.
Show the steps and the answer
- Every real x can be squared, and .A square of a real number never gives a negative answer.
- Every such output can enter f, so for every real x.The root returns the nonnegative size of x.
- f(g(x)) = |x|.
- Domain: (−∞, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Compare the inner outputs to the outer accepted inputs; the two lists describe different stages.
5 How
- Find the inner domain. Record inputs making an inner denominator zero or violating any other inner requirement.
- Find what the outer function cannot accept. For an outer denominator, determine its forbidden input values.
- Set g(x) equal to each forbidden outer input and solve. Exclude the solutions that are in the inner domain.
- Keep only starting inputs passing both gates. For roots, use inequalities rather than only equations, as the next lesson explains.
- Write the result in interval notation and check a permitted input and each excluded input using the original stages.
Find the domain of f(g(x))
- Gate 1: begin with any stated input list or interval for the inner function, then write every requirement in its original formula. A bottom must be nonzero; an even root must have a nonnegative inside; a root in a bottom needs a positive inside.
- Gate 2: keep any stated outer input list or interval, and write the outer formula’s requirements with g(x) in every input slot. These requirements check the in-between answer.
- To locate a zero bottom, set it equal to 0 and solve. This finds starts that break the division. Substitute each candidate into the original stages to confirm which gate fails.
- For a root, solve an inequality for its inside. When removing a root by squaring, first check that both compared quantities are nonnegative.
- Keep only starting inputs that pass both gates. Write intervals with included endpoints closed and excluded endpoints open. Retain every original restriction after simplification.
6 Worked example
Worked example
Two different failures in a fraction composition
Let f(x) = and g(x) = . Find the domain of (f ∘ g)(x). You want every starting number that can get through g and then f. Plan: find where the first bottom is zero, then find where g hands f the number 1; exclude both starts.
Show the steps and the answer
- Gate 1: set to find the starting input that makes g divide by zero.A zero inner bottom prevents any in-between answer.
- Add 2: . Divide by 3: . Plug back in: . Exclude .Balanced operations find the failed start, and substitution confirms the zero bottom.
- Gate 2: f cannot accept 1, since . Find every start whose g answer is 1.The outer function receives g(x), so the forbidden number is a handoff value.
- Solve . On the inner domain multiply by the nonzero : .This locates starts that reach the forbidden outer input. The first exclusion makes the multiplication legal.
- Add 2: . Divide by 3: .These operations find the start that causes the second failure.
- Plug back in: , and . Exclude 2.The first stage works at 2, but its answer breaks the second division.
- Keep and . Split the line at these two excluded points.All remaining starts pass both original bottoms.
- Domain: (−∞, ) ∪ (, 2) ∪ (2, ∞).
- Set-builder: {x | x ≠ and x ≠ 2}.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 5
Both gates accept every real number
Let g(x) = x + 3 and f(x) = 2x. Find the domain of f(g(x)). You only need to decide which starting inputs can pass both rules. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- g accepts every real x.Adding 3 has no restriction.
- f accepts every real intermediate output.Multiplying by 2 has no restriction.
Rung 2 of 5
One forbidden outer value
Let g(x) = x + 2 and f(x) = . Find the domain of f(g(x)). You must prevent the intermediate answer from becoming zero. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- g accepts all real inputs, but f requires .The reciprocal's denominator is its input.
- Set to locate the forbidden handoff zero. Subtract 2: . Plug back in: , so . Exclude .This solves for the starting input that breaks the outer division.
Rung 3 of 5
An inner restriction only
Let g(x) = and f(x) = . Find the composite domain. You want a defined inner fraction followed by a square. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- Set to locate the inner zero bottom. Subtract 4: . Plug back in: . Exclude .The equation identifies the failed first-stage input.
- No further exclusion is needed.The outer square accepts any real intermediate output.
Rung 4 of 5
Two fraction exclusions
Let g(x) = and f(x) = . Find the domain of f(g(x)). You must avoid an inner zero denominator and an intermediate value of 3. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- Gate 1: gives . Plug back in: . Exclude .This finds and confirms the inner zero bottom.
- At gate 2, solve : .f rejects input 3, and x + 1 is nonzero on the inner domain.
- , so and . Plug back in: ; , so f(3) has bottom 0. Exclude this start.This start makes the outer denominator zero.
Rung 5 of 5
The first restriction disappears from the formula
Let g(x) = and f(x) = . Find the formula and domain of f(g(x)). Taking the reciprocal twice will shorten the formula, but both stages must first exist. Plan: inspect the original inside rule, then inspect the outside rule at the inside answer, keeping both restrictions.
Show the steps and the answer
- Set to find the failed inner bottom. Add 5: . Substitution gives . Exclude 5.The shorter final expression must retain this original failed input.
- The inner output is never zero on that domain.A fraction with numerator 1 and a nonzero denominator cannot be zero.
- , still with .The reciprocal undoes the first reciprocal only at allowed inputs.
- Domain: (−∞, 5) ∪ (5, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Know cold: two gates, both must open. Write gate 1 and gate 2 as separate lines on the exam.
- Put on the cheat sheet for study: x must be accepted by the inner function, and the inner output must be accepted by the outer function.
- The whole inner range must fit the outer domain to compose on every inner input. If only some outputs fit, keep only the starting inputs that produce those outputs.
- Set-builder conditions that remove two points use and: {x | x ≠ a and x ≠ b}. Interval pieces use ∪ because an input may belong to any one piece.
- Gate 1 checks x. Gate 2 checks g(x).
7 The trap
Checking only the simplified final denominator. That can lose an inner restriction which disappeared during algebra.
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.
Lesson 9 of 10
Square roots add boundary checks
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
Picture a square tile whose area you know. A square root asks for its nonnegative side length. The number under the root sign is the radicand. A negative area cannot make a real square tile, so a real square root needs a nonnegative radicand, meaning zero or more. Zero is allowed: = 0. For a composition, a square root can appear at the first gate or the second gate, so check its radicand at the stage where it appears. Also notice whether a root sits on the bottom of a fraction. Then zero fails the division even though the root itself exists.
2 Picture it
Reminder
Reminder: Square roots, Inequality reversal, Squaring a nonnegative inequality, Intersection of bounds, Denominator, Substitution, Solve a root equation, Squares greater than a bound
- Square roots. = 3, = 0, and has no real value.
- Inequality reversal. −x ≥ −3 becomes x ≤ 3 after multiplying by −1.
- Squaring a nonnegative inequality. If u ≥ 0, then ≤ 4 is equivalent to u ≤ 16; 4 is nonnegative too.
- Intersection of bounds. x ≥ −1 and x ≤ 15 together give [−1, 15].
- Denominator. is undefined, even when that zero came from .
- Substitution. For f(x) = , replacing x with g(x) gives .
- Solve a root equation. = 5 has nonnegative sides. Square to get x + 9 = 25, hence x = 16; plug back in to obtain = 5. A negative right side would give no solution.
- Squares greater than a bound. > 36 means x < −6 or x > 6. For example, (−10 = 100 > 36, while = 0 fails.
3 Why
Every real number squared is nonnegative, so no real number can square to a negative radicand. The root symbol chooses the nonnegative answer, which makes an inner root's range useful: its output can never be below zero. This may make an outer requirement automatic or may impose an upper bound. When squaring a root inequality, first establish that both sides are nonnegative; squaring preserves their order there, but can erase important sign information otherwise.
4 The rule
requires .
A denominator requires A(x) > 0.
For f(g(x)), apply every root requirement at its own stage and keep both gates.
The same idea, five ways
A square root needs zero or more inside. A root on the bottom needs more than zero.
Every root must exist at the stage where you use it, and every bottom must be nonzero.
- [a, ∞) includes a; (a, ∞) excludes a
A tile may have zero area, but you cannot divide by its zero side length.
The same idea, other ways
A tile with area 9 has side length 3. Area zero has side length zero. A negative area does not have a real side length, because no real square has negative area.
If g is a square root, every value coming out is at least zero. Then an outer root of g(x) + 2 always has a radicand at least 2, once g exists.
A root can hand the next fraction its zero-bottom input. For g(x) = , start 16 gives 5. The fraction then fails. The first root exists, so you must inspect the second stage too.
Part 1: A root at the first gate
A root in the inner function restricts the starting inputs. An outer operation cannot remove that restriction, even when it squares the inner root and shortens the formula.
- For g(x) = , the first gate requires x ≥ 2.
- Squaring an existing nonnegative root returns its radicand.
Worked example
Squaring a root preserves its starting restriction
Let g(x) = and f(x) = . Find the formula and domain of f(g(x)). You want to square the inner root after checking that it exists. Plan: require the inner radicand x − 2 to be nonnegative, then square the existing root while keeping its original restriction.
Show the steps and the answer
- Require , so .The inner square root must have a nonnegative radicand.
- , on .Squaring undoes an existing square root but does not create values where that root failed.
- Domain: [2, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- A square can remove a root symbol, but it cannot repair a root that never existed.
Part 2: A root at the second gate
When the outer function is a square root, its input is the inner output. Check that output against the outer radicand condition. Sometimes an inner square root also needs to stay below a bound.
- For f(x) = , the outer function requires its input ≤ 4.
- If g(x) = , both x ≥ −1 and g(x) ≤ 4 are required.
Worked example
An outer root bounds the inner root
Let f(x) = and g(x) = . Find the domain of f(g(x)). You want starting inputs that produce a real inner root no larger than 4. Plan: keep the inner root’s existence condition, bound its answer by 4 for the outer root, and square only after checking nonnegative sides.
Show the steps and the answer
- Gate 1 requires , so .The inner root must exist.
- Gate 2 requires , so .The outer radicand cannot be negative.
- Square both sides: , so .The inner root is nonnegative and 4 is nonnegative, so squaring preserves order.
- Combine and .Both gates must work for the same starting input.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the inner lower bound before finding the outer upper bound.
Part 3: A root in a denominator
A root on the bottom must exist and must not be zero. Those two requirements combine into a positive radicand. The boundary that an ordinary root accepts is removed by division.
- requires x − 2 > 0, so x > 2.
- A zero numerator over a nonzero denominator is allowed; a zero denominator is not.
Worked example
Division removes the zero-root endpoint
Let f(x) = and g(x) = x − 2. Find the domain of f(g(x)). You want the reciprocal of a root, so its denominator must be real and nonzero. Plan: substitute x − 2 into the outer input and require it to be positive, so the root exists and the denominator is nonzero.
Show the steps and the answer
- g accepts every real input.Subtracting 2 has no restriction.
- The outer rule requires g(x) > 0.A negative input has no real root, and zero would give denominator zero.
- , so x > 2.Adding 2 preserves the inequality direction.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Look for the fraction bar before choosing an open or closed endpoint.
5 How
- Write the inner radicand requirement before using the inner function's output.
- Substitute the inner output into the outer radicand and require it to be nonnegative.
- Use the inner range when possible. A real square root output is always at least zero.
- Before squaring an inequality, check that both compared sides are nonnegative. Then square and solve while preserving the earlier requirements.
- If a root is a denominator, replace its nonnegative condition with a greater than zero one.
- Combine the bounds and test endpoints in the original two-stage formula.
Apply the two gates to roots
- Use the two-gate strategy from the preceding lesson. Write the original inner restrictions first.
- At every root require the whole inside ≥ 0. When that root is a bottom, require the inside > 0.
- An inner root gives only nonnegative answers. Check whether this makes an outer requirement automatic or impossible.
- If a forbidden outer value is nonnegative, solve the root equation by squaring both nonnegative sides, then substitute the candidate back into the original root.
- For an outer upper bound on a root, establish both sides nonnegative before squaring. Retain the inner lower bound.
- Combine every restriction and test included boundaries and excluded points in the original stages.
6 Worked example
Worked example
A root inside a root
Let f(x) = and g(x) = . Find (f ∘ g)(x) and its domain. You want a nested-root formula and the starting inputs for which both roots exist. Plan: find where the inner root exists, then use its nonnegative output to check the outer radicand after adding 2.
Show the steps and the answer
- .The whole inner root replaces the outer input.
- The inner root requires .A real square root cannot have a negative radicand.
- , so .Subtracting 3 gives the first inequality; multiplying by −1 reverses its direction.
- The outer root requires . This adds no restriction.Where the inner root exists, it is at least zero, so adding 2 makes the outer radicand at least 2.
- Domain: (−∞, 3].
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 7
An inner root and an unrestricted outer rule
Let g(x) = and f(x) = x + 1. Find the composite domain. You want a real root followed by addition. Plan: require a real inner root, then check that adding 1 accepts every resulting output.
Show the steps and the answer
- The inner root requires .Its radicand is the starting input.
- The outer function adds no restriction.Any real inner output can have 1 added to it.
Rung 2 of 7
A line feeds an outer root
Let g(x) = 5x − 15 and f(x) = . Find the composite domain. You need the inner output to be nonnegative. Plan: require the line’s output 5x − 15 to be nonnegative before it enters the outer root.
Show the steps and the answer
- g accepts every real x; f requires .The outer root's radicand is the entire g output.
- , so .Add 15, then divide by the positive number 5 without reversing the sign.
Rung 3 of 7
The inner range makes gate 2 automatic
Let g(x) = and f(x) = . Find the domain of f(g(x)). You want both roots to exist. Plan: find where the inner root exists, then use its nonnegative output to check the outer radicand after adding 5.
Show the steps and the answer
- gives .This is the inner root requirement; reversing the sign when multiplying by −1 gives the bound.
- The inner output is at least 0, so is at least 5.A square root's output is nonnegative.
- No further restriction is needed.The outer radicand is already positive whenever the inner function exists.
Rung 4 of 7
An inner root reaches a forbidden outer input
Let g(x) = and f(x) = . Find the domain of f(g(x)). You need the root to exist and its answer to avoid 5. Plan: keep the inner lower bound, solve = 5, then exclude the verified start.
Show the steps and the answer
- Gate 1: gives .This finds the starting inputs where the inner root exists.
- Gate 2: f rejects input 5, since . Solve to find the start that hands f that value.The equation locates the failed outer handoff.
- Both sides are nonnegative. Square: . Subtract 9: .Squaring reverses the existing root here; subtraction isolates the failed start.
- Plug back in: and . Exclude 16.The candidate truly breaks gate 2 and already lies in the inner domain.
- At the lower boundary and , so include .A zero root is permitted here because the outer bottom is −5, not zero.
Rung 5 of 7
Both a lower and an upper bound
Let g(x) = and f(x) = . Find the composite domain. The inner root must exist and its output must be no greater than 3. Plan: keep the inner lower bound, require its root output to be at most 3, then square the nonnegative comparison to find the upper bound.
Show the steps and the answer
- gives .Gate 1 requires a real inner root.
- gives .Gate 2 requires a real outer root.
- Square to get , so .Both the existing root and 3 are nonnegative.
- Combine the two bounds.Both stages must exist.
Rung 6 of 7
A denominator makes the bound strict
Let g(x) = 3x − 9 and f(x) = . Find the composite domain. You need a real square root that is also a nonzero denominator. Plan: require the line’s output to be positive, because its outer root is also a denominator.
Show the steps and the answer
- Require .The outer input must be positive, not only nonnegative, to avoid a zero denominator.
- 3x > 9, so x > 3.Add 9 and divide by positive 3.
Rung 7 of 7
A square feeds a root in a bottom
Let m(x) = − 36 and p(x) = . Find both p(m(x)) and m(p(x)), with their domains. You want to compare the two orders and keep any restriction hidden by simplification. Plan: first require − 36 > 0 for p after m; then retain p’s positive-input requirement for the reverse order.
Show the steps and the answer
- . Require .The root is a bottom, so its inside must be positive to make it real and nonzero.
- Add 36: . This means distance from zero greater than 6, so or x > 6.Both positive and negative numbers can have squares larger than 36. The points 6 and −6 give a zero bottom.
- For the reverse order, p must act first, so require x > 0.An inner root on the bottom rejects negative starts and zero before m can act.
- , still for x > 0.An existing root squares to x. The shorter expression retains the inner positive-input restriction.
- Domain: (−∞, −6) ∪ (6, ∞).
- Domain: (0, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Put on the cheat sheet for study: ordinary root means ≥ 0; root denominator means > 0.
- Know cold: zero is allowed under a root but not under a fraction bar. Picture a filled endpoint for the root and an open endpoint for division.
- Test boundary inputs in the original nested formula before choosing brackets.
7 The trap
Demanding a positive radicand for every square root. Ordinary roots allow zero; roots in denominators must avoid zero because of division.
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.
Lesson 10 of 10
Decompose by naming the inside and outside jobs
Open this lessonLeans on 0Comes back in 0
Leans on
No lesson links recorded.
Comes back in
No lesson links recorded.
1 In plain words
Imagine receiving a finished sandwich and describing its preparation in two jobs: assemble it, then wrap it. You can split a long calculation the same way. For h(1) = , you square 1, subtract that from 5 to get 4, then take the root to get 2. The last job, taking the root, becomes the outer function f. Everything before it becomes the inner function g. Naming these jobs is decomposition. The two named rules are component functions. This helps you calculate in two passes and see where a root or division limits the allowed starts. More than one split may rebuild the same function.
2 Picture it
Reminder
Reminder: Composition, Substitution, Squares and bounds, Reciprocal, Absolute value, Domain, Input-slot names
- Composition. f(g(x)) means calculate g first, then apply f to its whole output.
- Substitution. Putting the whole input 5x − 4 into gives (5x − 4.
- Squares and bounds. ≤ 5 means − ≤ x ≤ , because both signs can have that distance from zero.
- Reciprocal. The reciprocal of 5 is ; the reciprocal of 0 is undefined.
- Absolute value. |−2| = 2, because distance from zero is nonnegative.
- Domain. A decomposition must preserve accepted inputs; accepts [−, ].
- Input-slot names. f(u) = and f(x) = describe the same rule. u helps separate the outer slot from the x inside g.
3 Why
Composition substitutes the inside rule into the outside input slot. Decomposition reverses that substitution by choosing an expression to treat as one complete input. The outside rule describes the remaining work. Different choices can work, so there need not be one unique split. Naming the stages makes a long calculation easier to follow and exposes which stage causes a restriction. Recomposition proves that your rules rebuild the original formula. Comparing domains checks that no newly introduced division has removed a start the original function accepted. These jobs also prepare you for calculus, which studies how an output changes when its input changes.
4 The rule
To write , choose g as the inside job and f as the job applied to its output.
Check by substitution and preserve h's original domain.
The same idea, five ways
Split h into an inside job g and an outside job f.
Doing g first and then f must give back the original function h, with its original allowed starts.
- h(x) = f(g(x))
- h = f ∘ g
- g makes the inside; f performs the remaining outside work
Assemble the sandwich, then wrap it.
The same idea, other ways
One job prepares the completed input. The next finishes it. For (5x − 4 at input 2, first build 10 − 4 = 6, then cube 6 to get 216. The finishing operation is the outer function.
Cover the expression 5 − inside the root with the word input. The outside rule becomes . The covered expression is g, and the remaining rule is f.
Start:
Inside package: 5 −
Outside rule:
For , your calculator first builds 4 and then takes its root. The last calculator step is f. The steps making 4 are g. This gives g(x) = 5 − and f(u) = .
Part 1: Square-root outside
If the last job is taking a square root, let the inner function build its radicand. The outer function can be the basic root rule .
- For h(x) = , one choice is g(x) = x + 9 and f(x) = .
- The original radicand condition remains part of the function.
Worked example
Split a shifted root
Decompose h(x) = . You want an inside expression and the root operation applied to it. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Choose and .Addition builds the radicand before the root is taken.
- , with .Recomposition restores the original root and its nonnegative-radicand requirement.
- g(x) = x + 9
- Domain: [−9, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
Part 2: Cube outside
A cube is the product of three copies of the complete input. The inner function makes the expression that will be cubed; the outer function does the cubing.
- means x × x × x.
- For h(x) = (3x + 2, take g(x) = 3x + 2 and f(x) = .
Worked example
Split a cube without expanding it
Decompose h(x) = (3x + 2. You want two functions that produce this cube in sequence. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Choose and .The parentheses show which whole expression is cubed.
- .Substitution places the inner expression into the cube's input slot.
- g(x) = 3x + 2
- Domain: (−∞, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
Part 3: Reciprocal outside
A reciprocal is 1 divided by the input. Build the denominator first, then take its reciprocal. Check which starting input would build a zero denominator.
- For h(x) = , take g(x) = x − 6 and f(x) = .
Worked example
Split a shifted reciprocal
Decompose h(x) = . You want to identify the denominator-building job and the division job. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Choose and .Subtraction builds the denominator before the reciprocal is taken.
- , with .The outer reciprocal must not receive zero.
- Set to find the failed reciprocal input. Add 6: . Plug back in: . Exclude 6.This solve step identifies the start whose inside job makes the outside bottom zero.
- Domain: (−∞, 6) ∪ (6, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
Part 4: Absolute-value outside
Absolute value gives the distance of a number from zero. Make the signed inside expression first, then find its distance. Negative intermediate numbers are allowed; their distances are nonnegative.
- For h(x) = |3x + 1|, take g(x) = 3x + 1 and f(x) = |x|.
- |−2| = 2 because −2 is two units from zero.
Worked example
Split an absolute value
Decompose h(x) = |3x + 1|. You want a linear inside job followed by an absolute-value outside job. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Choose and .The expression between the bars is the input to the distance rule.
- .The whole inner output replaces f's input.
- g(x) = 3x + 1
- f(x) = |x|.
- Domain: (−∞, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
5 How
- Work out h at a permitted small input. The final job you perform suggests the outer function; everything before it suggests the inner function.
- Define g(x) as that package, which will be calculated first.
- Define f(x) as the operation applied to one input package.
- Substitute g(x) into f and show that f(g(x)) recreates h(x).
- Check the composite domain against the original domain. A formula match alone can hide a lost input.
- If another split is requested, choose a different package and repeat the same checks.
Find a useful inside and outside split
- Work out the given function at a permitted small input. Notice the final operation you perform.
- Choose g(x) to do the work before that final operation. Choose f(u) to perform the remaining job on one completed input u.
- Substitute g(x) into every u in f(u). The resulting expression must be exactly h(x).
- Compare the original domain with the two-stage domain. Test a permitted number as an arithmetic check.
- If you need a second split, move the dividing point between operations and repeat the same checks.
6 Worked example
Worked example
Three decompositions
Write each as f(g(x)): (a) h(x) = ; (b) h(x) = (5x − 4; (c) h(x) = . You want an inside calculation followed by the finishing operation. Plan: name everything before the last operation as g, name the last operation as f, then recompose and compare domains.
Show the steps and the answer
- (a) Choose and . Recompose: .The inside builds the radicand; the outside takes its root. u is another name for f’s input slot.
- Require . Rearrange to , so .This finds the starts whose radicand is nonnegative. Their distance from zero is at most ≈ 2.24.
- Test and : both give radicand . Start 3 gives and fails.These tests show why both a lower and an upper boundary are needed.
- (b) Choose g(x) = 5x − 4 and f(u) = . Recompose: .Build the whole parenthesized expression first, then cube it. Neither stage restricts real starts.
- (c) Choose and . Recompose: .Addition builds the bottom before taking the reciprocal.
- Locate the failed bottom by solving : subtract 8, giving . Plug back in: . Exclude .This equation finds the one start whose inside answer cannot enter the reciprocal.
- Domain: [−, ].
- Domain: (−∞, ∞).
- (c) g(x) = x + 8
- Domain: (−∞, −8) ∪ (−8, ∞).
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 7
A shifted square
Decompose h(x) = (x + 3. You want addition followed by squaring. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Take and .The whole sum is squared.
- .Replacing the outer input restores the formula.
- g(x) = x + 3
- f(x) = , with all real inputs.
Rung 2 of 7
A denominator package
Decompose h(x) = . You want to build the denominator before division. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Take and .The reciprocal acts on the entire denominator.
- , with .The outer function must not receive zero.
- To locate the zero bottom, solve : . Plug back in: .This identifies and confirms the one start the reciprocal must exclude.
- g(x) = x + 7
- Exclude x = −7.
Rung 3 of 7
A linear package under a cube
Decompose h(x) = (4x − 3. You want a linear inside function and a cube outside function. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Take and .The parentheses mark the expression cubed as one unit.
- .The cube receives the complete inner output.
- f(x) = , with all real inputs.
Rung 4 of 7
A quadratic package under a root
Decompose h(x) = and give its domain. The expression 10 − is quadratic: its highest input power is . You want the radicand-building job, the root job, and the permitted starts. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Take and .The quadratic expression is the package inside the root.
- .The entire radicand fills the outer input slot.
- Require , so and .The distance of x from zero must be no more than .
- Starts 3 and give inside and work. Starts 4 and give and fail. Since , both boundaries lie between those pairs.This makes the two-sided distance bound concrete.
- Domain: [−, ].
Rung 5 of 7
A different valid split
Find another decomposition of h(x) = . This time make squaring the whole first job. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.
Show the steps and the answer
- Take and .After squaring, the remaining operations are subtracting from 10 and taking a root.
- .Replacing the input of f with restores the original function.
- The inner square accepts all x, and the outer function requires .The outer radicand is 10 minus the intermediate square.
- Domain: [−, ], the same as the original.
Rung 6 of 7
A root inside a fraction bottom, two splits
Decompose h(x) = in two ways and give its domain. You want different pairs of jobs that both rebuild the root in the bottom. Plan: first split after the root; then split after the whole bottom; verify both formulas and find where the root or division fails.
Show the steps and the answer
- First split: and . Read as g sub 1, the name of the first choice.The inside job takes the root; the outside subtracts its answer from 6 and divides 3 by that result.
- .Substitution rebuilds the entire original bottom, including its root.
- Second split: and . Here sub 2 labels the second choice.The inside builds the whole bottom and the outside divides 3 by it.
- .The second pair rebuilds the same original expression.
- The root requires , hence . Locate a zero bottom: gives .This finds starts where the root exists, then starts where division fails.
- Both sides are nonnegative, so square: . Subtract 1: . Plug back in: and the bottom is . Exclude 35.Squaring locates the candidate, and substitution confirms the original failure.
- At the bottom is , so the root boundary is included. Both splits have the same restrictions.The root exists at zero and the resulting fraction bottom is nonzero.
- First: g₁(x) =
- Second: g₂(x) = 6 −
- Domain: [−1, 35) ∪ (35, ∞).
Rung 7 of 7
The top also depends on the starting input
Decompose h(x) = using g(x) = x − 6. You want an outside rule written only in its own input u. Plan: call the inside output u, express x in terms of u, rewrite both top and bottom in u, then recompose.
Show the steps and the answer
- Write u = x − 6. Add 6 to both sides: .This solve step recovers the original start from the chosen inside answer, so the outside rule can use u alone.
- The top becomes . The bottom becomes u.Both parts of the original fraction must be expressed through the same completed inside output.
- Choose . Then .The recomposition proves the outside rule rebuilds the whole original fraction.
- The original and recomposed bottoms both fail when . Add 6 to find . Plug back in: . Exclude 6.This locates and confirms the failed division, and shows the split preserves the original domain.
- Domain: (−∞, 6) ∪ (6, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Understand, then rebuild: cover the inside package and read what the outside operation does to one input.
- Always write f(g(x)) as the check. Do not rely on recognizing the two pieces by sight.
- More than one answer may be correct; formula and domain checks decide.
- The last calculator step is the outer function. Use this memory cue to choose the finishing job.
7 The trap
Giving the two correct component formulas in the wrong order. Recompose f(g(x)) on paper before accepting your decomposition.