What is a horizontal line?
Boost your knowledge of geometry and graphs with this guided lesson on horizontal lines.

Author
Tess Loucka

Published:
March 2025
Key takeaways
- • Horizontal lines are straight lines that move from left to right, just like the surface of the Earth when you look out at the horizon.
- • The slope of a horizontal line is always 0.
- • Every horizontal line is written with the equation y = b, where b represents the number at which the line crosses the y-axis.
A horizontal line is a straight line that lies flat, spanning from left to right.
The word “horizontal” sounds very similar to a word you may already be familiar with – “horizon.” The horizon is the line on the surface of the Earth that the sun appears to meet when it sets. The horizon is a horizontal line.
Properties of horizontal lines
In some cases, a line may look horizontal, but isn’t. So, what is a horizontal line really? Let’s go over the properties of horizontal lines:
- First, horizontal lines always have a slope of 0. Any line with a slope other than 0 cannot be classified as a horizontal line.
- Secondly, the equation of every horizontal line must follow the form y = b, where b is the y-value at which the line crosses the y-axis. No x-value is necessary in the equation because the x-coordinate of a horizontal line can be anything without affecting the y-coordinate.
Horizontal line examples
Horizontal lines exist all around us. We already talked about how they exist in nature with the example of the horizon, but they also exist in many human-made objects. Look at the image below.
Are any of its lines horizontal?

In math, the most obvious example of a horizontal line is the x-axis on an x,y graph.

In the example above, the horizontal line crosses the y-axis at 4 and goes straight across the graph from left to right, never moving up or down. That’s why the equation of this line is y = 4.
Table of contents
Strengthen your math skills with DreamBox
Turn math into playtime with DreamBox Math
DREAMBOX MATH
Get started for FREE today!

Difference between horizontal and vertical lines
Horizontal and vertical lines are, in many ways, the opposite of each other. While horizontal lines go from left to right, vertical lines go up and down.
Vertical lines always have an undefined slope, unlike horizontal lines which have a slope of 0.
Vertical lines are written with the equation x = a, with a representing the point on the x-axis at which the line crosses. No y-value is included in the equation because the y-coordinate of a vertical line can be anything.
As stated before, horizontal lines are written in the form y = b, with b representing the point on the y-axis at which the line crosses.
When horizontal lines and vertical lines cross each other, as the x-axis and y-axis do at the point (0,0), we call them intersecting lines. Since the angles created by intersecting horizontal and vertical lines are 90°, we can also call them perpendicular lines.
Advanced topics
Now that we know the basics, let’s get into the details.
You can explore math web apps, worksheets, or guides to complete practice questions, read through detailed explanations, and see how horizontal lines are used in various fields of mathematics.
Equation of a horizontal line
As you know, the equation of a horizontal line is y = b, but let’s think this through.
Horizontal lines exist on one single y-value. No matter the x-value, the y-value will always stay the same because a horizontal line does not move up or down. For instance, the line y = -7 can have any x-value, but its y-value will always be -7.
For this reason, the horizontal line equation does not include x-values, as a change in the x-value does not affect the y-value.
Which graph below is represented by the equation y = 5?

If you guessed option 2, you’re right! The line crosses the y-axis at the point (0,5) and completely exists on y = 5, moving left to right without straying up or down.
No matter the x-value, the y-value will always be 5.
Slope of a horizontal line
When asked what is the slope of a horizontal line, the answer will always be 0. But why is that?
Well, the equation of any slope follows the form slope = rise/run. Let’s fill in this equation with information from a horizontal line. We can use the same example from the section above, y = 5.

Using the two labeled points, (3,5) and (4,5), we can see that the rise of this line is 0 and the run is 1.

The rise of any horizontal line will always be 0, and 0 divided by any number will always be 0. Therefore, the slope of all horizontal lines is 0.
Horizontal line test
Horizontal lines can be used in math not only to create shapes and fill in graphs, but as a tool to test for one-to-one, or injective, functions.
One-to-one functions are functions in which every x-value must have a different y-value and vice versa. This is unlike other functions which can have multiple x-values for the same y-value.

If a horizontal line can pass through the entirety of the graph without touching two points at the same time, the function is one-to-one.
If a horizontal line does touch two points at once, the function cannot be one-to-one.

The math program that drives results
Get started today!
DreamBox adapts to your child’s level and learning needs, ensuring they are appropriately challenged and get confidence-building wins.
Horizontal line practice problems
Question 1: What is the equation of the following line?

Answer: y = -2
Question 2: What is the slope of any horizontal line? Why?
Answer: The slope is 0 because the rise of a horizontal line will always be 0 and 0 divided by any number is 0.
Question 3: Is the following function a one-to-one function? Why or why not?

Answer: No, it is not a one-to-one function because it fails the horizontal line test. There are multiple x-values for the same y-value.
Parent guide
Question 1: The form of the horizontal line equation is y = b, where b is the y-value at which the horizontal line crosses the y-axis. The graph shows a horizontal line crossing the y-axis at -2. Therefore, the equation must be y = -2.
Question 2: The equation of slope is slope = rise/run. Since the rise of a horizontal line will always be 0, it doesn’t matter what the run of the line is, because 0 divided by any number is 0. Therefore, the slope of any horizontal line will be 0.
Question 3: Conduct a horizontal line test on the graph provided. After overlaying a horizontal line, you can see that the function does not pass the test. A horizontal line touches two or more points at a time, meaning the function is not one-to-one.
FAQs about horizontal lines
There is no symbol in math used to express a horizontal line. However, a horizontal line, also called a vinculum, can be used to indicate many things including line segments, repeating decimals, complex numbers, and more.
The horizontal line test is a test used to determine whether a function is or is not one-to-one, or injective.
The slope for all horizontal lines is 0.
Take at home math practice to the next level
Empowering parents and educators to make math practice more impactful. Plus, your kids will love it.
