Processing math: 92%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

7.5: The Slope-Intercept Form of a Line

( \newcommand{\kernel}{\mathrm{null}\,}\)

The General Form of a Line

We have seen that the general form of a linear equation in two variables is ax+by=c (Section 7.4). When this equation is solved for y, the resulting form is called the slope-intercept form. Let's generate this new form.

ax+by=cSubtract ax from both sides. by=ax+c Divide both sides by bbyb=axb+cbbyb=axb+cby=axb+cb

This equation is of the form y=mx+b if we replace ab with m and constant cb with b. (Note The fact that we let b=cb is unfortunate and occurs because of the letters we have chosen to use in the general form. The letter b occurs on both sides of the equal sign and may not represent the same value at all. This problem is one of the historical convention and, fortunately, does not occur very often.)

The following examples illustrate this procedure.

Example 7.5.1

Solve 3x+2y=6 for y.

3x+2y=6 Subtract 3x from both sides 2y=3x+6 Divide both sides by 2y=32x+3

The equation is of the form y=mx+b. In this case, m=32 and b=3.

Example 7.5.2

Solve 15x+5y=20 for y.

15x+5y=205y=15x+20y=3x+4

This equation is of the form y=mx+b. In this case, m=3 and b=4.

Example 7.5.3

Solve 4xy=0 for y.

4xy=0y=4xy=4x

This equation is of the form y=mx+b. In this case, m=4 and b=0. Notice that we can write y=4x as y=4x+0

The Slope-Intercept Form of a Line

The Slope-Intercept Form of a Line y=mx+b

A linear equation in two variables written in the form y=mx+b is said to be in slope-intercept form.

Sample Set A

The following equations are in slope-intercept form:

Example 7.5.4

y=6x7. In this case m=6 and b=7

Example 7.5.5

y=2x+9. In this case m=2 and b=9

Example 7.5.6

y=15x+4.8. In this case m=15 and b=4.8

Example 7.5.7

y=7x. In this case m=7 and b=0 since we can write y=7x as y=7x+0.

The following equations are not in slope-intercept form.

Example 7.5.8

2y=4x1. The coefficient of y is 2. To be in slope-intercept form, the coefficient of y must be 1.

Example 7.5.9

y+4x=5. The equation is not solved for y. THe x and y appear on the same side of the equal sign.

Example 7.5.10

y+1=2x. The equation is not solved for y

Practice Set A

The following equation are in slope-intercept form. In each case, specify the slope and y-intercept.

Practice Problem 7.5.1

y=2x+7;m=?,b=?

Answer

m=2,b=7

Practice Problem 7.5.2

y=4x+2;m=?,b=?

Answer

m=4,b=2

Practice Problem 7.5.3

y=5x1;m=?,b=?

Answer

m=5,b=1

Practice Problem 7.5.4

y=23x10;m=?,b=?

Answer

m=23,b=10

Practice Problem 7.5.5

y=58x+12;m=?,b=?

Answer

m=58,b=12

Practice Problem 7.5.6

y=3x;m=?,b=?

Answer

m=3,b=0

Slope and Intercept

When the equation of a line is written in slope-intercept form, two important properties of the line can be seen: the slope and the intercept. Let's look at these two properties by graphing several lines and observing them carefully.

Sample Set B

Example 7.5.11

Graph the line y=x3.

x y (x,y)
0 3 (0,3)
4 1 (4,1)
2 5 (2,5)

A graph of a line passing through three points with coordinates zero, negative three; four, one , and negative two, negative five.

Looking carefully at this line, answer the following two questions.

At what number does this line cross the y-axis? Do you see this number in the equation?

The line crosses the y-axis at −3.

Place your pencil at any point on the line. Move your pencil exactly one unit horizontally to the right. Now, how many units straight up or down must you move your pencil to get back on the line? Do you see this number in the equation?

After moving horizontally one unit to the right, we must move exactly one vertical unit up. This number is the coefficient of x.

Example 7.5.12

Graph the line y=23x+1

x y (x,y)
0 1 (0,1)
3 3 (3,3)
3 1 (3,1)

