Finding inverse functions: rational | Mathematics III | High School Math | Khan Academy
- [Voiceover] So we're told that g of x is equal to two x minus one over x plus three. Based on this, pause the video and see if you can figure out what the inverse of g is. g inverse of x. What is that going to be equal to? Alright, I'm assuming you've had a go at it, and just as a little bit of a reminder of what we're talking about when we're talking about inverse of functions, or inverses of functions.
If that's the domain, the set of all inputs that we could input into g, so that's the domain, and if we consider the range to be the set of outputs, so that is the range, for a given input, so for a member of the domain, x, the function g, let me do it that color, the function g will map it to a point, let me do g in yellow, it will map it to a member of the range.
So if this is x, this value right over here we would consider to be g of x. That's what the function g does. Now, the inverse function goes the other way. You start with a member of the range and you go back to a member of the domain. That's what g inverse does.
And so, there's a couple of ways to think about it. If we were to set, if we were to say, look, let's just set y is equal to g of x. So we could just call that point y, as well. So this expression here, let's just, okay, if we have an x, this is what we do. We multiply by two times and we subtract one, divided by x plus three, and then that tells us what the associated g of x, what the associated y is.
But what if we're given the y, or the g of x? How do we get x? Well, we could just solve for x. So let's do that. If we said that y is equal to two x minus one over x plus three, let's solve for x, so that we know for any y we get, what the corresponding x we'll get. So how do we do that?
Well, we can multiply both sides times x plus three. So if we do that, we're going to get y, we're going to get y times x plus three, x plus three, is equal to, is equal to two x minus one. All I did was multiply both sides times x plus three. x plus three, and I multiplied x plus three on that side as well.
The x plus three cancels out with the x plus three. And then, let's see. Let's see what we can do now. Well, we could distribute the y. We could distribute the y, and I'll switch now to a different color because that's going to get complicated if I keep trying to separate the ys in a different color.
So we're going to get y times x, y x, plus three y, plus three y, is equal to two x minus one. And remember, we are now trying to solve for x. So we can collect all of the x terms on one side of this equation, and then all of the non-x-involved terms on the other side.
So let's get all of our x terms on the left-hand side and all of our non-x terms on the right-hand side. So I want to get rid of this. This doesn't involve an x, so let me subtract three y here. And so I'll subtract three y from this side. Minus three y.
And we want to get rid of this from the right-hand side, so minus two x. So we can put it right over here. Minus two x. And so, we are going to get, let me scroll down a little bit. So, whoops. Sorry for that. So this is going to be y x minus two x is going to be y minus two times x. These cancel out, which is their goal.
Is equal to two x minus two x, let's cancel that, which was the goal. And then you have one minus three y. One minus three y. And now, to solve for x, you just divide both sides by y minus two. y minus two.
And we're going to get x is equal to one minus three y over y minus two. So one way you could think about it is, you could say, well, x is equal to, this expression is equal to the inverse function as a function of y. You give me a y, you give me a y that's sitting in this range, I can input it into this function definition here and I can give you the corresponding x.
I can give you the corresponding x. Now, we didn't ask for g inverse of y. We asked for g inverse of x. But the important thing to remember is this variable that we use inside of, the variable that we use inside of functions right over here, they're chosen somewhat arbitrarily.
They just say, okay, I'm going to call the input y, and if you're going to call the input y, well, this is how I would give you the output. But we could call the input a, and that would be one minus three a over a minus two. Or we could even call the input, so let me make this clear.
So we have g inverse of y. Actually, since I did it in blue up here, let me write that in blue as well. So if we did, if we did g inverse, g inverse of y, I'm just rewriting what we already have, is equal to one minus three y over y minus two. This choice of variable is arbitrary.
We could say g inverse of smiley face, of smiley face, is equal to one minus three times smiley face, three times smiley face, over smiley face minus two. Or, if we want it in terms of, if we want to call the input x, we would just write g inverse of x is equal to one minus three x over x minus two. And we'd be done.
And I really want to point out, you might say, well, this is confusing, because now we're calling the input to this x, while, you know, we normally associate y with the variables. That's true, but you have to remember these variables, they're just labels that we apply to things so that we can keep track of them.
But they're just what we call the input. So we can call the input into the inverse function, we can call it x, smiley face, y, you know, a, b, c, d, whatever we want. So they want it in terms of g inverse of x, so we're going to define the input as x, whatever we input into it as x.
And so this is going to be the expression that maps back. Now another way that you could have done this, because if you think about what just happened here, if we said now that y is equal to g inverse, we've essentially swapped the x and y variables.
So, one way to solve these is you can start where we started, right over there, and then you swap the xs and the ys, which is essentially what we did in the last step the way I did it. And then you solve for y, after the swap, and you would get to this same result.
And you could say, y is equal to g inverse. So I encourage you to try either way.