Learn
Lesson · Lines, Functions and Graphs · Functions

Inverse Functions

An inverse sends every output back to the input it came from. It exists only when no two inputs share an output; a function that repeats outputs must be cut down to a one-to-one piece first. The superscript −1 is a label, not an exponent.

f⁻¹ undoes f: f⁻¹(f(x)) = x and f(f⁻¹(x)) = x exists ⟺ f is one-to-one (horizontal line test) method: swap x and y, then solve for y domain of f⁻¹ = range of f f⁻¹(x) is NOT 1/f(x)
What an inverse is, when it exists, how to find it

Core ideas

What this lesson establishes

Composition gave the language for undoing. This lesson asks which functions can be undone, and what to do about the ones that cannot.

1

An inverse is defined by composition

f⁻¹ is the function for which f⁻¹(f(x)) = x for every x in the domain of f, and f(f⁻¹(x)) = x for every x in the domain of f⁻¹. Both directions are part of the definition, and checking both is how a candidate inverse is verified.

2

It exists exactly when f is one-to-one

If two inputs share an output, the inverse would have to send that one output back to two places, and “What a Function Is” ruled that out. f(x) = x² sends 2 and −2 both to 4, so on all real numbers it has no inverse. On a graph, the horizontal line test decides it.

3

Restricting the domain is the usual repair

Cutting the domain down until no output repeats gives a function that does have an inverse. x² on x ≥ 0 inverts to √x; the same formula on x ≤ 0 inverts to −√x. The restriction is a choice, and different choices give different inverses.

The material

One-to-one, the swap method, and the restriction

What the notation promises, the test that decides existence, the procedure, and the part that is usually left out.

Definition · One-to-one, and the inverse

A function is one-to-one if different inputs always give different outputs: f(a) = f(b) forces a = b. For a one-to-one f, the inverse f⁻¹ is the function with domain equal to the range of f that sends each output back to the unique input it came from.

The notation is unfortunate and permanent. In f⁻¹ the −1 is not an exponent, so f⁻¹(x) is not 1/f(x) and the two are almost never equal. For f(x) = 3x − 7 the inverse is (x + 7)/3 and the reciprocal is 1/(3x − 7); at x = −1 they give 2 and −1/10. Nothing about the symbol warns you, so this is a fact to hold separately.

The horizontal line test

Theorem · Horizontal line test

A function has an inverse if and only if no horizontal line meets its graph more than once. A horizontal line is the set of points sharing one output, so two intersections are two inputs with the same output — exactly what one-to-one forbids.

The pairing with “What a Function Is” is exact. The vertical line test asks whether a graph is a function at all; the horizontal line test asks whether that function can be run backwards. A graph that passes both is a function with an inverse, and the second test says nothing about the first.

The swap method

Write y = f(x), exchange x and y, and solve the result for y. The swap is doing something specific: the graph of f⁻¹ is the graph of f reflected in the line y = x, and exchanging the letters is that reflection performed on the equation.

f(x) = 3x - 7 y = 3x - 7 write y for the output x = 3y - 7 swap x and y x + 7 = 3y solve for y y = (x + 7)/3 f⁻¹(x) = (x + 7)/3 check f(2) = -1 f⁻¹(-1) = 6/3 = 2 back to 2 f⁻¹(5) = 4 f(4) = 5 back to 5

Both checks are needed in principle, and for a formula like this one they will not disagree. They start to matter as soon as a restriction is involved, because a candidate can undo f on part of the domain and fail elsewhere.

Verifying both directions

The swap gives a candidate formula; composition proves it performs the promised undoing. For the line above, both directions use only the linear algebra already learned.

f⁻¹(f(x)) = ((3x - 7) + 7)/3 = 3x/3 = x f(f⁻¹(x)) = 3((x + 7)/3) - 7 = x + 7 - 7 = x

The first direction starts with an input of f; the second starts with an input of f⁻¹. A single numerical round trip can catch an error, but these two symbolic simplifications establish the claim for every real input of the two lines.

When the inverse does not exist

f(x) = x² on all real numbers fails the horizontal line test at every positive height. The output 4 came from 2 and from −2, and an inverse would have to choose. Writing √x and calling it the inverse of x² quietly makes that choice without saying so.

Example · Restricting a square

f(x) = x² on x ≥ 0 is one-to-one because the restriction keeps only the non-negative inputs. Swapping gives x = y², so y = ±√x. The restriction y ≥ 0 selects the positive root, giving f⁻¹(x) = √x with domain x ≥ 0. Check: f(5) = 25 and √25 = 5. On the other half, x ≤ 0, the same swap selects −√x; there f(−5) = 25 and −√25 = −5.

The ± is where the restriction does its work. Without a stated domain there is no way to choose a sign, and the two choices are genuinely different functions undoing genuinely different halves of the square's graph. Both are correct inverses; neither is the inverse of the unrestricted f, which has none.

  • Every line except a horizontal one is one-to-one. y = mx + b with m ≠ 0 passes the test, and its inverse is another line with slope 1/m.
  • A horizontal line is not. f(x) = 4 sends every input to 4, so nothing can be recovered.
  • Even powers and absolute value are not, without a restriction. x² and |x| both pair a with −a, and every even power does the same.
  • Odd powers are. x³ is one-to-one on all real numbers, and its inverse is the cube root, with no restriction needed anywhere.

