---
title: "Horizontal Line Test — AP Precalc Definition & Guide"
description: "The horizontal line test checks if a function is one-to-one: if any horizontal line hits the graph twice, no inverse exists. Core to AP Precalc Topic 2.8."
canonical: "https://fiveable.me/ap-pre-calc/key-terms/horizontal-line-test"
type: "key-term"
subject: "AP Pre-Calculus"
unit: "Unit 2"
---

# Horizontal Line Test — AP Precalc Definition & Guide

## Definition

The horizontal line test is a graphical check for whether a function is one-to-one (and therefore invertible): if every horizontal line crosses the graph at most once, each output comes from exactly one input, so the function has an inverse on that domain (AP Precalc Topic 2.8, EK 2.8.A.1).

## What It Is

The horizontal line test is a quick visual way to answer one question. Does each [output](/ap-pre-calc/unit-1/change-tandem/study-guide/eQFiTo22fpkDFsnj "fv-autolink") of a function come from exactly one input? Sweep an imaginary horizontal line up and down the graph. If that line ever crosses the graph in two or more places, the function repeats an output value, so it is not one-to-one and has no inverse function on that [domain](/ap-pre-calc/key-terms/domain "fv-autolink"). If every horizontal line hits the graph at most once, the function is one-to-one and invertible.

Here's the intuition behind why it works. An inverse function runs the original function backward, sending each output b back to the input a that produced it (EK 2.8.A.2). If a horizontal line at height b crosses the graph twice, then b was produced by two different inputs, and the "[reverse mapping](/ap-pre-calc/unit-2/inverse-functions/study-guide/JkTPSAR9TH5LfSXP "fv-autolink")" wouldn't know which input to send b back to. That's exactly the failure described in EK 2.8.A.1. The fix is domain restriction. Take g(x) = x², which fails the test on (−∞, ∞) because the line y = 4 hits the graph at both x = −2 and x = 2. Restrict the domain to [0, ∞) and every horizontal line hits at most once, so the inverse √x exists.

## Why It Matters

The horizontal line test lives in **Topic 2.8 (Inverse Functions)** in [Unit 2](/ap-pre-calc/unit-2 "fv-autolink") and supports learning objective **[AP Pre Calc](/ap-pre-calc "fv-autolink") 2.8.A** (determine the input-output pairs of the inverse of a function) and **AP Pre Calc 2.8.B** (determine the inverse on an invertible domain). It's the graphical version of EK 2.8.A.1, the rule that a function is invertible only when each output is mapped from a unique input. It also explains why Unit 2 is built the way it is. Exponential functions like b^x pass the horizontal line test everywhere, which is precisely why logarithmic functions exist as their inverses. Without this test, the whole exponential-log pairing that drives Unit 2 has no foundation.

## Connections

### [One-to-one function (Unit 2)](/ap-pre-calc/key-terms/one-to-one-function)

The horizontal line test and one-to-one are the same idea in two languages. "One-to-one" is the algebraic statement (no output repeats), and the horizontal line test is what that statement looks like on a graph. Passing the test is the definition of one-to-one, drawn.

### [Invertible function (Unit 2)](/ap-pre-calc/key-terms/invertible-function)

Passing the horizontal line test on a domain means the function is [invertible](/ap-pre-calc/key-terms/invertible-function "fv-autolink") there. When a graph fails the test, you don't give up. You restrict the domain to a piece that passes, which is how x² on [0, ∞) earns its inverse √x.

### [Composite function (Unit 2)](/ap-pre-calc/key-terms/composite-function)

Once the test confirms an inverse exists, composition is how you verify you found the right one. EK 2.8.B.1 says f(f⁻¹(x)) = f⁻¹(f(x)) = x. The horizontal line test tells you an inverse exists; composition proves a specific formula actually is that inverse.

### Exponential and logarithmic functions (Unit 2)

[Exponential functions](/ap-pre-calc/unit-2/exponential-functions/study-guide/5hZXVBTYwi72vxCy "fv-autolink") are strictly increasing or strictly decreasing, so they pass the horizontal line test on their entire domain. That's the structural reason logarithms exist at all. log_b(x) is the inverse that the test guarantees.

## On the AP Exam

Multiple-choice questions hit this concept from two angles. Some ask directly which test determines whether a function is one-to-one graphically (answer: the horizontal line test, not the vertical one). Others give you a function like g(x) = x² and ask you to evaluate an invertibility claim or pick an appropriate domain restriction, where the winning answer is the one that recognizes repeated outputs (g(−2) = g(2) = 4) and restricts to something like [0, 5] or [0, ∞). On the free-response side, the 2024 FRQ Q1 gave a graph of f passing through (−3, 1), (0, 1), and (3, 1), three different inputs sharing the output 1. That's a graph failing the horizontal line test at y = 1, and it's exactly the setup for reasoning about whether f is invertible. Be ready to do three things: apply the test to a graph, explain in a sentence why failing it kills invertibility, and propose a domain restriction that fixes the problem.

## horizontal line test vs vertical line test

The vertical line test checks whether a graph is a function at all (each input gives one output). The horizontal line test assumes you already have a function and checks whether it's one-to-one (each output comes from one input). Here's the connection that makes it click: a function passes the horizontal line test exactly when its reflection over y = x would pass the vertical line test. In other words, the horizontal line test on f is really the vertical line test on f⁻¹, since inverting swaps the roles of the x- and y-axes (EK 2.8.B.3).

## Key Takeaways

