Skip to main content
Pearson+ LogoPearson+ Logo
Start typing, then use the up and down arrows to select an option from the list.

Finding an Inverse by Interchange of Variables

Was this helpful?
Hi, my name is Rebecca Muller. You know, we can think of functions as rules or procedures by which we take a value from the domain and we map it to a value from the range. We can think about undoing that if we consider something called inverse functions. But it turns out we have to have certain criteria that are going to hold for that. So again, let's visually understand what we're looking for. We're going to have, let's say, a set that I'm just going to say is a set x. And from the set x, I'm going to use the function f to map the values in x to some set y. If I can take values from y and undo what f did to get back to x for each and every value, and one and only one value, then I end up with something called the inverse function. You'll notice that this notation looks like a little negative 1 as an exponent. It does not mean that, because f is not really a variable. It's just a way that we talk about functions. So we read this notation as f inverse. Now, specifically, we're going to look at a number of different subtopics. In particular, we'll look at one-to-one functions. Then we'll look at the horizontal line test. We'll look at finding the inverse function by reversing steps, and then relationships between graphs, and find the inverse function by interchanging variables. So I'm going to use as my first example, surprisingly, a function that does not have an inverse, but we're going to think about why it doesn't work in that context. So we're going to look at our function f of x equals x squared. Now, we know what happens when we substitute a number into this function. For instance, if we start off with the number one, we know that it is mapped to its square, which is 1. The value 2 is mapped to its square, which is 4. 3 is mapped to 9. 4 is mapped to 16, and so on and so forth. What we're looking for if we're working with an inverse function is something that goes the opposite direction. That is, for instance, if I start with the value 16, I want to end up with the result 4. If I start with a 9, I want to end up with the result 3. And the same thing all the way down the line. At least put one. If I start with 4, I want to end up at 2. So what kind of a function would undo the squaring that we've been looking at? And you may be saying to yourself, oh yeah, I know something that will do that. I know that if we have squared something to get back to what we started from, we can take the square root. So it appears that I would be able to say, OK, that's great. f inverse of x is going to equal the square root of x. And that seems really good except for a problem. And the problem comes in when you do something like this. What happens if I start off with the value negative 3? Well, when I perform the function f on the value negative 3, I'm going to end up squaring and end up getting the result 9. But that would mean that down here, I would have to start with 9 and end up with negative 3 to undo that. And of course, we'd already determined that if we start with 9 and take its square root, we end up with positive 3. This radical notation means we're looking at the positive square root. So this is not going to occur. And so what happens is we have to have inverse functions by looking at the entire domain of the original function. Can we accomplish that? Well, we can if we're going to restrict the domain on our x squared. You can see the problem comes in when we have negative values. If at the outset, I say I'm only looking at values that are positive or 0, because 0 is going to work also-- square of 0 is 0, and the square root of 0 is also 0-- then I can now say that I have an inverse to that function. But notice the restriction on the domain was really important for us to work with. So the x squared having to have a restricted domain brings up a problem that we have to consider when we're thinking about inverse functions. We're going to have to have a function that's called one-to-one. Let's define that now. A function is one-to-one if whenever f of a equals f of b, then a equals b. Another way to say that is, when the y values are the same, the x values must be the same. A function has an inverse function if it is one-to-one. And if so, we say the function is invertible. So now let's see how we can use that definition on a couple of examples. We already looked at f of x equals x squared. And I know we've determined that it's not going to be invertible over its entire domain, but let's use the definition from one-to-one to see what happens. If we look at f of a equal to f of b, which is the first part of the definition, we're supposed to be able to conclude that a equals b. Well, what does f of a equal? I can substitute in the value of a, and that requires me to square it. And then f of b is going to equal b squared. Solving for a, I'll take square roots of both sides of the equation. Now, recall that when we take square roots, we end up with plus or minus the square root of the expression that we have over here. So although I can say that a is equal to plus or minus the value b-- because I already have the plus minus, so I can just say square root of b squared is b-- this is not going to indicate that my a value has to equal b. My a value could either be b or negative b. And so we can conclude that this is not going to be a one-to-one function. Let's look at the graph of this real quickly, because we want to make a connection between the functions and their graphs. This is an easy one to sketch because you should already be familiar with this. This is the parabola that is going to have vertex at the origin. Now, just to give a couple of numbers, if I substitute in the value of 2, I know that I'm going to come up with-- let me just go ahead and go right on top of here-- I'm going to come up with the value of 4. But notice that if I substitute in the value of negative 2, I also end up at 4. You might recall something called a vertical line test. It was to tell you whether or not you had a function or not. We're going to now have a new one, and it's going to have to do with the fact that when I look at this graph, there's a horizontal line that will end up intersecting that graph in more than one point. Again, if we look back at this definition, my y values are the same, but I cannot conclude that my x values are the same. And so this is now going to show me that this is not going to be one-to-one. And we'll formalize that in a minute. Let's first look at the second example. And this is going to be g of x, and it's going to equal 3 minus x cubed. We'd like to determine whether or not g of x is going to be a one-to-one function. So we're going to start off by going with the assumption that g of a equals g of b. Substituting would give us that 3 minus a cubed would have to equal 3 minus b cubed. We can subtract 3 from both sides of the equation. Negative a cubed equals negative b cubed. We can multiply both sides of the equation by negative 1. a cubed equals b cubed. And now we'll solve for a by taking the cube root of both sides of the equation. So taking the cube root of a cubed is simply a. Taking the cube root of b cubed is simply b. And notice that we can conclude that if the y values are the same, then the x values have to be the same also. Let's look at the graph of that real quickly. This is the x cubed function. Let's think about what we know about transformations. We would have reflected that, and then we would have added 3. So if you can recall, it would be like first and third quadrant, flip it over, and then add 3. And I can quickly sketch out the picture for what that graph would look like. You can see that for any y value I choose, a horizontal line is going to intersect at most one point. So we're going to generalize from our previous two examples here. We end up with something called horizontal line test. If every horizontal line intersects the graph of a function in at most one point, then the function is one-to-one. And as we saw earlier, if the function is one-to-one, then we're able to call it invertible. Now, let's move on a little bit to trying to find inverse functions. Let's look at an example, g of x, equals 3 minus x cubed. What I'd like to do is try to figure out what the inverse function could be for this. We already know we've determined it's invertible. What is the inverse function? So to do so, what we're going to do is use a process by which I'm going to think about undoing whatever g does. That means I need to know what g does to a value that you substitute in. So I'm going to list what is going to be happening to a number that I substitute into this function g. Well, think about it. If you substitute in a value for x, the first thing you're going to do is to cube that value. So we're going to cube it. What would be next? To that value, I would then take its negative. And then finally, after I do both of those steps, I could then add 3 to the result. So how do you undo those? Well, I want to make sure you understand the concept. Let's say I'm giving you directions to a place from here and I say, OK, you need to go 3 blocks to the east, and then once you get there, you need to go 4 blocks to the south. How do you reverse your steps? Well, the first thing you'd have to do is start here and go 4 blocks to the north, and then 3 blocks to the west. So notice that if this is the direction you're going, when you start backing it up, you start with the last thing you did here and then do the reverse of that. Using that same concept then, if I'm looking at g inverse, I want to sort where I stopped. That is, if the last thing I did was to add 3, then the first thing I want to do is to undo an addition of 3. How do we undo addition? We can use subtraction. So we're going to start by subtracting the value of 3. Now I need to undo taking a negative. And this one may seem strange, but how do you undo taking a negative? You take another negative, because the negative of a negative is positive. So we're going to now take the negative again. That is undoing the second step. And finally, if the beginning step was to cube it, we now need to undo cubing. And how do you undo cubing? Well, you may be familiar with this from having solved equations. We're going to take the cube root. Now, what I need to do is to take these steps and apply them to a value x, and then we'll call that g of x, g inverse of x, that is. So first we subtract 3. So we're going to take a value of x and we're going to subtract 3 from it. Then we're going to take the negative of that result. So I can do that by taking negative of 3 minus x. And to that, I now want to take the cube root. This is going to do the opposite or to undo everything that g did. And so therefore, it's going to be an inverse function. I can simplify that somewhat by going ahead and distributing the negative sign. This is going to be the cube root of negative x plus 3. If you'd like, you can rewrite it as g inverse of x equals the cube root of 3 minus x. So this gives us a method by which we can find an inverse function. It's time for a quick quiz. Use the process of undoing steps to determine g inverse of x if g of x equals 4x minus 2. Is the correct answer A. g inverse x equals one fourth x plus 2. B. g inverse of x equals one fourth x plus one half. or C. g inverse of equals one divided by the quantity 4x minus 2. Choose A, B or C. You're right the answer is B. g inverse of x equals one fourth x plus one half. Sorry the answer is B. g inverse of x equals one fourth x plus one half. To use the process of undoing steps we first have to write out what the steps are for g. so let's think about what g of x tells to do to a value that substitute into that function. What is going to happen to a number when you substituted into the function g. The first thing that happens is we multiply by 4, someone to write that down this is the first step you would multiply, by 4. Once you get that result what would you nailed it you would then subtract 2. So now I want to think about what's going to happen when I go to g inverse. I'm going to write down steps that undo the steps that were just written above except I want to make sure I do it in the reverse order so if the last thing I did was to subtract 2 then the first thing I would want to do is to add 2. Since addition is the inverse operation of subtraction. Prior to that I had bought I would had multiplied by 4 so now I want to do it in reverse order I want to divide by 4, since division is going to be the inverse operation from multiplication. Now I need to write down g inverse of x by performing these operations, so I'm gonna take a value of x. In the first thing among I'm going to do is add 2, I didn't need to divide that entire result by 4. Now the answer which is B is not written in this format it's not written as x plus 2 quantity divided by 4 but what is happening is we divide both terms by the value of 4, then g inverse of x is going to equal we would have x over 4 which is the same as one fourth x, plus 2 over 4 which is equal to one half when reduced and that gives us our answer B. The next thing we want to investigate is, what is the relationship, if any, between a function and its inverse? And so let's do that by means of an example. And I'm going to start with the function f of x equals the square root of x. Now, we're familiar with this graph. So I'm going to quickly sketch it out here. Just give us a few points for reference. You'll recall that we can only substitute in non-negative values for x. So I'm going to start with the value of 0. And the square root of 0 is 0. Substituting in the value of 1, the square root of 1 is 1. And then I'm going to pick some nice numbers, like the square root of 4 equals 2. Let me get right here and make sure I'm lining it up correctly. And then we know that this graph has the following shape. It kind of looks like a parabola on its side heading off in that direction. So what would be a function that would undo a square root? Again, from your work with equations, you may be familiar with the fact that in order to undo a square root, we would use squaring. You may be saying, wait a minute, you're trying to trick me because we already determined that squaring was not going to be invertible. But hold on, because we're going to make it work. And that is that if we look at f of x equals x squared and I only look at the portion of x where x is positive, or 0, as we saw earlier, then I can now look at an inverse. And I'm going to go out and just call it then f inverse of x. So we can use some points to plot here. I can substitute in 0 and get square of 0 is 0. The square of 1 is 1. The square of 2 is 4. Let's go ahead and put that point on the graph. And we know that this shape is going to be a parabola in the first quadrant heading off in this direction. Now, a couple of things to point out. If you look at some coordinates of points, you know that this point is 0, 0. The x and the y are the same. The second point that I used right here, that has coordinates 1, 1. On the square root function, we have the point 4, 2. What is the corresponding point on the squaring function? That's going to be the point with coordinates 2, 4. And so even though that's one example, you can think about the fact that if I substituted in 9 here, I would end up getting 3 back. But over here, if I substitute in 3, I get back 9. And that makes sense. We're undoing and coming up with our values one after the other. So what is the relationship between the graphs? Well, I'm not very artistic, but if you tilt your head a little bit, you can see that if I draw in a line that is going to split the first and third quadrants-- let me see if I can do this half decently. So there's a straight line going that way and down here. Then I can see that what I've got is a reflection across that line. And it turns out that that is going to be the case for all functions and their inverses. Now, what is the equation of that line? Well, it's a straight line, it has a y-intercept of 0, and it has a slope of 1, as we can see, because it goes through the points 0, 0 and 1, 1. The equation is y equals x. So what we get is a relationship between the two graphs, in that they are reflections of each other across this line. And the other thing to note was that we see that the x's and the y's have switched places. So let's generalize that now from this one example. We know that if the point a, b lies on the graph of a function f, then the point b, a must lie on the graph of f inverse. The graphs of f and f inverse are reflections of each other across the line y equals x, which is what we saw on our graph. And the domain of f is actually the range of f inverse. And the range of f is the domain of f inverse. That makes sense because what did we say was happening with our x's and our y's with our points? They were interchanging. They were switching places. So the domain is the set of all x values. It switches places with the set of all y values when you go to the inverse function. Now, not all functions are as straightforward in the order of their steps. For instance, consider the function f of x equals x minus 5 divided by 2x plus 3. Let's say we've already determined that this function is invertible, and we'd like to find f inverse of x. Well, if we could start by trying to list the steps, you might say, OK, I'm going to begin by subtracting 5. But then what do I do to that result? Well, it turns out what you have to do is you have to jump down to the denominator, and then do something else to the beginning value. So it's not as easy to list those steps and then reverse the order. That means we need another technique. From what we just saw with the graphs, we know that what was an x becomes a y, and what was a y becomes an x when we change to our inverse function. So we're going to use that interchange of variables method now in order to find the inverse function. Here's how we'll start. I'm going to replace f of x with the value y. So y equals x minus 5 divided by 2x plus 3. Now, I'm still working with f of x here, but I'm about to switch gears. Instead of working with f of x, I now want to work with the inverse function, which means that what is in y becomes an x and what is an x becomes a y. Now, this is technically going to be the inverse function, but it's not in the format that I'd like to look at, because I want to be able to write it as f inverse of x, which means I want to be able to write it as a function of x. To do so, I need to solve this equation for y. So that's how we're going to proceed now. What we notice is I can multiply both sides of the equation by the denominator. That's going to look like x times 2y plus 3 equals y minus 5. Let's go ahead and distribute. We end up with 2xy plus 3x equals y minus 5. Next I notice that I have two terms that have a y in them. I have the 2xy and I have the y. I want to put those two terms on the same side of the equation. So I'm going to choose to subtract y from both sides of the equation next. We end up having 2xy. We're going to subtract y. That's going to equal-- I still have the negative 5 on the right-hand side. And I'm going to go ahead and do two steps in one. I'm going to this plus 3x and subtract it from both sides of the equation too. So that's going to be minus 3x. Next, remember, I'm trying to solve for y. So I can factor y out of both terms. That's going to leave us y times 2x minus 1 equals negative 5 minus 3x. And finally, to solve for y, I can divide through by the value 2x minus 1. So we now have y equals negative 5 minus 3x divided by 2x minus 1. Now, I have a tendency not to like to leave all of those negative signs in my result. So I'm just going to show you that what I can do is multiply both the numerator and denominator by negative 1, and rewrite this now as the inverse function. The numerator becomes 5 plus 3x. The denominator, when I multiply a subtraction times negative 1, you may recall that changes the order of subtraction. So I can rewrite this as 1 minus 2x. And I've been able to find the inverse function for the given function. One more thing I want to point out is back over in this step, you notice I put all the y's on the same side of the equation? Don't think that you can just add 5 to both sides of the equation and solve for y. Let me do it. I mean, it's not going to be wrong, except for the fact that if I think that's f inverse of x, I'm in trouble. Remember, f inverse of x would mean that everything over here would have to be in terms of x, which it's not. Now it's your turn to try a problem dealing with inverse functions. Here's the problem I want you to look at. Determine the range of g of x equals 1 divided by x minus 2 plus 2/3 by finding the domain of g inverse of x. Now, the instructions here are a little different than what we've been working with, so let's make sure you understand what is going on. You know the range of a function is equal to the domain of its inverse. So therefore, to find the range of this function g of x, you're going to first find g inverse of x, then determine the domain of g inverse of x, and that will be your result for what the range of g of x is. Go ahead and pause the video for a moment, try the problem on your own, and then come back and we'll do it together. Great. So let's see how you did. Remember, we're going to start by finding g inverse of x. And that requires us to do one of two steps, either to interchange the x's and y's or to undo all the steps in g. I'm going to work this by interchanging the x's and y's. So our function g of x is going to be the value of y. So I'm going to write down x equals, and then I'm going to replace all the x's on the right-hand side by y's. So that's going to be 1 divided by y minus 2 plus 2/3. Hopefully you started this way too. Next thing we're going do is to multiply both sides of the equation by the least common denominator. And so least common denominator is going to be the product of the two denominators that we see there. That is, we're going to multiply times 3 times y minus 2 on both sides of the equation. And let's go ahead and simplify. On the left-hand side, we can write this as 3y minus 6 times x equals. On the right-hand side, when we multiply the first term times the LCD, the y minus 2 is going to divide out, and we're going to have our numerator 1 multiplied times 3, so that's going to be 3, plus the denominator 3 will cancel out on the second term, leaving us with our numerator 2 multiplied times y minus 2. Now we'll use distributive property. This will give us 3xy minus 6x on the left-hand side of the equation. On the right-hand side of the equation, we have 3 plus 2y minus 4. Now, there are a couple of steps we can do, and it doesn't really matter the order in which we're going to do them. For one thing, I notice I can take 3 minus 4, and that's going to give me negative 1. The other thing I'm going to do all in one step is I want to put the values that have a y in them, or the terms that have a y in them together on one side of the equation, and the terms that do not have a y in them on the other side. So if you took more than one step to do this, no worries. Just double check yourself with what I come up with next. Let's subtract 2y from both sides of the equation. This is going to give us 3xy minus 2y. At the same time, I'm going to go ahead and notice that I'm going to add 6x to both sides of the equation. So that's going to give us a 6x on the right. And I'm going to go ahead and combine 3 minus 4 to give us negative 1. Now we're at the same point we were in previous problem that we worked, where I need to factor out the value of y from the two terms on the left. So that's going to give us y multiplied times 3x minus 2 equals our 6x minus 1. And since we're multiplying by 3x minus 2, we can divide both sides of the equation by that value to give us y equals 6x minus 1 divided by 3x minus 2. And we have found the inverse function. So we have found g inverse of x. Remember that the problem posed doesn't ask you just to stop there. It asks you to find the range of the original function g of x by using the domain of its inverse. This is a rational function. Its domain is going to be found by taking the denominator, setting that denominator equal to 0, and then eliminating that value from the domain, since we cannot divide by 0. So at this point, I'm going to say 3x minus 2 equals 0 when x is equal to 2/3, and the domain of g inverse can be listed as the set of all x such that x does not equal 2/3. And what's cool about that is if I know what the domain of g inverse is, then I also know the answer to the question that I was posed, which is, I know the range of my function g of x. Now it's time for you to try more problems of this type on your own, dealing with inverse functions. Good luck. It's time for another quick quiz. If f is an invertible function which of the following statements must hold true. A. f inverse exist. B. The graphs of f and f inverse are reflections across y equals x. C. The range of f inverse equals the domain of f. D. All of the above. Choose A, B, C or D. Your correct the answer is D. All of the above. Sorry the answer is D. All of the above. To say that f is an invertible function means that f inverse must exist, so A is correct. If we have a function and its inverse we know that the graphs of those functions are going to be reflections of each other across the line y equals x. And because the range and the domain of functions and their inverses switch therefore the range of f inversed must equal to domain of f.