Main content

## Precalculus

### Course: Precalculus > Unit 1

Lesson 5: Verifying inverse functions by composition- Verifying inverse functions from tables
- Using specific values to test for inverses
- Verifying inverse functions by composition
- Verifying inverse functions by composition: not inverse
- Verifying inverse functions by composition
- Verify inverse functions
- Composite and inverse functions: FAQ

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# 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(4 votes)
- 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).(9 votes)

- 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?(6 votes)- 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)

- 2:08

but the square root of 4 will be both -2 and 2

doesn't the mean we have successfully inverse it??

please reply if I'm wrong(2 votes)- So two points

1.

What you are referring to is +/- square root.

What is being used here is the principal square root.

2. By definition a function cannot be one to many i.e. given one input there cannot be multiple outputs. Failure to satisfy this property will result in a relation not a function.(3 votes)

- 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**?(2 votes)- It does always work, by definition. Either your functions are, in fact, inverses, or you made a mistake computing the composition. Which functions are you working with?(2 votes)

- Would it be easier to just find the inverse function of f(x) and see if f^-1(x) = g(x) ?(2 votes)
- 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.(2 votes)

- How many types of functions are there?(2 votes)
- Thanks a lot for all your contributions, Sir. But since the square root of any number there is the output of plus and minus of the square rooted number, say square root of 4 is +2 and -2 as well for both brings 4. So, in fact, for 7 in x, for g(x) we get both +2,-2 but yes, it is NOT inverse because of non-unique mapping. I understand that principle square root is positive, that is for 4 is it 2, but if we are simplifying function expression then we should be considering both the positives and negatives for g(f(x)) otherwise considering only principle square root would give x that is equal to f(g(x)) and in that case the solution won't agree with the answer we r getting.

I think the real reason is this. Could you kindly let us know. Thanks!(2 votes) - 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.(2 votes)

- 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?(1 vote)- 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(1 vote)

## Video transcript

- [Instructor] In this video,
we're gonna think about function inverses a little bit more, or whether functions are
inverses of each other, and specifically we're gonna think about can we tell that by essentially looking at a few inputs for the
functions and a few outputs? So for example, let's say we have f of x is equal to x squared plus three, and let's say that g of x
is equal to the square root, the principal root of x minus three. Pause this video and think about whether f and g are
inverses of each other. All right, now one approach
is to try out some values. So for example, let me make
a little table here for f, so this is x and then
this would be f of x. And then let me do the same thing for g. So we have x and then we have g of x. Now, first let's try a simple value. If we try out the value
one, what is f of one? Well, it's gonna be
one squared plus three. That's one plus three, that is four. So if g is an inverse of f,
then if I input four here, I should get one. Now, that wouldn't prove
that their inverses, but if it is an inverse,
we should at least be able to get that. So let's see if that's true. If we take four here,
four minus three is one. The principal root of that is one, so that's looking pretty good. Let's try one more value here. Let's try two. Two squared plus three is seven. Now let's try out seven here. Seven minus three is four. The principal root of that is two. So, so far it is looking pretty good. But then what happens if
we try a negative value? Pause the video and think about that. Let's do that. Let me put a negative two right over here. Now, if I have negative two
squared, that's positive four, plus three is seven, so I have seven here. But we already know that
when we input seven into g, we don't get negative two, we get two. In fact, there's no
way to get negative two out of this function right over here. So we have just found a case, and frankly any negative
number that you try to use would be a case where you could show that these are not inverses of each other. Not inverses. So you actually can use
specific points to determine that two functions like
this, especially functions that are defined over really
an infinite number of values, these are continuous functions,
that using specific points, you can show examples where
they are not inverses, but you actually can't use specific points to prove that they are inverses because there's an
infinite number of values that you could input into these functions, and there's no way that
you're going to be able to try out every value. For example, if I were
to tell you that h of x, really simple functions,
h of x is equal to four x, and let's say that j of x
is equal to x over four. We know that these are
inverse of each other. We'll prove it in other
ways in future videos, but you can't try every single input here and look at every single output,
and every single input here and every single output. So we need some other technique
other than just looking at specific values to
prove that two functions are inverses of each other. Although you can use
specific values to prove that they are not inverses of each other.