# Finding Equations for Lines

You know that the slope of a line measures how steep the line is. In this lesson you will 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.

## 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?