We've updated our

TEXT

# Equations of Lines

Now that we've learned how to plot points on a coordinate plane and graph linear equations, we can begin to analyze the equations of lines and evaluate the different characteristics of these lines. In this section, we'll learn about the commonly used forms for writing linear equations and the properties of lines that can be determined from their equations. For example, without creating a table of values, you will be able to match each equation below to its corresponding graph. You will also be able to explain the similarities and differences of each line, how they relate to each other, and why they behave that way.   (a) $y=3x+2$ (b) $y-4=-\frac{1}{2}(x+2)$ (c) $x=5$ (d) $y=-2$ (e) $3x=y+1$ (f) $2y-3x=6$

## Writing Equations of Lines

### Slope-Intercept Form

Perhaps the most familiar form of a linear equation is the slope-intercept form, written as $y=mx+b$, where $m=\text{slope}$ and $b=y\text{-intercept}$. Let us begin with the slope.

### The Slope of a Line

The slope of a line refers to the ratio of the vertical change in y over the horizontal change in x between any two points on a line. It indicates the direction in which a line slants as well as its steepness. Slope is sometimes described as rise over run.
$m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$
If the slope is positive, the line slants to the right. If the slope is negative, the line slants to the left. As the slope increases, the line becomes steeper. Some examples are shown below. The lines indicate the following slopes: $m=-3$, $m=2$, and $m=\frac{1}{3}$.

### A General Note: The Slope of a Line

The slope of a line, m, represents the change in y over the change in x. Given two points, $\left({x}_{1},{y}_{1}\right)$ and $\left({x}_{2},{y}_{2}\right)$, the following formula determines the slope of a line containing these points:
$m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$

### Example: Finding the Slope of a Line Given Two Points

Find the slope of a line that passes through the points $\left(2,-1\right)$ and $\left(-5,3\right)$.

Answer: We substitute the y-values and the x-values into the formula.

$\begin{array}{l}m\hfill&=\frac{3-\left(-1\right)}{-5 - 2}\hfill \\ \hfill&=\frac{4}{-7}\hfill \\ \hfill&=-\frac{4}{7}\hfill \end{array}$
The slope is $-\frac{4}{7}$.

#### Analysis of the Solution

It does not matter which point is called $\left({x}_{1},{y}_{1}\right)$ or $\left({x}_{2},{y}_{2}\right)$. As long as we are consistent with the order of the y terms and the order of the x terms in the numerator and denominator, the calculation will yield the same result.

### Try It

Find the slope of the line that passes through the points $\left(-2,6\right)$ and $\left(1,4\right)$.

Answer: $m = - \frac{2}{3}$

### Example: Finding the Equation of a Line Passing Through Two Given Points

Find the equation of the line passing through the points $\left(3,4\right)$ and $\left(0,-3\right)$. Write the final equation in slope-intercept form.

Answer: First, we calculate the slope using the slope formula and two points.

$\begin{array}{l}\hfill \\ m=\frac{-3 - 4}{0 - 3}\hfill \\ =\frac{-7}{-3}\hfill \\ =\frac{7}{3}\hfill \end{array}$
Next, we use the point-slope formula with the slope of $\frac{7}{3}$, and either point. Let’s pick the point $\left(3,4\right)$ for $\left({x}_{1},{y}_{1}\right)$.
$\begin{array}{l}y - 4=\frac{7}{3}\left(x - 3\right)\hfill \\ y - 4=\frac{7}{3}x - 7\hfill&\text{Distribute the }\frac{7}{3}.\hfill \\ y=\frac{7}{3}x - 3\hfill \end{array}$
In slope-intercept form, the equation is written as $y=\frac{7}{3}x - 3$.

#### Analysis of the Solution

To prove that either point can be used, let us use the second point $\left(0,-3\right)$ and see if we get the same equation.
$\begin{array}{l}y-\left(-3\right)=\frac{7}{3}\left(x - 0\right)\hfill \\ y+3=\frac{7}{3}x\hfill \\ y=\frac{7}{3}x - 3\hfill \end{array}$
We see that the same line will be obtained using either point. This makes sense because we used both points to calculate the slope.

### Standard Form of a Line

Another way that we can represent the equation of a line is in standard form. Standard form is given as
$Ax+By=C$
where $A$, $B$, and $C$ are integers. The x- and y-terms are on one side of the equal sign and the constant term is on the other side.

