Which Graph Shows a Function Whose Inverse Is Also a Function?

The graph that shows a function whose inverse is also a function is the one that passes the horizontal line test. That means every horizontal line you could draw across the graph touches it at most once. If any horizontal line crosses the graph in two or more places, the inverse of that function is not a function.

This question comes up frequently on algebra and precalculus exams, usually with four graphs to choose from. The trick is knowing exactly what visual pattern to look for and why it works.

The Horizontal Line Test

You probably already know the vertical line test: if a vertical line crosses a graph more than once, the graph isn’t a function. The horizontal line test works the same way but answers a different question. Instead of asking “Is this a function?”, it asks “Does this function have an inverse that is also a function?”

A function passes the horizontal line test if and only if every horizontal line intersects the graph at most once. When this is true, the function is called one-to-one (sometimes written 1-to-1 or injective). Being one-to-one means that no two different inputs ever produce the same output. If two x-values give the same y-value, a horizontal line at that y-value would hit the graph twice, and the inverse would fail.

Why One-to-One Matters for Inverses

An inverse function essentially reverses the process: it takes each output and sends it back to the original input. If two different inputs (say x = 3 and x = −3) both produce the same output (y = 9, as in f(x) = x²), then the inverse wouldn’t know which input to return. It would need to send 9 back to both 3 and −3, which violates the definition of a function. That’s why only one-to-one functions have inverses that are also functions.

Graphically, the inverse of a function is its reflection across the line y = x. Every point (a, b) on the original graph becomes (b, a) on the inverse. If the original graph passes the horizontal line test, this reflected graph will pass the vertical line test, confirming it’s a valid function.

Graphs That Pass

When you’re looking at multiple-choice options, these types of graphs will pass the horizontal line test:

  • Straight lines that aren’t horizontal. Any linear function with a nonzero slope (like y = 2x + 1) is one-to-one. A horizontal line like y = 4 fails because every horizontal line at y = 4 touches it infinitely many times.
  • Cubic functions. The graph of y = x³ steadily increases from left to right. No horizontal line ever crosses it twice.
  • Exponential and logarithmic functions. Graphs like y = 2ˣ or y = log(x) are always increasing, so they pass.
  • Square root functions. The graph of y = √x only goes in one direction and never doubles back on itself.

The key trait these all share is that they are strictly monotonic, meaning they only go up or only go down across their entire domain, never reversing direction. A strictly monotonic function is always one-to-one, and its inverse is also strictly monotonic.

Graphs That Fail

These common graphs will fail the horizontal line test:

  • Parabolas (y = x²). A horizontal line at y = 4 hits the graph at both x = 2 and x = −2. The U-shape guarantees failure.
  • Absolute value functions (y = |x|). Same problem as the parabola. The V-shape means two x-values share each positive y-value.
  • Sine and cosine waves. These repeat forever, so horizontal lines cross them infinitely many times.
  • Circles or ellipses. These fail even the vertical line test, so they aren’t functions to begin with.

What About Restricting the Domain?

Some exam questions show a parabola or sine wave that has been cut down to only part of its domain. This is a deliberate move to make the function one-to-one. For example, if you see y = x² but only for x ≥ 0 (the right half of the parabola), that graph does pass the horizontal line test because no horizontal line hits it more than once. This is exactly how inverse trigonometric functions work: the standard sine function fails badly, but if you restrict its domain to just −π/2 to π/2, it becomes one-to-one and its inverse (arcsin) is a valid function.

So if one of your answer choices shows a partial parabola or a single arc of a sine wave, don’t automatically rule it out. Check whether the portion shown actually passes the horizontal line test.

How to Answer the Question Quickly

When you see this question on a test, mentally slide a horizontal line from the bottom of each graph to the top. If at any height the line touches the curve in two or more spots, eliminate that graph. The correct answer is the graph where this never happens.

Look for graphs that consistently move in one direction. If the curve ever turns around and comes back to a height it already visited, it fails. Straight diagonal lines, cube-root curves, exponential curves, and half-parabolas restricted to one side are the most common correct answers you’ll encounter.