onto-functions
Onto (surjective) A function is onto if for every there exists at least one with . Every target in the codomain gets hit, so the range fills completely with no unreachable outputs.
The whole question onto answers is simple: can every output be produced? Pick any you like in the codomain, and onto promises some input maps to it. Geometrically, for , the graph has to touch every height on the y-axis. No gaps, no unreachable .
Proving onto: run the definition backwards
The definition reads "for every , there exists an ", so the proof always has the same four moves. Start with an arbitrary . Solve for in terms of . Check that this actually lands in the domain . Then plug it back and confirm really simplifies to .
For on , the candidate input is , which is real for any real , and substituting it back gives . That is the recipe in full: find the preimage, check it lives in the domain, verify it maps where you want.
Not-onto, and what it does not mean
The cheapest not-onto function is on . Every input is used, but the output is just , so the rest of is never reached. The function misses every negative number the same way. Both are perfectly valid functions, they just fail to cover their codomain.
Outputs may have gaps, inputs never can I first read "not onto" as the function being allowed to skip some inputs, leaving part of the domain unused. That mixes up the two sides. A function is total by definition: every element of its stated domain must map somewhere. If a rule is undefined at a point, that point is not in the domain ( has domain , not ). Onto is about the other side, whether the outputs cover . Outputs are free to leave gaps, which is exactly what not-onto means. Inputs are not.
Why onto is worth proving
Two reasons. First, guaranteed solvability. Onto is an existence theorem in disguise: if is onto, the equation has a solution for every . In linear algebra, a transformation being onto is exactly the statement that is solvable for every .
Second, onto is half of what you need for an inverse. To build , the inverse has to be defined on all of , because a function is total on its domain. If is not onto, some has no preimage, so has nothing to send it to and fails to be a function.
Onto is only half of an inverse
Onto gives every at least one preimage. For an inverse you also need at most one, which is the one-to-one (injective) condition: no output is shared by two inputs, or would have to send one to two places and stop being deterministic. Onto plus one-to-one is bijective, exactly one preimage per , and that is when exists. The one-to-one side, and the trap that catches most people proving it, is its own story in one-to-one-proof-converse-trap.
Equal sizes collapse onto and one-to-one
When the domain and codomain are finite and the same size, , onto and one-to-one stop being separate properties. Prove one and the other comes free. The reason is the Pigeonhole Principle: if is not one-to-one, two inputs collide on one output, so the inputs cover at most outputs, leaving some element of unreached, which is not onto. Run it the other way and not-onto forces not one-to-one.
Infinite sets break this. Take with and for . It is not one-to-one, since and both map to , yet it is onto, since every has preimage . The bound that locked the two properties together is gone. This asymmetry is the very definition of an infinite set: a set is infinite exactly when it has a map to itself that is onto but not one-to-one (a Dedekind-infinite set).
The handle Onto is a claim about the output side: every target in gets hit. Inputs are never allowed gaps, that is what makes a function. Outputs are allowed gaps, that is what makes a function not-onto, and onto closes that gap. Add one-to-one and the inverse appears. For equal finite sizes the two properties come as a pair, for infinite sets they part ways.