Horizontal Line Test Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Horizontal Line Test.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

A graph passes the horizontal line test if every horizontal line intersects it at most once.

A horizontal line that crosses the graph at two points means those two inputs produce the same output β€” the function is many-to-one and has no inverse without domain restriction.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: The horizontal line test checks one-to-one: if every horizontal line intersects the graph at most once, the function has a well-defined inverse.

Common stuck point: The vertical line test checks if a graph IS a function; the horizontal line test checks if it has an inverse β€” these are different questions requiring different tests.

Sense of Study hint: Use vertical test for β€œis function”; horizontal test for β€œhas inverse.”

Worked Examples

Example 1

easy
Use the horizontal line test to determine whether f(x) = 2x + 5 is one-to-one.

Solution

  1. 1
    The graph of f(x) = 2x + 5 is a straight line with slope 2 (nonzero).
  2. 2
    Any horizontal line y = c intersects a non-horizontal line at most once.
  3. 3
    Since every horizontal line crosses the graph at most once, f passes the horizontal line test and is one-to-one.

Answer

\text{Yes, } f(x) = 2x + 5 \text{ is one-to-one.}
The horizontal line test states: a function is one-to-one if and only if no horizontal line intersects its graph more than once. One-to-one functions have inverses. All linear functions with nonzero slope are one-to-one.

Example 2

medium
Does f(x) = |x - 2| pass the horizontal line test? Explain algebraically.

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

medium
Which of the following functions are one-to-one: (a) f(x) = x^3, (b) g(x) = x^3 - 3x, (c) h(x) = e^x?

Example 2

hard
Prove algebraically that f(x) = \frac{x}{x+1} (for x > -1) is one-to-one without graphing.

Background Knowledge

These ideas may be useful before you work through the harder examples.

inverse functionone to one mappingfunction notation