6.3 Operations on Functions and Composition

Adding, subtracting, multiplying and dividing functions and finding the domains, power functions and a rhino heartbeat model, evaluating a composition at a number, composing functions symbolically with domain care, and a discount model in which the order of composition changes the answer.

Subject: Algebra 2 · 65 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Lesson 6.3 Operations on Functions and Composition

Title

Algebra 2 · Chapter 6 — Rational Exponents and Radical Functions

Perform Function Operations and Composition

2. By the end of this lesson you can

Objectives

Five outcomes. The last two are about order, which is where composition differs from everything before it.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 428-435 — the lesson these objectives are drawn from

3. What you already have

Warm-up

Lesson 5.3 added, subtracted and multiplied polynomials. Those were operations on expressions; this lesson does the same to functions.

Discussion prompt

Let f of x be 5x and g of x be x plus 2. Write the four functions you get by adding, subtracting, multiplying and dividing them. Which one needs a caution attached?

Hint: Think about what could go wrong in a fraction.

Answer:

\[ 6x+2, \; 4x-2, \; 5x^2+10x, \; \tfrac{5x}{x+2} \]

The quotient needs a caution: at x equal to negative 2 the divisor is zero, so that input has to be removed from the domain. Three of the four operations are as easy as they look, and the fourth is too — provided the domain is checked.

4. Functions can be combined, and stacked

Concept

Two functions can be combined arithmetically, giving a new function whose domain is what the two domains share. They can also be composed, with the output of one becoming the input of the other — and composition, unlike addition and multiplication, depends on the order.

composition — The composition of g with f is the function h with h of x equal to g of f of x. Its domain is every x in the domain of f whose output f of x lies in the domain of g.

\[ h(x) = g(f(x)) \]

Composition is the operation that models a sequence of steps — a discount then a tax, a conversion then a rate — and the order of the steps is exactly why it does not commute.

Figure (svg): Two columns separating the four arithmetic operations from composition

Arithmetic combines two answers; composition feeds one answer into the next question.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 428-430

5. Adding and subtracting functions

Section

Section 1

6. Combine the outputs, intersect the domains

Concept

The sum of two functions is the function whose output at each input is the sum of the two outputs. Its domain consists of the inputs that lie in both original domains, since an input must be usable by each function.

\[ (f+g)(x) = f(x) + g(x), \qquad (f-g)(x) = f(x) - g(x) \]

When both functions are multiples of the same power, adding them is collecting like terms — the same distributive move that combined like radicals in Lesson 6.2.

Figure (svg): The four operations on functions, each defined and applied to the same pair

The definitions are the obvious ones; all the care goes into the domain, which is stated separately every time.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 428-428 — Operations on Functions

7. Four operations, one pair

Picture it

The definitions applied to f of x equals 5x and g of x equals x plus 2.

Figure (svg): The four operations on functions, each defined and applied to the same pair

The definitions are the obvious ones; all the care goes into the domain, which is stated separately every time.

Only the last line changes the domain, and only because a divisor can be zero. The other three inherit whatever the two functions already allowed.

8. Worked example: add and subtract

Worked example

Example 1, all three parts.

\[ \text{With } f(x) = 4x^{1/2} \text{ and } g(x) = -9x^{1/2}, \text{ find } f+g, \; f-g \text{ and their domains.} \]

Add the outputs

Why: Both are multiples of x to the one half, so the coefficients combine: 4 plus negative 9 is negative 5.

\[ -5 x ^{\frac{1}{2}} \]

Subtract the outputs

Why: Four minus negative 9 is 13.

\[ 13 x ^{\frac{1}{2}} \]

Find each original domain

Why: An exponent of one half is a square root, so both functions need x to be non-negative.

\[ x \ge 0\text{ for both} \]

Intersect them

Why: Both domains are the same set, so the combined domain is that set.

Figure (svg): The solution to Worked example add and subtract shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ -5x^{1/2}, \; 13x^{1/2}; \quad x \ge 0 \]

Verify: test one input

Why: At x equal to 4: f gives 8 and g gives negative 18, so the sum is negative 10 and the difference 26. The combined formulas give negative 5 times 2, which is negative 10, and 13 times 2, which is 26. Both check. And at x equal to negative 1 neither original function has a value, so neither does the sum.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 428-428

9. Combine the coefficients

Fill the middle

Example 1a.

Fill in the blanks

4x^-5 + (-9x^___) = (4 - 9)x^___ = ___x^___

Why: Four minus 9 is negative 5, and the power stays as it is. This is collecting like terms with x to the one half in the role of the variable, exactly as like radicals were combined in Lesson 6.2.

10. Worked example: a domain that does not shrink

Worked example

Guided Practice 1 to 3. The exponent looks similar but behaves differently.

\[ \text{With } f(x) = -2x^{2/3} \text{ and } g(x) = 7x^{2/3}, \text{ find } f+g, \; f-g \text{ and their domains.} \]

Combine the coefficients

Why: Negative 2 plus 7 is 5; negative 2 minus 7 is negative 9.

\[ 5 x ^{\frac{2}{3}}\text{ and } -9 x ^{\frac{2}{3}} \]

Read the exponent as a root

Why: Two thirds means the cube root, squared.

\[ \text{index } 3 \]

Decide the domain

Why: A cube root is defined for every real number, so both functions accept every real input.

Intersect

Why: Both domains are all real numbers, so the combined domain is too.

