A horizontal line is a line that runs parallel to the x-axis. An example can be seen in the diagram below.
Every point on the line above has y-coordinate 2. In fact, the rule for this function is y=2. Notice that this looks different than most linear functions. The slopem of a line is the quotient between the rise and the run between any two of its points.
m=runrise
In the graph above, it can be seen that the line does not rise. In other words, the vertical change between any two points is 0. Therefore, its slope is 0. In fact, all horizontal lines have slope m=0. The slope-intercept form of horizontal lines can be written as follows.
y=0⋅x+b⇔y=b
Therefore, all horizontal lines can be written in this form, where b is the y-intercept.