# Is onto function necessarily a function?

The standard definition suggests that every element in the codomain should have a preimage. So, Can different elements in codomain or range have same domain? A worst question I think. Please reply...

• Koushik, yes, an "onto function" is implicitly a function, not some other kind of relation. – Thomas Andrews Feb 5 '16 at 15:19
• Different elements in the co-domain cannot have the same element in the domain mapping to them. But you can have multiple elements of the domain map to the same element in the co-domain. But that has nothing to do with a function being onto. An onto function means every element in the co-domain has at least one element in the domain mapping to it. – Gregory Grant Feb 5 '16 at 15:26
• An onto function is definitely a function. It's not like "tall Pygmy" or "trim sumo wrestler". – BrianO Feb 5 '16 at 15:36
• There are a few occurrences of the word "function" where a modifying word actually makes it a non-function. "Multi-valued function," for example, and "partial function," and even "meromorphic function." @BrianO :) – Thomas Andrews Feb 5 '16 at 15:43
• @ThomasAndrews with apologies, i delete my comment. Thanks – Shailesh Feb 5 '16 at 15:44

A function $f\colon A\rightarrow B$ is a relation between the elements of $A$ and $B$ satisfying a key property: if $f(a)=b$ and $f(a)=b^{\prime}$, $b=b^{\prime}$.
An onto function is a function $f\colon A\rightarrow B$ satisfying the following property: if $b$ is an element of $B$, there exists an $a$ in $A$ such that $f(a)=b$.
Note that there could be more than one element mapping to each $b$ in $B$. For example, $f(a)=f(a^{\prime})=b$. If $C\subset B$, we can define the preimage of $C$ as $$f^{-1}(C)\equiv\left\{ a\in A\colon f(a)\in C\right\} .$$ If $C$ is a singleton (i.e. $C=\{c\}$ for some $c\in B$), we often drop the set braces $\{\cdot\}$: $$f^{-1}(c)\equiv f^{-1}(\{c\}).$$ We can now restate the definition of onto in terms of preimages of singletons:
An onto function is a function $f\colon A\rightarrow B$ satisfying the following property: for each $b$ in $B$, $f^{-1}(b)$ is nonempty.