Recent chats

Why does a function need to be one-to-one to have an inverse function?

Quick answer

An inverse swaps a function’s inputs and outputs. If two different inputs share one output, swapping them would make that output correspond to two inverse outputs, so the inverse would not be a function. A function is one-to-one when each output comes from at most one input. The horizontal line test checks this: if any horizontal line crosses more than once, the function is not one-to-one on the domain shown.

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

I understand that an inverse swaps x and y, but why does the original function have to be one-to-one? What actually goes wrong if it sends two different inputs to the same output?

Geez

A function gives each input exactly one output. Its inverse swaps those roles: each original output becomes an input to the inverse, and the original input becomes the inverse’s output. For the inverse to be a function, each of its inputs must still have just one output.

Suppose an original function sends both 3 and −3 to 9. After swapping, the inverse would have to send 9 to both 3 and −3. That gives one input two outputs, which is not a function. So the issue is not whether you can reverse the arrows at all; it is whether reversing them still meets the definition of a function. [S1]

Follow-up question

Can you show that with an equation, and then show one that does have an inverse function?

Geez

Take f(x) = x² with its full real-number domain. The inputs 3 and −3 both produce 9. If you swap x and y, you get x = y², or y = ±√x. For a positive input such as 9, that gives two possible outputs, 3 and −3, so the inverse relation is not a function on this domain. This is the repeated-output issue in equation form. [S1]

Now keep the same rule but restrict the original domain to x ≥ 0. Each output then comes from only one allowed input, and the inverse is f⁻¹(x) = √x for x ≥ 0. The domain restriction matters: the rule x² over all real inputs does not have an inverse function, but its restriction to nonnegative inputs does. [S1]

Follow-up question

How does the horizontal line test help me see this from a graph? Does passing it guarantee anything beyond having an inverse?

Geez

For a function’s graph, imagine drawing horizontal lines across it. If any horizontal line crosses the graph at two or more points, those points have the same y-value but different x-values. That means the function repeats an output and is not one-to-one on the domain shown. In the graph of y = x² over all real x, the line y = 9 crosses at x = −3 and x = 3, so it fails the test. [S1]

If every horizontal line crosses at most once, the graph is one-to-one, so swapping input and output coordinates gives an inverse that is a function. The test checks this one-to-one condition for the graph and domain you are examining. It does not, by itself, give the inverse’s formula; you still find that by swapping variables and solving, or by reading the reflected graph.

Follow-up question

What’s a reliable way to check my answer on a problem, especially if the question lets me restrict the domain?

Geez

Use this short check:

  1. Write down the original function and the domain the problem gives. Do not silently change the domain.
  2. Ask whether two different allowed inputs can produce the same output. If yes, the function is not one-to-one on that domain.
  3. If needed, use the horizontal line test on the graph over that domain.
  4. If the function is not one-to-one, identify a domain restriction that keeps only one input for each output, if the problem permits one.
  5. Swap x and y, solve for y, and check that the result gives one output for each input in the inverse’s domain.

For example, with f(x) = x², the full real domain fails because 3 and −3 both give 9. If the stated restriction is x ≥ 0, the allowed input for 9 is only 3. Swapping variables and solving gives f⁻¹(x) = √x. The inverse’s input values are outputs of the restricted original function, so here x ≥ 0. [S1]

Keep the domain attached to the function throughout. A correct inverse formula without the relevant domain can hide why the original function is, or is not, invertible as a function.

A practical checklist

  • Record the original function and its stated domain.

  • Look for two distinct allowed inputs with the same output.

  • Use the horizontal line test on the graph over that domain.

  • If permitted, restrict the domain so each output comes from at most one input.

  • Swap x and y, solve, and check the inverse’s domain and outputs.

A few more useful answers

Can a function that is not one-to-one have an inverse relation?

Yes. Swapping its inputs and outputs still makes a relation, but repeated original outputs become inputs with multiple inverse outputs. That relation is not an inverse function unless the original domain is restricted appropriately.

Does the horizontal line test apply to a specific domain restriction?

Yes. Check only the part of the graph belonging to the domain in question. A function may fail the test on its full domain but pass after a restriction, as x² does on x ≥ 0.

Does passing the horizontal line test tell me the inverse formula?

No. It tells you the function is one-to-one on the domain shown, so its inverse is a function. To find the formula, swap x and y and solve for y, keeping track of the relevant domains.

Sources

References used for this guide.

  1. [S1] OpenStax Precalculus: Inverse Functions
    openstax.org · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work