Give every student a locker. If no two students share a locker, then a locker number tells you exactly whose locker it is. Functions face the same question. When two different inputs can produce the same output, the output alone cannot tell you where it came from, and the process cannot be run backward. One-to-one functions are the ones where every output leads back to a single input.
Key terms
One-to-one function
Definition A function with domain is one-to-one if no two different inputs in have the same output. Equivalently, each number in the range of is the output of exactly one input in . Whether a function is one-to-one depends on its domain as well as on its rule.
In plain words No output is used twice. If you know an output, you know the input it came from.
Example The function on is one-to-one, because different numbers have different doubles and so different values . The function on is not, since . With the domain the same rule is one-to-one. If , then
so two different nonnegative numbers always have different squares.
Injective
Definition Injective is the standard name for one-to-one in the language of sets. A function is injective, or an injection, if implies for all and in . Being injective puts no condition on how much of the codomain is reached. An injective function need not reach every element of , and its range can be a proper subset of . A one-to-one function should not be confused with a one-to-one correspondence, which is a function that is injective and whose range is all of .
In plain words Injective and one-to-one mean the same thing. The word is about outputs never repeating, not about covering every possible output.
Example The function given by is injective. If , squaring both sides gives . Its range is , so it never reaches , and it is not a one-to-one correspondence between and .
Distinct inputs give distinct outputs
Definition The defining condition can be written in two equivalent forms. For all and in the domain of ,
The second form is the contrapositive of the first, so the two say the same thing, and it is the form used in proofs. Assume two outputs are equal and show by algebra that the inputs must be equal.
In plain words Different in means different out. To prove it, start from equal outputs and show there was only one input all along.
Example Let for , and suppose with and . Multiplying both sides by the nonzero number gives
Expanding gives
and collecting terms leaves . So , and is one-to-one.
Showing a function is not one-to-one
Definition A function fails to be one-to-one exactly when there are inputs in its domain with . A single such pair is a complete proof. The reverse does not work. Checking many inputs and finding no repeated output is evidence, not a proof that is one-to-one.
In plain words One repeated output is enough to say no. Saying yes needs an argument that covers every input.
Example For the values and already settle the question. To see every such pair, set and factor,
So with happens exactly when , that is, for inputs placed symmetrically about .
Horizontal line test
Definition A function is one-to-one if and only if every horizontal line meets the graph of in at most one point. The reason is that the line meets the graph at the points with , one point for each input whose output is . The test applies to the graph over the whole domain. A sketch or a calculator picture can suggest the answer but does not prove it.
In plain words Slide a horizontal line up and down. If it ever touches the graph twice, two inputs share an output. The vertical line test asks whether a graph belongs to a function at all, and the horizontal line test asks whether that function is one-to-one.
Example The line meets the graph of at and , so squaring on fails the test. A picture can mislead. On the window the graph of looks just like the graph of , which passes the test. But
so the line meets the graph at , and , and is not one-to-one.
Strict monotonicity as a sufficient condition
Definition A function is strictly increasing on a set in its domain if whenever in , and strictly decreasing on if whenever in . These are the conditions that the lesson on reading graphs calls increasing and decreasing. If is strictly increasing on its whole domain, or strictly decreasing on its whole domain, then is one-to-one. Indeed, two different inputs can be named so that , and then and are strictly ordered, so they differ. The inequalities must be strict. Allowing would permit a flat piece, and a flat piece repeats outputs. The converse is false in general. For a function whose domain is an interval and whose graph has no breaks it does hold, which follows from the intermediate value theorem.
In plain words A graph that always climbs, or always falls, can never come back to a height it already reached. So it passes the horizontal line test automatically.
Example Let . Solving for is hard, but if then , and adding gives . So is strictly increasing on and therefore one-to-one. The converse fails for , whose domain has a gap at . It is one-to-one, since forces . Yet it is neither increasing nor decreasing on its domain, because while .
Check yourself
- Is one-to-one on ? Is it one-to-one on ?
Show the answer
Not on , since . On it is. If then , so . The function is strictly increasing there and therefore one-to-one.
- Prove that , with , is one-to-one.
Show the answer
Suppose with . Multiplying by the nonzero number gives
that is
This simplifies to , so .
- Does pass the horizontal line test?
Show the answer
No. The values and are equal, so the line meets the graph at and . One repeated output is enough, and is not one-to-one.