Slope-Intercept Form



We need two pieces of information to determine the equation of a line: the slope, and the y-intercept. The y-intercept is just a single number that tells us where the line crosses the y-axis. Consider this graph of a line:

Note that the graph of the line crosses the y-axis at 1, so the y-intercept of the line is 1.

A quick look will show that the slope of this line is 3/2, since for every rise of 3 units, there is a run of 2 units. Using these two pieces of information, we can write the equation of the line being graphed.

The slope-intercept form of the equation of a line is y = mx + b, where m is the slope and b is the y-intercept. For the line graphed above, we determined that the slope is 3/2 and the y-intercept is 1. Since m = 3/2, and b = 1, the equation of the line above is:

y = \frac{3}{2}x + 1 

Any time you are dealing with an equation of a line, you’ll want to make sure it’s in slope-intercept form before you try to do anything with it. For example, if you are asked to find the slope and y-intercept of the following equation

4x + 2y = -6

Then you’ll want to get the y by itself on the left side to have the slope-intercept form. First, we’ll start by subtracting 4x from each side:

4x + 2y – 4x = -6 – 4x
2y = -4x – 6

Now, we’ll divide both sides by 2 to get rid of the 2:

\frac{2y}{2} = \frac{-4x - 6}{2} 

y = -2x - 3 

Since the slope-intercept form is y = mx + b where m is slope and b is the y-intercept, it’s pretty easy to see that in the equation above, m = -2 and b = -3. This means that the slope is -2 and the y-intercept is -3.

So what if you’re given two points, and you’re asked to find the equation of the line that goes through those two points? To find the equation of a line, you’ll always need the slope and the y-intercept. To find the slope of the line, you’ll use the formula

m = \frac{y_2 - y_1}{x_2 - x_1} 

As discussed in the sections about slope on this website. So say you were given the points (3, 2) and (9, 6) and you were asked to find the equation of the line that went through those two points. First you’d find the slope, using the formula above:

m = \frac{6 - 2}{9 - 3} = \frac{4}{6} = \frac{2}{3} 

And we see that the slope m is 2/3. So far, our equation looks like this:

y = \frac{2}{3}x + b 

Now, we’ll plug in one of our points (either one will work fine) for x and y. Here we’re going to put in the point (3, 2):

y = \frac{2}{3}x + b 

2 = \frac{2}{3}(3) + b 

2 = 2 + b 

b = 0 

And we see that the y-intercept b = 0. Then our equation for our line would be y = (2/3)x + 0, or just y = (2/3)x.