Surjective 

A surjective function. (However, this one is not an injection)
Another surjective function. (This one happens to be a bijection)
A non-surjective function. (This one happens to be an injection)
Surjective composition: the first function need not be surjective.

In mathematics, a function f is said to be surjective or onto, if its values span its whole codomain; that is, for every y in the codomain, there is at least one x in the domain such that f(x) = y .

Said another way, a function fX → Y is surjective if and only if its range f(X) is equal to its codomain Y. A surjective function is called a surjection.

Contents

Examples and a counterexample

There always exists a function "reversible" by a surjection

Every function with a right inverse is a surjection. The converse is equivalent to the axiom of choice. That is, assuming the axiom of choice, a function fX → Y is surjective if and only if there exists a function gY → X such that, for every y \in Y

f(g(y)) = y \, (g can be undone by f)

that is a function g such that f o g equals the identity function on Y (cf. with definition of inverse function).

Note that g may not be a complete inverse of f because the composition in the other order, g o f, may not be the identity on X. In other words, f can undo or "reverse" g, but not necessarily can be reversed by it. Surjections are not always invertible (bijective).

For example, in the first illustration, there is some function g such that g(C) = 4. There is also some function f such that f(4) = C. It doesn't matter that g(C) can also equal 3; it only matters that f "reverses" g.

Other properties

See also

Look up surjective, surjection, onto in Wiktionary, the free dictionary.