One-to-one functions and the horizontal line test
Quick review (2 minutes)
Think of a coat check.
A function f is a one-to-one function when different inputs always give different outputs: f(a) = f(b) happens only when a = b. A function has an inverse function exactly when it is one-to-one. Horizontal line test: a function is one-to-one exactly when no horizontal line meets its graph at more than one point.
Say the question in plain words: do any two different inputs share an output?
From a table or a list of pairs: read along the outputs. A value that sits under two different inputs means the function is not one-to-one. No repeated output means it is one-to-one.
From a graph: hold a horizontal line at the bottom of the picture and slide it to the top. If at any height it meets the graph at two or more points, the function is not one-to-one. If it meets the graph at most once at every height, the function is one-to-one.
From a formula: look at its graph and use the horizontal line test, or write f(a) = f(b) and see whether that forces a = b.
To say a function is not one-to-one, write down the proof: two different inputs and the output they share, such as f(−2) = 4 and f(2) = 4.
State the conclusion about undoing: a one-to-one function has an inverse function, and a function that is not one-to-one does not.
Say what is being asked: do any two different inputs give the same output?
Pick the tool that fits how the function is given: the output row of a table, a sliding horizontal line on a graph, or the equation f(a) = f(b) for a formula.
Hunt for one tied pair: two different inputs with the same output. One pair settles it as not one-to-one.
If you find no tied pair, give the reason none can exist: no repeat in the table, at most one meeting point at every height, or f(a) = f(b) forcing a = b.
Finish with the conclusion about undoing: one-to-one means an inverse function exists, not one-to-one means it does not.
Decide whether f(x) = − 3 is a one-to-one function, and say whether it has an inverse function. In plain words: do any two different inputs give the same output?
f(x) = − 3 is not a one-to-one function, because f(−2) = 1 and f(2) = 1.
It fails the horizontal line test, so it has no inverse function.
Using the wrong line. A vertical line tests whether a graph is a function at all. A horizontal line tests whether that function is one-to-one. The graph of y = passes the first test and fails the second. Say the question out loud before you draw the line: "does one input have two outputs?" calls for a vertical line, and "do two inputs share one output?" calls for a horizontal line.
inverse function
A function that undoes another one. It takes each output of the first function back to the input it came from.
one-to-one function
A function in which no two different inputs share an output. Every output comes from exactly one input, so the function can be undone.
horizontal line test
A check done on a graph. If no horizontal line crosses the graph more than once, the function is a one-to-one function and has an inverse function.
1 In plain words
Think of a coat check. You hand over a coat, the input, and get a ticket number, the output. Later you hand back the ticket and the clerk walks it to your coat. That return trip is the inverse. It works only if no two coats got the same number. If two coats both carry ticket 7, the clerk holding a 7 cannot know which coat to bring. A function in which every output belongs to only one input is called a one-to-one function. On a graph you can see this with a ruler held flat. Slide it up the page. If it never touches the graph in two places at once, the function is one-to-one. That is the horizontal line test.
2 Picture it
Reminder
Reminder: What a function is, What means, Horizontal and vertical, Squaring a negative number, Order of operations, Solving a linear equation
- What a function is. Each input gets exactly one output. For f(x) = , the input 3 gives 9 and nothing else.
- What means. The inverse sends each output back to its input: f(a) = b gives (b) = a. If f(2) = 9, then (9) = 2.
- Horizontal and vertical. Horizontal means flat, like the horizon. Vertical means straight up and down. Every point on the horizontal line y = 4 has height 4.
- Squaring a negative number. A negative times a negative is positive: (−2 = (−2) × (−2) = 4, the same as .
- Order of operations. Work inside the parentheses first, then the power, then the adding: (0 − 1 + 2 = (−1 + 2 = 1 + 2 = 3.
- Solving a linear equation. Undo each step in reverse order, doing the same thing to both sides: 2a − 1 = 2b − 1, add 1 to get 2a = 2b, then divide by 2 to get a = b.
3 Why
An inverse function must itself be a function, so it must send each of its inputs to exactly one place. Suppose f(a) = b and f(c) = b with a and c different. Then (b) would have to equal a and also c. That is two outputs for one input, which no function allows. So a shared output blocks the inverse. The picture test says the same thing. Every point on a horizontal line has the same height, which means the same output. If the line meets the graph at two points, those are two different inputs with one output.
4 The rule
A function f is a one-to-one function when different inputs always give different outputs: f(a) = f(b) happens only when a = b.
A function has an inverse function exactly when it is one-to-one. Horizontal line test: a function is one-to-one exactly when no horizontal line meets its graph at more than one point.
The same idea, five ways
f is one to one. Every output comes from only one input.
A function is one-to-one when no two different inputs give the same output.
- f(a) = f(b) only when a = b
- a ≠ b gives f(a) ≠ f(b)
- every horizontal line y = c meets the graph at most once
A coat check where every coat gets its own ticket number, so every ticket leads back to exactly one coat.
The same idea, other ways
Look at the graph of y = . Lay a flat line across it at height 1 and it touches the graph twice, at x = −1 and x = 1. Lay it at height 4 and it touches twice again, at x = −2 and x = 2. Two touches at one height mean two inputs with the same output. One height with two touches is enough to say the function is not one-to-one.
A list sends each person to the month of their birthday. Going forward is fine: each person has one birthday month, so this is a function. Going backward breaks. If someone tells you only "May", you cannot say whether they mean Ana or Cal. Two arrows landing on the same output is what stops you from running the arrows in reverse.
Doubling: 3 goes to 6, and no other number doubles to 6. Ask "which number doubles to 6?" and there is one answer, 3. Doubling can be undone. Squaring: 3 goes to 9, and −3 also goes to 9, because (−3) × (−3) = 9. Ask "which number squares to 9?" and there are two answers. Squaring cannot be undone until you know more.
Undoing a function means answering one question for every output b: which input gave b? An inverse function needs that question to have exactly one answer every time. A one-to-one function is one where it always does. The horizontal line at height b is the picture of that question: it collects every point whose output is b. One meeting point is one answer. Two meeting points are two answers, and the undoing breaks.
Vertical asks: is it a function? Horizontal asks: has it an inverse function? Remember it as H for horizontal, H for has an inverse. A graph must pass the vertical test to be a function at all, and then pass the horizontal test for the function to be undone.
| Test | The line you slide | The question it answers | It fails when |
|---|---|---|---|
| Vertical line test | An up-and-down line, moved from left to right | Is this graph a function? Does each input have only one output? | Some vertical line meets the graph twice: one input, two outputs |
| Horizontal line test | A flat line, moved from bottom to top | Is this function one-to-one? Does each output come from only one input? | Some horizontal line meets the graph twice: two inputs, one output |
5 How
- Say the question in plain words: do any two different inputs share an output?
- From a table or a list of pairs: read along the outputs. A value that sits under two different inputs means the function is not one-to-one. No repeated output means it is one-to-one.
- From a graph: hold a horizontal line at the bottom of the picture and slide it to the top. If at any height it meets the graph at two or more points, the function is not one-to-one. If it meets the graph at most once at every height, the function is one-to-one.
- From a formula: look at its graph and use the horizontal line test, or write f(a) = f(b) and see whether that forces a = b.
- To say a function is not one-to-one, write down the proof: two different inputs and the output they share, such as f(−2) = 4 and f(2) = 4.
- State the conclusion about undoing: a one-to-one function has an inverse function, and a function that is not one-to-one does not.
Deciding whether a function is one-to-one
- Say what is being asked: do any two different inputs give the same output?
- Pick the tool that fits how the function is given: the output row of a table, a sliding horizontal line on a graph, or the equation f(a) = f(b) for a formula.
- Hunt for one tied pair: two different inputs with the same output. One pair settles it as not one-to-one.
- If you find no tied pair, give the reason none can exist: no repeat in the table, at most one meeting point at every height, or f(a) = f(b) forcing a = b.
- Finish with the conclusion about undoing: one-to-one means an inverse function exists, not one-to-one means it does not.
6 Worked example
Worked example
Can f(x) = − 3 be undone?
Decide whether f(x) = − 3 is a one-to-one function, and say whether it has an inverse function. In plain words: do any two different inputs give the same output?
Show the steps and the answer
- Look at the graph of f: a U shape with its lowest point at . is never negative and equals 0 only when x = 0, so the smallest output is 0 − 3 = −3. On either side of 0 the outputs climb.
- Lay a horizontal line across the graph at height 1. This is the line .Every point on that line has output 1, so wherever it meets the graph, the function's output is 1. Height 1 is above the lowest point, so the line cuts through both arms of the U.
- Read the meeting points: and (2, 1).The line crosses the left arm above x = −2 and the right arm above x = 2.
- Confirm with the formula: , and .Reading a graph by eye can be slightly off, and the formula settles it. (−2 = (−2) × (−2) = 4, because a negative times a negative is positive.
- Conclude that f is not a one-to-one function.Two different inputs, −2 and 2, share the output 1. One tied pair is enough.
- Conclude that f has no inverse function.(1) would have to be −2 and also 2, and a function gives only one output for each input.
- f(x) = − 3 is not a one-to-one function, because f(−2) = 1 and f(2) = 1.
- It fails the horizontal line test, so it has no inverse function.
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 5
A table with no repeats
The table shows a function f. Is f a one-to-one function? In plain words: does any output appear under two different inputs?
Show the steps and the answer
- Read the output row of the table: 5, 9, 2, 7.One-to-one is a question about outputs, so the output row is the place to look.
- Look for a value that appears twice. There is none.5, 9, 2 and 7 are four different numbers.
- Conclude that f is one-to-one.No two inputs share an output.
Rung 2 of 5
A table with a repeat
The table shows a function h. Is h a one-to-one function? In plain words: does any output appear under two different inputs?
Show the steps and the answer
- Read the output row of the table: 4, 9, 5, 9, 1.A shared output can only show up as a repeat in this row.
- Spot the two 9s. One sits under the input 1 and the other under the input 3.The table says h(1) = 9 and h(3) = 9.
- Conclude that h is not one-to-one.Two different inputs, 1 and 3, share the output 9.
- Notice that h is still a function.Each input in the top row has one output below it. Repeated outputs are allowed in a function. They only stop it from being one-to-one.
- No. h(1) = 9 and h(3) = 9, so h is not a one-to-one function.
- It has no inverse function.
Rung 3 of 5
A slanted straight line
Is f(x) = 2x − 1 a one-to-one function? In plain words: can two different inputs ever give the same output?
Show the steps and the answer
- Look at the graph: a straight line that climbs steadily from left to right.Each step of 1 to the right adds 2 to the output: f(0) = −1, f(1) = 1, f(2) = 3.
- Lay the horizontal line across it. It meets the graph once, at (2, 3).A climbing line passes through each height one time and never comes back to it.
- Slide the horizontal line to any other height. There is still one meeting point.The line keeps climbing to the right and keeps falling to the left, so it reaches every height exactly once.
- Conclude that f passes the horizontal line test.No horizontal line meets the graph at more than one point.
Rung 4 of 5
A curve that still passes
Is f(x) = a one-to-one function? In plain words: do any two different inputs give the same cube? The gotcha: a graph does not have to be straight to pass.
Show the steps and the answer
- Test the tempting pair, 2 and : and .With squaring, opposite inputs tied. Cubing uses three factors: (−2) × (−2) = 4, then 4 × (−2) = −8, so the negative sign survives. The outputs 8 and −8 are different.
- Lay the horizontal line across the graph. It meets the graph only at (2, 8).The point for x = −2 is far below, at height −8, not at height 8.
- Slide the line to other heights. There is one meeting point each time.The graph climbs the whole way from left to right. It flattens near x = 0 but never turns back down, so it never returns to a height it has already passed.
- Conclude that f passes the horizontal line test.No horizontal line meets the graph at more than one point.
Rung 5 of 5
Opposite inputs are not the only pair to try
Is f(x) = (x − 1 + 2 a one-to-one function? In plain words: do any two different inputs give the same output? The gotcha: the tied pair is not 2 and −2 this time.
Show the steps and the answer
- Try 2 and : , and .This is the pair that tied for . Here the outputs are 3 and 11, which differ. That does not show the function is one-to-one: one pair that differs proves nothing.
- Look at the graph: a U shape with its lowest point at (1, 2).(x − 1 is 0 when x = 1 and positive for every other x, so the smallest output is 0 + 2 = 2, at x = 1. The U is centered on x = 1, not on x = 0.
- Lay the horizontal line across it. It meets the graph at (0, 3) and (2, 3).Any height above the lowest point cuts both arms of a U. The meeting points sit the same distance on either side of x = 1: one unit to the left and one unit to the right.
- Confirm with the formula: , and from the first step.The formula settles what the eye read from the graph.
- Conclude that f is not one-to-one and has no inverse function.Two different inputs, 0 and 2, share the output 3, so (3) would need to be two numbers.
- No. f(0) = 3 and f(2) = 3, so f(x) = (x − 1 + 2 is not a one-to-one function.
- It has no inverse function.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Memory device: vertical asks "is it a function?", horizontal asks "has it an inverse function?". H for horizontal, H for has an inverse.
- Use the edge of a sheet of paper as the horizontal line. Hold it flat and slide it up the graph, watching for a height where it touches twice.
- A horizontal line that misses the graph, or touches it once, is fine. Only two or more meeting points on one line is a fail.
- To show a function is not one-to-one you need only one tied pair. Write it down as proof, for example f(−2) = 4 and f(2) = 4.
- In a table, only the output row decides one-to-one. Scan it for a repeated value.
- A graph in one unbroken piece that only climbs as you read left to right, or only falls, always passes. One that turns around, down then up or up then down, always fails.
- Opposite inputs such as 2 and −2 are a good first pair to try, but they are not the only pair. For a U shape, try two inputs the same distance on either side of its lowest point.
- Failing the test is not the end of the story. A later lesson keeps one piece of such a graph so that an inverse function exists.
7 The trap
Using the wrong line. A vertical line tests whether a graph is a function at all. A horizontal line tests whether that function is one-to-one. The graph of y = passes the first test and fails the second. Say the question out loud before you draw the line: "does one input have two outputs?" calls for a vertical line, and "do two inputs share one output?" calls for a horizontal line.
Flash cards
Say the answer out loud, then flip.
What makes a function a one-to-one function?
A horizontal line meets a graph at two points. What does that tell you?
Vertical line or horizontal line: which one answers which question?
- Vertical line: does one input have two outputs? It tests whether the graph is a function at all.
- Horizontal line: do two inputs share one output? It tests whether the function is one-to-one.