Surjective function

In mathematics, a surjective function or onto function or surjection is a function for which every possible output value occurs for one or more input values: that is, its image is the whole of its codomain.

An surjective function f has an inverse $$f^{-1}$$ (this requires us to assume the Axion of Choice). If y is an element of the image set of f, then there is at least one input x such that $$f(x) = y$$. We define $$f^{-1}(y)$$ to be one of these x values. We have $$f(f^{-1}(y) = y$$ for all y in the codomain.