2.2.9Functions

Inverse functions — finding f⁻¹(x), horizontal line test

2,719 words12 min readdifficulty · medium6 backlinks

Overview

An inverse function undoes what the original function does. If ff takes xx to yy, then f1f^{-1} takes yy back to xx. Not every function has an inverse—only one-to-one (injective) functions do. The horizontal line test determines whether a function is one-to-one and thus invertible.

Connections:

  • Function Composition — verifying inverses via f(f1(x))=xf(f^{-1}(x)) = x
  • Domain and Range — domain/range swap for inverses
  • Bijective Functions — invertibility requires bijection
  • Exponential and Logarithmic Functions — classic inverse pair
  • Trigonometric Functions — restricting domains for invertibility

Core Intuition

For example, if f(x)=2x+3f(x) = 2x + 3 takes 5135\to 13, then f1(13)=5f^{-1}(13) = 5. The inverse "rewinds" the operation.

BUT: not every machine is reversible. If two different inputs give the same output (like f(x)=x2f(x) = x^2 where f(2)=f(2)=4f(2) = f(-2) = 4), you can't uniquely reverse it. That's why we need the one-to-one condition.

Figure — Inverse functions — finding f⁻¹(x), horizontal line test

Definitions and Core Concepts

Key property: The graph of f1f^{-1} is the reflection of ff across the line y=xy = x.

Why this matters: Only one-to-one functions are invertible. If f(2)=f(5)=7f(2) = f(5) = 7, then f1(7)f^{-1}(7) is ambiguous (is it 2 or 5?). No ambiguity means invertible.

Why it works: A horizontal line y=cy = c represents all points with the same yy-value. If it hits the graph twice, two different xx-values map to the same yy, violating one-to-one.


Deriving the Inverse: The Swap Method

WHY this process works: If (a,b)(a, b) is on the graph of ff (meaning f(a)=bf(a) = b), then (b,a)(b, a) must be on the graph of f1f^{-1} (meaning f1(b)=af^{-1}(b) = a). Swapping xx and yy in the equation literally swaps input and output roles.

Derivation from first principles:

  • We want f1f^{-1} such that f(f1(x))=xf(f^{-1}(x)) = x
  • Let f1(x)=yf^{-1}(x) = y. Then f(y)=xf(y) = x (by definition of inverse)
  • So we need to solve f(y)=xf(y) = x for yy
  • The swap method is just a notational trick to organize this solving process

Worked Examples

Step 1: Write y=3x7y = 3x - 7

Step 2: Swap to get x=3y7x = 3y - 7

Step 3: Solve for yy: x+7=3yx + 7 = 3y y=x+73y = \frac{x + 7}{3}

Why this step? We're isolating yy to express the output in terms of the input.

Step 4: Therefore f1(x)=x+73f^{-1}(x) = \frac{x + 7}{3}

Step 5: Verify: f(f1(x))=f(x+73)=3x+737=(x+7)7=xf(f^{-1}(x)) = f\left(\frac{x+7}{3}\right) = 3 \cdot \frac{x+7}{3} - 7 = (x + 7) - 7 = x \,\checkmark f1(f(x))=f1(3x7)=(3x7)+73=3x3=xf^{-1}(f(x)) = f^{-1}(3x - 7) = \frac{(3x - 7) + 7}{3} = \frac{3x}{3} = x \,\checkmark

Why verification matters: It's easy to make algebraic mistakes. Verification catches them.


Step 1: Write y=2x+1x3y = \frac{2x + 1}{x - 3}

Step 2: Swap to get x=2y+1y3x = \frac{2y + 1}{y - 3}

Step 3: Solve for yy: x(y3)=2y+1x(y - 3) = 2y + 1 xy3x=2y+1xy - 3x = 2y + 1 xy2y=3x+1xy - 2y = 3x + 1 y(x2)=3x+1y(x - 2) = 3x + 1 y=3x+1x2y = \frac{3x + 1}{x - 2}