A graph of a line passing through three points with coordinates zero, one; three, three, and negative three, negative one.

Looking carefully at this line, answer the following two questions.

At what number does this line cross the y-axis? Do you see this number in the equation?

The line crosses the y-axis at +1.

Place your pencil at any point on the line. Move your pencil exactly one unit horizontally to the right. Now, how many units straight up or down must you move your pencil to get back on the line? Do you see this number in the equation?

After moving horizontally one unit to the right, we must move exactly 23 unit upward. This number is the coefficient of x.

Practice Set B

Practice Problem 7.5.7

Graph the line y=3x+4

x y (x,y)
0 - -
3 - -
2 - -

Looking carefully at this line, answer the following two questions.

At what number does the line cross the y-axis? Do you see this number in the equation?

Answer

The line crosses the y-axis at +4. After moving horizontally 1 unit to the right, we must move exactly 3 units downward.

Place your pencil at any point on the line. Move your pencil exactly one unit horizontally to the right. Now, how many units straight up or down must you move your pencil to get back on the line? Do you see this number in the equation?

Answer

A graph of a line passing through two points with coordinates zero,four; two, negative two ,and three, negative five.

In the graphs constructed in Sample Set B and Practice Set B, each equation had the form y=mx+b. We can answer the same questions by using this form of the equation (shown in the diagram).

A graph of a line sloped up and to the right in a first quadrant labeled with the equation y equal to mx plus b and intersecting y axis at point with coordinates zero, b. Lines illustrating an upward change of m units and a horizontal change of one unit to the right.

y-Intercept

At what number does the line cross the y-axis? Do you see this number in the equation?

Answer

In each case, the line crosses the y-axis at the constant b. The number b is the number at which the line crosses the y-axis, and it is called the y-intercept. The ordered pair corresponding to the y-intercept is (0,b).

Place your pencil at any point on the line. Move your pencil exactly one unit horizontally to the right. Now, how many units straight up or down must you move your pencil to get back on the line? Do you see this number in the equation?

Answer

To get back on the line, we must move our pencil exactly m vertical units.

Slope

The number m is the coefficient of the variable x. The number m is called the slope of the line and it is the number of units that y changes when x is increased by 1 unit. Thus, if x changes by 1 unit, y changes by m units.
Since the equation y=mx+b contains both the slope of the line and the y-intercept, we call the form y=mx+b the slope-intercept form.

The Slope-Intercept Form of the Equation of a Line

The slope-intercept form of a straight line is y=mx+b
The slope of the line is m, and the y-intercept is the point (0,b).

The Slope is a Measure of the Steepness of a Line

The word slope is really quite appropriate. It gives us a measure of the steepness of the line. Consider two lines, one with slope 12 and the other with slope 3. The line with slope 3 is steeper than is the line with slope 12. Imagine your pencil being placed at any point on the lines. We make a 1-unit increase in the x-value by moving the pencil one unit to the right. To get back to one line we need only move vertically 12 unit, whereas to get back onto the other line we need to move vertically 3 units.

A graph of a line sloped up and to the right with lines illustrating an upward change of three units and a horizontal change of one unit to the right. A graph of a line sloped up and to the right with lines illustrating an upward change of one half unit and a horizontal change of one unit to the right.

Sample Set C

Find the slope and the y-intercept of the following lines.

Example 7.5.13

y=2x+7

The line is in the slope-intercept form y=mx+b. The slope is m, the coefficient of x. Therefore, m=2. The y-intercept is the point (0,b). Since b=7, the y-intercept is (0,7).

Slope:2

y-intercept: (0,7)

Example 7.5.14

y=4x+1

The line is in the slope-intercept form y=mx+b. The slope is m, the coefficient of x. Therefore, m=4. The y-intercept is the point (0,b). Since b=1, the y-intercept is (0,1).

Slope:4

y-intercept: (0,1)

Example 7.5.15

3x+2y=5.

This equation is written in general form. We can put the equation in slope-intercept form by solving for y.

3x+2y=52y=3x+5y=32x+52

Now the equation is in slope-intercept form.

Slope:32

