Illustrated · 2 min
Horizontal Line Test
Similar to the vertical line test, we also have a horizontal line test.
If we have a function, we can use the horizontal line test to tell if the function is one-to-one. One-to-one means that for every specific input, the function has a specific output. This also means the function's inverse is also a function.
The process is the same as the vertical line test. We draw horizontal lines and see how many places they intersect our graph. If its at, at most, one point, then our function is one-to-one and we know its inverse is a function.
One-to-one Function
Suppose we want to know if the following function is one-to-one: First, we graph the function. This is a cubic function.

Made using Desmos
Then, we draw some horizontal lines through it and see where they intersect.

Made using Desmos
Each of our lines only intersect the graph at, at most, one point. Therefore, we know this function is one-to-one.
This means the function's inverse is also a function. Let's find the inverse and see.
To find the inverse, we swap the and variables and solve for again. Here is our inverse function. If we graph this and apply the vertical line test, we will see it passes and is a function.
To get to this inverse function, you may want to review the Addition and Subtraction Property of Equality, the Multiplication and Division Property of Equality, cube roots,

The inverse passes the vertical line test so it's a function.
Made using Desmos
Not a One-to-one Function
Let's look at an example that doesn't pass the horizontal line test.
Start by graphing the function.

Made using Desmos
Next, draw horizontal lines through it.

Made using Desmos
While one of our horizontal lines goes through only one point, the others we draw will go through two. This means our function is not one-to-one. Our function fails the horizontal line test.
If we graph its inverse, it will not be a function and won't pass the vertical line test.
Let's take a look. Again, we swap the and variables and solve for .

The inverse doesn't pass the vertical line test so it's not a function.
Made using Desmos
Even this graph isn't a function, it is still a relation!















