A function is
surjective or
onto if each element of the
codomain is mapped to by at least one element of the
domain. In other words, each element of the codomain has a non-empty
preimage. Equivalently, a function is surjective if its image is equal to its codomain. A surjective function is a
surjection. The formal definition is the following. :The function f \colon X \to Y is surjective, if for all y \in Y, there is x \in X such that f(x) = y. The following are some facts related to surjections: • A function f \colon X \to Y is surjective if and only if it is right-invertible; that is, if and only if there is a function g \colon Y \to X such that f\circ g= identity function on Y. (This statement is equivalent to the
axiom of choice.) • By collapsing all arguments mapping to a given fixed image, every surjection induces a bijection from a
quotient set of its domain to its codomain. More precisely, the preimages under
f of the elements of the image of f are the
equivalence classes of an
equivalence relation on the domain of f, such that
x and
y are equivalent if and only they have the same image under f. As all elements of any one of these equivalence classes are mapped by
fon the same element of the codomain, this induces a bijection between the
quotient set by this equivalence relation (the set of the equivalence classes) and the image of f (which is its codomain when f is surjective). Moreover,
f is the
composition of the
canonical projection from
f to the quotient set, and the bijection between the quotient set and the codomain of f. • The composition of two surjections is again a surjection, but if g\circ f is surjective, then it can only be concluded that g is surjective (see figure). ==Bijection==