Skip to main content
  1. Grade 12 Mathematics/
  2. Functions and Inverses/

The Logic of Inverses

What is an Inverse?
#

An inverse function is the mathematical “undo” button. If a function $f$ takes an input $x$ and produces an output $y$, then the inverse $f^{-1}$ takes $y$ as input and gives back the original $x$.

$$f: x \to y \qquad \text{then} \qquad f^{-1}: y \to x$$

The “Machine” Analogy
#

Think of $f$ as a machine:

  • You feed in $x = 3$, and out comes $y = 10$
  • The inverse machine $f^{-1}$ takes $10$ and gives back $3$

The inverse reverses the process — it “undoes” whatever the original function did.

The Formal Definition
#

$f^{-1}$ is the inverse of $f$ if and only if:

$$f^{-1}(f(x)) = x \quad \text{and} \quad f(f^{-1}(x)) = x$$

Applying the function and then its inverse (in either order) gets you back to where you started.


1. The “Swap” Rule — Finding an Inverse
#

The Method
#

To find the inverse of any function:

  1. Write the equation: $y = \dots$
  2. Swap $x$ and $y$: replace every $x$ with $y$ and every $y$ with $x$
  3. Solve for $y$ (make $y$ the subject)
  4. Write in inverse notation: $f^{-1}(x) = \dots$

Why Does Swapping Work?
#

If the original function maps $x$ values to $y$ values, the inverse maps $y$ values back to $x$ values. Swapping $x$ and $y$ literally reverses the input-output relationship.

Worked Example 1 — Linear Inverse
#

Find the inverse of $f(x) = 2x + 6$.

Step 1: $y = 2x + 6$

Step 2 — Swap: $x = 2y + 6$

Step 3 — Solve for $y$:

$$x - 6 = 2y$$

$$y = \frac{x - 6}{2}$$

Step 4: $f^{-1}(x) = \frac{x - 6}{2}$

Verify: $f(3) = 2(3) + 6 = 12$. Does $f^{-1}(12) = 3$? $\frac{12 - 6}{2} = 3$ ✓

Worked Example 2 — Exponential Inverse
#

Find the inverse of $f(x) = 3^x$.

Step 1: $y = 3^x$

Step 2 — Swap: $x = 3^y$

Step 3 — Solve for $y$: Apply $\log_3$ to both sides:

$$y = \log_3 x$$

Step 4: $f^{-1}(x) = \log_3 x$

This is why logarithms exist — they are the inverses of exponential functions.


2. The Graphical Relationship: Reflection Across $y = x$
#

The graph of $f^{-1}$ is always a reflection of the graph of $f$ in the line $y = x$.

Why?
#

If the point $(a; b)$ is on $f$, then $f(a) = b$. By definition, $f^{-1}(b) = a$, so the point $(b; a)$ is on $f^{-1}$.

Swapping coordinates $(a; b) \to (b; a)$ is exactly what reflection in $y = x$ does.

Worked Example 3 — Points on the Inverse
#

The following points lie on $f$: $(1; 4)$, $(2; 7)$, $(3; 10)$. Write down points on $f^{-1}$.

Swap each coordinate:

Point on $f$Point on $f^{-1}$
$(1; 4)$$(4; 1)$
$(2; 7)$$(7; 2)$
$(3; 10)$$(10; 3)$

3. One-to-One vs Many-to-One
#

Not every function can be inverted to give another function.

One-to-One Functions
#

A function is one-to-one if every output comes from exactly one input. The horizontal line test confirms this: if any horizontal line crosses the graph more than once, the function is not one-to-one.

Examples of one-to-one functions:

  • $y = mx + c$ (linear, $m \neq 0$)
  • $y = a^x$ (exponential)
  • $y = \log_a x$ (logarithmic)

These can be inverted directly — the inverse is automatically a function.

Many-to-One Functions
#

A many-to-one function maps different inputs to the same output. The classic example is the parabola:

$$(-3)^2 = 9 \quad \text{and} \quad 3^2 = 9$$

If you try to “undo” $9$, you get two answers: $-3$ and $3$. The inverse is not a function because one input ($9$) gives two outputs.

