# Nakafa Framework: LLM URL: /en/subject/high-school/11/mathematics/function-composition-inverse-function/function-composition Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/function-composition-inverse-function/function-composition/en.mdx Output docs content for large language models. --- export const metadata = { title: "Function Composition", description: "Master function composition (f∘g)(x) with real-world shopping examples. Learn sequential function application and non-commutative properties.", authors: [{ name: "Nabil Akbarazzima Fatih" }], date: "04/27/2025", subject: "Function Composition and Inverse Function", }; ## Understanding Function Composition Imagine you are shopping at a store that offers two attractive promos: 1. **Promo A:** 20% discount, then another deduction of Rp25,000.00. 2. **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: 1. **Promo A (Discount first, then price reduction):** We are looking for For : So, the final price with Promo A is Rp135,000.00. 2. **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:** 1. **Finding :** Substitute in with : So, . 2. **Finding :** Substitute in with : So, . Note that , illustrating the non-commutative property.