
A hiker climbing a trail, a taxi meter ticking upward, a candle slowly shrinking: all of these change at a steady pace, and a straight line on a graph captures that pace in a single number called the slope. In this chapter you will learn to measure slope, to read it from an equation, and to write the equation of a line in three different forms. You will also graph lines quickly, recognize parallel and perpendicular lines, and spot direct variation.
1. Rate of change
A rate of change compares how much one quantity changes with how much another quantity changes. Speed is a rate of change (miles per hour), and so is the price of gasoline (dollars per gallon). Look at this bike rental shop.
| Hours rented, \(x\) | Total cost in dollars, \(y\) |
|---|---|
| 2 | 12 |
| 5 | 27 |
| 8 | 42 |
From 2 hours to 5 hours the cost grows by \(27-12=15\) dollars while the time grows by \(5-2=3\) hours, so the rate is \(\dfrac{15}{3}=5\) dollars per hour. From 5 hours to 8 hours we get \(\dfrac{42-27}{8-5}=\dfrac{15}{3}=5\) again. The rate never changes.
A function is linear when its rate of change is the same between any two points of its table or graph. The graph is then a straight line, and the constant rate of change is called the slope.
A tank holds 40 gallons after 2 minutes of filling and 70 gallons after 5 minutes. The rate of change is \(\dfrac{70-40}{5-2}=\dfrac{30}{3}=10\) gallons per minute (about 37.9 liters per minute).
2. The slope formula
Pick two points on a line, \((x_1,\,y_1)\) and \((x_2,\,y_2)\). Going from the first to the second, the rise is the vertical change and the run is the horizontal change.
The slope \(m\) of a line is
\[ m=\dfrac{\text{rise}}{\text{run}}=\dfrac{y_2-y_1}{x_2-x_1},\qquad x_1\neq x_2 . \]
In the figure, going from \(A(1,\,1)\) to \(B(5,\,4)\) the run is \(5-1=4\) and the rise is \(4-1=3\), so \(m=\dfrac{3}{4}\).
- Label the points \((x_1,\,y_1)\) and \((x_2,\,y_2)\).
- Subtract the \(y\)-values: \(y_2-y_1\).
- Subtract the \(x\)-values in the same order: \(x_2-x_1\).
- Divide and simplify.
For \((-2,\,5)\) and \((4,\,-1)\): \(m=\dfrac{-1-5}{4-(-2)}=\dfrac{-6}{6}=-1\). The line goes down one unit for every unit to the right.
The sign and the value of the slope tell you how the line looks.
| Type of line | Slope | What you see |
|---|---|---|
| Rising | positive | goes up from left to right |
| Falling | negative | goes down from left to right |
| Horizontal | \(0\) | flat, \(y\) never changes |
| Vertical | undefined | straight up and down, \(x\) never changes |
Through \((-5,\,2)\) and \((6,\,2)\): \(m=\dfrac{2-2}{6-(-5)}=\dfrac{0}{11}=0\). Through \((3,\,-4)\) and \((3,\,7)\): the run is \(3-3=0\), and dividing by zero is impossible, so the slope is undefined.
Subtract in the same order on top and on the bottom. Computing \(\dfrac{y_2-y_1}{x_1-x_2}\) flips the sign of the slope. Also be careful with negative numbers: \(4-(-2)=6\), not 2.
3. Slope-intercept form
A line with slope \(m\) that crosses the \(y\)-axis at \((0,\,b)\) has the equation
\[ y=mx+b . \]
The number \(b\) is the \(y\)-intercept.
This form is the fastest way to graph: plot the \(y\)-intercept first, then use the slope as a rise over run to find more points.
Graph \(y=-\dfrac{1}{2}x+3\). The \(y\)-intercept is \(3\), so plot \(A(0,\,3)\). The slope \(-\dfrac12=\dfrac{-1}{2}\) means: go right 2, down 1, which gives \(B(2,\,2)\). Draw the line through the two points.
A line passes through \((0,\,5)\) and \((2,\,1)\). The point \((0,\,5)\) is the \(y\)-intercept, so \(b=5\). The slope is \(m=\dfrac{1-5}{2-0}=-2\). The equation is \(y=-2x+5\).
On my home planet we always test a new equation with a point we already know. Put its coordinates in the equation: if both sides match, the line really goes through that point.
4. Point-slope form
Sometimes you know the slope and a point that is not on the \(y\)-axis. Point-slope form handles this case directly.
The line with slope \(m\) through the point \((x_1,\,y_1)\) has the equation
\[ y-y_1=m\,(x-x_1) . \]
Slope \(4\), point \((2,\,-3)\): \(y-(-3)=4(x-2)\), so \(y+3=4x-8\) and \(y=4x-11\).
Through \((1,\,7)\) and \((4,\,1)\): the slope is \(m=\dfrac{1-7}{4-1}=-2\). Using the first point, \(y-7=-2(x-1)\), so \(y=-2x+9\). Check with the second point: \(-2\cdot 4+9=1\). It works.
If \(y_1\) or \(x_1\) is negative, the minus sign in the formula becomes a plus: for \((2,\,-3)\) we write \(y+3\), not \(y-3\).
5. Standard form
An equation of the form \(Ax+By=C\), where \(A\), \(B\) and \(C\) are integers and \(A\) is not negative, is written in standard form. When \(B\neq 0\), the slope is \(-\dfrac{A}{B}\) and the \(y\)-intercept is \(\dfrac{C}{B}\).
Start with \(y=-\dfrac23x+4\). Multiply every term by 3 to clear the fraction: \(3y=-2x+12\). Move the \(x\)-term to the left: \(2x+3y=12\). The slope is \(-\dfrac{2}{3}\), as expected.
6. Graphing with intercepts
The \(x\)-intercept is where the line crosses the \(x\)-axis (there \(y=0\)); the \(y\)-intercept is where it crosses the \(y\)-axis (there \(x=0\)). Standard form makes both easy to find.
- Replace \(y\) by 0 and solve for \(x\): this gives the \(x\)-intercept.
- Replace \(x\) by 0 and solve for \(y\): this gives the \(y\)-intercept.
- Plot both points and draw the line through them.
For \(3x+2y=12\): with \(y=0\), \(3x=12\) and \(x=4\); with \(x=0\), \(2y=12\) and \(y=6\). The line goes through \((4,\,0)\) and \((0,\,6)\).
For \(5x-4y=20\): if \(y=0\) then \(x=4\); if \(x=0\) then \(-4y=20\), so \(y=-5\). The intercepts are \((4,\,0)\) and \((0,\,-5)\), and the slope is \(-\dfrac{5}{-4}=\dfrac{5}{4}\).
7. Parallel and perpendicular lines
- Two different non-vertical lines are parallel exactly when they have the same slope.
- Two non-vertical lines are perpendicular exactly when the product of their slopes is \(-1\): the slopes are opposite reciprocals, such as \(2\) and \(-\dfrac12\), or \(\dfrac34\) and \(-\dfrac43\).
Find the line perpendicular to \(y=2x+1\) that passes through \((4,\,1)\). The new slope is \(-\dfrac12\). Point-slope form gives \(y-1=-\dfrac12(x-4)\), so \(y=-\dfrac12x+3\). A parallel line to \(y=2x+1\) through \((1,\,-1)\) would be \(y+1=2(x-1)\), that is \(y=2x-3\).
8. Direct variation
We say that \(y\) varies directly with \(x\) when \(y=kx\) for a constant \(k\neq 0\), called the constant of variation. Its graph is a line through the origin \((0,\,0)\), and \(k=\dfrac{y}{x}\) is also its slope.
Three pounds of trail mix (about 1.36 kilograms) cost 14.40 dollars. The constant is \(k=\dfrac{14.40}{3}=4.8\) dollars per pound, so \(c=4.8p\). For 7.5 pounds: \(c=4.8\times 7.5=36\) dollars.
The points \((2,\,5)\) and \((4,\,9)\) give \(\dfrac52=2.5\) and \(\dfrac94=2.25\). The ratios differ, so \(y\) does not vary directly with \(x\).
\(y=3x+2\) is linear, but it does not pass through the origin, so it is not direct variation. Only equations of the form \(y=kx\) are.
Key takeaways
- The slope is the constant rate of change: \(m=\dfrac{y_2-y_1}{x_2-x_1}\).
- Positive slope rises, negative slope falls, horizontal lines have slope \(0\), vertical lines have undefined slope.
- Slope-intercept form: \(y=mx+b\); point-slope form: \(y-y_1=m(x-x_1)\); standard form: \(Ax+By=C\).
- To graph with intercepts, set \(y=0\) and then \(x=0\).
- Parallel lines have equal slopes; perpendicular lines have slopes whose product is \(-1\).
- Direct variation: \(y=kx\), a line through the origin with \(k=\dfrac{y}{x}\).
Test yourself: quick challenge for Grade 9
Speed drill for Grade 9: how many in 60 seconds?
🚀 Keep exploring with Zyro
✏️ Math practiceSlope and Graphing Linear Functions: math practice, Grade 9
📝 Math testsSlope and Graphing Linear Functions: math test, Grade 9
🎯 Math quizzesSlope and Graphing Linear Functions: math quiz, Grade 9
✏️ Math practiceWriting Linear Equations and Scatter Plots: math practice, Grade 9
✏️ Math practiceSystems of Linear Equations: math practice, Grade 9
📝 Math testsWriting Linear Equations and Scatter Plots: math test, Grade 9

