# 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 = a$, and horizontal lines have the form $y = b$, where $a$ and $b$ 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 $x$-coordinate. For any two points on the line, the change in the $x$-values, or run, is zero. So, the denominator is zero in the slope formula:
$m=\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 $x$-intercept is $a$, then the point $(a,0)$ is on the line. So are the points $(a, 1)$, $(a, 2)$, $(a, 3)$, and so on. The $x$-value of every point on the line is $a$. So, the equation is written as $x = a$. On a horizontal line, every point has the same $y$-coordinate. For any two points on a horizontal line, the change in the $y$-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 $y$-intercept is $b$, the equation of a horizontal line can be written in slope-intercept form as:
\begin{aligned}y&=0x+b\\y&=b\end{aligned}
Vertical Line Horizontal Line
• Every point on the line has an $x$-coordinate of 5.
• The slope of the line is undefined, and there is no $y$-intercept, so the line cannot be written in slope-intercept form.
• The equation of the line is $x=5$.
• Every point on the line has a $y$-coordinate of –3.
• The slope of the line is zero, and the $y$-intercept is –3. The slope-intercept form is $y=0x-3$.
• The equation of the line is $y=-3$.

### Parallel Lines

Parallel lines have the same slope, but different $y$-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 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:
$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)$ and is parallel to the given equation:
$y=3x-8$
Step 1

First, determine the slope of the given equation.

The given equation is in slope-intercept form, where $m$ is the slope and $b$ is the $y$-intercept:
\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)$ into the point-slope form.
\begin{aligned}y-y_1&=m(x-x_1)\\y-(-1)&=3(x-5)\end{aligned}
Solution
Simplify the left side of the equation.
\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.
\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 $m$, then the slope of a perpendicular line has slope $-\frac{1}{m}$.
Step-By-Step Example
Determining the Equation of a Perpendicular Line
Identify the equation of a line passing through point $(7, 2)$ that is perpendicular to the line of the given equation:
$y=-2x+1$
Step 1

Determine the slope of the given equation.

The given equation is in slope-intercept form, where $m$ is the slope and $b$ is the $y$-intercept:
\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:
$-\left (\frac{1}{-2}\right)=\frac{1}{2}$
Step 3
Substitute $\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)$ into the point-slope form.
\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 $\frac{1}{2}$. Then add 2 to both sides.
\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}