Figure (svg): The solution to Worked example a domain that does not shrink shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ 5x^{2/3}, \; -9x^{2/3}; \quad \text{all reals} \]

Verify: compare with the previous example

Why: An exponent of one half restricted the domain and an exponent of two thirds did not, purely because the index in the first is even and in the second odd — which is Lesson 6.1's parity rule showing up as a statement about domains. At x equal to negative 8 the function gives 5 times 4, or 20.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 429-429

11. Trap: taking the domain from the combined formula

Trap

The trap

\[ f(x) = 4x^{1/2}, \; g(x) = -4x^{1/2} \;\Longrightarrow\; (f+g)(x) = 0 \]

Read the domain from the answer

Why: The constant function zero is defined everywhere, so the domain is taken as all reals.

\[ \text{domain: all real numbers} \quad \text{(wrong)} \]

At x equal to negative 1 neither f nor g has a value, so their sum has none either — even though the simplified formula suggests otherwise.

The fix

\[ \text{domain of } f+g = \text{domain of } f \cap \text{domain of } g \]

Find each original domain first, then intersect

Why: The combined function is only defined where both parts are.

\[ x \ge 0 \]

Simplification can hide a restriction, which is exactly what the textbook's Avoid Errors note about compositions says too. Always take the domain from the parts, never from the simplified answer.

12. What is the domain?

Sorting

Read the exponent as a root and check its parity.

Sort into buckets

Sort each function by its domain.

All real numbers
g(x) = -2x^(2/3); p(x) = 3x; q(x) = x^(1/5)
Non-negative reals only
f(x) = 4x^(1/2); h(x) = x^(3/4)
all
The index is odd, or there is no root at all, so every real input produces a real output. A cube root or fifth root accepts negatives without complaint.
nonneg
The index is even, so a negative input would ask for an even root of a negative number, which Lesson 6.1 showed does not exist among the reals.

The denominator of the exponent is the index, and its parity is the whole story. Nothing about the numerator matters for the domain.

13. Operation to result

Matching

For f of x equals 5x and g of x equals x plus 2.

Match the pairs

  • l1. f(x) + g(x)
  • l2. f(x) - g(x)
  • l3. f(x) x g(x)
  • l4. f(x)/g(x)
  • r1. 6x + 2
  • r2. 4x - 2
  • r3. 5x^2 + 10x
  • r4. 5x/(x + 2), x not -2

Why: Only the last carries a restriction, and it comes from the divisor rather than from either original function. Both f and g accept every real number, so the first three inherit that domain unchanged.

14. Why intersect the domains?

Prediction

Commit before reasoning.

Predict first

Why must an input lie in both domains for the sum to be defined?

  • Because sums are always more restrictive
  • Because the sum needs both outputs, and a missing one makes the sum meaningless
  • Because the formula requires it
  • It does not; either domain will do

Correct: Because the sum needs both outputs.

\[ (f+g)(x) \text{ exists} \;\Longleftrightarrow\; f(x) \text{ and } g(x) \text{ both exist} \]

Why: To compute f of x plus g of x you need a value for each. If x is outside the domain of g then g of x does not exist, and there is nothing to add. The intersection is not a convention imposed on the definition; it is what the definition already requires.

15. Multiplying and dividing functions

Section

Section 2

16. Exponents add, and the divisor cannot vanish

Concept

The product of two functions multiplies their outputs, and for power functions that means adding exponents. The quotient divides them, and its domain excludes every input making the divisor zero, on top of the shared domain.

power function — A function of the form y equals a times x to the b, where a is real and b is rational. Linear and quadratic functions are the cases b equal to 1 and 2.

\[ (f\cdot g)(x) = f(x)g(x), \qquad \left(\tfrac{f}{g}\right)(x) = \tfrac{f(x)}{g(x)}, \; g(x) \neq 0 \]

Because these are power functions, Lesson 6.2's exponent properties do all the algebra: multiplying adds the exponents and dividing subtracts them.

Figure (svg): Two overlapping domains with the shared region marked as the domain of the combined function

The quotient loses one more point than the product, and it is the point where the divisor vanishes.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 429-429 — Multiply and divide functions

17. Two domains, one overlap

Picture it

Example 2: f accepts every real, g only the non-negatives.

Figure (svg): Two overlapping domains with the shared region marked as the domain of the combined function

The quotient loses one more point than the product, and it is the point where the divisor vanishes.

The product is defined on the overlap. The quotient loses one more point, zero, because g of zero is zero and division by zero is undefined.

18. Worked example: multiply and divide

Worked example

Example 2, all three parts.

\[ \text{With } f(x) = 6x \text{ and } g(x) = x^{3/4}, \text{ find } f\cdot g, \; \tfrac{f}{g} \text{ and their domains.} \]

Multiply, adding the exponents

Why: Six x is 6x to the first, and 1 plus three quarters is seven quarters.

\[ 6 x ^{\frac{7}{4}} \]

Divide, subtracting the exponents

Why: One minus three quarters is one quarter.

\[ 6 x ^{\frac{1}{4}} \]

Intersect the domains

Why: F accepts every real; g needs x non-negative because the index 4 is even.

\[ x \ge 0 \]

Remove the zeros of the divisor

Why: G of zero is zero, so zero leaves the quotient's domain.

\[ x > 0\text{ for } \frac{f}{g} \]

Figure (svg): The solution to Worked example multiply and divide shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ 6x^{7/4}, \; x \ge 0; \qquad 6x^{1/4}, \; x > 0 \]

