Y by
Which one of these functions are invertible? or both are invertible?
Let
and
be defined as
,

I think both of them are invertible, for
its trivial for
is where it gets confusing.
The condition for invertibility of a function according to Wikipedia is
>The function
is invertible if and only if it is bijective. This is because the condition
implies that
is injective, and the condition
implies that
is surjective.
My friends whom I discussed this problem with say that
isn't invertible because
isn't surjective since
never reaches values 
since when I make
in
the domain it won't produce values for for
, but I think that argument is wrong but I can't point it out. The only argument I could provide was

Is it necessary for surjectivity here? and if so why is it contradicting the defintion? where am i going wrong?
The question asks, "Is it invertible?", which I interpret as, "Will an inverse exist?"
YES, if I restrict the codomain to the range.
NO, if I keep the codomain as it is.
It never said anything about whether I can restrict the codomain or not, so I should be allowed to restrict it.
Restricting the codomain doesn’t change the actual input-output behavior of the function — it just changes how we describe the function.
The mapping rule remains the same. For example, if
, then
and
, regardless of whether the codomain is
or
.
It is valid to restrict the codomain to the range when discussing invertibility.
This doesn't alter the nature of the function — it just makes the description precise and allows an inverse to exist by making the function surjective. Many textbooks do this without issue.
If restricting the domain or codomain changes the function, then technically those functions don't have inverses.
But we came up with functions like
or
precisely to define inverses — so maybe it's fair to come up with an inverse here too.
Yes, strictly speaking, changing the codomain defines a different function in the formal sense.
But since the input-output rule doesn't change, and the goal is to determine if an inverse exists, it's mathematically acceptable — and often necessary by many textbooks — to restrict the codomain to the range.
Since the question was to analyze invertibility, it makes sense to say the function can be made invertible in that context.
Let




I think both of them are invertible, for


The condition for invertibility of a function according to Wikipedia is
>The function





My friends whom I discussed this problem with say that




since when I make




Is it necessary for surjectivity here? and if so why is it contradicting the defintion? where am i going wrong?
The question asks, "Is it invertible?", which I interpret as, "Will an inverse exist?"
YES, if I restrict the codomain to the range.
NO, if I keep the codomain as it is.
It never said anything about whether I can restrict the codomain or not, so I should be allowed to restrict it.
Restricting the codomain doesn’t change the actual input-output behavior of the function — it just changes how we describe the function.
The mapping rule remains the same. For example, if





It is valid to restrict the codomain to the range when discussing invertibility.
This doesn't alter the nature of the function — it just makes the description precise and allows an inverse to exist by making the function surjective. Many textbooks do this without issue.
If restricting the domain or codomain changes the function, then technically those functions don't have inverses.
But we came up with functions like


Yes, strictly speaking, changing the codomain defines a different function in the formal sense.
But since the input-output rule doesn't change, and the goal is to determine if an inverse exists, it's mathematically acceptable — and often necessary by many textbooks — to restrict the codomain to the range.
Since the question was to analyze invertibility, it makes sense to say the function can be made invertible in that context.