y-intercept: (0,52)

Practice Set C

Practice Problem 7.5.8

Find the slope and y-intercept of the line 2x+5y=15.

Answer

Solving for y we get y=25x+3. Now m=25 and b=3.

The Formula for the Slope of a Line

We have observed that the slope is a measure of the steepness of a line. We wish to develop a formula for measuring this steepness.

It seems reasonable to develop a slope formula that produces the following results:

Steepness of line 1> steepness of line 2.

A graph of two lines sloped up and to the right in the first quadrant. Line with the lable 'Line one' has a steepness greater than the line with the lable 'Line two'.

Consider a line on which we select any two points. We’ll denote these points with the ordered pairs (x1,y1) and (x2,y2). The subscripts help us to identify the points.

(x1,y1) is the first point. Subscript 1 indicates the first point.

(x2,y2) is the second point. Subscript 2 indicates the second point.

A graph of a line sloped up and to the right in the first quadrant passing through two points with coordinates x-one, y-one and x-two, y-two.

The difference in x values (x2x1) gives us the horizontal change, and the difference in y values (y2y1) gives us the vertical change. If the line is very steep, then when going from the first point to the second point, we would expect a large vertical change compared to the horizontal change. If the line is not very steep, then when going from the first point to the second point, we would expect a small vertical change compared to the horizontal change.

A graph of a line sloped up and to the right in a first quadrant. Lines illustrating an upward change of y-two minus y-one and a  horizontal change x-two minus x-one. Horzontal change is small as compared to  vertical change.A graph of a line sloped up and to the right in a first quadrant. Lines illustrating an upward change of y-two minus y-one and a  horizontal change x-two minus x-one. Vertical change is small as compared to horzontal change

We are comparing changes. We see that we are comparing:

The vertical change to  the horizontal changeThe change in y to  the change in xy1y1 to x2x1

This is a comparison and is therefore a ratio. Ratios can be expressed as fractions. Thus, a measure of the steepness of a line can be expressed as a ratio.

The slope of a line is defined as the ratio

Slope = change in y change in x

Mathematically, we can write these changes as

Slope =y2y1x2x1

Finding the Slope of a Line

The slope of a nonvertical line passing through the points (x1,y1) and (x2,y2) is found by the formula:

m=y2y1x2x1

Sample Set D

For the two given points, find the slope of the line that passes through them.

Example 7.5.16

(0,1) and (1,3).

Looking left to right on the line we can choose (x1,y1) to be (0,1), and (x2,y2) to be (1,3). Then,

m=y2y1x2x1=3110=21=2

A graph of a line passing through two points with coordinates zero, one, and one, three with the upward change of two units and a horizontal change of one unit to the right.