Verify: test the boundary input

Why: At x equal to 0 the product is 0, which is fine, but the quotient asks for 0 divided by 0 and has no value. The two domains really do differ by exactly that one point, which is why they must be stated separately.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 429-429

19. Add the exponents

Fill the middle

Example 2a.

Fill in the blanks

(6x)(x^7/4) = 6x^___ = 6x^___}

Why: One is four quarters, so the sum is seven quarters. The product of powers rule from Lesson 6.2 is doing all the work; multiplying functions is only new in that the answer is a function rather than a number.

20. Worked example: two more, with an odd index

Worked example

Guided Practice 4 to 6.

\[ \text{With } f(x) = 3x \text{ and } g(x) = x^{1/5}, \text{ find } f\cdot g, \; \tfrac{f}{g} \text{ and their domains.} \]

Multiply

Why: One plus one fifth is six fifths.

\[ 3 x ^{\frac{6}{5}} \]

Divide

Why: One minus one fifth is four fifths.

\[ 3 x ^{\frac{4}{5}} \]

Find the domains of the parts

Why: F accepts every real, and so does g because the index 5 is odd.

Apply the quotient restriction

Why: G of zero is zero, so the quotient excludes zero.

Figure (svg): The solution to Worked example two more, with an odd index shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ 3x^{6/5}, \; \text{all reals}; \qquad 3x^{4/5}, \; x \neq 0 \]

Verify: compare with the previous example

Why: The odd index left the domain unrestricted where the even index had cut it to the non-negatives, but the quotient still lost the point zero in both cases. The two restrictions have different sources: one is about roots and one about division.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 429-429

21. Find the error: forgetting the divisor's zeros

Error analysis

A student states the domain of a quotient of functions.

Annotate

On: \( f(x) = 6x, \; g(x) = x^{3/4} \;\Longrightarrow\; \tfrac{f}{g} = 6x^{1/4}, \text{ domain } x \ge 0 \)

  • The algebra is right: subtracting the exponents gives 6x^(1/4).
  • And the shared domain really is x >= 0, since g needs a fourth root.
  • But g(0) = 0, and a quotient is undefined wherever its divisor is zero.
  • The domain of f/g is x > 0, not x >= 0.

A quotient carries two restrictions: the shared domain, and the zeros of the divisor. The simplified formula shows neither of them.

22. Which restriction applies?

Sorting

Even index, or a zero divisor, or neither.

Sort into buckets

Sort each combined function by why its domain is restricted.

Even index only
(6x)(x^(3/4))
Even index and a zero divisor
(6x)/(x^(3/4))
Zero divisor only
(3x)/(x^(1/5))
No restriction
(3x)(x^(1/5)); 5x + (x + 2)
even
One factor has an even index, so negatives are excluded, but nothing is being divided.
both
The divisor has an even index, excluding negatives, and it also vanishes at zero, excluding that too.
zero
The index is odd so negatives are fine, but the divisor is zero at the origin.
none
No even index and no division, so every real number is acceptable.

Two independent sources of restriction, and a quotient with an even-index divisor collects both.

23. What is a power function?

Prediction

Commit before reasoning.

Predict first

Which of these is not a power function?

  • y = 5x, since b = 1
  • y = 2 to the x, since the variable is in the exponent
  • y = 3x^(2/3)
  • y = -7x^4

Correct: y equals 2 to the x, since the variable is in the exponent.

\[ y = ax^b \text{ (power)} \qquad \text{versus} \qquad y = ab^x \text{ (exponential)} \]

Why: A power function has the form a times x to the b, with the variable in the base and a rational constant in the exponent. Putting the variable in the exponent instead makes it an exponential function, a different family entirely and the subject of Chapter 7. Linear and quadratic functions are power functions with b equal to 1 and 2, which is why the family is worth naming.

24. Product against quotient

Comparison

Fill the blanks. One extra restriction.

Comparison matrix

QuestionProductQuotient
Exponentsaddsubtract
Domain starts asthe shared domainthe shared domain
Extra restrictionnoneremove zeros of the divisor
For f = 6x, g = x^(3/4)x >= 0x > 0

One point of difference in this example, but that point matters: it is exactly the boundary of the domain, which is where models are most often evaluated.

25. Composing at a number

Section

Section 3

26. Work from the inside out

Concept

To evaluate g of f of a number, first evaluate the inner function at that number, then feed the result into the outer one. The parentheses say which function acts first, and the inner one always does.

\[ g(f(4)): \; \text{find } f(4) \text{ first, then apply } g \]

The inner function is written closest to the input, which is a useful way to remember the order: read the expression from the inside outward, the way you would evaluate it.

Figure (svg): An arrow diagram showing an input passing through f and then through g

Two conditions on the domain, not one: the input must be usable by f, and its output must be usable by g.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 430-430 — Example 4

27. Input, middle, output

Picture it

The chain that composition describes.

Figure (svg): An arrow diagram showing an input passing through f and then through g

Two conditions on the domain, not one: the input must be usable by f, and its output must be usable by g.

The middle box has two roles at once: it is the output of f and the input of g. Every domain question about a composition comes from that double role.

28. Worked example: evaluate a composition

Worked example

Example 4. Inside first.

\[ \text{With } f(x) = 3x - 14 \text{ and } g(x) = x^2 + 5, \text{ find } g(f(4)). \]

Identify the inner function

