Definition · One-to-one, and the inverseA 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 testA 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 squaref(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.