# 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