If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Get ready for AP® Calculus

### Course: Get ready for AP® Calculus>Unit 3

Lesson 7: Verifying inverse functions by composition

# Using specific values to test for inverses

Are two functions inverses? Even one counterexample can show that they are not. How many examples would it take to show that they really are inverses? Created by Sal Khan.

## Want to join the conversation?

• roots can't have negative answers? I thought they can have positive and negative numbers • I think you might have confused two similar yet different mathematical concepts.
Let's assume that x^2=4. Then indeed there will be two answers: both positive and negative square root of 4 (+sqrt(4) and -sqrt(4)), namely +2 and -2.
But be careful as the negative sign in this case is before the square root (-sqrt(4), not sqrt(-4)). You do not (and cannot) take the square root of a negative number!
Hope it helps!

(The only exception of the negative square root applies to imaginary and complex numbers, but this is not applicable to the situation we are dealing with in this video).
• You can find the inverse function of a certain function by switching the x and y values. In this case y= x^2 + 3 can be turned into x= y^2 +3. This simplifies to x-3= y^2 and then sqrt(x-3)=y. This is the exact same equation as g(x). When finding the inverse equation of f(x), it gives us the exact equation as g(x), so why are the two equations not inverses when you plug in values? Does the method I used not work all the time? • The method you used to find the inverse function of the function y = x^2 + 3 is correct. You switched the x and y values, solved for y, and obtained the inverse function g(x) = sqrt(x - 3).

If you plug in values to both the original function f(x) = x^2 + 3 and its inverse g(x) = sqrt(x - 3), you should get the same output when the input is the same. For example, if you plug in x = 4 into f(x), you get f(4) = 4^2 + 3 = 19. If you plug in the same value x = 4 into g(x), you get g(4) = sqrt(4 - 3) = 1. So, f(4) is not equal to g(4), and they are not inverses of each other.

The reason why f(x) and g(x) are not inverses of each other is that the domain and range of the original function f(x) and its inverse function g(x) are different. The domain of f(x) is all real numbers, but the range is y ≥ 3. On the other hand, the domain of g(x) is x ≥ 3, but the range is all non-negative real numbers.

Therefore, even though f(x) and g(x) have the same equation, they are not inverses of each other because they have different domains and ranges. To be inverses of each other, the functions must have the same domain and range, and the composition of the two functions must be the identity function.
(1 vote)
• I'm sorry I still didn't understand something!

A) After finding the supposedly inverse of a function by switching the x and y values, what is a practical way to check if this "inverse function" is not a fake inverse? Please confirm if my hypothesis at C) is correct!

B) Please confirm if my reasoning is correct:
After we switch y=x^2 +3 to x=y^2 +3, we can turn that into y= +sqrt(x-3) BUT ALSO TO y= -sqrt(x-3).
Thefore, they would NOT be inverses because otherwise the function would have TWO inverse functions as there is the -sqrt option as well. So the function f(x)=x^2 +3 is NOT invertible because actually for ONE input at supposedly f-1(x) we would have TWO outputs for +sqrt and -sqrt.

C) Therefore, the answer for A is that always this method of “switching the x and y values” for finding inverse functions works IF you only get ONE output for the f-1(x), otherwise f(x) will not be invertible. Right? • So as you note is your example we may have to restrict domain or range of a function to make it a invertible. I would avoid the term fake inverse as it is not common terminology.

Everything is pretty much correct. There is actually university definition and high school definition of inverse function. Based on the university definition you would require function f be one-to-one and onto. However this detail is not important

• but the square root of 4 will be both -2 and 2
doesn't the mean we have successfully inverse it?? • Can we check for inverse functions the opposite way? As in, using g(x) first, then f(x)? • but doesnt a square root give us an answer of positive or negetive value
for example - root(4)= plus or minus 2
As both (+2)^2 and (-2)^2 give us 4
(1 vote) • This is a common confusion I see. When I ask you to take the square root, I am implicitly asking you for the positive one (As the square root of a number cannot be negative. See the graph of y = sqrt(x) if you want) and hence, we call it the "principal root"

However, if I had an expression like x^2 = 4, then you'd say that x = 2 and -2, because there are two numbers that can satisfy the expression.

Also, the square root being the positive one is just convention. We could've taken sqrt(4) to equal 2 and -2, but we chose 2.
• When I take f(g(x)), it gives me x and when I take g(f(x)) it also gives me x. This should mean that these two functions are inverses but they are not. Does the method of verifying inverse functions by composition not always work? • Would it be easier to just find the inverse function of f(x) and see if f^-1(x) = g(x) ? • Sometimes, it's very difficult to find the inverse of a function. Sure, you can do it easily with something like f(x) = ax²+bx+c using the quadratic formula, but imagine a polynomial that begins in x⁴ and has a bunch more terms behind it. It would be hard just to figure out the function itself from the graph, and then inverting it might be too much. That's just an example, but it happens sometimes. And you're right, too. Often, finding the inverse of a function is easier than trying to test it by using points. It's good to have different methods and use the one most suited to the task.  