Why: The parentheses put f closest to the 4, so f acts first.

\[ \text{find } f(4) \]

Evaluate it

Why: Three times 4 is 12, minus 14 is negative 2.

\[ f(4) = -2 \]

Feed the result into g

Why: Now evaluate g at negative 2.

\[ g(-2) \]

Evaluate the outer function

Why: Negative 2 squared is 4, plus 5 is 9.

\[ 9 \]

Figure (svg): The solution to Worked example evaluate a composition shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ g(f(4)) = 9 \]

Verify: compute the other order for contrast

Why: Going the other way, g of 4 is 21, and f of 21 is 63 minus 14, or 49. So f of g of 4 is 49 while g of f of 4 is 9 — the same two functions and the same input, and two completely different answers. Order is not a technicality here.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 430-430

29. Evaluate the inner function

Fill the middle

Example 4.

Fill in the blanks

f(x) = 3x - 14: \; f(4) = 12 - 14 = -2, \text___ g(-2) = 9

Why: Twelve minus 14 is negative 2, and that value becomes the input of g. Note that the intermediate value is negative even though both the input 4 and the final answer 9 are positive — the middle of a composition need not resemble either end.

30. Worked example: four evaluations

Worked example

Guided Practice 8 to 11.

\[ \text{With } f(x) = 3x - 8 \text{ and } g(x) = 2x^2, \text{ find } g(f(5)), \; f(g(5)), \; f(f(5)), \; g(g(5)). \]

First: f of 5, then g

Why: Fifteen minus 8 is 7, and 2 times 49 is 98.

\[ 98 \]

Second: g of 5, then f

Why: Two times 25 is 50, and 150 minus 8 is 142.

\[ 142 \]

Third: f twice

Why: F of 5 is 7, and f of 7 is 21 minus 8, which is 13.

\[ 13 \]

Fourth: g twice

Why: G of 5 is 50, and g of 50 is 2 times 2500, which is 5000.

\[ 5000 \]

Figure (svg): The solution to Worked example four evaluations shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ 98, \; 142, \; 13, \; 5000 \]

Verify: compare the first two

Why: The same two functions at the same input gave 98 one way and 142 the other. A function can also be composed with itself, as the last two show, and that is not a special case — it is just composition with f and g happening to be equal.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 431-431

31. Trap: applying the outer function first

Trap

The trap

\[ g(f(4)) \text{ with } f(x) = 3x-14, \; g(x) = x^2+5 \]

Apply g to 4, then f

Why: The function written first is taken to act first.

\[ g(4) = 21, \; f(21) = 49 \quad \text{(that is } f(g(4)), \text{ not } g(f(4))) \]

The answer 49 is a perfectly good value — of the other composition. The question asked for 9.

The fix

\[ g(f(4)): \; f(4) = -2, \text{ then } g(-2) = 9 \]

Evaluate the innermost function first

Why: The parentheses nest, and evaluation works outward from the middle.

\[ g(f(x)) \neq f(g(x)) \text{ in general} \]

Reading the expression from the inside out matches the order of the arrows in the diagram: the input meets f first because f is written next to it.

32. Composition to value

Matching

For f of x equals 3x minus 8 and g of x equals 2x squared.

Match the pairs

  • l1. g(f(5))
  • l2. f(g(5))
  • l3. f(f(5))
  • l4. g(g(5))
  • r1. 98
  • r2. 142
  • r3. 13
  • r4. 5000

Why: The first two use the same functions in opposite orders and differ by 44. The last two compose a function with itself, which grows very differently: doubling and squaring twice reaches 5000, while subtracting and tripling twice reaches only 13.

33. Order the evaluation

Ranking

Evaluating g of f of a number.

Put in order

  1. Read which function is innermost
  2. Substitute the number into that function
  3. Compute its output
  4. Substitute that output into the outer function
  5. Compute the final value

Why: Step one is the only place a mistake changes the answer entirely rather than by an arithmetic slip. The remaining steps are two ordinary evaluations done in sequence, which is why composition is easier to evaluate at a number than to write symbolically.

34. Does order ever not matter?

Prediction

Commit before reasoning.

Predict first

Is there a pair of functions for which g of f of x always equals f of g of x?

  • No, never
  • Yes — for instance when one of them is the identity function
  • Only for linear functions
  • Only when both are constant

Correct: Yes — for instance when one of them is the identity function.

\[ f(g(x)) = g(f(x)) = x \quad \text{is the definition of inverse functions} \]

Why: If g of x is x then both compositions give f of x. Other pairs commute too: f of x equal to x plus 1 and g of x equal to x plus 2 give x plus 3 either way. So the rule is that composition does not commute in general, not that it never does — and Lesson 6.4 is built entirely on a special pair for which both compositions give x.

35. Composing symbolically

Section

Section 4

36. Substitute the whole inner function

Concept

To find g of f of x as a formula, replace every x in the outer function's rule with the entire expression for the inner function. The domain needs both conditions: x must be usable by the inner function, and its output must be usable by the outer one.

\[ f(g(x)) = f(5x-2) = 4(5x-2)^{-1} = \frac{4}{5x-2} \]

The domain cannot always be read from the simplified formula. A composition may simplify to something defined everywhere while still excluding an input that broke one of the two functions along the way.

Figure (svg): An arrow diagram showing an input passing through f and then through g

Two conditions on the domain, not one: the input must be usable by f, and its output must be usable by g.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 430-430 — Find compositions of functions

