Main content

## Linear algebra

### Unit 2: Lesson 4

Inverse functions and transformations- Introduction to the inverse of a function
- Proof: Invertibility implies a unique solution to f(x)=y
- Surjective (onto) and injective (one-to-one) functions
- Relating invertibility to being onto and one-to-one
- Determining whether a transformation is onto
- Exploring the solution set of Ax = b
- Matrix condition for one-to-one transformation
- Simplifying conditions for invertibility
- Showing that inverses are linear

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Relating invertibility to being onto and one-to-one

Relating invertibility to being onto (surjective) and one-to-one (injective). Created by Sal Khan.

## Want to join the conversation?

- So for a function like f(x)=e^x which is a mapping from ℝ^1 to ℝ^1, Sal's argument would seem to say that e^x is not invertible because the image (range) of e^x is not the entire codomain ℝ^1.

However, we know that e^x does have an inverse, and that inverse is ln(x). Does this go against what Sal is saying?(5 votes)- You got the co-domain wrong. If the domain of e^x is ℝ, then the codomain is ℝ+ (the positive real numbers).

The domain of ln x is ℝ+ and the codomain is ℝ.(11 votes)

- I still don't understand why f has to be surjective to be invertible.

Assume f is injective.

I understand that if the domain of f^(-1) (let's call it g) is greater than the range of f, then

f(g(y)) = y

where y is a member of g's domain is not always true; so f doesn't satisfy one of the requirements to be fully invertible.

But f being surjective means it's range has to be it's entire codomain. But why does the inverse function g's domain have to be f's codomain? Why can't it just be f's range? If we define g's domain as f's range then codomains and surjectivity (is that a word?) don't even have to enter the picture right?

Does f have to be surjective just bc by definition the domain of f^(-1) has to equal the codomain of f and not necessarily the range?(5 votes)- Your last statement is correct. In general, if a function has domain A and codomain B, we want its inverse to have domain B and codomain A.

However, if we have a function f(x) with a range R that is not surjective, we can define a new function whose codomain is R, and is otherwise identical to f. These two functions are, in a very strict sense, not the same thing since their codomains are different. But we can treat them as the same for most purposes, since they do the same thing to the entire domain.

The point of this is that the new function is now invertible by this definition.(5 votes)

- I get why a function must be injective to be invertible, as you cannot invert from Y back to X if there are two "paths" you could potentially take. But I don't entirely understand why a function must be subjective to be invertible. It would appear to me that you could invert and revert back and forth between X and Y (using f and f^-1) all day long even if there happen to be elements in Y to which there is no mapping from X. Can somebody explain?(2 votes)
- Another answer Ben is that yes you can have an inverse without f being surjective, however you can only have a left inverse. A left inverse means given two functions f: X->Y and g:Y->X. g is an inverse of f but f is not an inverse of g. So take any element x in X and g(f(x)=x. But when there are elements in Y that are not mapped to from X we need to send them somewhere otherwise g is not a function(definition of a function requires that all elements in the domain map to an element in the range). So we take an element of X and map all extra elements in Y to this element in X. So our function g becomes g(y)=x when f(x)=y, which gives us our left inverse, and for any elements in Y that are not mapped to by y g(y)= our chosen element, say x0. In English g is saying "Whatever f sends us, send it right back, and if we have anything extra send that to f as well". Note how it is not the case that f(g(y))=y since g(y) could send 2 things to one element in f but f cannot send two things back because, again, this would violate the function definition. So there is no right inverse in this case.(6 votes)

- I am confused as to what is the objective of the video "Proof: Invertibility implies a unique solution to f(x)=y" if, as this video clarifies, that unique solution is the very definition of invertibility. Anyone could help?(1 vote)
- being invertible is basically defined as being onto and one-to-one. theres a difference between this definition and saying that invertibility implies a unique solution to f(x)=y. also notice that being invertible really only applies to transformations in this case.

having a unique solution to f(x)=y would be a consequence of being onto and one-to-one. i didnt look at the video or anything, but im guessing he says this means it's invertible. so unique solution -> invertibility. this does not necessarily mean invertibility -> unique solution. thats what the difference is.

ok i didnt explain that very well, but you should get my idea.(5 votes)

- is is necessary for a function to be bijective so that the inverse exists(1 vote)
- F(x)= -2x+4

is this one to one function and how(1 vote)- There's two ways of looking at whether a function is 1-1.

The easy way is to look at the graph of the function and look for places where multiple different x-values will yield the same y-value. For instance, the function f(x) = x^2 is not one to one, because x = -1 and x = 1 both yield y = 1. If you look at the graph of your function, f(x) = -2x + 4, you'll notice the graph of a function is linear. These functions are one to one by default.

Another way to see if a function is one to one is the evaluate and see if f(m) = f(n) leads to m = n. So, if f(x) = -2x + 4, then f(m) = -2m + 4 and f(n) -2n + 4.

Equating the two functions: -2m + 4 = -2n + 4, if you divide both sides by (-2) and subtract 4 from both sides, this gives you m = n. This implies that the function is indeed one to one.(3 votes)

- Could someone please solve this problem :

Show that the following function is bijective and find the inverse of the function

f:R-{0}->R-{0},defined by f(x)=3/x(2 votes)- A function is bijective if andi only if it is invertible. Observe that g(x) := 1/x is an involution, i.e. is it's own inverse as g(g(x)) = 1/(1/x) = x. We can write f(x) as two functions - namely one that multiplies by three i.e. h(x):= 3x and g(x) := 1/x. clearly f(x) = h(g(x)) = 3/x. Finally, inverting flips the order of composition (Do you see why?) hence h(g(x))^-1 = g^-1(h^-1(x)) = g(h^-1(x)). The inverse of h(x) is given by x/3, hence the inverse function will simply be g(3x) = 1/3x.

Alternatively, you can just view 3 as multiplication and to undo the multiplication you divide, and the 1/x part is it's own inverse, so the inverse is 1/3x. I leave it as an exercise to you to show that it is indeed the inverse!(1 vote)

- sir what if x has 2 images in the range like f[x]=x^1/2 then x has two values like for 4 it is -2 and +2(2 votes)
- By definition, a function maps each point in the domain to only one point in the range. √x is not a function if you insist it return the positive and negative square root.(1 vote)

- So is f: [0, 1] ---> Real numbers ; f(x)=x^2 a injective?(1 vote)
- Yes, the function is injective. But it would not be injective if we took the domain to include anything in [-1, 0].(2 votes)

- At ~5:00, Sal lays out the conditions for invertibility. It seems possible that f of a (unique) x might map to 2 (or more) elements in Y. I don't see how that situation is covered by the stated conditions.(1 vote)
- The definition of a function is that for any input x, there is a unique output. So it can't map to 2 or more elements in Y.(1 vote)

## Video transcript

A couple of videos ago, we
learned that a function that is a mapping from the set x to
the set y is invertible if and only if-- and I'll write that as
a if with two f's --if and only if for every y-- so
let me write this down. I'll do this in yellow. For every y that is a member of
our co-domain, there exists a unique-- and I'll make that a
little bit bold --a unique x that is a member of our domain,
such that f of this x is equal to this y. So that's just saying that if
I take my domain right here, that's x, and then I take a
co-domain here, that is y, we say that the function
f is invertible. And we know what invertibility
means. It means that there's this
other function called the inverse that can essentially,
if you take that in composition with f, it's like
taking the identity on x. Or if you take f in composition
with it, it's like taking the identity on y. And we've done that multiple
times so I won't repeat that there. We know what invertibility
means, but we learned that it's invertible, if and only if,
for every y here, so you take any y here, any y that's
a member of your co-domain, there exists a unique x,
such that f of x is equal to that y. Let me write it this way. If this is an x, let's say
that's an x not, f of x not would be equal to y. So this y would be equal
to f of x not. You apply the function here. It's going to map it
to this point here. It wouldn't be invertible
if you had this. If you had two members
of x mapping here. That would break invertibility
if you had this situation, because then you wouldn't have
the unique condition. You have to have a unique x
that maps to this thing. And what I just drew here, this
other pink mapping, we don't have a unique x that maps
to y, we have two x's that map to y. Now, based on what I just told
you on that last video, what does this mean? If we have a unique x
that maps to each y? That means that we have to have
a one-to-one mapping. That f has to be one-to-one. Let me write that. Another way of saying
this, is that f is one-to-one, or injective. If we have two guys mapping to
the same y, that would break down this condition. We wouldn't be one-to-one and
we couldn't say that there exists a unique x solution to
this equation right here. Now, the other part of this is
that for every y -- you could pick any y here and there
exists a unique x that maps to that. There cannot be some y here. Let's say that there's some y
here, and no one maps to that. If that's the case, then we
don't have our conditions for invertibility. So that would be
not invertible. Everything in y, every element
of y, has to be mapped to. All of these guys have
to be mapped to. And they can only be mapped to
by one of the elements of x. Everything here has to be mapped
to by a unique guy. Now, in the last video, what did
we call it went a function maps to every element
of your co-domain? So this every here, what is
another way of saying that? That a function maps to every
element of your co-domain? On the last video I explained
that notion is called a surjective or onto function. So the whole reason why I'm
doing this video is because I really just want to restate
this condition for invertibility using the
vocabulary that I introduced to you in the last video. So given that the statement for
every y that's a member of our co-domain, there exists
a x that maps to it. We could just say that
f is surjective. If we just say that f is
surjective, that means that everything here is mapped to. But it could be mapped to, maybe
this person right here, could be mapped to
by more than one. Surjective doesn't, by itself,
make the condition that there's a unique mapping
from a member of x to that element of y. So in order to get that, in
order to satisfy the unique condition of this condition for
invertibility, we have to say that f is also injective. And obviously, maybe the less
formal terms for either of these, you call this onto,
and you could call this one-to-one. So using the terminology that we
learned in the last video, we can restate this condition
for invertibility. We can say that a function that
is a mapping from the domain x to the co-domain y is
invertible, if and only if -- I'll write it out -- f is both
surjective and injective. Or we could have said, that f is
invertible, if and only if, f is onto and one-to-one. And these are really just fancy
ways of saying for every y in our co-domain, there's a
unique x that f maps to it. There isn't more than one and
every y does get mapped to.