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.

## Algebra 1

### Course: Algebra 1>Unit 8

Lesson 13: 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..? • Additional notes from me: a variable is a "bucket" that can be any number based on its constraints and can be changed to any symbol, letter, or maybe shapes (it's basically anything distinct to be used to represent the "bucket") without changing the value of the expression.

Up until x = f inverse of y = (1/2)y - 2, y is useful to see where it's coming from: it's coming from the original equation y = f(x) = 2x + 4, we just solve for x in terms of y to map from the range back to the domain or to make the output as the input and vice versa (that is why it is called inverse function).

After we know where it's coming from, it's useful that at this point and onward, we change the symbol/variable from y to x to see the relationship between f inverse of y to f(x) or f of x. We can do that because we just change the symbol or the variable without changing the value. We could've change the y into a or b or anything, but we chose to change the y into x because we need to see the relationship between the f inverse of y and the f(x) or f of x.

• x = f inverse of y = (1/2)y - 2 --------> change the letter y to X to see the correlation between this equation to f(x) (it's not going to change the value, it's the same as if you were to use star shapes to represent a variable and decide to change them to heart shapes)
• x = f inverse of X = (1/2)X -2

We now see the correlation between f inverse of X and f(x) or f of x. In fact, f inverse of X is derived from f(x).

Notice that it might be a little confusing since now, in the x or f inverse of X equation, the domain (input) and range (output) are represented by the same variable, they are just differentiated by means of capital letter and lowercase letter: x = f inverse of X (let us use capital X as the input and the lowercase x as the output to differentiate them) = (1/2)X - 2.

• The x (range or output) = f inverse of X (domain or input) is similar to the y (range or output) in y (range or output) = f(x) or f of x (domain or input).
• The X (domain or input) in x (range or output) = f inverse of X (domain or input) is similar to the x (domain or input) in y (range or output) = f(x) or f of x (domain or input). • 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? • There are actually other ways you can write an inverse function! Take this example:

f(x) = 2x + 4
f(x)^-1 = (x-4)/2 • 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. 