How Can We Be Sure Two Functions Are Inverses?
Imagine you lock a door, and then you use a key to unlock it. You are back exactly where you started: with an unlocked door.
If a friend gives you a key, how can you be absolutely sure it is the correct inverse key? You would test it! You would lock the door, use the key, and see if the door unlocks.
In math, we use a very similar test. If we have a function $f(x)$ and we think another function $g(x)$ is its inverse, we test them by putting them together. We call this process composition.
The Composition Test
When we compose functions, we put one function inside the other.
If $f(x)$ and $g(x)$ are truly inverses, applying $f$ and then applying $g$ should leave our original input $x$ completely unchanged.
The rule is: Two functions $f(x)$ and $g(x)$ are inverses if and only if:
- $f(g(x)) = x$
- $g(f(x)) = x$
You must check both directions!
Compare and Contrast:
- Checking a single number: $f(g(2)) = 2$ tells you they might be inverses for that one number.
- Checking the function: $f(g(x)) = x$ tells you they are inverses for every possible number. We always use $x$ to prove it for all numbers.
Worked Example: Verifying Inverses
Question: Verify whether $f(x) = 3x - 12$ and $g(x) = \frac{1}{3}x + 4$ are inverse functions.
Step 1: Find $f(g(x))$. Substitute the entire function $g(x)$ into the $x$ spot in $f(x)$.
$f(g(x)) = 3(\frac{1}{3}x + 4) - 12$
Step 2: Simplify the expression. Distribute the $3$.
$f(g(x)) = (1x + 12) - 12$
$f(g(x)) = x$
Step 3: Now check the other direction, $g(f(x))$. Substitute $f(x)$ into $g(x)$.
$g(f(x)) = \frac{1}{3}(3x - 12) + 4$
Step 4: Simplify. Distribute the $\frac{1}{3}$.
$g(f(x)) = (x - 4) + 4$
$g(f(x)) = x$
Answer: Since both $f(g(x)) = x$ and $g(f(x)) = x$, they are inverse functions!
Your Turn
Question: Verify if $f(x) = 2x + 8$ and $g(x) = \frac{x}{2} - 4$ are inverse functions by finding $f(g(x))$ and $g(f(x))$.
Hint: Start by putting $g(x)$ inside $f(x)$, like this: $2(\frac{x}{2} - 4) + 8$.
Answer: Yes, they are inverses because $f(g(x)) = x$ and $g(f(x)) = x$.
The Domain and Range Swap: A Closer Look
We learned earlier that when we find an inverse, the inputs ($x$) and outputs ($y$) trade places. This means the domain (all valid inputs) of the original function becomes the range (all valid outputs) of the inverse function.
Similarly, the range of the original function becomes the domain of the inverse!
Let's look closely at why this matters.
Consider the function $f(x) = x^2$. We learned this is not a one-to-one function because both $3^2 = 9$ and $(-3)^2 = 9$. It fails the Horizontal Line Test.
So, how can we possibly find an inverse for it?
Restricting the Domain
We can "rescue" $f(x) = x^2$ by cutting off half of its graph! If we only look at zero and positive numbers, we are restricting the domain to $x \geq 0$.
Now, the graph is just the right side of the U-shape. It passes the Horizontal Line Test!
For $f(x) = x^2$ where $x \geq 0$:
- The domain is $x \geq 0$ (or $[0, \infty)$).
- The range is $y \geq 0$ (or $[0, \infty)$).
Now let's find the inverse. The inverse of squaring a number is taking the square root. So, $f^{-1}(x) = \sqrt{x}$.
- The domain of the inverse is $x \geq 0$. (This matches the range of the original!)
- The range of the inverse is $y \geq 0$. (This matches the restricted domain of the original!)
Worked Example: Domain and Range
Question: The function $f(x) = \sqrt{x - 5}$ has a domain of $[5, \infty)$ and a range of $[0, \infty)$. Find the domain and range of its inverse function, $f^{-1}(x)$.
Step 1: Remember the golden rule of inverses: the domain and range swap places.
Step 2: Take the range of $f(x)$, which is $[0, \infty)$, and make it the domain of $f^{-1}(x)$.
Step 3: Take the domain of $f(x)$, which is $[5, \infty)$, and make it the range of $f^{-1}(x)$.
Answer: For $f^{-1}(x)$, the domain is $[0, \infty)$ and the range is $[5, \infty)$.
Your Turn
Question: A one-to-one function $h(x)$ has a domain of $(-\infty, 4)$ and a range of $(2, 10]$. What are the domain and range of $h^{-1}(x)$?
Hint: Just swap the sets!
Answer: The domain of $h^{-1}(x)$ is $(2, 10]$ and the range is $(-\infty, 4)$.