Why this step? We collect all yy terms on one side to factor out yy.

Step 4: Therefore f1(x)=3x+1x2f^{-1}(x) = \frac{3x + 1}{x - 2}, x2x \neq 2

Domain note: The denominator restriction changes because roles swap. Original's range limitation (y2y \neq 2 from the horizontal asymptote) becomes the inverse's domain restriction.

Verification (abbreviated): f(f1(x))=f(3x+1x2)=23x+1x2+13x+1x23=6x+2+x2x23x+13x+6x2=7x7=xf(f^{-1}(x)) = f\left(\frac{3x+1}{x-2}\right) = \frac{2 \cdot \frac{3x+1}{x-2} + 1}{\frac{3x+1}{x-2} - 3} = \frac{\frac{6x+2+x-2}{x-2}}{\frac{3x+1-3x+6}{x-2}} = \frac{7x}{7} = x \,\checkmark


Horizontal Line Test: Draw y=4y = 4. It intersects the parabola at x=2x = -2 and x=2x = 2. Two intersections means not one-to-one.

Why no inverse: If we tried to find f1(4)f^{-1}(4), we'd get two answers: 2-2 and 22. An inverse must give exactly one output per input.

HOWEVER: If we restrict the domain to x0x \geq 0, then f(x)=x2f(x) = x^2 becomes one-to-one on [0,)[0, \infty). Now we can find the inverse:

  • y=x2y = x^2, x0x \geq 0
  • x=y2x = y^2, y0y \geq 0
  • y=xy = \sqrt{x} (positive root only)
  • f1(x)=xf^{-1}(x) = \sqrt{x}

Why restrict? Domain restriction removes the ambiguity. This technique is crucial for trig functions.


Step 1: y=x+532y = \sqrt[3]{x + 5} - 2

Step 2: x=y+532x = \sqrt[3]{y + 5} - 2

Step 3: Solve for yy: x+2=y+53x + 2 = \sqrt[3]{y + 5} (x+2)3=y+5(x + 2)^3 = y + 5 y=(x+2)35y = (x + 2)^3 - 5

Why cube both sides? Cubing undoes the cube root, just as the inverse operation should.

Step 4: f1(x)=(x+2)35f^{-1}(x) = (x + 2)^3 - 5

Domain/Range: Since cube root is defined for all real numbers and is one-to-one, both ff and f1f^{-1} have domain and range R\mathbb{R}.


Common Mistakes & How to Fix Them

Why it feels right: The 1-1 exponent notation is borrowed from reciprocals (x1=1/xx^{-1} = 1/x).

The truth: f1f^{-1} is inverse function, NOT reciprocal.

  • f1(f(x))=xf^{-1}(f(x)) = x (composition gives identity)
  • 1f(x)f(x)=1\frac{1}{f(x)} \cdot f(x) = 1 (multiplication gives 1)

Example: For f(x)=2xf(x) = 2x:

  • Inverse: f1(x)=x2f^{-1}(x) = \frac{x}{2}, and f(f1(x))=2x2=xf(f^{-1}(x)) = 2 \cdot \frac{x}{2} = x
  • Reciprocal: 1f(x)=12x\frac{1}{f(x)} = \frac{1}{2x}, which is completely different

Fix: Always verify your inverse using composition, never by multiplication.


Why it feels right: The algebra is correct.

The truth: f(x)=x2f(x) = \sqrt{x - 2} has domain x2x \geq 2 and range y0y \geq 0. When we swap, f1f^{-1} must have domain x0x \geq 0 (the original range) and range y2y \geq 2 (the original domain).

So f1(x)=x2+2f^{-1}(x) = x^2 + 2 only for x0x \geq 0.

Fix: Track domain/range swaps explicitly:

  • Original domain → inverse range
  • Original range → inverse domain

Why it feels right: The algorithm is mechanical and always produces something.

