# Confusion on the definition of the inverse function

I am currently trying to prove the equivalence of two definitions of enumerability (one involving a surjective function, the other involving an injective one). In doing so, I wanted to consider the inverse of a function, but then it occurred to me that I can't just assume that any function has an inverse. I looked in my lecture notes and got the following definition

Let $$f: a \rightarrow b$$ be $$1$$-$$1$$. Then the inverse function of $$f$$ is $$f^{-1}: Ran(f) \rightarrow \text{Dom}(f)$$ such that: $$\forall \ \ x \in \text{Ran}(f) \ \ \forall \ \ y \in \text{Dom}(f) (f^{-1} = y \leftrightarrow f(y) = x)$$

Where a function $$1$$-$$1$$ function is a injective function. i.e.: $$f: a \rightarrow b$$ is injective ($$1$$-$$1$$) iff $$\forall \ \ x,y \in a (f(x) = f(y) \rightarrow x = y)$$

But everywhere else I am reading that only a bijective function has an inverse. Now, unless I am mistaken, being an injective function does not imply being a surjective function, so injective functions are not necessarily bijective. But in this case there is a palpable disagreement between these two definitions, and that affects my proof. So, I wonder: have my notes got it wrong, or have I made a mistake?

Thank you for any help.

• A function ought to have a specifically stated domain and codomain. An injective function does not necessarily have an inverse function from its codomain to its domain... but it will have an inverse function if we were to go from its range to its domain. What prevented it was us not knowing for sure whether $f^{-1}(y)$ would be defined for every $y$ or not, but if we were only considering $y$ for which we know there to be an $x$ value who mapped to it then that concern is no longer necessary. Dec 6, 2022 at 18:57
• Do use caution and recognize that some authors are sloppy and use "Range" to refer to the codomain regardless of circumstances. The rest of us reserve the word "Range" to refer exclusively to those elements of the codomain who get mapped to by some element of the domain, specifically to resolve situations like this. Dec 6, 2022 at 19:00

Let $$f:A \to B$$ be a function with domain $$A$$ and codomain $$B$$. This implies every element in $$A$$ is mapped to a single element in $$B$$.

Of course, there may be an element in $$B$$ that is mapped to more than once, and there may be an element in $$B$$ that is not mapped to at all. If the function is injective, then there are no elements in $$B$$ that are mapped to more than once, and if the function is surjective, then every element in $$B$$ is mapped to. If the function is bijective, then it is both injective and surjective. Note that the range $$f(A)$$ of $$f$$ is a subset of the codomain $$B$$ consisting of all elements in $$B$$ that are mapped to.

Now, the inverse function $$f^{-1}: B \to A$$ from the codomain $$B$$ of $$f$$ to the domain of $$A$$ of $$f$$ exists iff $$f$$ is bijective. Of course, this is because, under $$f$$, for every element in $$B$$, we can map backwards to a single element in $$A$$.

However, if $$f$$ is injective alone, then we can still define an "inverse" function $$f^{-1}: f(A) \to A$$ from the range $$f(A)$$ of $$f$$ to the domain $$A$$ of $$f$$. This is because, under $$f$$, for every element in the range $$f(A)$$, we can still map backwards to a single element in $$A$$, even if there are elements in $$B$$ that are not mapped to (because the range $$f(A)$$ only contains those elements in $$B$$ that are mapped to). But if $$f$$ is injective alone, then we cannot define an inverse from $$B$$ to $$A$$ because there may be an element in $$B$$ with nothing to map backwards to.

Typically, an inverse function is defined in terms of the domain/codomain of some other function and not the domain/range of said function, so your confusion is understandable.

The jective-brothers come in three names, relative to morphisms: injective, surjective and bijective.

1. The injective brother has always one answer for one question, but there are questions without answers, which it prefers to avoid;
2. The surjective brother has oftentimes two or more answers for the same question;
3. The bijective brother has always one answer for every question;

In symbolic mathematics, we have that, given domain set as blackboard bold $$\mathbb{D}$$, image or range set $$\mathbb{I}$$ and set $$\mathbb{F}$$ as some super set algebraic structure, we have that it fulfills $$\mathbb{D} \to \mathbb{I}, \mathbb{D} \, ? \, \mathbb{F}$$. The question mark $$?$$ is equivalent to:

• $$\subset$$: injective
• $$\subseteq$$: surjective
• $$\equiv$$: bijective