Inverse functions: why does the “undo” have two buttons?

I keep thinking of inverse functions as the math version of an undo button, but mine seems to come with two buttons and no instruction manual. For example, if f(x) = x^2 + 4, then f(3) = 13… so should f^{-1}(13) be 3 or -3? My book says to restrict the domain, but it feels like I’m picking a team (≥ 0 or ≤ 0) and hoping for the best.

I’m confused about when and how I’m supposed to decide on a restriction so the inverse is an actual function. Is there a rule for choosing the “right” side for things like f(x) = x^2 + 4 or f(x) = (x – 5)^2, or is it context-dependent? And if someone else chose the other side, do we end up with a totally different inverse that’s still valid?

Practically speaking: how do I tell if a function has an inverse, how do I pick a restriction without guesswork, and how do I write f^{-1} so it behaves nicely? Also, is there a simple way to sanity-check a choice with a quick number, like the 13 example, to make sure I picked the correct branch?

3 Responses

  1. Great question-the “two buttons” show up because f(x) = x^2 + 4 is not one-to-one on all real numbers: both 3 and −3 map to 13, so a single-valued inverse can’t exist unless we pick one side. The rule of thumb is: an inverse function exists precisely when the original is one-to-one (passes the horizontal line test); if not, restrict the domain to a monotonic piece (always increasing or always decreasing) and then invert. Conventionally, for squares we take the principal square-root branch (nonnegative), so we restrict to x ≥ 0 and get f−1(y) = √(y − 4). Worked example: start with y = x^2 + 4, restrict x ≥ 0, solve for x: x = √(y − 4), so f−1(13) = √(13 − 4) = 3. If instead you intentionally choose x ≤ 0, you get the equally valid other branch f−1(y) = −√(y − 4), giving f−1(13) = −3. For shifts like f(x) = (x − 5)^2, pick x ≥ 5 to get f−1(y) = 5 + √y, or x ≤ 5 to get f−1(y) = 5 − √y. How to choose? Use the context: pick the side that contains the inputs you care about (e.g., distances are ≥ 0), or that keeps the function increasing near your point of interest. Sanity-check with composition: f(f−1(y)) = y for y in the range (e.g., y ≥ 4), and f−1(f(x)) = x for x in your chosen domain; plus a quick plug like y = 13 confirms you picked the desired branch. For a deeper dive, see Khan Academy’s guide to invertible functions and domain restriction: https://www.khanacademy.org/math/algebra2/manipulating-functions/inverse-functions/a/invertible-functions.

  2. Your “two-button undo” shows up when a function isn’t one-to-one; to get a true inverse you restrict to a side where it’s monotone (passes the horizontal line test)-for f(x)=x^2+4, pick x≥0 for f^{-1}(y)=√(y−4) or x≤0 for f^{-1}(y)=−√(y−4), and the context decides which side you want. Example and quick check: with the x≥0 branch, f^{-1}(13)=3 and f(f^{-1}(13))=13; with the x≤0 branch you’d get −3 instead-both valid on their own domains.

  3. Think of f(x) = x^2 + 4 like a camera that folds a line in half at x = 0 and then slides everything up by 4 – that fold is why your “undo” seems to have two buttons. To make an actual inverse function, you pick one side of the fold so the function passes the horizontal line test (no horizontal line hits the graph twice). For quadratics like x^2 + 4 or (x − 5)^2, that means choosing either the right half (x ≥ 0 or x ≥ 5) or the left half (x ≤ 0 or x ≤ 5). There isn’t magic here: both choices are valid inverses of the restricted function, and mathematicians usually pick the right side by convention so the inverse uses the principal square root. So for f(x) = x^2 + 4 with domain x ≥ 0, the inverse is f^{-1}(y) = sqrt(y − 4), and f^{-1}(13) = 3; if you instead choose x ≤ 0, the inverse is f^{-1}(y) = −sqrt(y − 4), so f^{-1}(13) = −3. A quick sanity check is: plug back – compute f(f^{-1}(y)) and make sure you get y, and also confirm the returned x lives in your chosen side. How to tell if a function has an inverse without restricting? Use the horizontal line test (or, more mechanically, if f′(x) ≠ 0 for all x then it’s invertible; if f′ ever hits 0, it isn’t – that’s the usual signal). Small analogy: it’s like having two elevator doors for “up” and “down” – both lead to the lobby, but you must commit to one door so people don’t collide coming back.

Leave a Reply

Your email address will not be published. Required fields are marked *

Join Our Community

Ready to make maths more enjoyable, accessible, and fun? Join a friendly community where you can explore puzzles, ask questions, track your progress, and learn at your own pace.

By becoming a member, you unlock:

  • Access to all community puzzles
  • The Forum for asking and answering questions
  • Your personal dashboard with points & achievements
  • A supportive space built for every level of learner
  • New features and updates as the Hub grows