High School Modules > Algebra by Gregory A. Moore
Slope
An exploration of the slope of a line.
[Directions : Execute the Code Resource section first. Although there will be no output immediately, these definitions are used later in this worksheet.]
0. Code
| > | restart; with(plots): |
Warning, the name changecoords has been redefined
| > | slope_plot := proc( a, b, m, delta, n) local x1,x2, y1,y2,i, p1, p2, p3, a1, a2, T, T2, T3; x2 := a; y2 := b; a1 := x2-1; a2 := round(x2 + n*delta + 1); for i from 1 to n do x1 := x2; x2 := evalf(x1 + delta); y1 := y2; y2 := evalf(y1 + m*delta); p1[i] := plot( [[x1,y1], [x2,y1]],x = a1..a2, color = blue): p2[i] := plot( [[x2,y1], [x2,y2]],x = a1..a2, color = green): od: if( m > 0) then y1 := min(b,0); else y1 := max(b,0); fi; p3 := plot( [[a,b], [x2, y2]],x = a1..a2, y = y1..y2, color = gold, thickness= 3): T := textplot([ x2 - delta, b + 2*m*delta, slope = m ] , align={ABOVE,RIGHT}); T2 := textplot([ x2 - delta, b + m*delta, rise=delta*m], align = {ABOVE,RIGHT}); T3 := textplot([ x2 - delta, b, run=delta], align={ABOVE,RIGHT} ); plots[display](seq( p1[i], i = 1..n), seq( p2[i], i = 1..n), p3,T, T2, T3, scaling=constrained); end: |
| > | RiseRunPlot := proc(expr, a, delta ) local t, b, m, A, B, C, wid, xi, yi, xl, xr, yl, yr, xt,yt, Run, Rise, TRu, TRi; xt := 1.3* max( abs(a), a + delta); xl := a - .6*delta; xr := a + 1.8*delta; m := subs( x = 1, solve( expr, y)-solve( subs( x = 0, expr), y)); b := solve( subs( x = a, expr), y): yt := 1.3* max( abs(b), b + delta*m); yl := -abs(yt); yr := abs(yt); if ( a < 0 ) then xr := xr/3; else xl := xl/3; fi; if ( b < 0 ) then yr := yr/3; else yl := yl/3; fi; wid := a/10; A := plot( solve( expr, y), x = xl..xr, thickness = 2, color = blue ): xi := plottools[disk]([ a, b], wid, color=red ): yi := plottools[disk]([ a+delta, b+delta*m], wid, color=red ): Run := plot( [[ a,b], [a + delta, b]], color = green, linestyle = 2 ); Rise := plot( [[a + delta, b],[a + delta, b + delta*m] ], color = green, linestyle = 2 ); TRu := textplot( [ a + delta/2, b - 1, delta ] ); TRi := textplot( [ a + delta + 1, b + delta*m/2, delta*m ] ); plots[display]( A, xi, yi, Run, Rise, TRu, TRi, plot(0, x=xl..xr), scaling=constrained ); end proc: |
| > |
1. The Concept of Slope, Rise, and Run
Every line has a quality called slope. It is a measurement of how steep the line is uphill.
Lets look at some examples to see how the slope of a line is measured.
Example 1
This line begins at the point (-4,2). If we go over 5 units, the line goes up 10 units. We can see that this is true no matter where we choose the point to start measuring over and up. In all cases, we get the same ratio when we divide rise by run, 2. This is the slope.
| > | slope_plot ( -4, 2 , 2, 5, 6 ); # (x1, y1), slope, delta x, n |
If we choose a smaller run, we get a smaller rise. However, the ratio of rise to run is the same as before, 2.
| > | slope_plot ( -4, 2 , 2, 3, 10); |
Even if we take a smaller run, we get a smaller rise, but the slope (the ratio of rise to run) is the same, 2.
| > | slope_plot ( -4, 2 , 2, 1, 30 ); |
Example 2
Lets look at a different line to see if this same phenomenon occurs again. In each of the cases below, the slope is -3/4, no matter how small we choose the run.
| > | slope_plot ( -10, 15 , -1/2, 8, 5); |
| > | slope_plot ( -10, 15 , -3/4, 4, 10); |
| > | slope_plot ( -10, 15 , -3/4, 2, 20); |
| > |
2. Spectrum of Slopes
Slope is a measurement of the steepness of a line. Positive slopes are uphill (as we move left to right).
| > | display( plot( {tan(k*Pi/(24))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = blue ), textplot( [-3, 3, `Positive Slopes`]) ); |
More specifically, if the slope is 1, then the line rises an equal amount as it runs. This is indicated by the black (45 degree line). If the slope is greater than one, then the line increases faster than it runs.
The blue lines indicate lines with slopes
greater
than one
.
On the other hand, slopes which are positive but less than one - that is, between 0 and 1, are slower rising.
The green lines indicate lines with slope
less
than one.
| > | display( plot( {tan( (12+k)*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = blue ), plot( {tan(k*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = green ), plot( x, x = -4..4, y = -4..4, color = black, thickness = 3 ), textplot( [-3, 3, `Positive Slopes`]) ); |
Lines which are going downhill have negative slope.
| > | display( plot( {-tan(k*Pi/(24))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = red ), textplot( [ 3, 3, `Negative Slopes`]) ); |
The black line indicates the line of slope -1, where the rise is equal to negative the run.
Lines which decrease faster are colored red
, and
l
ines which decrease more slowly are colored pink
.
| > | display( plot( {-tan( (12+k)*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = red ), plot( {-tan(k*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = magenta ), plot( -x, x = -4..4, y = -4..4, color = black, thickness = 3 ), textplot( [ 3, 3, `Negative Slopes`]) ); |
Here is a representation of all the types of slopes, positive and negative.
| > | display( plot( {tan( (12+k)*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = blue ), plot( {tan(k*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = green ), plot( x, x = -4..4, y = -4..4, color = black, thickness = 3 ), plot( {-tan( (12+k)*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = red ), plot( {-tan(k*Pi/(48))*x $ k = 1..11 }, x = -4..4, y = -4..4, color = magenta ), plot( -x, x = -4..4, y = -4..4, color = black, thickness = 3 )); |
3. Rise and Run
To compute the slope of a line, we compute :
- the run, which is the change in x = x2 - x1
- the rise, which is the change in y = y2 - y1
- then take the ratio of rise over run
What is the slope of this line?
| > | RiseRunPlot( y = 3*x + 2, 2, 4); |
Now we draw the line through these two points. There is only one unique line which passes through two points.
| > | RiseRunPlot( 3*x + 5*y + 15 = 0, 2, 3); |
Determine the slope
| > | RiseRunPlot( 3*x - 2*y = 60, 0, 5); |
Determine the slope.
| > | RiseRunPlot( y = .5*x + 1, -6, 7); |
4. Computing Slope
Here is the formula for slope
| > | m := (y2 - y1) / ( x2 - x1); |
We can substitute in values....
| > | subs( { x1 = 3, y1 = 13, x2 = 11, y2 = 29 }, m); |
Here is another case, where the slope is negative.
| > | subs( { x1 = -3, y1 = 5, x2 = 7, y2 = 4 }, m); |
Here are other examples
| > | subs( {x1 = 3, y1 = 5, x2 = 7, y2 = 4 }, m); |
| > | subs( {x1 = 51, y1 = 156, x2 = 129, y2 = 340 }, m); |
We can get the slope of a horizontal line in this way.
| > | subs( {x1 = 4, y1 = 5, x2 = 10, y2 = 5 }, m); |
If we try to find the slope of a vertical line,
we get an error because we are dividing by zero.
| > | subs( {x1 = 6, y1 = 2, x2 = 6, y2 = 5 }, m); |
Error, numeric exception: division by zero
© 2002 Waterloo Maple Inc