Which Function Has an Inverse That Is Also a Function?

A function has an inverse that is also a function when it is one-to-one, meaning every output comes from exactly one input. In mathematical terms, this property is called being “injective”: if f(a) = f(b), then a must equal b. Functions that fail this test produce inverses that aren’t functions, because a single input in the inverse would map to multiple outputs.

What Makes a Function One-to-One

A one-to-one function never repeats an output value. For every y-value the function produces, there is exactly one x-value responsible for it. This is the key requirement because when you “flip” a function to create its inverse (swapping all the inputs and outputs), repeated outputs become repeated inputs, and that violates the basic definition of a function.

Consider f(x) = x². Plug in 3 and you get 9. Plug in -3 and you also get 9. If you try to invert this, the value 9 would need to map to both 3 and -3 simultaneously. That’s not a function. Now consider f(x) = 3x + 2. If you assume 3x₁ + 2 = 3x₂ + 2, you can subtract 2 from both sides and divide by 3, proving x₁ = x₂. No two inputs share an output, so its inverse is guaranteed to be a function.

The Horizontal Line Test

The fastest way to check visually is the horizontal line test. Draw (or imagine) horizontal lines across the graph of a function. If every horizontal line crosses the graph at most once, the function is one-to-one and its inverse is also a function. If any horizontal line crosses twice or more, the function fails the test.

This is different from the vertical line test, which tells you whether a graph represents a function at all. The vertical line test checks whether each input has one output. The horizontal line test checks whether each output has one input. You need both to pass for a function and its inverse to both qualify as functions.

Common Functions That Pass

Several parent functions you encounter in algebra and precalculus are naturally one-to-one across their entire domain:

  • Linear functions (like y = 2x + 5): Any non-horizontal line passes the horizontal line test. A horizontal line like y = 4 is technically a function but is not one-to-one, since every x-value produces the same output.
  • Cubic functions (like y = x³): Odd-degree polynomials with a positive or negative leading coefficient are always increasing or always decreasing, so they never repeat a y-value.
  • Exponential functions (like y = 2ˣ): These are always increasing (or always decreasing if the base is between 0 and 1), so every output is unique.
  • Logarithmic functions (like y = log₂x): These are the inverses of exponential functions and are themselves one-to-one.

The broader principle here is that any function which is strictly increasing or strictly decreasing over its entire domain will be one-to-one. Mathematicians call this “monotonic.” If the function always goes up or always goes down, no horizontal line can cross it more than once.

Common Functions That Fail

Quadratic functions like y = x² fail because they curve back up (or down), creating a mirror effect where two x-values share the same y-value. The same problem affects even-degree polynomials in general, absolute value functions, and trigonometric functions like sine, cosine, and tangent. Sine, for example, oscillates forever between -1 and 1, hitting every value in that range infinitely many times.

Fixing Non-Invertible Functions With Domain Restrictions

When a function isn’t one-to-one over its full domain, you can restrict the domain to a portion where it is one-to-one. This is exactly how inverse trigonometric functions work.

Sine is not one-to-one across all real numbers, but if you restrict it to the interval from -90° to 90° (or -π/2 to π/2 in radians), it becomes strictly increasing and passes the horizontal line test. The inverse sine function, arcsin, is defined using this restricted version. Similarly, arccos uses cosine restricted to 0° to 180°, and arctan uses tangent restricted to the open interval from -90° to 90°.

The same logic applies to y = x². If you restrict the domain to x ≥ 0 only, you eliminate the duplicate outputs. The inverse of this restricted version is y = √x, which is a perfectly valid function. Without the restriction, the “inverse” would be y = ±√x, which gives two outputs for each input and therefore isn’t a function.

The Algebraic Test

If you need to prove a function is one-to-one without graphing, use the algebraic approach. Start by assuming f(x₁) = f(x₂), then work through the algebra to show that x₁ must equal x₂. If you can reach that conclusion, the function is one-to-one and its inverse is a function.

For example, to test f(x) = 5x – 7: assume 5x₁ – 7 = 5x₂ – 7. Add 7 to both sides to get 5x₁ = 5x₂. Divide by 5 to get x₁ = x₂. Done. The function is one-to-one.

For f(x) = x² (with no domain restriction), assume x₁² = x₂². This gives x₁ = ±x₂, not necessarily x₁ = x₂. Since you can’t force equality, the function is not one-to-one, and its inverse won’t be a function unless you restrict the domain.

One-to-One vs. Bijective

In many algebra and precalculus courses, “one-to-one” is the only term used, and it’s sufficient for ensuring the inverse is a function. In more advanced math, you’ll encounter the term “bijective,” which means a function is both one-to-one (injective) and onto (surjective). “Onto” means every element in the target set actually gets hit by some input.

For practical purposes in a standard math course, the distinction rarely matters because you’re typically working with functions where the range and the target set are treated as the same thing. But formally, a function has a true two-way inverse (where both compositions return the original input) if and only if it is bijective. If you’re working in a discrete math or proof-based course, this is the precise condition to look for.