In this video, we'll discuss inverse functions, what it means to invert or undo a function, how this arises by interchanging the roles of input and output, and how this relates to taking reflections in the line y equals x in the xy plane. We also explain and illustrate how to find the rule for the inverse function by algebraic manipulation. Let's begin with a familiar quadratic function, we'll call f with rule y equals x squared, whose graph is a parabola and next to it we display a parabola on its side half of which is the graph of the function we'll call g, the square root function whose rule is y equals the square root of x. How do we know that the graph of g should also be a parabola? Well, if we put y equal to root x, then squaring both sides gives y squared equals x, that is x equals y squared. So, the graph should be almost the same as for y equals x squared except that we've interchanged the roles of x and y. I say almost the same because we only use the top half of the parabola to get the positive square root. If instead for some reason we wanted the negative square root, we could consider a new function, say h with rule h of x equals negative square root of x and get the other half of the parabola on its side. The point is that there's really these two halves of the parabola on its side that are associated with undoing the square function by taking positive and negative square roots. What's going on? Well, we have this simple but important fact about graphs of functions that satisfy the so-called vertical line test, which means, as you scan a vertical line from left to right, the vertical line never passes through the graph at more than one point. The reason is that for each potential input x from the x-axis, we want at most one output y on the y-axis. If some input x corresponded to two or more outputs, then the function would be ambiguous and an important feature of a functional process is that it produces a single, clear, unambiguous outcome for each input. For example, the graph of the square function has this property. As we scan from left to right, vertical lines only pass through the graph once. However, for the curve x equals y squared which is the full parabola on its side, this property fails. Except at the origin, vertical lines cross this parabola on its side at two points. So, for every input x greater than zero, there will be two possible outputs creating ambiguity resolved earlier by considering just the positive or just the negative square root. And each of those halves of the parabola on its side then satisfy the vertical line test. Any circle in the plane is another example where the vertical line test fails. Take for example the unit circle with equation x squared plus y squared equals 1. Over the interior of the circle, all vertical lines cross at two points. If we rearrange the equation for the circle to get y as output in terms of x as input, we get in a couple of steps two possibilities for y namely, plus or minus the square root of 1 minus x squared. Having two possibilities explains why the vertical lines cross the graph twice. If we take the positive square root, we get a function whose graph is the upper semicircle. If we take the negative square root we get a function whose graph is the lower semicircle. In each of these cases, clearly the vertical line test holds. If the graph of the function also satisfies the horizontal line test, by which we mean all horizontal lines pass through at most one point of the graph, then the function turns out to be invertible, which means we can undo the function, reverse the original process, go back from output to input. For example, the parabola y equals x squared does not satisfy the horizontal line test. The test fails for this graph. But if we restrict the domain, say to non-negative reals, that is x greater than or equal to zero, then we get the right-hand half of the parabola only and the horizontal line test now is satisfied. This graph passes the horizontal line test. Satisfying both the horizontal and vertical line tests mean that you can move both forwards and backwards between inputs and outputs without any ambiguity. The process of unraveling the output to get back to the original input is called inverting the function. To invert a function, we need to go back from output to input to interchange the roles of x and y which act as input and output respectively and therefore to interchange the roles of the horizontal x-axis and vertical y-axis, all of which is achieved visually or geometrically by reflecting the graph in the line y equals x. Here's the line y equals x creating a diagonal in the xy plane. Reflecting in this line has the effect of interchanging horizontal and vertical and therefore interchanging the x and y-axes which is just what we need. Let's demonstrate this physically say with a half parabola y equals x squared for non-negative x only. Here's the graph on a transparency. To reflect in the line y equals x, we just flip it over so that the original vertical axis becomes horizontal and the horizontal axis becomes vertical. Here are the graphs all together on one diagram and the reflected graph, just on its own, which you may recognize as the positive square root function. We can do the same thing but now with the other half of the parabola where x is less than or equal to zero. Here's a new graph on another transparency and again we get the reflection effect by flipping it over. Here are the graphs all together on one diagram and the reflected graph just on its own, you may recognize as the negative square root function. We have this important notation, the inverse of a function f is denoted by f to the minus one which is related to reciprocal notation for real numbers that comes from composition of functions and the role of the identity function which behaves like the real number one in function arithmetic and details are given in the notes. The rules for f and its inverse are tightly held together, y equals f of x precisely when x is f inverse applied to y. That is, if f takes x to y, then f inverse brings y back to x and vice versa. All of these say the same thing, that f and f inverse undo each other. We can apply this notation in the cases that we looked at earlier in undoing the square function. If f of x is x squared, for x greater than or equal to zero, then the rule for f inverse is to take the positive square root. By contrast, if f of x is x squared for x less than or equal to zero, then the rule for f inverse is to take the negative square root. A very beautiful example is the function h given by the rule h of x is 1 over x, whose graph is a hyperbola. The hyperbola has two branches and the domain and the range are both the real line with zero removed. The graph satisfies both horizontal and vertical line tests and is perfectly symmetrical about the line y equals x. So, if you reflect in that line you just get the hyperbola back again. You can see this physically by making a transparency and seeing that if you flip it over to interchange the axes then the hyperbola will reproduce itself. So, the inverse of h must be itself. Now, you can check this works algebraically, h of h of x is h of the reciprocal of x which is the reciprocal of the reciprocal of x which is just x which gets you back to the original input. So, indeed h does undo itself. Now, we can create an algebraic method for undoing a function essentially by interchanging the roles of input and output, of x and y. To invert y equals f of x, first, simply rearrange the rule to express x in terms of y. And then we must have x equals f inverse of y. Typically, we denote the input by the symbol x. So finally, we just rewrite this with x instead of y and y instead of x. Here's an example. Find the rule for the inverse function f inverse when f is given by this rather complicated rule x goes to the square root of x plus 2 minus 1 divided by 3. To solve this, we first put y equal to the expression that gives the rule for f and then in a sequence of easy steps using algebraic manipulation, we unravel this to express x in terms of y. Thus x equals f inverse of y which equals in this case 3y plus 1 all squared minus 2. So, reverting to using x as a typical input, we finally get the rule for f inverse, namely f inverse of x is 3x plus 1 all squared minus 2. And this finally solves our original problem. We can check this really works, that the rule does indeed undo the rule for f by looking at f inverse of f of an input x and carefully checking that we recover the input x. Let's quickly revisit the earlier example using the unit circle. To satisfy the vertical line test, to get the graph of a function remember, we could for example take either the upper or lower hemisphere. But neither of these satisfy the horizontal line test. There are different ways of remedying this. We could for example restrict the domain to real numbers between zero and one. So, we get one quarter of the unit circle where everything is non-negative and both the vertical and horizontal line tests are satisfied. Call the function with this graph k. So, we get the rule k of x is the square root of 1 minus x squared. To find the inverse of k geometrically, we can reflect in the line y equals x. Like the hyperbola example before, this graph has perfect reflectional symmetry about this line so the graph of the inverse function is just the graph of k. Hence k is k inverse so the rules for k and k inverse are the same. You can also check this algebraically though we won't do that here. We've covered a lot of ideas in just a few minutes. We've introduced and illustrated inverse functions and along the way discussed the vertical line test which is satisfied by all functions, the horizontal line test which is satisfied by all invertible functions, illustrated how we can invert a function by reflecting its graph in the line y equals x corresponding to interchanging input and output, and also how we can invert a function using algebraic manipulation. There's a lot more detail in the notes so please read them and when you're ready please attempt the exercises. Thank you very much for watching and I look forward to seeing you again soon.