An onto function is sometimes called a surjection or a surjective function. In an onto function, every possible value of the range is paired with an element in the domain.
Note: for the examples listed below, the cartesian products are assumed to be taken from all real numbers.
onto function | not onto |
f(x) = x
(all real numbers appear in the range) |
g(x) = x2
The range of this function is all non-negative numbers, this is not onto because the negative y's are never appear anywhere in the range. |
h(x) = 2x
(all real numbers appear in the range) |
h |