The Solution: Domain Restriction
#

To make the inverse of a many-to-one function into a valid function, we restrict the domain of the original. For $y = x^2$:

  • Restrict to $x \geq 0$: inverse is $y = \sqrt{x}$ (the right half)
  • Restrict to $x \leq 0$: inverse is $y = -\sqrt{x}$ (the left half)
OriginalDomain restrictionInverse
$y = x^2$$x \geq 0$$f^{-1}(x) = \sqrt{x}$
$y = x^2$$x \leq 0$$f^{-1}(x) = -\sqrt{x}$

For the full treatment of each function type and its inverse, see the individual deep-dive pages: Linear, Quadratic, Exponential, Logarithmic.


4. Domain and Range Swap
#

When you find an inverse, the domain and range swap:

$f$$f^{-1}$
Domain$\{x: x \in \mathbb{R}\}$= Range of $f$
Range$\{y: y > 0\}$= Domain of $f$

Worked Example 4 — Domain and Range
#

$f(x) = 2^x$ has domain $x \in \mathbb{R}$ and range $y > 0$.

$f^{-1}(x) = \log_2 x$ has domain $x > 0$ and range $y \in \mathbb{R}$.

The domain and range have swapped — exactly as expected.


5. Verifying an Inverse
#

To check that $g$ is truly the inverse of $f$, verify both compositions:

$$f(g(x)) = x \quad \text{and} \quad g(f(x)) = x$$

Worked Example 5 — Verification
#

Verify that $f(x) = 2x + 6$ and $g(x) = \frac{x - 6}{2}$ are inverses.

$$f(g(x)) = 2\left(\frac{x-6}{2}\right) + 6 = (x - 6) + 6 = x \;\checkmark$$$$g(f(x)) = \frac{(2x + 6) - 6}{2} = \frac{2x}{2} = x \;\checkmark$$

Both compositions return $x$, confirming that $g = f^{-1}$.


🚨 Common Mistakes
#

MistakeWhy it’s wrongFix
$f^{-1}(x) = \frac{1}{f(x)}$The $-1$ is inverse notation, NOT a negative exponent$f^{-1}$ means “undo $f$,” not “reciprocal of $f$”
Forgetting to swap $x$ and $y$Just solving for $x$ gives $x$ in terms of $y$ — not the inverse equationAlways swap first, then solve for $y$
Not restricting the domainThe inverse of $y = x^2$ is $x = y^2$, which is not a functionSpecify $x \geq 0$ or $x \leq 0$ before finding the inverse
Wrong reflection lineReflecting in the $x$-axis or $y$-axis is not the same as $y = x$The inverse is a reflection in $y = x$ specifically
Domain/range confusionThe domain of $f^{-1}$ is the range of $f$ — not the same as the domain of $f$Always state both domain and range for $f$ and $f^{-1}$

💡 Pro Tips for Exams
#

1. The “Point-Swap” Check
#

If $(3; 10)$ is on the graph of $f$, then $(10; 3)$ must be on $f^{-1}$. This is the fastest way to check your inverse in an exam — substitute one known point.

2. The Line $y = x$ is Your Mirror
#

When sketching both $f$ and $f^{-1}$ on the same axes, draw $y = x$ as a dashed line first. Every point on $f^{-1}$ should be the mirror image of the corresponding point on $f$ across this line.

3. Exponential ↔ Log Connection
#

If the question involves $y = a^x$, the inverse is $y = \log_a x$ — and vice versa. You don’t need to go through the swap steps every time; just recognise the pair. See Logarithmic Function for the full treatment.


🏠 Back to Functions & Inverses | ⏭️ Linear Function

Related

Sigma Notation

Master sigma notation from the ground up — decoding the symbol, expanding, counting terms, connecting to sum formulas, and splitting sums with fully worked examples.

Geometric Sequences & Series

Master the logic of scaling — common ratio, general term, sum formulas with proofs, sum to infinity, and convergence with deep explanations and fully worked examples.

Quadratic Sequences

Master the logic of changing speed — first and second differences, the general term derivation, and solving for n with fully worked examples.