# Finding Equations for Lines

You know that the slope of a line measures how steep the line is. It is the amount of change in the height of a line as you move 1 unit to the right. In this lesson you will learn another method for finding the slope of a line. You will also learn how to find an equation for a line if you know its slope and a point on the line, or two points on the line.

## Slope as rate of change

Jane is descending a 20-foot rock. She climbs down the rock at a rate of 2 feet per minute (so, each minute her height decreases by 2 feet).

In this example $t$ represents time in minutes and $h$ represents Jane’s height in feet. When $t=0$, $h=20$. What is $h$ when $t=1$? Enter the value you just found in the $h$ column corresponding to $t=1$ in the table to the right. Repeat this for the other $t$ values in the table to chart her progress. The points representing Jane’s height are plotted on the grid to the left.
$t$$h  What shape is formed by the points plotted on the grid to the left (triangle, circle, line, square, …)?  Click . What is the slope of the red line on the grid to the left? (Remember that slope is the amount of change in the height of a line as you move 1 unit to the right.) We say that the rate of change between the points (0,20) and (2,16) is:$$\text"change in height"/\text"change in time" = {16-20}/{2-0} = {-4}/2 = -2$$Find the rate of change between the points shown in the table below. All of these points are on the graph. t- and h- values rate of change t$$h$
$t$$h t$$h$
 Look at the rates of change that you just computed. Are they the same as each other or are they different from each other?
 Is the slope of the line equal to those rates of change?

The slope of the line through the points $(x_1,y_1)$ and $(x_2,y_2)$ is:
$${y_2-y_1}/{x_2-x_1}$$

## Computing more slopes

The formula $${y_2-y_1}/{x_2-x_1}$$ from slopeDef lets you compute slopes by using $x$-values that aren’t exactly one unit apart. Sometimes, this makes it easier to compute those slopes.

Compute the slope of each line by using the given $x$-values, and the formula $${y_2-y_1}/{x_2-x_1}$$.

EquationValuesSlope

Compute the slope of the line $$y=-3/2x+2$$ by using each of the given $x$-values.

ValuesSlope

As you can see, whenever the $x$-coordinate on the graph of $$y=-3/2x+2$$ changes by 2, the $y$-coordinate changes by $-3$ (goes down by 3). This is illustrated by the picture below.

You can say something similar for any line whose slope is a fraction:

Any line of slope $$p/q$$, for some numbers $p$ and $q$, is the graph of an equation of the form $$y=p/q x + b$$. Changing the $x$-coordinate on that line by $q$ makes the $y$-coordinate change by $p$.

## Finding an equation for a line given its slope and $y$-intercept

To the left is the graph of $y=2x+1$. Remember that this equation is in slope-intercept form, so 2 is the slope of the line and 1 indicates where the line crosses the $y$-axis. Use the sliders to change the values of $m$ and $b$ and notice how they affect the graph. Complete this table by using the sliders.

equationslope$y$-intercept

slope$y$-interceptequation

## Finding equations for lines with a given point and slope

In the last section you found an equation for a line given its slope and a particular point on the line, its $y$-intercept. In this section you will learn how to find an equation for a line given its slope and any point on the line, not necessarily the $y$-intercept.

Use the sliders to change the values of $m$, $x_1$, and $y_1$ and notice how they affect the graph of $y-y_1=m(x-x_1)$ and the plotted point $(x_1,y_1)$. The equation for the line is always shown below the grid. Use the sliders to complete this table.

$m$$x_1$$y_1$pointequation
 To what values would you have to slide the $x_1$ and $y_1$ sliders if you wanted to plot the point $(20,15)$?
 The red line is the graph of $w-4=2(x-3)$. Find the point with $x$-coordinate 2 that is on the red line.
 Slide $m$ to the value 2. Next, slide $x_1$ to the value of the $x$-coordinate of your new point and $y_1$ to the value of the $y$-coordinate of your new point. What is the equation (in $x$ and $y$) for the blue line?
 Is the graph different from the graph of $w-4=2(x-3)$ (the red line)?
 Find the point with $x$-coordinate 1 that is on the red line.
 Slide $x_1$ and $y_1$ as before using the new point. Is the graph different?
 What is the equation for the line you found using this new point?
 Find another point that is on the red line.
 Slide $x_1$ and $y_1$ as before using the new point. What is the equation for the line you get?

If a line contains the point $(x_1,y_1)$ and has slope $m$, then its equation can be written as $y-y_1=m(x-x_1)$.
$y-y_1=m(x-x_1)$ is called the point-slope form of the equation for a line.

You can write the equation $y-4=2(x-3)$ in slope-intercept form:

 Point-slope form: $y-4$ = $2(x-3)$ Distribute: $y-4$ = $2x-2(3)$ $y-4$ = $2x-6$ Add 4 to both sides: $y-4+4$ = $2x-6+4$ Slope-intercept form: $y$ = $2x-2$

The first two equations you found in sameLineEqs are given again in the table below. Write them in slope-intercept form.

 Look at the two equations in slope-intercept form that you just found. Are they the same or are they different?

## Finding equations for lines through two points

Sometimes we don’t know the slope of a line, but we do know two points on the line. For example, you might be told that the price of 4 baskets of strawberries is \$6 and the price of 2 baskets of strawberries is \$3. This means that you have two points, $(4,6)$ and $(2,3)$. To find an equation for the line through these points you need to find the slope first.

 What is the slope between the points $(2,3)$ and $(4,6)$? Write your final answer as a fraction using a ‘/’, or as a decimal.
 Use the point $(4,6)$ and the slope you just calculated to find an equation for the line in point-slope form.
 Slide the values of $m$, $x_1$, and $y_1$ in the equation $y-y_1=m(x-x_1)$ to get the equation you just found. Does its graph pass through the point $(2,3)$?

Write the equation you found in slope-intercept form.

By performing the following steps, write an equation for the line that passes through $(3,1)$ and $(4,-1)$ in slope-intercept form.

 First, find the slope of the line.
 Next, use that slope and the point $(3,1)$ to write an equation for that line in point-slope form.

Finally, rewrite the equation in slope-intercept form.

 If you had used the point $(4,-1)$ instead of $(3,1)$ to write the equation in point-slope form, would you have ended up with the same final equation in slope-intercept form?