Interactive

Inverses

Reflect in y = x, and say which half you kept

A function
fthe second curvedashed: y = x, or a discarded halfwhere it fails

Method

Finding an inverse

Test first, then swap. Finding a formula for something that does not exist is the failure this order prevents.

1

Check that f is one-to-one

Use the horizontal line test on the graph, or argue from the formula: a line with non-zero slope and an odd power pass, an even power and an absolute value fail. If it fails, restrict the domain and record the restriction you chose.

2

Write y = f(x) and swap the letters

Every x becomes y and every y becomes x, all at once. This is the reflection in y = x carried out on the equation, and it is the only step where the two letters change roles.

3

Solve for y

Use Linear Equations and Inequalities rearranging for a line. When a square appears, the ± arrives here, and the restriction from step 1 decides which sign can return inputs from the retained half.

4

State the domain, and verify both compositions

The domain of f⁻¹ is the range of f, which is a check as much as a statement: if the two do not match, something earlier is wrong. Then confirm f⁻¹(f(a)) = a and f(f⁻¹(b)) = b at one value each.

Undoing, and when it is possible

Score 0 / 0

A line and a square restricted before inversion

The line passes the horizontal test. The square does not until its domain is cut to one side of zero.

1. f(x) = 3x - 7 y = 3x - 7 -> x = 3y - 7 -> y = (x + 7)/3 f⁻¹(x) = (x + 7)/3 domain and range of both: every real number check f(2) = -1 f⁻¹(-1) = 6/3 = 2 compositions: f⁻¹(f(x)) = ((3x - 7) + 7)/3 = x f(f⁻¹(x)) = 3((x + 7)/3) - 7 = x NOT the inverse: 1/(3x - 7) at x = -1 gives -1/10 NOT the inverse: (x - 7)/3 at x = -1 gives -8/3 2. p(x) = x^2 on x >= 0 horizontal test: passes on the retained right half x = y^2 -> y = +-sqrt(x) swap and solve retained inputs have y >= 0, so choose + p⁻¹(x) = sqrt(x) domain x >= 0 check p(5) = 25 p⁻¹(25) = 5 p⁻¹(p(x)) = sqrt(x^2) = x because x >= 0 p(p⁻¹(x)) = (sqrt(x))^2 = x because x >= 0 on x <= 0 instead: p⁻¹(x) = -sqrt(x) p(-5) = 25 -sqrt(25) = -5

The two rejected candidates in the first example fail in two different ways. 1/(3x − 7) reads the −1 as an exponent. (x − 7)/3 does take the 7 first, which is the right order, but keeps the sign it arrived with: the 7 was subtracted last, so it must be added back first. At x = −1 that candidate gives −8/3 where the inverse gives 2.

The square example produces two different inverses from one formula. Both check out, and which one is correct depends entirely on the restriction that was stated. An answer of p⁻¹(x) = √x without a domain attached to p is incomplete, not merely untidy.

For a faded inverse, let g(x) = 5x + 2. The swapped equation x = 5y + 2 is supplied. Solve for y, state the inverse's domain, simplify both compositions symbolically, and use g(−1) = −3 for a numerical round trip. Then explain why the horizontal line h(x) = 4 cannot pass the same test.

Common mistakes

1
Reading the superscript as an exponentf⁻¹(x) is not 1/f(x). For f(x) = 3x − 7 the inverse is (x + 7)/3 and the reciprocal is 1/(3x − 7); at x = −1 they give 2 and −1/10. The notation collides with negative exponents and there is no fixing it, only remembering it.
2
Undoing the operations in the order they were applied3x − 7 multiplies first and subtracts second, so the inverse adds first and divides second: (x + 7)/3. Writing x/3 + 7 inverts both operations but applies them in the order f applied them, and it fails the check at the first value tried: f(2) = −1, while −1/3 + 7 = 20/3, not 2.
3
Dropping the restrictionCalling √x the inverse of x² is only true once x² has been cut down to x ≥ 0. Without that sentence the claim is false, since the unrestricted x² has no inverse at all, and the omission hides the fact that x ≤ 0 would have given −√x instead.

Check your understanding

✓
Finish when you test for one-to-one before hunting for a formula, and can produce an inverse together with its domain and the restriction it required.

Given a non-horizontal line or x² restricted to one half-axis, you should apply the swap method, state the inverse domain, make the sign choice forced by the restriction, and verify both compositions. Rational-function inverses and shifted quadratics wait for the courses that teach their algebra.

Note: That completes the toolkit the course promised: notation, domain, shape, composition and inverse. The path can now use function notation and inverse reasoning without smuggling in factoring, rational-function algebra or the quadratic formula before their own courses teach them.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.