 Home > College of Sciences > Institute of Fundamental Sciences > Maths First > Online Maths Help > Algebra > Linear Equations and Graphs > The Slope SEARCH MASSEY  # Linear Equations and Graphs

## Slope (or Gradient)

So far, we have learned that the equation for any line can be written in the form y = mx + b. We have also found that the value of b is given by the y-intercept. Now let's have a look at what m represents.

Let (x1,y1) and (x2,y2) be two distinct points on the line given by y = mx + b. Then

y1 = mx1 + b

y2 = mx2 + b

Subtracting the second equation from the first gives

y1 - y2 = mx1 - mx2

Factoring out the m we get

y1 - y2 = m(x1 - x2)

Dividing both sides by (x1 - x2) This relationship is true no matter which two distinct points on the line we choose. We call m the slope or gradient of the line. It represents the change in y-value per unit change in x-value.

For example, consider the line given by the equation y = 2x + 1. Here are some points on the line.

 x y 0 1 1 3 2 5 3 7

Note that the difference between any two y-values divided by the difference of the corresponding x-values is always 2. Thus the slope of the line is m = 2.

Note that the slope of a vertical line is undefined as the change in x coordinates is zero: ### Exercise 4A.

Try finding the slope of a line which passes through two given points:

 Find the slope of the line passing through the points ( , ) and ( , ). Round your answer to 1 d.p., and if the slope is undefined, enter DNE as your answer (for does not exist). Slope = (1 d.p.)

Now that we know how to calculate the slope, what does it actually represent? If we imagine a point moving along a straight-line graph from P to R, then the x- and y- coordinates of the point will change and in fact  In other words, the slope of the line tells us the rate of change of y relative to x. If the slope is 2, then y is changing twice as fast as x; if the slope is 1/2, then y is changing half as fast as x, and so on.

For a linear function, the rate of change of y relative to x is always constant, i.e. is the same no matter which values x is changing between.

Note that the slope of the line may be negative; this tells us that y is decreasing as x increases. For example:  The larger the magnitude of the slope, the steeper the line is, i.e. the more it approaches the vertical. In other words, if the line is near vertical then y is changing very fast relative to x. If the slope is small in magnitude, then y is changing slowly relative to x and the line is nearly horizontal. If the slope is zero, then the line is horizontal and y does not change at all (the equation of the line has the form y = c and y = c for all values of x.)

### Example 4     Experiment with the applet below, varying the value of m in the linear equation y = mx + b to see how changing the slope m changes the graph. The initial graph shown is y = 0x + 2 or y = 2. This has a slope of zero and remains stationary for comparison. See how the line changes as the slope m becomes positive or negative.

Can't see the above java applet? Click here to see how to enable Java on your web browser. (This applet is based on free Java applets from JavaMath )

Determining the Sign of a Slope from its Graph Exercises (opens in new window)

 Contact Us | About Massey University | Sitemap | Disclaimer | Last updated: November 21, 2012     © Massey University 2003