What is a Composition of Functions?
A composition of functions is a sequential operation where the output of one function becomes the input for the next. This introductory example shows how this works in a real-world scenario. Press 'Next Step' to see the calculation unfold.
Application: The Washing Machine Discount
A shopper buys a $500 washing machine that is on sale for $100 off. She also has a 25% off coupon that is applied *after* the markdown.
Original Price ($x$)
Apply $g(x) = x - 100$
Apply $f(x) = 0.75x$
The final price is $\mathbf{\$300}$. The output of the markdown function ($400) became the input for the coupon function.
How to Compute Compositions
Algebraically, composition involves substituting one entire function into the variable of another. Select which composition to calculate, then press 'Next Step' to see the process line by line.
Example 4.19A
Given: $f(x) = x+5$ and $g(x) = x^2 - 2$.
The Challenge: Finding the Domain
The most important rule: **The domain of $(f \circ g)(x)$ is constrained by the domain of the *inner function*, $g(x)$.** The output of $g(x)$ must be a valid input for $f(x)$. This section visualizes the domains from the textbook examples. Select an example to begin.
Domain Visualizer
This chart visualizes the domains on a number line. The final, valid domain is the "Intersection" line.
Interactive Explorer
Now, try it yourself. Select two functions from the textbook's practice problems and the application will generate the full composition and domain analysis for $(f \circ g)(x)$.
Review: The Vertical Line Test
This concept from the review section helps determine if a graph represents a function. A graph is a function if and only if no vertical line intersects the graph at more than one point. Select a graph and run the test to see this in action.