### Example: Finding the Equation of a Line and Writing It in Standard Form

Find the equation of the line with $m=-6$ and passing through the point $\left(\frac{1}{4},-2\right)$. Write the equation in standard form.

Answer: We begin using the point-slope formula.

$\begin{array}{l}y-\left(-2\right)=-6\left(x-\frac{1}{4}\right)\hfill \\ y+2=-6x+\frac{3}{2}\hfill \end{array}$
From here, we multiply through by 2, as no fractions are permitted in standard form, and then move both variables to the left aside of the equal sign and move the constants to the right.
$\begin{array}{l}2\left(y+2\right)=\left(-6x+\frac{3}{2}\right)2\hfill \\ 2y+4=-12x+3\hfill \\ 12x+2y=-1\hfill \end{array}$
This equation is now written in standard form.

### Try It

Find the equation of the line in standard form with slope $m=-\frac{1}{3}$ and passing through the point $\left(1,\frac{1}{3}\right)$.

Answer: $x+3y=2$

If we know the equation of a line, we can use what we know about slope to write the equation of a line that is either parallel or perpendicular to the given line.

### Writing Equations of Parallel Lines

Suppose for example, we are given the following equation.

$f\left(x\right)=3x+1$

We know that the slope of the line formed by the function is 3. We also know that the y-intercept is (0, 1). Any other line with a slope of 3 will be parallel to f(x). So the lines formed by all of the following functions will be parallel to f(x).

$\begin{cases}g\left(x\right)=3x+6\hfill \\ h\left(x\right)=3x+1\hfill \\ p\left(x\right)=3x+\frac{2}{3}\hfill \end{cases}$

Suppose then we want to write the equation of a line that is parallel to f and passes through the point (1, 7). We already know that the slope is 3. We just need to determine which value for b will give the correct line. We can begin with the point-slope form of an equation for a line, and then rewrite it in the slope-intercept form.

$\begin{cases}y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y - 7=3\left(x - 1\right)\hfill \\ y - 7=3x - 3\hfill \\ \text{ }y=3x+4\hfill \end{cases}$

So $g\left(x\right)=3x+4$ is parallel to $f\left(x\right)=3x+1$ and passes through the point (1, 7).

### How To: Given the equation of a function and a point through which its graph passes, write the equation of a line parallel to the given line that passes through the given point.

1. Find the slope of the function.
2. Substitute the given values into either the general point-slope equation or the slope-intercept equation for a line.
3. Simplify.

### Example: Finding a Line Parallel to a Given Line

Find a line parallel to the graph of $f\left(x\right)=3x+6$ that passes through the point (3, 0).

Answer: The slope of the given line is 3. If we choose the slope-intercept form, we can substitute = 3, = 3, and f(x) = 0 into the slope-intercept form to find the y-intercept.

$\begin{cases}g\left(x\right)=3x+b\hfill \\ \text{ }0=3\left(3\right)+b\hfill \\ \text{ }b=-9\hfill \end{cases}$

The line parallel to f(x) that passes through (3, 0) is $g\left(x\right)=3x - 9$.

#### Analysis of the Solution

We can confirm that the two lines are parallel by graphing them. The graph below shows that the two lines will never intersect.

### Writing Equations of Perpendicular Lines

We can use a very similar process to write the equation for a line perpendicular to a given line. Instead of using the same slope, however, we use the negative reciprocal of the given slope. Suppose we are given the following function:

$f\left(x\right)=2x+4$

The slope of the line is 2, and its negative reciprocal is $-\frac{1}{2}$. Any function with a slope of $-\frac{1}{2}$ will be perpendicular to f(x). So the lines formed by all of the following functions will be perpendicular to f(x).

$\begin{cases}g\left(x\right)=-\frac{1}{2}x+4\hfill \\ h\left(x\right)=-\frac{1}{2}x+2\hfill \\ p\left(x\right)=-\frac{1}{2}x-\frac{1}{2}\hfill \end{cases}$

As before, we can narrow down our choices for a particular perpendicular line if we know that it passes through a given point. Suppose then we want to write the equation of a line that is perpendicular to f(x) and passes through the point (4, 0). We already know that the slope is $-\frac{1}{2}$. Now we can use the point to find the y-intercept by substituting the given values into the slope-intercept form of a line and solving for b.