37. Two conditions on the domain

Picture it

The diagram, read as a statement about which inputs work.

Figure (svg): An arrow diagram showing an input passing through f and then through g

Two conditions on the domain, not one: the input must be usable by f, and its output must be usable by g.

An input must survive both arrows. Checking only the second, or only the simplified end result, is what makes composition domains harder than sum domains.

38. Worked example: three compositions

Worked example

Example 5, all four parts.

\[ \text{With } f(x) = 4x^{-1} \text{ and } g(x) = 5x-2, \text{ find } f(g(x)), \; g(f(x)), \; f(f(x)) \text{ and their domains.} \]

Substitute g into f

Why: Replace x in 4x to the negative 1 with the whole of 5x minus 2.

\[ \frac{4}{5 x - 2} \]

Substitute f into g

Why: Replace x in 5x minus 2 with 4x to the negative 1.

\[ \frac{20}{x} - 2 \]

Compose f with itself

Why: Replace x in 4x to the negative 1 with 4x to the negative 1; the reciprocals undo each other.

\[ f(f(x)) = x \]

Find the domains

Why: For the first, 5x minus 2 must not be zero, so x is not two fifths.

\[ x\text{ not } \frac{2}{5} \]

Find the other two domains

Why: Both need f of x to exist, so x cannot be zero.

\[ x\text{ not } 0 \]

Figure (svg): The solution to Worked example three compositions shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ \tfrac{4}{5x-2}; \quad \tfrac{20}{x}-2; \quad x \]

Verify: check the surprising third domain

Why: The formula f of f of x simplifies to x, which looks defined for every real number — but at x equal to zero the inner f has no value at all, so nothing can be composed. The domain is every real except zero. The textbook flags exactly this in an Avoid Errors note, and it is the clearest case of a formula hiding a restriction.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 430-430

39. Substitute the whole function

Fill the middle

Example 5a.

Fill in the blanks

f(x) = \tfrac5x - 2___, \; g(x) = 5x-2 \;\Longrightarrow\; f(g(x)) = \frac______}

Why: Every x in the outer function is replaced by the entire expression for the inner one, brackets and all. Substituting only part of it — writing 4 over 5x, say — is the commonest slip, and writing g in brackets before simplifying prevents it.

40. Worked example: three more, with domains

Worked example

Guided Practice 12.

\[ \text{With } f(x) = 2x^{-1} \text{ and } g(x) = 2x+7, \text{ find } f(g(x)), \; g(f(x)), \; f(f(x)). \]

Substitute g into f

Why: Two over the whole of 2x plus 7.

\[ \frac{2}{2 x + 7} \]

Substitute f into g

Why: Two times 2 over x, plus 7.

\[ \frac{4}{x} + 7 \]

Compose f with itself

Why: Two divided by 2 over x is x.

State the three domains

Why: The first needs 2x plus 7 non-zero; the other two need x non-zero.

\[ x\text{ not } -\frac{7}{2}; x\text{ not } 0; x\text{ not } 0 \]

Figure (svg): The solution to Worked example three more, with domains shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ \tfrac{2}{2x+7}, \; \tfrac{4}{x}+7, \; x \]

Verify: test one value in each

Why: At x equal to 1: g of 1 is 9 and f of 9 is two ninths, matching 2 over 9. Also f of 1 is 2 and g of 2 is 11, matching 4 plus 7. The two answers differ, as expected, and the third composition returns 1 — which is what f of f of x equals x predicts.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 431-431

41. Find the error: reading the domain off the simplified formula

Error analysis

A student composes a function with itself.

Annotate

On: \( f(x) = 4x^{-1} \;\Longrightarrow\; f(f(x)) = x, \text{ domain all real numbers} \)

  • The simplification is correct: 4 divided by 4 over x really is x.
  • But at x = 0 the inner f(x) does not exist, so there is nothing to feed into the outer f.
  • An input must be in the domain of the inner function before anything else happens.
  • The domain is all real numbers except 0.

Check the domain of the inner function first, then the outer one, and only then look at the simplified formula. The formula is the last thing to consult, not the first.

42. Which input is excluded?

Sorting

Check the inner function, then the outer.

Sort into buckets

For f of x equal to 4 over x and g of x equal to 5x minus 2, sort each composition by its excluded input.

Excludes 2/5
f(g(x))
Excludes 0
g(f(x)); f(f(x)); f(x) + g(x)
Excludes nothing
g(g(x))
twofifths
The inner function g is fine everywhere, but its output is zero at x equal to two fifths, and the outer function f cannot accept zero.
zero
The function f appears somewhere and f cannot accept zero as an input, so zero is excluded whatever else happens.
none
Both applications are of g, which is a linear function defined for every real number, so no input causes trouble.

The exclusion can come from either arrow. Tracing which function breaks, and where, is the whole of finding a composition's domain.

43. Why can the formula mislead?

Prediction

Commit before reasoning.

Predict first

Why does f of f of x equal to x still exclude zero?

  • It does not; the simplification is wrong
  • Because the inner f has no value at zero, so the composition never gets started
  • Because x equals zero makes the outer f undefined
  • Because zero is never in any domain

Correct: Because the inner f has no value at zero.

\[ f(0) = \tfrac{4}{0} \text{ undefined} \;\Longrightarrow\; f(f(0)) \text{ undefined} \]