- If any horizontal line crosses a graph more than once, the function is not one-to-one and has no inverse function on that domain.
- The test works because an inverse reverses outputs back to inputs, and a repeated output would have two inputs to go back to, which breaks the reverse mapping.
- Failing the test isn't final; you can restrict the domain (like limiting x² to [0, ∞)) so the function becomes one-to-one and invertible (EK 2.8.A.1).
- Don't mix it up with the vertical line test, which checks whether a graph is a function in the first place, not whether it has an inverse.
- Exponential functions pass the horizontal line test everywhere, which is why logarithmic functions exist as their inverses in Unit 2.
- On the exam, the strongest justification names the repeated output explicitly, like g(−2) = g(2) = 4, rather than just saying 'it fails the test.'

## FAQs

### What is the horizontal line test in AP Precalculus?

It's a graphical check for [invertibility](/ap-pre-calc/unit-4/inverse-determinant-matrix/study-guide/5R16yv2jjzGKkQ3H "fv-autolink") from Topic 2.8. If every horizontal line intersects a function's graph at most once, the function is one-to-one and has an inverse; if any horizontal line hits the graph twice or more, it doesn't.

### Does failing the horizontal line test mean a function can never have an inverse?

No. It only means the function isn't invertible on its current domain. EK 2.8.A.1 says you can restrict the domain to make it invertible, which is exactly how x² on [0, ∞) gets the inverse √x.

### What's the difference between the horizontal line test and the vertical line test?

The vertical line test checks whether a graph is a function at all, while the horizontal line test checks whether an existing function is one-to-one and therefore invertible. A graph can pass the vertical test but fail the horizontal one, like y = x².

### Why does x² fail the horizontal line test?

Because outputs repeat. The horizontal line y = 4 crosses the parabola at both x = −2 and x = 2, so the output 4 has two possible inputs and a reverse mapping can't pick one. Restricting the domain to [0, ∞) or (−∞, 0] fixes it.

### How do I justify invertibility on an AP Precalc FRQ?

Point to specific repeated outputs, not just the test's name. The 2024 FRQ Q1 graph passed through (−3, 1), (0, 1), and (3, 1), and noting that three inputs share the output 1 is the kind of concrete evidence that earns the point.

## Related Study Guides

- [2.8 Inverse Functions](/ap-pre-calc/unit-2/inverse-functions/study-guide/JkTPSAR9TH5LfSXP)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-pre-calc/key-terms/horizontal-line-test#resource","name":"Horizontal Line Test — AP Precalc Definition & Guide","url":"https://fiveable.me/ap-pre-calc/key-terms/horizontal-line-test","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-pre-calc/key-terms/horizontal-line-test#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-11T05:27:28.387Z","isPartOf":{"@type":"Collection","name":"AP Pre-Calculus Key Terms","url":"https://fiveable.me/ap-pre-calc/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/ap-pre-calc/key-terms/horizontal-line-test#term","name":"horizontal line test","description":"The horizontal line test is a graphical check for whether a function is one-to-one (and therefore invertible): if every horizontal line crosses the graph at most once, each output comes from exactly one input, so the function has an inverse on that domain (AP Precalc Topic 2.8, EK 2.8.A.1).","url":"https://fiveable.me/ap-pre-calc/key-terms/horizontal-line-test","inDefinedTermSet":{"@type":"DefinedTermSet","name":"AP Pre-Calculus Key Terms","url":"https://fiveable.me/ap-pre-calc/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the horizontal line test in AP Precalculus?","acceptedAnswer":{"@type":"Answer","text":"It's a graphical check for [invertibility](/ap-pre-calc/unit-4/inverse-determinant-matrix/study-guide/5R16yv2jjzGKkQ3H \"fv-autolink\") from Topic 2.8. If every horizontal line intersects a function's graph at most once, the function is one-to-one and has an inverse; if any horizontal line hits the graph twice or more, it doesn't."}},{"@type":"Question","name":"Does failing the horizontal line test mean a function can never have an inverse?","acceptedAnswer":{"@type":"Answer","text":"No. It only means the function isn't invertible on its current domain. EK 2.8.A.1 says you can restrict the domain to make it invertible, which is exactly how x² on [0, ∞) gets the inverse √x."}},{"@type":"Question","name":"What's the difference between the horizontal line test and the vertical line test?","acceptedAnswer":{"@type":"Answer","text":"The vertical line test checks whether a graph is a function at all, while the horizontal line test checks whether an existing function is one-to-one and therefore invertible. A graph can pass the vertical test but fail the horizontal one, like y = x²."}},{"@type":"Question","name":"Why does x² fail the horizontal line test?","acceptedAnswer":{"@type":"Answer","text":"Because outputs repeat. The horizontal line y = 4 crosses the parabola at both x = −2 and x = 2, so the output 4 has two possible inputs and a reverse mapping can't pick one. Restricting the domain to [0, ∞) or (−∞, 0] fixes it."}},{"@type":"Question","name":"How do I justify invertibility on an AP Precalc FRQ?","acceptedAnswer":{"@type":"Answer","text":"Point to specific repeated outputs, not just the test's name. The 2024 FRQ Q1 graph passed through (−3, 1), (0, 1), and (3, 1), and noting that three inputs share the output 1 is the kind of concrete evidence that earns the point."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AP Pre-Calculus","item":"https://fiveable.me/ap-pre-calc"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/ap-pre-calc/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 2","item":"https://fiveable.me/ap-pre-calc/unit-2"},{"@type":"ListItem","position":4,"name":"horizontal line test"}]}]}
```