$\begin{cases}g\left(x\right)=mx+b\hfill \\ 0=-\frac{1}{2}\left(4\right)+b\hfill \\ 0=-2+b\hfill \\ 2=b\hfill \\ b=2\hfill \end{cases}$

The equation for the function with a slope of $-\frac{1}{2}$ and a y-intercept of 2 is $g\left(x\right)=-\frac{1}{2}x+2$. So $g\left(x\right)=-\frac{1}{2}x+2$ is perpendicular to $f\left(x\right)=2x+4$ and passes through the point (4, 0). Be aware that perpendicular lines may not look obviously perpendicular on a graphing calculator unless we use the square zoom feature.

### Q & A

A horizontal line has a slope of zero and a vertical line has an undefined slope. These two lines are perpendicular, but the product of their slopes is not –1. Doesn’t this fact contradict the definition of perpendicular lines? No. For two perpendicular linear functions, the product of their slopes is –1. However, a vertical line is not a function so the definition is not contradicted.

### How To: Given the equation of a function and a point through which its graph passes, write the equation of a line perpendicular to the given line.

1. Find the slope of the function.
2. Determine the negative reciprocal of the slope.
3. Substitute the new slope and the values for x and y from the coordinate pair provided into $g\left(x\right)=mx+b$.
4. Solve for b.
5. Write the equation for the line.

### Example: Finding the Equation of a Perpendicular Line

Find the equation of a line perpendicular to $y=3x+3$ that passes through the point (3, 0).

Answer: The original line has slope = 3, so the slope of the perpendicular line will be its negative reciprocal, or $-\frac{1}{3}$. Using this slope and the given point, we can find the equation for the line.

$\begin{cases}y_{2}=-\frac{1}{3}x+b\hfill \\ \text{ }0=-\frac{1}{3}\left(3\right)+b\hfill \\ \text{ }1=b\hfill \\ \text{ }b=1\hfill \end{cases}$

The line perpendicular to y that passes through (3, 0) is $y_{2}=-\frac{1}{3}x+1$.

#### Analysis of the Solution

A graph of the two lines is shown in the graph below.

### Try It

Given the line $y=2x - 4$, write an equation for the line passing through (0, 0) that is
1. parallel to y
2. perpendicular to y

1. $y=2x$is parallel
2. $y=-\frac{1}{2}x$is perpendicular

### Example: Finding the Equation of a Line Perpendicular to a Given Line Passing Through a Given Point

Find the equation of the line perpendicular to $5x - 3y+4=0\left(-4,1\right)$.

Answer: The first step is to write the equation in slope-intercept form.

$\begin{array}{l}5x - 3y+4=0\hfill \\ -3y=-5x - 4\hfill \\ y=\frac{5}{3}x+\frac{4}{3}\hfill \end{array}$

We see that the slope is $m=\frac{5}{3}$. This means that the slope of the line perpendicular to the given line is the negative reciprocal, or $-\frac{3}{5}$. Next, we use the point-slope formula with this new slope and the given point.

$\begin{array}{l}y - 1=-\frac{3}{5}\left(x-\left(-4\right)\right)\hfill \\ y - 1=-\frac{3}{5}x-\frac{12}{5}\hfill \\ y=-\frac{3}{5}x-\frac{12}{5}+\frac{5}{5}\hfill \\ y=-\frac{3}{5}x-\frac{7}{5}\hfill \end{array}$

## Key Concepts

• Given two points, we can find the slope of a line using the slope formula.
• We can identify the slope and y-intercept of an equation in slope-intercept form.
• We can find the equation of a line given the slope and a point.
• We can also find the equation of a line given two points. Find the slope and use the point-slope formula.
• The standard form of a line has no fractions.
• Horizontal lines have a slope of zero and are defined as $y=c$, where c is a constant.
• Vertical lines have an undefined slope (zero in the denominator), and are defined as $x=c$, where c is a constant.
• Parallel lines have the same slope and different y-intercepts.
• Perpendicular lines have slopes that are negative reciprocals of each other unless one is horizontal and the other is vertical.
• A linear equation can be used to solve for an unknown in a number problem.

## Glossary

slope the change in y-values over the change in x-values