Why: Composition is a two-stage process, and the first stage fails at zero: four over zero does not exist. Simplifying afterwards cannot restore an input that was never accepted, because the simplification is only valid where the original expression was defined. This is why the domain is always found from the parts and never from the answer.

44. Two orders, two functions

Comparison

Fill the blanks. The same pair, composed both ways.

Comparison matrix

Questionf(g(x))g(f(x))
Which acts firstgf
Result, for f = 4/x and g = 5x - 24/(5x - 2)20/x - 2
Excluded input2/50
Equal to each other?nono

Different formulas, different domains, different graphs. Composition is genuinely two operations, not one operation performed in either order.

45. Composition in a model

Section

Section 5

46. Two stages, and the order changes the answer

Concept

When a process has two stages, each stage is a function and the whole process is their composition. Because composition does not commute, doing the stages in the other order generally gives a different result — which is often the point of the question.

\[ g(f(x)) = 0.85(x-10) \quad \text{versus} \quad f(g(x)) = 0.85x - 10 \]

Naming each stage as its own function first is what makes the two orders easy to write down and compare. Trying to reason about the combined process directly is much harder.

Figure (svg): The same purchase discounted in two orders, giving two different prices

The gap is exactly 15 percent of 10 dollars, because in the first order the certificate itself gets discounted.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 431-431 — Solve a multi-step problem

47. Certificate first, or discount first

Picture it

Example 6: a 55 dollar purchase with two reductions.

Figure (svg): The same purchase discounted in two orders, giving two different prices

The gap is exactly 15 percent of 10 dollars, because in the first order the certificate itself gets discounted.

Applying the certificate first gives 38.25 dollars and applying the discount first gives 36.75. The customer prefers the second, and the difference is exactly 15 percent of the certificate.

48. Worked example: the paint store

Worked example

Example 6, in the book's four steps.

\[ \text{A } 55 \text{ dollar purchase, a } 10 \text{ dollar certificate and a } 15 \text{ percent discount. Compare the two orders.} \]

Find the total

Why: Thirty dollars of paint and 25 of supplies is 55 dollars.

\[ x = 55 \]

Write each stage as a function

Why: The certificate subtracts 10; the discount multiplies by 0.85.

\[ f(x) = x - 10, g(x) = 0.85 x \]

Compose for the certificate first

Why: Applying f then g gives 0.85 times the quantity x minus 10.

\[ g(f(x)) = 0.85(x - 10) \]

Compose for the discount first

Why: Applying g then f gives 0.85x minus 10.

\[ f(g(x)) = 0.85 x - 10 \]

Evaluate both at 55

Why: The first gives 0.85 times 45, or 38.25; the second gives 46.75 minus 10, or 36.75.

\[ 38.25\text{ and } 36.75 \]

Figure (svg): The solution to Worked example the paint store shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ 38.25 \text{ and } 36.75 \text{ dollars} \]

Verify: explain the gap

Why: The two answers differ by 1.50 dollars, which is 15 percent of the 10 dollar certificate. Applying the certificate first means the discount is taken on a smaller amount, so the certificate itself effectively loses 15 percent of its value. Understanding the gap is more useful than either number alone.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 431-431

49. Compose the discounts

Fill the middle

Example 6, step 3.

Fill in the blanks

f(x) = x - 10, \; g(x) = 0.85x \;\Longrightarrow\; g(f(x)) = 0.85(x - 10)

Why: The whole of f, brackets included, replaces the x in g. Writing 0.85x minus 10 instead would be f of g of x — the other order, and 1.50 dollars cheaper.

50. Worked example: rhino heartbeats

Worked example

Example 3 and Guided Practice 7. A product rather than a composition, and the units say why.

\[ \text{With } r(m) = 241m^{-0.25} \text{ and } s(m) = (6\times10^6)m^{0.2}, \text{ find } r\cdot s \text{ and evaluate at } m = 1.7\times10^5. \]

Multiply the coefficients

Why: Two hundred forty-one times 6 times 10 to the sixth is 1446 times 10 to the sixth.

\[ 1446 x 10 ^{6} \]

Add the exponents

Why: Negative 0.25 plus 0.2 is negative 0.05.

\[ m ^{-0.05} \]

Write in scientific notation

Why: One thousand four hundred forty-six times 10 to the sixth is 1.446 times 10 to the ninth.

\[ (1.446 x 10 ^{9}) m ^{-0.05} \]

Interpret the product

Why: Beats per minute times minutes gives beats, so the product is total heartbeats in a lifetime.

Evaluate at the given mass

Why: The mass to the negative 0.05 is about 0.547.

\[ \text{about } 7.9 x 10 ^{8} \]

Figure (svg): The solution to Worked example rhino heartbeats shown as a ladder of expressions, one row per algebraic move

The whole solution at once: each drop is one legal move.

\[ (1.446\times10^9)m^{-0.05} \;\Longrightarrow\; \approx 7.9\times10^8 \]

Verify: check why this is a product and not a composition

Why: Heart rate and life span are both functions of the same input, the mass, so their outputs are multiplied. A composition would mean feeding the heart rate into the life-span function, which is meaningless: a rate in beats per minute is not a mass. The units decide which operation is the right one.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 429-429

51. Trap: composing when the operation is a product

Trap

The trap

\[ r(m) = 241m^{-0.25}, \; s(m) = (6\times10^6)m^{0.2} \]

Compose to get total heartbeats

Why: The life-span function is applied to the heart rate.

