# What is the horizontal line test?

In January of this year, we have discussed about the vertical line test. We have learned that if a vertical line intersect a graph more than once, then that graph is not a function. In this post, we learn about the horizontal line test and its relation to inverse functions.

Suppose we have a function $f$. Then, we input $x$ and call the output $f(x)$. If we do things backward, suppose we have the number $y$ which is in the range of $f$. What value should we input to $f$ to get $y$? Let’s have a more specific example.

Suppose we have the function $f(x) = x^2$. And we choose the number $y = 9$ which is in the range of $f$. What number should we input in $f$ to get $9$? Well, we will have two numbers, those are $3$ and $-3$.

On the other hand, suppose we have the function $g(x) = x^3$. And we choose the number $y = 8$. What number should we input in $g$ to get $8$? We only have one and only one number which is equal to $2$. Now this is true for any $y$ in $g$ since there is only one cube root of any number.

Now if there is one and only one value of $x$ which satisfies $f(x) = y$ for each $y$, then we can define a new function which reverses the transformation. Given the output $y$, there is one and only one input $x$ that results to $y$. This function is called the inverse function.

Notice from the graph of $f$ below the representation of the values of $x$. Graphically, $y = 9$ is a horizontal line, and the inputs $x = 3$ and $x = -3$ are the values $x$ at the intersection of the graph and the horizontal line. In fact, if you put a horizontal line at any part of the graph except at $y = 0$, there are always 2 intersections. As we have learned in functions, for every input, there is exactly one output and hence reversing $f(x) = x^2$ will have two outputs. Thus, it cannot qualify as a function and therefore it has no inverse function.

However, if we examine the graph of $g(x) = x^3$, a horizontal line can only intersect it at one point regardless of where you place it. Therefore, $g$ has an inverse function.

From the discussion above, we can conclude that we can use horizontal lines to test whether a function has an inverse or none. That is, if every horizontal line intersects the function at most once, then the function has an inverse; otherwise, it has no inverse function. This method is called the horizontal line test.

## 2 thoughts on “What is the horizontal line test?”

1. I like the illustartion and how it was discussed and explain. Direct and informative. More power.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 37, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9680125117301941, "perplexity": 96.94937966156236}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-13/segments/1490218188553.49/warc/CC-MAIN-20170322212948-00270-ip-10-233-31-227.ec2.internal.warc.gz"}