What is Horizontal Line? (Definition, Equation, Slope with Examples) - BYJUS

Horizontal Line

The term "sleeping lines" refers to horizontal lines. Horizontal lines are those that are parallel to the x-axis in a coordinate plane. Horizontal lines can be found on the steps of a staircase or a ladder, sides of a table and other places. Let's look at the properties of horizontal lines, as well as its equation and slope. ...Read MoreRead Less

Select your child's grade in school:

What is a Horizontal Line?

A horizontal line is a straight line with only a y-intercept and not any x-intercept. Hence the equation of a horizontal line is always of the form y = awhere the y-intercept or the y-coordinate of the point the line passes through the y-axis is represented by the letter a.


The following are some examples of horizontal line equations:

  • y = 3
  • y = -2
  • y = -7
  • y = 6
  • y = 2






Slope of Horizontal Line

Consider a horizontal line: In a horizontal line the y-coordinate remains the same, only the x-coordinate varies. Hence, any two points on the line can be written as \((x_1, y)\) and \((x_2, y)\).


Slope of any line, \(m=\frac{y_2~-~y_1}{x_2~-~x_1}\)




m = 0


It can be seen that horizontal lines have the same slopes as their slope is always zero.

Horizontal and Vertical Lines

Horizontal lines are parallel to the x-axis and drawn from side to side (left to right or right to left). Vertical lines are parallel to the y-axis and are drawn from top to bottom or bottom to top. Hence, vertical and horizontal lines are always perpendicular to each other.

Solved Examples on Horizontal Line

Example 1:

Find the equation of the horizontal line that passes through (0, 4).




(0,4) denotes that when the x-coordinate is 0, the y-coordinate is 4. Hence the y-intercept is 4.


A horizontal line’s general equation is y = k where the yintercept is “k”.


Here, the value of k = 4.


As a result, the given horizontal line’s equation is y = 4.




Example 2:

From the image, recognize the horizontal line segments in the shape.





The horizontal lines are sleeping lines.


Therefore in the given shape, the horizontal line segments are AB, EF and CD.

Frequently Asked Questions

A horizontal line is one that runs parallel to the x-axis and has the same y coordinate throughout. The horizontal line’s equation is y = b where the coordinates of the y-intercept is (0, b).

A horizontal line has no vertical change, so its slope is zero. On the coordinate plane, a horizontal line is parallel to the x-axis so the y coordinate remains constant throughout. Hence there is no rise in the line. As a result, the horizontal line has no slope.

If an equation if of the form y = b, then we can say that it is a horizontal line that passes through the point (0, b).

If a line is vertical, it will be parallel to the y-axis and will have no y-intercept. Hence a vertical line is of the form x = c, where the line passes through the point (c, 0).