The truth: If ff isn't one-to-one, the "inverse" you find won't actually work. For f(x)=x2f(x) = x^2 (all reals):

  • Swap method gives f1(x)=±xf^{-1}(x) = \pm\sqrt{x}
  • But this isn't a function (two outputs for one input)!

Fix: Always apply horizontal line test first. If it fails, restrict the domain before finding inverse.


Horizontal Line Test — Geometric Proof

WHY does the horizontal line test work?

Claim: ff is one-to-one     \iff every horizontal line intersects the graph at most once.

Proof (\Rightarrow): Suppose ff is one-to-one. Assume for contradiction that a horizontal line y=cy = c intersects the graph at two points (x1,c)(x_1, c) and (x2,c)(x_2, c) with x1x2x_1 \neq x_2. Then f(x1)=cf(x_1) = c and f(x2)=cf(x_2) = c, so f(x1)=f(x2)f(x_1) = f(x_2) but x1x2x_1 \neq x_2. This contradicts one-to-one. ✓

Proof (\Leftarrow): Suppose every horizontal line intersects at most once. To show one-to-one, assume f(x1)=f(x2)=cf(x_1) = f(x_2) = c. Then (x1,c)(x_1, c) and (x2,c)(x_2, c) are both on the graph, so they lie on the horizontal line y=cy = c. Since this line intersects at most once, we must have x1=x2x_1 = x_2. Thus ff is one-to-one. ✓


Domain and Range of Inverses

Derivation:

  • Let yRange(f)y \in \text{Range}(f). Then y=f(x)y = f(x) for some xAx \in A. By definition of inverse, f1(y)=xf^{-1}(y) = x, so yDomain(f1)y \in \text{Domain}(f^{-1}).
  • Conversely, if yDomain(f1)y \in \text{Domain}(f^{-1}), then f1(y)f^{-1}(y) is defined, meaning there exists xx such that f(x)=yf(x) = y, so yRange(f)y \in \text{Range}(f).

Why this matters: When finding inverses algebraically, you must transfer domain restrictions correctly.


