# Horizontal Line Test

The **horizontal line test** is a convenient method that can determine whether a given function has an inverse, but more importantly to find out if the inverse is also a function.

Remember that it is very possible that a function may have an inverse but at the same time, the inverse is not a function because it doesn’t pass the vertical line test.

So here’s the deal!

If the horizontal line intersects the graph of a function in all places **at exactly one point**, then the given function should have an *inverse that is also a function*. We say this function **passes** the horizontal line test.

Here are some examples of functions that pass the horizontal line test:

## Horizontal Line Cutting or Hitting the Graph at Exactly One Point

- Graph of the line f\left( x \right) = - x + 2.

- Graph of the square root function f\left( x \right) = \sqrt {x + 1}

- Graph of the rational function \large{f\left( x \right) = {1 \over {x + 1}}}.

On the other hand, if the horizontal line can intersect the graph of a function in some places at **more than one point**, then the function involved can’t have an inverse that is also a function.

We say this function fails the horizontal line test.

Here are some examples of functions that **fail** the horizontal line test:

## Horizontal Line Cutting or Hitting the Graph at More Than One Point

- Graph of the parabola f\left( x \right) = {x^2} - 2.

- Graph of absolute value function f\left( x \right) = \left| x \right|

- Graph of semi-circle f\left( x \right) = \sqrt {7 - {x^2}}

**You might also be interested in:**