\[ s(r(m)) = (6\times10^6)(241m^{-0.25})^{0.2} \quad \text{(meaningless)} \]

The input of s is a mass in kilograms, and r's output is a rate in beats per minute. Feeding one into the other combines incompatible quantities.

The fix

\[ r(m)\cdot s(m) = (1.446\times10^9)m^{-0.05} \]

Multiply, because both functions take the same input and their units multiply

Why: Beats per minute times minutes gives beats.

\[ \frac{\text{beats}}{\text{minute}}\times\text{minutes} = \text{beats} \]

The units test settles which operation is meant every time. Composition needs the inner function's output to be the outer one's kind of input; a product only needs a shared input.

52. Product or composition?

Sorting

Check whether the two functions share an input or feed one another.

Sort into buckets

Sort each situation.

Multiply the functions
heart rate and life span, both from mass; hourly wage and hours worked, both from a job code
Compose the functions
a certificate then a discount on a price; a currency conversion then a sales tax; radius from volume, then surface area from radius
product
Both functions take the same input and their outputs have units that multiply into something meaningful, such as a rate times a time.
comp
The output of one function is exactly the kind of thing the other takes as input, so the two act in sequence and the second consumes the first's answer.

The units decide it. If the outputs multiply into something meaningful, it is a product; if one output is the other's input, it is a composition.

53. Which order should the customer want?

Prediction

Commit before reasoning.

Predict first

Should the customer prefer the certificate applied first or the discount applied first?

  • The certificate first, giving 38.25 dollars
  • The discount first, giving 36.75 dollars
  • It makes no difference
  • It depends on the total

Correct: The discount first, giving 36.75 dollars.

\[ g(f(x)) - f(g(x)) = 0.85(x-10) - (0.85x - 10) = 1.50 \]

Why: Applying the discount first means the full 10 dollars comes off afterwards; applying the certificate first means the discount is taken on a smaller amount, so the certificate is effectively worth only 8.50 dollars. The gap is 15 percent of 10 dollars, or 1.50, whatever the purchase total is — which answers the fourth option too: the difference does not depend on the total.

54. Order the modelling steps

Ranking

Modelling a two-stage process.

Put in order

  1. Identify the two stages and what each does to a value
  2. Write each stage as its own function of a single variable
  3. Decide which order the situation describes
  4. Compose the two functions in that order
  5. Evaluate at the given value and interpret the result

Why: Step two is what makes the rest easy: once each stage is a named function, both orders can be written down in one line each and compared. Step three is a reading question about the situation, not an algebraic one, and it is where these problems are usually lost.

55. Five ways to combine two functions

Comparison

Fill the blanks. Four are arithmetic; one is not.

Comparison matrix

OperationDefinitionDomain
Sumf(x) + g(x)the shared domain
Differencef(x) - g(x)the shared domain
Productf(x) x g(x)the shared domain
Quotientf(x)/g(x)shared domain, minus zeros of g
Compositiong(f(x))x in domain of f, with f(x) in domain of g

The last row is the only one where the two functions are not treated symmetrically, and that asymmetry is exactly why the order matters.

56. The procedure, in order

Pattern

One routine for arithmetic, one for composition.

  1. For a sum, difference or product, combine the outputs algebraically and take the domain as the intersection of the two original domains.
  2. For a quotient, do the same and then remove every input at which the divisor is zero.
  3. For a composition at a number, evaluate the inner function first and feed its output into the outer one.
  4. For a composition as a formula, replace every occurrence of the variable in the outer function with the entire inner expression, in brackets.
  5. For a composition's domain, require the input to be in the inner function's domain and its output to be in the outer one's — never read the domain from the simplified formula.

In a model, the units decide whether two functions should be multiplied or composed, and the situation decides which order a composition takes.

OpenStax Algebra and Trigonometry 2e, §3.4 Composition of Functions §3.4

57. Check yourself 1 of 3

Check

Domains. Check the divisor.

Check your understanding

With f(x) = 6x and g(x) = x^(3/4), what is the domain of f/g?

  • A. All x > 0 (correct)
  • B. All x >= 0
  • C. All real numbers
  • D. All x not equal to 0

Answer: A

Why: The shared domain is x >= 0 because of the even index, and g(0) = 0 removes the origin as well.

Why B tempts people
This is the shared domain, but a quotient also excludes every input making the divisor zero.
Why C tempts people
The fourth root in g excludes negative inputs, so not every real number works.
Why D tempts people
This removes the origin but keeps the negatives, which the even index in g does not allow.

58. Check yourself 2 of 3

Check

Composition at a number. Inside first.

Check your understanding

With f(x) = 3x - 14 and g(x) = x^2 + 5, find g(f(4)).

  • A. 9 (correct)
  • B. 49
  • C. -9
  • D. 1

Answer: A

Why: The inner function gives f(4) = 12 - 14 = -2, and then g(-2) = 4 + 5 = 9.

Why B tempts people
This is f(g(4)), the other order: g(4) = 21 and f(21) = 49.
Why C tempts people
The square of -2 was taken as -4. An even power of a negative is positive.
Why D tempts people
The 5 was subtracted rather than added when evaluating g.

59. Check yourself 3 of 3

Check

A hidden domain restriction.

Check your understanding

With f(x) = 4/x, the composition f(f(x)) simplifies to x. What is its domain?

  • A. All real numbers except 0 (correct)
  • B. All real numbers
  • C. All x > 0
  • D. All real numbers except 4

