A function is called onto or a surjective function if every element $b$ in $B$ can be obtained as $b = f(a)$ for some $a$ in $A$. To summarise, the entire codomain must be mapped to the domain.
| Example of a Surjective mapping |
In general, this might not be the case. If is an function, we know that for every , we have . If the range of can be a proper subset of (which is the codomain), then it is not onto.