# Nakafa Framework: LLM

URL: /en/subject/high-school/11/mathematics/function-composition-inverse-function/inverse-function
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/function-composition-inverse-function/inverse-function/en.mdx

Output docs content for large language models.

---

import { FunctionIllustration } from "./illustration";
import { LineEquation } from "@repo/design-system/components/contents/line-equation";
import { getColor } from "@repo/design-system/lib/color";

export const metadata = {
  title: "Inverse Function",
  description: "Learn inverse functions step-by-step: definition, bijective requirements, finding formulas, and graph reflections. Master f⁻¹(x) with clear examples.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "04/27/2025",
  subject: "Function Composition and Inverse Function",
};

## Understanding Inverse Functions

You often translate words or sentences from English to Indonesian, for example, when watching movies or reading news. This translation process is similar to how a function works: there is an input (English word) and an output (Indonesian word).

Consider the following illustration:

<FunctionIllustration
  title="Translation Machine"
  description="The translation machine changes words or sentences from English to Indonesian."
  machineLabel="Translation Machine"
  content={{ input: "Mathematics", output: "Matematika" }}
/>

Here, the "Translation Machine" acts like a function that transforms "Mathematics" (input) into "Matematika" (output).

Now, what if we want to do the reverse? Translate "Matematika" back into "Mathematics"?

This reverse process is the basis of the **inverse function** concept.

## Definition of Inverse Function

An inverse function is a function that "reverses" the operation of an initial function. If function <InlineMath math="f" /> maps element <InlineMath math="x" /> from domain <InlineMath math="A" /> to element <InlineMath math="y" /> in codomain <InlineMath math="B" />, then its inverse function, denoted as <InlineMath math="f^{-1}" /> (read "f inverse"), maps element <InlineMath math="y" /> from <InlineMath math="B" /> back to element <InlineMath math="x" /> in <InlineMath math="A" />.

Mathematically:

<BlockMath math="y = f(x) \iff x = f^{-1}(y)" />

In other words, if <InlineMath math="f" /> changes <InlineMath math="x" /> to <InlineMath math="y" />, then <InlineMath math="f^{-1}" /> changes <InlineMath math="y" /> back to <InlineMath math="x" />. The inverse function "undoes" the effect of the original function.

**Important:** The notation <InlineMath math="f^{-1}(x)" /> does **not** mean <InlineMath math="\frac{1}{f(x)}" /> (multiplicative inverse or reciprocal). It is special notation for the inverse function.

## Condition for a Function to Have an Inverse

Not all functions have an inverse function. For a function <InlineMath math="f" /> to have an inverse function <InlineMath math="f^{-1}" />, the function <InlineMath math="f" /> must be **bijective**. A bijective function is both **injective** (one-to-one) and **surjective** (onto).

- **Injective (One-to-one):** Every distinct element in the domain maps to a distinct element in the codomain. No two different inputs produce the same output.
- **Surjective (Onto):** Every element in the codomain is the result of mapping from at least one element in the domain. All possible outputs occur.

If function <InlineMath math="f" /> is not bijective, its inverse relation might exist, but that relation will not be a function.

## Determining the Formula for an Inverse Function

To find the formula for the inverse function <InlineMath math="f^{-1}(x)" /> from a function <InlineMath math="f(x)" />, you can follow these steps:

1.  Replace <InlineMath math="f(x)" /> with <InlineMath math="y" />.
2.  Swap the positions of the variables <InlineMath math="x" /> and <InlineMath math="y" /> in the equation.
3.  Solve the equation for <InlineMath math="y" /> in terms of <InlineMath math="x" />.
4.  Replace <InlineMath math="y" /> with <InlineMath math="f^{-1}(x)" /> to get the inverse function formula.

**Example:**

Find the inverse function of <InlineMath math="f(x) = 2x + 3" />.

1.  Replace <InlineMath math="f(x)" /> with <InlineMath math="y" />:

    <BlockMath math="y = 2x + 3" />

2.  Swap <InlineMath math="x" /> and <InlineMath math="y" />:

    <BlockMath math="x = 2y + 3" />

3.  Solve for <InlineMath math="y" />:

    <div className="flex flex-col gap-4">
      <BlockMath math="x - 3 = 2y" />
      <BlockMath math="\frac{x - 3}{2} = y" />
    </div>

4.  Replace <InlineMath math="y" /> with <InlineMath math="f^{-1}(x)" />:

    <BlockMath math="f^{-1}(x) = \frac{x - 3}{2}" />

So, the inverse function of <InlineMath math="f(x) = 2x + 3" /> is <InlineMath math="f^{-1}(x) = \frac{x - 3}{2}" />.

## Graph of a Function and Its Inverse

The graph of the inverse function <InlineMath math="f^{-1}(x)" /> is a reflection of the graph of the original function <InlineMath math="f(x)" /> across the line <InlineMath math="y = x" />.

For example, let's look at the graph of <InlineMath math="f(x) = 2x + 3" />, its inverse <InlineMath math="f^{-1}(x) = \frac{x - 3}{2}" />, and the identity line <InlineMath math="y=x" />.

<LineEquation
  title={
    <>
      Graph of <InlineMath math="f(x)" /> and its Inverse
    </>
  }
  description={
    <>
      The graph shows the function <InlineMath math="f(x)" />, its inverse{" "}
      <InlineMath math="f^{-1}(x)" />, and the line <InlineMath math="y=x" /> as
      the line of reflection.
    </>
  }
  data={[
    {
      // f(x) = 2x + 3
      points: Array.from({ length: 11 }, (_, i) => {
        const x = i - 5;
        return { x, y: 2 * x + 3, z: 0 };
      }),
      color: getColor("ORANGE"),
      labels: [
        {
          text: "f(x) = 2x + 3",
          at: 5,
          offset: [-2.5, 0, 0],
        },
      ],
    },
    {
      // f⁻¹(x) = (x - 3) / 2
      points: Array.from({ length: 11 }, (_, i) => {
        const x = i - 5;
        return { x, y: (x - 3) / 2, z: 0 };
      }),
      color: getColor("EMERALD"),
      labels: [
        {
          text: "f^{-1}(x) = (x-3)/2",
          at: 10,
          offset: [0.5, 0.5, 0],
        },
      ],
    },
    {
      // y = x (Identity Line)
      points: Array.from({ length: 11 }, (_, i) => {
        const x = i - 5;
        return { x, y: x, z: 0 };
      }),
      color: getColor("PINK"),
      labels: [
        {
          text: "y = x",
          at: 10,
          offset: [0.5, 0.5, 0],
        },
      ],
    },
  ]}
/>
