Illustrated · 1 min
So far, we have learned about different functions, such as piecewise, step, and one-to-one functions, but now let's learn about onto functions!
##Onto Functions
Onto functions, also known as surjective functions, are when every possible output corresponds to an input value of real numbers It sounds very similar to one-to-one functions, but the key difference is that in one-to-one functions, every input must correspond to only one output. Onto functions are more particular in that every output or value must have an input or value.
Let's look at an example onto function.

Image source: by Trisha Rahman
In this function map, we can see every value connects to an value, meaning we have an onto function.
However, if we slightly change this example, we no longer have an onto function:

Image source: by Trisha Rahman
In this function map, the output does not have a corresponding input (the horizontal line changed), so we know this is not an onto function.