Properties of Inverse Functions

  1. Inverse of Inverse: (f1)1=f(f^{-1})^{-1} = f Derivation: If g=f1g = f^{-1}, then f(g(x))=xf(g(x)) = x and g(f(x))=xg(f(x)) = x. This means ff satisfies the definition of the inverse of gg, so g1=fg^{-1} = f.

  2. Composition Property: (fg)1=g1f1(f \circ g)^{-1} = g^{-1} \circ f^{-1}

    Derivation: Toundo "do gg then do ff", we must "undo ff then undo gg" (reverse order). Formally: (g1f1)(fg)(x)=g1(f1(f(g(x)))=g1(g(x))=x(g^{-1} \circ f^{-1})(f \circ g)(x) = g^{-1}(f^{-1}(f(g(x))) = g^{-1}(g(x)) = x


Active Recall Questions

#flashcards/maths

What is the definition of an inverse function? :: A function f1f^{-1} such that f1(f(x))=xf^{-1}(f(x)) = x and f(f1(x))=xf(f^{-1}(x)) = x. It "undoes" what ff does.

What condition must a function satisfy to have an inverse?
The function must be one-to-one (injective): different inputs produce different outputs.

State the Horizontal Line Test :: A function is one-to-one if and only if every horizontal line intersects its graph at most once.

What are the four steps to find an inverse algebraically?
1. Write y=f(x)y = f(x) 2. Swap xx and yy 3. Solve for yy 4. Replace yy with f1(x)f^{-1}(x)
How are the domain and range of ff and f1f^{-1} related?
Domain of f1f^{-1} = Range of ff; of f1f^{-1} = Domain of ff. They swap.
What is the difference between f1(x)f^{-1}(x) and 1f(x)\frac{1}{f(x)}?
f1(x)f^{-1}(x) is the inverse function (composition gives identity), while 1f(x)\frac{1}{f(x)} is the reciprocal (multiplication gives 1). Completely different concepts.
How is the graph of f1f^{-1} related to the graph of ff?
The graph of f1f^{-1} is the reflection of ff across the line y=xy = x.
Why can't f(x)=x2f(x) = x^2 have an inverse over all real numbers?
Because it fails the horizontal line test: f(2)=f(2)=4f(-2) = f(2) = 4, so it's not one-to-one. Multiple inputs map to the same output.
If f(x)=2x5f(x) = 2x - 5, find f1(x)f^{-1}(x)
y=2x5y = 2x - 5, swap: x=2y5x = 2y - 5, solve: y=x+52y = \frac{x + 5}{2}, so f1(x)=x+52f^{-1}(x) = \frac{x + 5}{2}
What is (ff1)(x)(f \circ f^{-1})(x) always equal to?
xx (the identity function), by definition of inverse.

Recall Feynman Technique: Explain to a 12-Year-Old

Imagine you have a secret code machine. You put in a number, and it spits out a coded number. For example, your machine takes any number and doubles it, then adds 3. So if you put in 5, you get 13.

An inverse function is like having a decoder machine. You give it the coded number (13), and it tells you the original number (5). The decoder does the opposite operations in reverse order: first subtract 3, then divide by 2.

But here's the catch: not every code machine has a decoder! If your machine sometimes gives the same code for different numbers (like squaring: both 3 and -3 give 9), then you can't decode uniquely. You wouldn't know if 9 came from 3 or -3.

The horizontal line test is a quick way to check: draw your machine's graph, then draw horizontal lines. If any line touches the graph twice, your machine isn't decodable (two different inputs gave the same output).

To find the decoder formula: write down your machine's rule, swap the input and output, then solve to get the input by itself. That's your decoder!


For horizontal line test: "Horizontal = One-to-One" — if a horizontal line hits once, the function is one-to-one.


Summary

To find an inverse function f1(x)f^{-1}(x):

  1. Verify ff is one-to-one (use horizontal line test)
  2. Use the swap method: y=f(x)x=f(y)y = f(x) \to x = f(y) \to solve for yy
  3. Remember domain and range swap
  4. Always verify using composition

The inverse "undoes" the function. Graphically, it's a reflection across y=xy = x. Only one-to-one functions are invertible—the horizontal line test checks this condition by ensuring each output comes from exactly one input.

Concept Map

undoes via

must be

required for

tests

line hits graph once

graph is reflection

derives

steps: write swap solve

verified by

swaps

classic pair

restrict domain

Function f

Inverse f inverse

One-to-one injective

Horizontal line test

Reflection across y equals x

Swap method

Solve f of y equals x

f of f inverse equals x

Domain and range

Exp and log functions

Trig functions

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Inverse function ek aisi function hai jo original function ka kaam ulta kar deti hai. Socho ki agar ek machine hai jo number ko double karke 3 add karti hai, toh inverse machine pehle 3 minus karegi phir half kar degi—bilkul opposite steps, reverse order mein.

Lekin har function ka inverse nahi hota! Agar ek function do different inputs pe same output deta hai (jaise x2x^2 mein 2 aur -2 dono 4 dete hain), toh inverse bane mein problem hogi—kyunki 4 ko wapas le jaoge toh confuse ho jaoge ki 2 chahiye ya -2? Isliye one-to-one zaruri hai matlab har output sirf ek hi input se ata ho.

Horizontal line test se check karte hain: graph pe horizontal line draw karo, agar ek se zyada baar touch kare toh inverse nahi ban sakta. Algebraically inverse nikalne ke liye y = f(x) likho, phir x aur y swap karo, a ke liye solve karo. Domain aur range bhi swap ho jate hain inverse mein. Ye concept bahut powerful hai—exponential aur log, sine aur arcsin, sab inverse pairs hain.

Go deeper — visual, from zero

Test yourself — Functions

Connections