Vertical and Horizontal Lines
There are two types of lines that don't easily fit into the "slope and intercept" view that we've seen throughout the previous sections in the class: vertical lines and horizonal lines. We've summarized some basic facts about these lines in the two tables below.
Vertical LinesPoints on the Line All of the points on the line will have the same x value so, if you're given two points like (2, 5) and (2, 6), you can tell the line is vertical because their xcoordinates are the same. The Equation The equation of a vertical line has an x variable but no y variable, e.g. x = 2. Slopes Pick any two points on the line and they'll have the same xcoordinate. This means the denominator of the slope formula will be 0 so the line's slope is undefined. 
Horizontal LinesPoints on the Line All of the points on the line will have the same y value so, if you're given two points like (3, 5) and (2, 5), you can tell the line is vertical because their ycoordinates are the same. The Equation The equation of a horizontal line has a y variable but no x variable, e.g. y = 5. Slopes Pick any two points on the line and they'll have the same ycoordinate. This means the numerator of the slope formula will be 0 so the line's slope must be 0. 
Examples
Example 1Find the equation of the line through the points (2, 7) and (4, 7). The first thing we need to do is find the line's slope. Now we can substitute that into the slopeintercept form of the equation and we're half way there. y = 0 · x + b = b Now, I'll take the second point (it doesn't matter which you chose) and substitute it's y value into our partial equation. 7 = b If we substitute that into our "half equation", we get the equation of the line: y = 7 
Example 2Find the equation of the line through the points (4, 1) and (3, 1). You can start this process the same way as example one but, if you're a little observant, you can make the process a little faster. If you look closely at the points, you'll see that they both have the same ycoordinate. Since the line is vertical and we know that the equation of a vertical line looks like y = (a number) we can jump right to our equation: y = 1 I got the 1 from the ycoordinate of the points. Example 3Find the equation of the line through the points (3, 1) and (3, 4). At this point, our two formulas, pointslope and slopeintercept, are going to fail us. Neither of them is any use when the slope is undefined. At this point, you have to just realize that the line is vertical so the equation will be: x = 3 Where the 3 is the common xcoordinate of the two points. 
Videos
