Composite function machine: connect two function machines in series; compare (f∘g)(x) and (g∘f)(x) outputs to demonstrate that composition is not commutative; composition in mapping diagrams; everyday examples such as price–discount–VAT
Return to simulation
Explore the operations of (f circle g)(x) and (g circle f)(x) by connecting two function machines back-to-back with the function composition simulation. In this interactive experiment, you will see through mapping diagrams why function composition is not commutative and reinforce it with examples from daily life. It is a great tool to visually learn the concept of functions and domain restrictions in mathematics.
What can you do in this simulation?
You can observe how inputs are transformed by running two separate functions consecutively with the composite function machine.
You can test that composition is not commutative by directly comparing the outputs of (f circle g)(x) and (g circle f)(x).
You can follow intermediate values and results step by step by working on mapping diagrams.
You can discover the condition for g(x) to be in the domain of f and undefined inputs for the domain of f(g(x)).
You can practice the logic of composite functions through daily life examples such as price, discount, and VAT.
Basic concepts and formulas
The new function obtained by the successive application of two functions is called a composite function and is denoted as (f o g)(x) = f(g(x)). Here, the output of the function g becomes the input of the function f. The basic formula for the composition operation is as follows: (f o g)(x) = f(g(x)). Generally, unlike multiplication or addition in functions, the composition operation does not have the commutative property; that is, (f o g)(x) is generally not equal to the expression (g o f)(x).
How to use?
Examine the function machines or cards given on the experiment screen.
Determine the input value and calculate the output of the first function.
Feed the resulting intermediate value as an input to the second function.
Observe the difference between (f o g)(x) and (g o f)(x) by comparing the final outputs.
Reinforce your learning by answering the questions in the guide and completing the mapping diagrams.
Frequently asked questions
Why is function composition not commutative?
Because when functions are applied in sequence, the priority of operations changes. In the operation f(g(x)), g is applied first, whereas in the operation g(f(x)), f is applied first, and this situation generally produces different results.
When does f(g(x)) become undefined?
The composite function is undefined if the input x is not in the domain of the function g, or if the value of g(x) is not in the domain of the function f.
Where is function composition used in daily life?
Function composition is used in multiple mathematical operations performed back-to-back, such as applying a discount to a product first and then adding VAT.