Equation of a Line Through Two Points


Problem
Find the equation of the line that passes through points (-7, 1) and (3, 4).


Solution

The equation of the line they are looking for is of the form y = mx + b, where m is the slope and b is the y-intercept.

There are two things to find in order to get the equation: the slope and the y-intercept.

1. Slope

The slope m equals the change in y over the change in x. So m = (4 − 1) / (3 − -7) = 0.3.

2. The y-intercept

The y-intercept is just plug and chug. Using the found slope, we have the equation y = 0.3x + b.

The equation passes through the points (-7, 1) and (3, 4), which are of the form (x, y), so we can plug the values of either coordinates into our equation.

Using the coordinates (-7, 1):

1 = 0.3*−7 + b

1 = −2.1 + b

3.1 = b

b = 3.1

The y-intercept is 3.1.

Let's check to see that we get the same y-intercept by using the other coordinates (3, 4).

4 = 0.3*3 + b

4 = 0.9 + b

3.1 = b

b = 3.1

Our y-intercept is the same using either coordinates

Now we can form our answer.

The equation of the line through points (-7, 1) and (3, 4) is:

 y = 0.3x + 3.1 

Results can be checked by plugging in either x or y from either coordinate system to see that you get the corresponding value.