Composition connects two functions by feeding the output of one into the input of another. It describes a sequence of operations, such as converting a temperature and then calculating a fee based on the converted value.
Read the inside function first
The notation means apply to , then apply to the result. The small circle means composition, not multiplication. The input to is the complete expression
Let and Then
At the inside function gives and the outside function gives Evaluating the combined formula at 2 also gives 17, which checks the substitution.
Using a different letter in the definition of can make the roles clearer. The variable name is a placeholder; the rule says “square the entire input and add one.”
Example: order usually changes the answer
Reverse the functions above:
At this gives 13 rather than 17. Squaring after subtracting 2 is different from subtracting 2 after squaring. In general, A composition question must specify the order.
Likewise, is not With the same functions at 2, the product is a third different value. Read the notation before choosing an operation.
Domain requires both stages to work
An input is allowed in only if belongs to g's domain and belongs to f's domain. The inside stage must exist, and its output must be acceptable to the next stage.
Suppose and Then requires Reversing the order gives whose domain is The order changes the restrictions as well as the formula.
Example: simplification must preserve the composed domain
Let and The inner function excludes Its output is never zero, so every other real is acceptable to . Algebraically,
The simplified formula looks like a line defined everywhere, but the original two-stage process cannot begin at 2. That restriction remains part of the composite function. Domain information cannot be recovered by inspecting only the final simplified expression.
Build a composition from a real process
A store applies a 20% discount to an original price , then adds a fixed delivery fee of 6 dollars. Define and The final charge is
Reversing the order gives which discounts the delivery fee too. The two formulas encode different policies. Defining each function's input and output units makes the correct order easier to see.
A complicated rule can also be decomposed. For choose the inner rule and outer rule Many decompositions are possible; the useful one separates the operation you need to analyze.
Try it yourself
Let and Find and formulas for both compositions.
Answer: so But so The formulas are and Both domains are all real numbers.
What to remember
Apply the inside function first, substitute its entire output, and verify that every stage is defined. Composition records an ordered process; multiplication and reversed order describe different processes.