Combining Functions
You can add, multiply and divide functions just like numbers. You can also chain them: in , whatever comes out of goes straight into , and the order you chain them in usually matters.
What the symbols mean
- Composition
Apply g first, then f.
- Inner function
Its output is fed into f.
Explanation
Combining functions is simply building a new function out of two old ones, either by doing arithmetic with their outputs or by running one after the other. The first row of formulas just says "do , do , then add (or multiply, or divide) the answers." Composition is the interesting one: has (the inner function, which goes first) and (the outer one, which takes 's answer as its input). The little circle is read "composed with," and it helps to think of as " after ." It's like an assembly line, and that's all there is to it.
Order matters. Think about the machines from last lesson. Feeding through and then is a different process from first and then , so and are usually different functions. Putting on socks and then shoes isn't the same as shoes and then socks. Always work from the inside out.
Domains. , and need to be in both domains, since you have to be able to compute both outputs, and also needs . For there are two hurdles: has to be a legal input for , and then has to be a legal input for .
Decomposition runs the other way. is with inner and outer : first you compute , then you raise it to the 4th power. Spotting the inner function like this is the first step of the chain rule in calculus.
See it
Worked examples
For and , find and .
- 1
For , goes first and gives ; then doubles it and adds 1: .
Practice
Type your answer and check it. Solve them all to complete the lesson.
For , , find .
For the same functions, find .
For the same functions, find .
For and , what is the domain of ?
is with . What is ?
A balloon's radius is cm after seconds, and a sphere's surface area is . Find , the surface area after 2 seconds.
For and , which inputs must be excluded from the domain of ?
The hardest one here. Get it, and you've got this lesson.
If and , find , choosing the one with a positive leading coefficient.
Where it's used
Pipelines are compositions: a currency conversion after a sales tax, a unit change after a measurement, a neural network's layers each feeding the next.