Horizontal lines have a slope of 0. Thus, in the slope-intercept equation y = mx + b, m = 0. The equation becomes y = b, where b is the y-coordinate of the y-intercept.

Example 1: Write an equation for the following line:

Since y always takes the value -1, an equation for the line is y = - 1.

Example 2: Write an equation for the horizontal line that passes through (6, 2).

Since the line is horizontal, y is constant--that is, y always takes the same value. Since y takes a value of 2 at the point (6, 2), y always takes the value 2. Thus, the equation is y = 2.

Vertical Lines

Similarly, in the graph of a vertical line, x only takes one value. Thus, the equation for a vertical line is x = a, where a is the value that x takes.

Example 3: Write an equation for the following line:

Since x always takes the value 2 = , the equation for the line is x = .

Example 4: Write an equation for the vertical line that passes through (6, 2).

Since the line is vertical, x is constant--that is, x always takes the same value. Since x takes a value of 6 at the point (6, 2), x always takes the value 6. Thus, the equation is x = 6.