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 Algebra 2

### Course: Get ready for Algebra 2>Unit 4

Lesson 9: Intro to inverse functions

# Intro to inverse functions

Sal explains what inverse functions are. Then he explains how to algebraically find the inverse of a function and looks at the graphical relationship between inverse functions. Created by Sal Khan.

## Want to join the conversation?

• Is the inverse of y=4 x=4? If so then are horizontal and vertical lines the only lines that are perpendicular to there inverses? •   I love this question-- because testing the boundaries of new concepts is so important to advancing mathematics.First, we must come to grips with the idea that not every function has an inverse. Only functions with "one-to-one" mapping have inverses.The function y=4 maps infinity to 4. It is a great example of not a one-to-one mapping. Thus, it has no inverse. There is no magic box that inverts y=4 such that we can give it a 4 and get out one and only one value for x.
• i don't quite get the thing Sal does at . He is talking about y being equal to x, and then draws a dotted line in the middle. is there maybe a video that clarifies this relation? •  Heh, yeah, that may have been a bit fast. The equation of that dotted line is y=x, and his point is that the function and the inverse were reflections of each other across that dotted line. In other words, if you drew the graph of a function and its inverse on a piece of paper and then folded the paper along the line y=x, the two graphs would line up.
• Why do we rename Y to X? •   Justin,

If you are trying to invert a function, one way to do it is to switch the positions of all of the variables, and resolve the function for y. The intuition works like this:

We sometimes think about functions as an input and an output. For example, we take a value, called x, and that is what we put into the function. Then the function does some "stuff" and we get out a value called y. So, for some function f, X goes in, and Y comes out. If we think about it that way, then for the inverse of the f function (call it 'g', maybe), we should be able put IN the values that came OUT of function f as our y's, and get the same x values we put IN to f to get the y's originally.

But that is kind of like we switched the x's and y's in our f function…. and that's exactly how you solve for the inverse function, g. You take the original function, switch all of the y's for x's and the x's for y's, and then you resolve it for y.

For example: if our original function f is y=2x-5, then we would switch the y's and x's to get x=2y-5. If we solve for y, we get y=(x+5)/2. That's function 'g'.

Now let's try it out. We put in an x=0, 1, and 2 in function f, and we get, -5,
-3, and -1 as the corresponding y's (try it yourself). Now we take those y's and we make them our x values (or inputs) into function g and we should get our original 0, 1, and 2.
y=(-5+5)/2 =0
y=(-3+5)/2= 1
y=(-1+5)/2=2

It worked. The x's (or inputs) for our first function produce y's (outputs) from our first function. We can take those y's (outputs from our first function) and make those the x's (or inputs) of our inverse function, and we get the original inputs we started with.
• as to solve for x, for inverse, why can't we just switch the x and y in the same equation..? • Does this solely apply to lines? • No, all strictly growing or strictly decreasing functions have an inverse.

If it is not strictly growing/decreasing, there will be values of f(x) where
f(x) = f(y), x not equal to y.

So, its inverse g would have two values for f(x), as g( f(x) ) = x AND y, which is not possible for a function.

An example of this is x^2. It's inverse would be g(x) = +sqrt( x ) AND -sqrt( x ), which is not possible.

However, functions such as f( x ) = x^3, or f( x ) = e^x, which are strictly growing, do have an inverse : )
• Can a function be the inverse of itself?
What are some examples? • What is the purpose of inverse functions? Is there a real world example for why we might need an inverse function? • Sure. In physics, let's say we are trying to calculate a certain angle and we end up with the expression:
sin 𝜃 cos 𝜃 = 1/3
We can write this as:
sin 2𝜃 = 2/3
To solve for 𝜃, we must first take the arcsine or inverse sine of both sides. The arcsine function is the inverse of the sine function:
2𝜃 = arcsin(2/3)
𝜃 = (1/2)arcsin(2/3)
This is just one practical example of using an inverse function. There are many more.
• There are actually other ways you can write an inverse function! Take this example:

f(x) = 2x + 4
f(x)^-1 = (x-4)/2   