Understanding Function Composition
Imagine you are shopping at a store that offers two attractive promos:
- Promo A: 20% discount, then another deduction of Rp25,000.00.
- Promo B: Price reduction of Rp25,000.00, then a 20% discount.
Do both promos result in the same final price? Which promo is more beneficial? To answer this, we need to understand the concept of function composition.
Definition of Function Composition
Function composition is the sequential combination of two or more functions to produce a new function.
If we have a function and a function , then their composition, written as , is a new function that maps directly from the domain to the codomain .
This means we apply function first, and then we input its result into function .
Mathematically, this is written as:
Promo Calculation
Let's calculate the final price for an item worth Rp200,000.00 using both promos with the concept of functions.
Let be the initial price of the item.
- 20% discount function:
- Rp25,000.00 reduction function:
Now let's compose these two functions according to the promo sequence:
-
Promo A (Discount first, then price reduction): We are looking for
For :
So, the final price with Promo A is Rp135,000.00.
-
Promo B (Price reduction first, then discount): We are looking for
For :
So, the final price with Promo B is Rp140,000.00.
It turns out that the order of applying the functions (discount and price reduction) affects the final result. Promo A () is more beneficial for the buyer than Promo B () for an item priced at Rp200,000.00. This demonstrates that, generally, .
Another Example
Suppose we have two functions:
Determine and .
Solution:
-
Finding :
Substitute in with :
So, .
-
Finding :
Substitute in with :
So, .
Note that , illustrating the non-commutative property.