Graphing Lines

Types of Lines

Vertical and Horizontal Lines

Equations of vertical and horizontal lines are based on an undefined or zero slope. Vertical lines have the form x=ax = a, and horizontal lines have the form y=by = b, where aa and bb are real numbers.

The equations of horizontal and vertical lines look slightly different from the equations of other lines.

On a vertical line, every point has the same xx-coordinate. For any two points on the line, the change in the xx-values, or run, is zero. So, the denominator is zero in the slope formula:
m=RiseRunm=\frac{\text{Rise}}{\text{Run}}
Therefore, the slope of a vertical line is undefined. The equation of the line cannot be written in slope-intercept form. To write the equation of a vertical line, consider several points on the line. If the xx-intercept is aa, then the point (a,0)(a,0) is on the line. So are the points (a,1)(a, 1), (a,2)(a, 2), (a,3)(a, 3), and so on. The xx-value of every point on the line is aa. So, the equation is written as x=ax = a. On a horizontal line, every point has the same yy-coordinate. For any two points on a horizontal line, the change in the yy-values, or rise, is zero. So, the slope formula has a numerator of zero. Therefore, the slope of a horizontal line is zero. If the yy-intercept is bb, the equation of a horizontal line can be written in slope-intercept form as:
y=0x+by=b\begin{aligned}y&=0x+b\\y&=b\end{aligned}
Vertical Line Horizontal Line
  • Every point on the line has an xx-coordinate of 5.
  • The slope of the line is undefined, and there is no yy-intercept, so the line cannot be written in slope-intercept form.
  • The equation of the line is x=5x=5.
  • Every point on the line has a yy-coordinate of –3.
  • The slope of the line is zero, and the yy-intercept is –3. The slope-intercept form is y=0x3y=0x-3.
  • The equation of the line is y=3y=-3.

Parallel Lines

Parallel lines have the same slope, but different yy-intercepts.
Parallel lines are lines in the same plane that do not intersect. If two parallel lines are not vertical, they must have the same slope. Vertical lines have a slope that is undefined. Any pair of vertical lines are parallel.
The graphs show examples of parallel lines. In the graph showing y=3x+5y=3x+5 and y=3x2y=3x-2, both lines have a slope of 3. In the graph showing y=4y=4 and y=1y=-1, both lines have a slope of zero.
The point-slope form is commonly used to find the equation of a line parallel to another line that passes through a given point. Determine the slope of the given line, and substitute the slope and the coordinates of the point into the point-slope form:
yy1=m(xx1)y-y_1=m(x-x_1)
Step-By-Step Example
Determining the Equation of a Parallel Line
Determine the equation of a line that passes through point (5,1)(5, -1) and is parallel to the given equation:
y=3x8y=3x-8
Step 1

First, determine the slope of the given equation.

The given equation is in slope-intercept form, where mm is the slope and bb is the yy-intercept:
y=mx+by=3x8\begin{aligned}y&=mx+b\\y&=3x-8\end{aligned}
The slope of the given equation is 3.

Parallel lines have the same slope. So, the slope of the parallel line will also be 3.

Step 2
Substitute the slope, 3, and the coordinates of the point (5,1)(5, -1) into the point-slope form.
yy1=m(xx1)y(1)=3(x5)\begin{aligned}y-y_1&=m(x-x_1)\\y-(-1)&=3(x-5)\end{aligned}
Solution
Simplify the left side of the equation.
y(1)=3(x5)y+1=3(x5)\begin{aligned}y-(-1)=3(x-5)\\y+1=3(x-5)\end{aligned}
To write the equation in slope-intercept form, first distribute the 3. Then subtract 1 from both sides.
y+1=3(x5)y+1=3x15y+11=3x151y=3x16\begin{aligned}y+1&=3(x-5)\\y+1&=3x-15\\ y+1-1&=3x-15-1\\y&=3x-16\end{aligned}

Perpendicular Lines

Perpendicular lines have slopes whose product is –1.
Perpendicular lines are lines that intersect at a 90° angle. When multiplied together, their slopes have a product of –1. That means that they are opposite reciprocals. If a line has slope mm, then the slope of a perpendicular line has slope 1m-\frac{1}{m}.
The graphs show examples of perpendicular lines. The slope of one line is the opposite reciprocal of the other.
Step-By-Step Example
Determining the Equation of a Perpendicular Line
Identify the equation of a line passing through point (7,2)(7, 2) that is perpendicular to the line of the given equation:
y=2x+1y=-2x+1
Step 1

Determine the slope of the given equation.

The given equation is in slope-intercept form, where mm is the slope and bb is the yy-intercept:
y=mx+by=2x+1\begin{aligned}y&=mx+b\\y&=-2x+1\end{aligned}
The slope of the given equation is –2.
Step 2

Identify the slope of the line perpendicular to the line of the given equation.

Perpendicular lines have opposite reciprocals. So, the slope of the line perpendicular to the line of the given equation is:
(12)=12-\left (\frac{1}{-2}\right)=\frac{1}{2}
Step 3
Substitute 12\frac{1}{2}, which is the slope of the line perpendicular to the line of the given equation, and the coordinates of point (7,2)(7, 2) into the point-slope form.
yy1=m(xx1)y2=12(x7)\begin{aligned}y-y_1&=m(x-x_1)\\y-2&=\frac{1}{2}(x-7)\end{aligned}
Solution
To rewrite the equation in slope-intercept form, first distribute 12\frac{1}{2}. Then add 2 to both sides.
y2=12(x7)y2=12x72y2+2=12x72+2y=12x72+42y=12x32\begin{aligned}y-2&=\frac{1}{2}(x-7)\\y-2&=\frac{1}{2}x-\frac{7}{2}\\y-2+2&=\frac{1}{2}x-\frac{7}{2}+2\\y&=\frac{1}{2}x-\frac{7}{2}+\frac{4}{2}\\y&=\frac{1}{2}x-\frac{3}{2}\end{aligned}