This line has slope 2. It appears fairly steep. When the slope is written in fraction form, 2=21, we can see, by recalling the slope formula, that as x changes 1 unit to the right (because of the +1) y changes 2 units upward (because of the +2.

m= change in y change in x=21.

Notice that as we look left to right, the line rises.

Example 7.5.17

(2,2) and (4,3).

Looking left to right on the line we can choose (x1,y1) to be (2,2), and (x2,y2) to be (4,3). Then,

m=y2y1x2x1=3242=12

A graph of a line passing through two points with coordinates two, two, and four, three.

This line has slope 12. Thus, as x changes 2 units to the right (because of the +2, y changes 1 unit upward (because of the +1).

m= change in y change in x=12.

Notice that in examples 16 and 17, both lines have positive slopes, +2 and +12, and both lines rise as we look left to right.

Example 7.5.18

(2,4) and (1,1).

Looking left to right on the line we can choose (x1,y1) to be (2,4), and (x2,y2) to be (1,1). Then,

m=y2y1x2x1=141(2)=31+2=33=1

A graph of a line passing through two points with coordinates negative two, four, and one, one with a downward change of one unit and a horizontal change of one unit to the right.

This line has slope 1.

When the slope is written in fraction form, m=1=1+1, we can see that as x changes 1 unit to the right (because of the +1, y changes 1 unit downward (because of the 1).

Notice also that this line has a negative slope and declines as we look left to right.

Example 7.5.19

(1,3) and (5,3).

m=y2y1x2x1=3351=04=0

A graph of a line parallel to x axis and passing through two points with coordinates one, three, and five, three.

This line has 0 slope. This means it has no rise and, therefore, is a horizontal line. This does not mean that the line has no slope, however.

Example 7.5.20

(4,4) and (4,0).

m=y2y1x2x1=0444=40

A graph of a line parallel to y axis and passing through two points with coordinates four,zero and four, four.

Since division by 0 is undefined, we say that vertical lines have undefined slope. Since there is no real number to represent the slope of this line, we sometimes say that vertical lines have undefined slope, or no slope.

Practice Set D

Practice Problem 7.5.9

Find the slope of the line passing through (2,1) and (6,3). Graph this line on the graph of problem 2 below.

Answer

m=3162=24=12

Practice Problem 7.5.10

Find the slope of the line passing through (3,4) and (5,5). Graph this line.

An xy-plane with gridlines

Answer

The line has slope 12

Practice Problem 7.5.11

Compare the lines of the following problems. Do the lines appear to cross? What is it called when lines do not meet (parallel or intersecting)? Compare their slopes. Make a statement about the condition of these lines and their slopes.

Answer

The lines appear to be parallel. Parallel lines have the same slope, and lines that have the same slope are parallel

A graph of two parallel lines. One of the lines passes through two points with coordinates two, one and six, three. Another straight line passes through two points with coordinates three, four and five, five.

Before trying some problems, let’s summarize what we have observed.

  • The equation y=mx+b is called the slope-intercept form of the equation of a line. The number m is the slope of the line and the point (0,b) is the y-intercept.
  • The slope, m, of a line is defined as the steepness of the line, and it is the number of units that y changes when x changes 1 unit.
  • The formula for finding the slope of a line through any two given points (x1,y1) and (x2,y2) is:
    • m=y2y1x2x1
  • The fraction y2y1x2x1 represents the \dfrac{\text{ change in } y}{\text{ change in } x}
  • As we look at a graph from left to right, lines with positive slope rise and lines with negative slope decline.
  • Parallel lines have the same slope.
  • Horizontal lines have 0 slope.
  • Vertical lines have undefined slope (or no slope).

Exercises

For the following problems, determine the slope and y-intercept of the lines.

Exercise 7.5.1

y=3x+4

Answer

slope = 3; y-intercept= (0,4)

Exercise 7.5.2

y=2x+9

Exercise 7.5.3

y=9x+1

Answer

slope = 9; y-intercept= (0,1)

Exercise 7.5.4

y=7x+10

Exercise 7.5.5

y=4x+5

Answer

slope = 4; y-intercept= (0,5)

Exercise 7.5.6

y=2x+8

Exercise 7.5.7

y=6x1

Answer

slope = 6; y-intercept= (0,1)

Exercise 7.5.8

y=x6

Exercise 7.5.9

y=x+2

Answer

slope = 1; y-intercept= (0,2)

Exercise 7.5.10

2y=4x+8

Exercise 7.5.11

4y=16x+20

Answer

slope = 4; y-intercept= (0,5)

Exercise 7.5.12

5y=15x+55

Exercise 7.5.13

3y=12x27

Answer

slope = 4; y-intercept= (0,9)

Exercise 7.5.14

y=358

Exercise 7.5.15

y=2712

Answer

slope = 27; y-intercept= (0,12)

Exercise 7.5.16

y=18x+23

Exercise 7.5.17

y=4547

Answer

slope = 45; y-intercept= (0,47)

Exercise 7.5.18

3y=5x+8

Exercise 7.5.19

10y=12x+1

Answer

slope = 65; y-intercept= (0,110)

Exercise 7.5.20

y=x+1

Exercise 7.5.21

y=x+3

Answer

slope = 1; y-intercept= (0,3)

Exercise 7.5.22

3xy=7

Exercise 7.5.23

5x+3y=6

Answer

slope = 53; y-intercept= (0,2)

Exercise 7.5.24

6x7y=12

Exercise 7.5.25

x+4y=1

Answer

slope = 14; y-intercept= (0,14)

For the following problems, find the slope of the line through the pairs of points.

Exercise 7.5.26

(1,6),(4,9)

Exercise 7.5.27

(1,3),(4,7)

Answer

m=43

Exercise 7.5.28

(3,5),(4,7)

Exercise 7.5.29

(6,1),(2,8)

Answer

m=74

Exercise 7.5.30

(0,5),(2,6)

Exercise 7.5.31

(2,1),(0,5)

Answer

m=2

Exercise 7.5.32

(3,9),(5,1)

Exercise 7.5.33

(4,6),(2,1)

Answer

m=76

Exercise 7.5.34

(5,4),(1,0)

Exercise 7.5.35

(3,2),(4,6)

Answer

m=4

Exercise 7.5.36

(9,12),(6,0)

Exercise 7.5.37

(0,0),(6,6)

Answer

m=1

Exercise 7.5.38

(2,6),(4,1)

Exercise 7.5.39

(1,7),(2,9)

Answer

m=2

Exercise 7.5.40

(6,6),(5,4)

Exercise 7.5.41

(1,0),(2,2)

Answer

m=2

Exercise 7.5.42

(4,2),(0,0)

Exercise 7.5.43

(2,3),(10,3)

Answer

m=0 (horizontal line y=3)

Exercise 7.5.44

Make a statement about the slopes of parallel lines.

Exercise 7.5.45

(4,2),(4,7)

Exercise 7.5.46

(8,1),(8,3)

Answer

No slope (vertical line at x=8)

Exercise 7.5.47

(4, 2), (6,2)

Exercise \PageIndex{48}

(5, −6), (9,−6)

Answer

m=0 (horizontal line at y=−6)

Exercise \PageIndex{49}

Do lines with a positive slope rise or decline as we look left to right?

Exercise \PageIndex{50}

Do lines with a negative slope rise or decline as we look left to right?

Answer

decline

For the following problems, determine the slope and y-intercept of the lines. Round to two decimal places.

Exercise \PageIndex{51}

3.8x+12.1y=4.26

Answer

slope=−0.31

y−intercept=(0,0.35)

Exercise \PageIndex{52}

8.09x+5.57y=−1.42

Exercise \PageIndex{53}

10.813x−17.0y=−45.99

Answer

slope=0.64

y−intercept=(0,2.71)

Exercise \PageIndex{54}

−6.003x−92.388y=0.008

For the following problems, find the slope of the line through the pairs of points. Round to two decimal places.

Exercise \PageIndex{55}

(5.56, 9.37), (2.16, 4.90)

Answer

m=1.31

Exercise \PageIndex{56}

(33.1, 8.9), (42.7, −1.06)

Exercise \PageIndex{57}

(155.89, 227.61), (157.04,227.61)

Answer

m=0 (horizontal line at y=227.61)

Exercise \PageIndex{58}

(0.00426, −0.00404), (−0.00191, −0.00404)

Exercise \PageIndex{59}

(88.81, −23.19), (88.81, −26.87)

Answer

No slope (vertical line x=88.81)

Exercise \PageIndex{60}

(−0.0000567, −0.0000567), (−0.00765, 0.00764)

Exercises for Review

Exercise \PageIndex{61}

Simplify (x^2y^3w^4)^0.

Answer

1 if xyw≠0

Exercise \PageIndex{62}

Solve the equation 3x−4(2−x)−3(x−2)+4=0.

Exercise \PageIndex{63}

When four times a number is divided by five, and that result is decreased by eight, the result is zero. What is the original number?

Answer

10

Exercise \PageIndex{64}

Solve −3y+10=x+2  if x=−4.

Exercise \PageIndex{65}

Graph the linear equation x+y=3.

An xy coordinate plane with gridlines, labeled negative five and five on the both axes.

Answer

A graph of a line passing through two points with coordinates three, zero and zero, three.


This page titled 7.5: The Slope-Intercept Form of a Line is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Denny Burzynski & Wade Ellis, Jr. (OpenStax CNX) .

Support Center

How can we help?