# Surjective

Definition: Surjective
A function is surjective if for every output , there exists an input such that .
Onto is a synonym for surjective.

In short, every element of the codomain gets "hit". (Mnemonic device: the prefix sur- means "over" or "above", as in "surcharge" or "surname", etc. So each element of the codomain has at least one preimage (and maybe more)).

The following function is not surjective:

because there is no with .