Calculus: Early Transcendentals (2nd Edition)

A function $f$ that is not one-to-one will fail the horizontal line test.
A function $f$ that is not one-to-one will have multiple $x$ values for one $y$ value, which means a horizontal line (a line parallel to the $x$-axis) connecting two points on the graph of said function can be drawn. Since this can be done, a function $f$ that is not one-to-one is said to fail the horizontal line test meaning it cannot have an inverse function.