Answer: A

Why: The inner f has no value at 0, so the composition cannot start there, whatever the simplified formula says.

Why B tempts people
This is what the simplified formula suggests, and it is exactly the error the textbook warns about.
Why C tempts people
There is nothing wrong with negative inputs here; 4 divided by a negative is a perfectly good number.
Why D tempts people
Four is not special: f(4) = 1 and f(1) = 4, so the composition works fine there.

60. Where this shows up outside the textbook

Real world

A shop marks every item up by 40 percent over cost, then holds a sale taking 25 percent off the marked price. A separate 5 percent sales tax is added at the till.

Discussion prompt

Write each stage as a function of the cost, compose all three in the correct order, and say what single percentage of the cost the customer finally pays.

Hint: Each stage multiplies by a constant, so the composition is a product of those constants.

Answer:

\[ m(c) = 1.40c, \quad s(p) = 0.75p, \quad t(q) = 1.05q \]

\[ t(s(m(c))) = 1.05\cdot 0.75\cdot 1.40 \, c = 1.1025c \]

The customer pays about 110.25 percent of the cost, so the shop's margin after the sale and the tax is about 10 percent of cost — with the tax portion going to the government, not the shop.

Two things are worth noticing. Because every stage is a multiplication, the three constants simply multiply and the order does not matter here — an unusual case, and the reason it works is that all three functions are of the form a times x with no added constant. Add a fixed 10 dollar certificate to the chain, as in Example 6, and the order matters again immediately.

61. How sure are you?

Commit first

Answer, then rate your confidence honestly.

Predict first

Is f of g of x always equal to g of f of x?

  • Yes, composition is commutative
  • No — in general the two are different functions
  • Yes, for linear functions
  • Only when both are power functions

Correct: No — in general the two are different functions.

\[ g(f(4)) = 9 \quad \text{but} \quad f(g(4)) = 49 \]

Why: With f of x equal to 3x minus 14 and g of x equal to x squared plus 5, the two compositions at 4 give 9 and 49. Even for two linear functions the orders usually differ: with f of x equal to x minus 10 and g of x equal to 0.85x, the paint-store example shows a gap of 1.50 dollars at every input. Particular pairs do commute — the identity function with anything, or two functions of the form a times x — but that is the exception rather than the rule.

62. Explain it to someone a year behind you

Explain it

They can evaluate a function and have just seen g of f of x for the first time.

Discussion prompt

In four sentences or fewer, explain what a composition is and how to evaluate one, without using the word composition.

Hint: Talk about a machine feeding into another machine.

Answer:

Think of each function as a machine that turns an input into an output. Writing g of f of x means feeding x into the f machine first, taking whatever comes out, and putting that into the g machine.

So you always work from the inside out: the function written closest to the input goes first. Swapping the two machines usually gives a different answer, which is why the order of the letters matters as much as the letters themselves.

63. Exit ticket

Exit ticket

Name the weakest spot before you close the deck.

Predict first

Which of these would you least want handed to you cold?

  • Finding the domain of a quotient of functions
  • Getting the order right in a composition
  • Substituting a whole function into another
  • Spotting a domain restriction the formula hides

Correct: Whichever you picked is tonight's ten minutes, and each has a one-line fix.

Why: For quotients, write the shared domain and then remove the divisor's zeros as a separate step. For order, read the expression from the inside out. For substituting, write the inner function in brackets before simplifying anything. For hidden restrictions, always check the inner function's domain before looking at the answer. Do five of your chosen kind rather than twenty mixed ones.

64. Draw the lesson on one page

Connect it up

Paper. Fifteen minutes.

Draw it

Choose f of x equals 4 over x and g of x equals 5x minus 2 and work them through everything. Top left: write the four arithmetic combinations and state each domain, marking which restriction comes from which function. Top right: draw the arrow diagram for g of f of x, labelling the input, the middle value and the output, and write beside it the two conditions the domain has to satisfy. Bottom left: compute both compositions symbolically and both at x equal to 1, showing that the two orders disagree. Bottom right: compute f of f of x, simplify it, and write one sentence explaining why the domain is not what the simplified formula suggests. In a margin, write down a two-stage everyday process and both orders of its composition.

If your bottom-right sentence says the domain is all real numbers, reread it: the inner f cannot accept zero, and no amount of simplifying afterwards can change that.

65. What you can do now

Recap

Five things, and the last three are about an operation with no analogue in arithmetic.

If you seeThen
Two functions combined arithmeticallyIntersect the domains
A quotient of functionsAlso remove the divisor's zeros
An even index in a formulaRestrict to non-negative inputs
g(f(x))Apply f first
A composition that simplifiesCheck the domain of the inner function anyway
A two-stage processCompose, and check which order is meant

Lesson 6.4 takes one special case of composition seriously: the pair of functions for which both orders give x, which is what it means for two functions to undo each other.

McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition §6.3, pp. 428-435 — everything on these slides traces back here

Sources

  1. McDougal Littell Algebra 2 (Texas Edition), Ch. 6 Rational Exponents and Radical Functions — Lesson 6.3 Perform Function Operations and Composition — Larson, Boswell, Kanold & Stiff, McDougal Littell / Houghton Mifflin, 2007, pp. 428-435
  2. OpenStax Algebra and Trigonometry 2e, §3.4 Composition of Functions

Want this taught 1-on-1? Alexander tutors Algebra 2 — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108