We've updated our

TEXT

# Finding a Linear Equation

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 in Figure 2. The lines indicate the following slopes: $m=-3$, $m=2$, and $m=\frac{1}{3}$.
Figure 2

### 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 7: 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)$.

### Solution

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 7

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

### Example 8: Identifying the Slope and y-intercept of a Line Given an Equation

Identify the slope and y-intercept, given the equation $y=-\frac{3}{4}x - 4$.

### Solution

As the line is in $y=mx+b$ form, the given line has a slope of $m=-\frac{3}{4}$. The y-intercept is $b=-4$.

### Analysis of the Solution

The y-intercept is the point at which the line crosses the y-axis. On the y-axis, $x=0$. We can always identify the y-intercept when the line is in slope-intercept form, as it will always equal b. Or, just substitute $x=0$ and solve for y.

## The Point-Slope Formula

Given the slope and one point on a line, we can find the equation of the line using the point-slope formula.
$y-{y}_{1}=m\left(x-{x}_{1}\right)$
This is an important formula, as it will be used in other areas of college algebra and often in calculus to find the equation of a tangent line. We need only one point and the slope of the line to use the formula. After substituting the slope and the coordinates of one point into the formula, we simplify it and write it in slope-intercept form.

### A General Note: The Point-Slope Formula

Given one point and the slope, the point-slope formula will lead to the equation of a line:
$y-{y}_{1}=m\left(x-{x}_{1}\right)$

### Example 9: Finding the Equation of a Line Given the Slope and One Point

Write the equation of the line with slope $m=-3$ and passing through the point $\left(4,8\right)$. Write the final equation in slope-intercept form.

### Solution

Using the point-slope formula, substitute $-3$ for m and the point $\left(4,8\right)$ for $\left({x}_{1},{y}_{1}\right)$.
$\begin{array}{l}y-{y}_{1}=m\left(x-{x}_{1}\right)\hfill \\ y - 8=-3\left(x - 4\right)\hfill \\ y - 8=-3x+12\hfill \\ y=-3x+20\hfill \end{array}$

### Analysis of the Solution

Note that any point on the line can be used to find the equation. If done correctly, the same final equation will be obtained.

### Try It 8

Given $m=4$, find the equation of the line in slope-intercept form passing through the point $\left(2,5\right)$. Solution

### Example 10: 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.

### Solution

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 11: 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.

### Solution

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 9

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)$. Solution

## Vertical and Horizontal Lines

The equations of vertical and horizontal lines do not require any of the preceding formulas, although we can use the formulas to prove that the equations are correct. The equation of a vertical line is given as
$x=c$
where c is a constant. The slope of a vertical line is undefined, and regardless of the y-value of any point on the line, the x-coordinate of the point will be c. Suppose that we want to find the equation of a line containing the following points: $\left(-3,-5\right),\left(-3,1\right),\left(-3,3\right)$, and $\left(-3,5\right)$. First, we will find the slope.
$m=\frac{5 - 3}{-3-\left(-3\right)}=\frac{2}{0}$
Zero in the denominator means that the slope is undefined and, therefore, we cannot use the point-slope formula. However, we can plot the points. Notice that all of the x-coordinates are the same and we find a vertical line through $x=-3$. The equation of a horizontal line is given as
$y=c$
where c is a constant. The slope of a horizontal line is zero, and for any x-value of a point on the line, the y-coordinate will be c. Suppose we want to find the equation of a line that contains the following set of points: $\left(-2,-2\right),\left(0,-2\right),\left(3,-2\right)$, and $\left(5,-2\right)$. We can use the point-slope formula. First, we find the slope using any two points on the line.
$\begin{array}{l}m=\frac{-2-\left(-2\right)}{0-\left(-2\right)}\hfill \\ =\frac{0}{2}\hfill \\ =0\hfill \end{array}$
Use any point for $\left({x}_{1},{y}_{1}\right)$ in the formula, or use the y-intercept.
$\begin{array}{l}y-\left(-2\right)=0\left(x - 3\right)\hfill \\ y+2=0\hfill \\ y=-2\hfill \end{array}$
The graph is a horizontal line through $y=-2$. Notice that all of the y-coordinates are the same.
Figure 3. The line x = −3 is a vertical line. The line y = −2 is a horizontal line.

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

Find the equation of the line passing through the given points: $\\left(1,-3\\right)$ and $\\left(1,4\\right)$.

### Solution

The x-coordinate of both points is 1. Therefore, we have a vertical line, $x=1$.

### Try It 10

Find the equation of the line passing through $\left(-5,2\right)$ and $\left(2,2\right)$. Solution