4.1: The Slope of a Line from a Graph or from Two Points
The Slope of a Line from a Graph
Introduction
In this lesson you will learn that the slope of a straight line is simply the slant or gradient of that line. The slope is often defined as \begin{align*}\frac{\text{rise}}{\text{run}}\end{align*} (rise over run), \begin{align*}\frac{\Delta y}{\Delta x}\end{align*} (delta \begin{align*}y\end{align*} over delta \begin{align*}x\end{align*}) and \begin{align*}\frac{y_2-y_1}{x_2-x_1}\end{align*} (change in \begin{align*}y\end{align*} over change in \begin{align*}x\end{align*}). Whatever definition of slope is used, they all mean the same. The slope of a line is represented by the letter ‘\begin{align*}m\end{align*}’ and its value is a real number. You will learn to determine the slope of a line from a graph by counting to determine the value of \begin{align*}\frac{\text{rise}}{\text{run}}\end{align*}. In addition, you will also learn how to calculate the slope of a line by using the coordinates of two points on the line.
Objectives
The lesson objectives for Slope of a Line are:
- Understanding how to determine the slope of a line from a graph
- Understanding how to determine the slope of a line from two given points
- Understanding the slope of special lines
- Understanding the role of slope in real world problems
Introduction
Determine the slope of the following line:
The slope of a line is best understood when it is expressed in the fraction form. The denominator of a fraction should never have a negative number. To determine the slope of a line from a graph, choose two points on the line that are exact points on the Cartesian grid. By exact points, choose two points that are located on the corner of a box or points that have coordinates that do not have to be estimated. On the above graph, two exact points are indicated by the blue dots. Begin with the point that is farthest to the left and RUN to the right until you are directly below (in this case) the second indicated point. Count the number of spaces that you had to run to be below the second point and place this value in the run position in the denominator of the slope. Next count the number of spaces you have to move to reach the second point. In this case you have to rise upward which indicates a positive move. This value must be placed in the rise position in the numerator of the slope.
\begin{align*}m=\frac{\text{rise}}{\text{run}}\end{align*} You had to run 5 spaces to the right which indicates moving 5 spaces in a positive direction. You now have \begin{align*}m=\frac{\text{rise}}{{\color{blue}5}}\end{align*}. To reach the point directly above involved moving upward 6 spaces in a positive direction. You now have \begin{align*}m=\frac{{\color{magenta}6}}{{\color{blue}5}}\end{align*}. The slope of the above line is \begin{align*}\frac{6}{5}\end{align*}.
Watch This
Khan Academy Slope and Rate of Change
Guidance
i)
In the above graph of a straight line, there are not two points on the line that are exact points on the Cartesian grid. Therefore, the slope of the line cannot be determined by counting. The coordinates of points on this line would only be estimated values. When this occurs, the task of calculating the slope of the line must be presented in a different way. The slope would have to be determined from two points that are on the line and these points would have to be given.
ii) Determine the slope of the line that passes through the points \begin{align*}A (-6, -4)\end{align*} and \begin{align*}B (3, -8)\end{align*}.
The slope of this line can be determined by finding the change in \begin{align*}y\end{align*} over the change in \begin{align*}x\end{align*}.
The formula that is used is \begin{align*}m=\frac{y_2-y_1}{x_2-x_1}\end{align*} where ‘\begin{align*}m\end{align*}’ is the slope, \begin{align*}(x_1,y_1)\end{align*} are the coordinates of the first point and \begin{align*}(x_2,y_2)\end{align*} are the coordinates of the second point. To determine the slope, the choice of the first and second point will not affect the result.
\begin{align*}& A \begin{pmatrix} x_1, & y_1 \\ -6, & -4 \end{pmatrix} \quad B \begin{pmatrix} x_2, & y_2 \\ 3, & -8 \end{pmatrix}&& \text{Label the points to indicate the first and second points.}\\ & m=\frac{y_2-y_1}{x_2-x_1} && \text{Substitute the values into the formula.}\\ & m=\frac{-8--4}{3--6} && \text{Simplify the values (if possible)}\\ & m=\frac{-8+4}{3+6} && \text{Evaluate the numerator and the denominator}\\ & m=\frac{-4}{9} && \text{Reduce the fraction (if possible)}\end{align*}
Example A
What is the slope of each of the following lines.
i)
ii)
i) Two points have been indicated. These points are exact values on the graph. From the point to the left, run one space in a positive direction and rise upward 2 spaces in a positive direction.
\begin{align*}m &=\frac{\text{rise}}{\text{run}}\\ m &= \frac{2}{{\color{blue}1}}\end{align*}
ii) Two points have been indicated. These points are exact values on the graph. From the point to the left, run two spaces in a positive direction and move upward 5 spaces in a negative direction.
\begin{align*}m &=\frac{\text{rise}}{\text{run}}\\ m &= \frac{-5}{{\color{blue}2}}\end{align*}
Example B
Determine the slope of the line passing through each pair of points:
i) (-3, -8) and (5, 8)
ii) (9, 5) and (-1, 6)
iii) (-2, 7) and (-3, -1)
iv) \begin{align*}x-\end{align*}intercept 4 and \begin{align*}y-\end{align*}intercept -3
To determine the slope of a line from two given points, the formula \begin{align*}m=\frac{y_2-y_1}{x_2-x_1}\end{align*} must be used.
Don’t forget to designate your choice for the first and the second point. Designating the points will reduce the risk of entering the values in the wrong location of the formula.
i) \begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -3, & -8 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 5, & 8 \end{pmatrix}\\ & \text{Substitute the values into the formula} && m=\frac{y_2-y_1}{x_2-x_1}\\ & && m=\frac{8--8}{5--3}\\ & \text{Simplify} && m=\frac{8+8}{5+3}\\ & \text{Calculate} && m=\frac{16}{8}\\ & \text{Simplify} && m=\frac{2}{1}\end{align*}
ii) \begin{align*}& \begin{pmatrix} x_1, & y_1 \\ 9, & 5 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ -1, & 6 \end{pmatrix}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{6-5}{-1-9}\\ & m =\frac{1}{-10}\end{align*}
There should never be a negative sign in the denominator of a fraction.
\begin{align*}m =-\frac{1}{10}\end{align*}
iii) \begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -2, & 7 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ -3, & -1 \end{pmatrix}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{-1-7}{-3--2}\\ & m =\frac{-1-7}{-3+2}\\ & m =\frac{-8}{-1}\\ & m =\frac{8}{1}\end{align*}
iv) \begin{align*}& \begin{pmatrix} x_1, & y_1 \\ 4, & 0 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 0, & -3 \end{pmatrix} && \text{Express the} \ x- \text{and} \ y- \text{intercepts as coordinates of a point.}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{-3-0}{0-4}\\ & m =\frac{-3}{-4}\\ & m =\frac{3}{4}\end{align*}
Example C
If you look at the following graphs, a slope or gradient is not present.
(a)
Two points on this line are (-5, 5) and (4, 5).
(b)
Two points on this line are (-3, 5) and (-3, -10).
To determine the slope of each line from two given points, the formula \begin{align*}m=\frac{y_2-y_1}{x_2-x_1}\end{align*} will be used.
(a)
Two points on this line are (-5, 5) and (4, 5).
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -5, & 5 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 4, & 5 \end{pmatrix}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{5-5}{4--5}\\ & m =\frac{5-5}{4+5}\\ & m =\frac{0}{9}\\ & m=0\end{align*}
The slope of a line parallel to the \begin{align*}x-\end{align*}axis is zero.
(b)
Two points on this line are (-3, 5) and (-3, -10).
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -3, & 5 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ -3, & -10 \end{pmatrix}\\ & m =\frac{-10-5}{-3--3}\\ & m =\frac{-10-5}{-3+3}\\ & m =\frac{-15}{0}\\ & m=\text{undefined}\end{align*}
The slope of a line parallel to the \begin{align*}y-\end{align*}axis is undefined.
Example D
Joseph drove from his summer home to his place of work. To avoid the road construction, Joseph decided to travel the gravel road. After driving for 20 minutes he was 62 miles away from work and after driving for 40 minutes he was 52 miles away from work. Represent the problem on a graph. Determine the slope of the line and tell what it means in this problem.
If the slope is calculated by counting, caution must be used to determine the correct values for both rise and run. The scale on both the \begin{align*}x-\end{align*} and \begin{align*}y-\end{align*}axis is increments of ten. Although these points are not exact values on the graph, knowing the coordinates makes counting an acceptable way to determine the slope of the line. The \begin{align*}x-\end{align*}axis represents the time, in minutes, driving. The \begin{align*}y-\end{align*}axis represents the distance, in miles, driving.
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ 20, & 62 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 40, & 52 \end{pmatrix} && \text{The formula can also be used to calculate the slope of the line.}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{52-62}{40-20}\\ & m =\frac{-10}{20}\\ & m =\frac{-1 \ (miles)}{2 \ (minutes)}\end{align*}
Insert the units of the quantities that are represented on each of the axes. The slope means that for every two minutes that Joseph is driving, he gets one mile closer to work.
Vocabulary
- Slope
- The slope of a line is the ratio of the \begin{align*}\frac{\text{change in} \ Y}{\text{change in} \ X}\end{align*}.
Guided Practice
1. Identify the slope for each of the following graphs by completing the formula \begin{align*}m=\frac{\text{rise}}{\text{run}}\end{align*}.
i)
ii)
2. Calculate the slope of the line that passes through the following pairs of points:
i) (5, -7) and (16, 3)
ii) (-6, -7) and (-1, -4)
iii) (5, -12) and (0, -6)
3. i) What is the slope of the line that passes through the point (2, 4) and is perpendicular to the \begin{align*}x-\end{align*}axis?
ii) What is the slope of the line that passes through the point (-6, 8) and is perpendicular to the \begin{align*}y-\end{align*}axis?
4. For the following situation, determine the slope and explain its meaning for the given situation.
The local Wine and Dine Restaurant has a private room that can serve as a banquet facility for up to 200 guests. When the manager quotes a price for a banquet she is includes the cost of the room rent in the price of the meal. The price of a banquet for 80 people is $900 while one for 120 people is $1300.
i) Plot a graph of cost versus the number of people.
ii) What is the slope of the line and what meaning does it have for this situation?
Answers
1. i)
Two exact points on the above graph are (0, 4) and (16, -2). From the point to the left, run fifteen spaces in a positive direction and move downward six spaces in a negative direction.
\begin{align*}m&=\frac{\text{rise}}{\text{run}}\\ m&=\frac{-6}{{\color{blue}16}}\\ m&=\frac{-3}{{\color{blue}8}}\end{align*}
ii)
Two exact points on the above graph are (-2, -2) and (8, 4). From the point to the left, run ten spaces in a positive direction and move upward six spaces in a positive direction.
\begin{align*}m&=\frac{\text{rise}}{\text{run}}\\ m&=\frac{6}{{\color{blue}10}}\\ m&=\frac{3}{{\color{blue}5}}\end{align*}
2. i) (5, -7) and (16, 3)
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ 5, & -7 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 16, & 3 \end{pmatrix} && \text{Designate the points as to the first point and the second point.}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{3--7}{16-5} && \text{Fill in the values}\\ & m =\frac{3+7}{16-5} && \text{Simplify the numerator and denominator (if possible)}\\ & m =\frac{10}{11} && \text{Calculate the value of the numerator and the denominator}\end{align*}
ii) (-6, -7) and (-1, -4)
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -6, & -7 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ -1, & -4 \end{pmatrix} && \text{Designate the points as to the first point and the second point.}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{-4--7}{-1--6} && \text{Fill in the values}\\ & m =\frac{-4+7}{-1+6} && \text{Simplify the numerator and denominator (if possible)}\\ & m =\frac{3}{5} && \text{Calculate the value of the numerator and the denominator}\end{align*}
iii) (5, -12) and (0, -6)
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ 5, & -12 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 0, & -6 \end{pmatrix} && \text{Designate the points as to the first point and the second point.}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{-6--12}{0-5} && \text{Fill in the values}\\ & m =\frac{-6+12}{0-5} && \text{Simplify the numerator and denominator (if possible)}\\ & m =\frac{6}{-5} && \text{Calculate the value of the numerator and the denominator}\\ & m =\frac{-6}{5} && \text{Do not leave the negative sign in the denominator}\end{align*}
3. i) You are not given the coordinates of two points. Sketch the graph according the information given.
A line that is perpendicular to the \begin{align*}x-\end{align*}axis is parallel to the \begin{align*}y-\end{align*}axis. The slope of a line that is parallel to the \begin{align*}y-\end{align*}axis has a slope that is undefined.
ii) You are not given the coordinates of two points. Sketch the graph according the information given.
A line that is perpendicular to the \begin{align*}y-\end{align*}axis is parallel to the \begin{align*}x-\end{align*}axis. The slope of a line that is parallel to the \begin{align*}x-\end{align*}axis has a slope that is zero.
4.
The domain for this situation is \begin{align*}N\end{align*}. However, to demonstrate the slope and its meaning, it is more convenient to draw the graph as \begin{align*}x \ \varepsilon \ R\end{align*} instead of showing just the points on the Cartesian grid. The \begin{align*}x-\end{align*}axis has a scale of 10 and the \begin{align*}y-\end{align*}axis has a scale of 100. The slope can be calculated by counting to determine \begin{align*}\frac{\text{rise}}{\text{run}}\end{align*}
From the point to the left, run four spaces (40) in a positive direction and move upward four spaces (400) in a positive direction.
\begin{align*}m&=\frac{\text{rise}}{\text{run}}\\ m&=\frac{400}{{\color{blue}40}}\\ m &= \frac{10}{{\color{blue}1}}\\ m &= \frac{10 \ dollars}{{\color{blue}1 \ person}}\end{align*}
The slope represents the cost of the meal for each person. It will cost $10 for the meal for each person.
Summary
In this lesson you have learned two ways to determine the slope of a line. The first way you learned was a simple method of counting to determine the values of \begin{align*}\frac{\text{rise}}{\text{run}}\end{align*}
This method worked well if the coordinates of exact points were available on the graph. The second method that you learned was to use a formula. To use this formula, it was not necessary to plot the points on a graph. It was necessary to designate the first and the second point to fill in the values correctly. The formula that was used was
\begin{align*}m=\frac{y_2-y_1}{x_2-x_1}\end{align*}
You also learned that the slope of a line parallel to the \begin{align*}x-\end{align*}axis is zero and the slope of a line that is parallel to the \begin{align*}y-\end{align*}axis is undefined.
By determining the slope of a line, you were then able to apply one of these methods to a real life situation in order to determine the meaning of the slope.
Problem Set
For each of the following graphs, complete the following \begin{align*}m=\frac{\text{rise}}{\text{run}}\end{align*}
Calculate the slope of the line that passes through the following pairs of points:
- (3, 1) and (-3, 5)
- (-5, -57) and (5, -5)
- (-3, 2) and (7, -1)
- (-4, 2) and (4, 4)
- (-1, 5) and (4, 3)
For each of the following real world problems, sketch a graph that would model the situation and explain the meaning of the slope for the problem.
- The cost of operating a car for one month depends upon the number of miles you drive. According to a recent survey completed by drivers of mid size cars, it costs $124/month if you drive 320 miles/month and $164/month if you drive 600 miles/month.
- Plot a graph of cost/month versus distance/month.
- What meaning does the slope of the line represent?
- A Glace Bay developer has produced a new handheld computer called the Blueberry. He sold 10 computers in one location for $1950 and 15 in another for $2850. The number of computers and the cost forms a linear relationship.
- Plot a graph of cost versus number of computers sold.
- What meaning does the slope of the line represent?
- Shop Rite sells one-quart cartons of milk for $1.65 and two-quart cartons for $2.95. Assume there is a linear relationship between the volume of milk and the price.
- Plot a graph of cost versus the volume of milk sold.
- What meaning does the slope of the line represent?
- Some college students, who plan on becoming math teachers, decide to set up a tutoring service for high school math students. One student was charged $25 for 3 hours of tutoring. Another student was charged $55 for 7 hours of tutoring. The relationship between the cost and time is linear.
- Plot a graph of cost versus the time spent tutoring.
- What meaning does the slope of the line represent?
Answers
For each of the following graphs...
\begin{align*}m=\frac{\text{rise}}{\text{run}} && m=\frac{10}{5} && m=2\end{align*}
\begin{align*}m=\frac{\text{rise}}{\text{run}} && m=\frac{6}{8} && m=\frac{3}{4}\end{align*}
\begin{align*}m=\frac{\text{rise}}{\text{run}} && m=\frac{8}{-2} && m=-4\end{align*}
Calculate the slope of the line...
- (3, 1) and (-3, 5)
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ 3, & 1 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ -3, & 5 \end{pmatrix}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{5-1}{-3-3}\\ & m =\frac{4}{-6}\\ & m =-\frac{4}{6}\\ & m=-\frac{2}{3}\end{align*}
- (-3, 2) and (7, -1)
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -3, & 2 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 7, & -1 \end{pmatrix}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{-1-2}{7--3}\\ & m =\frac{-1-2}{7+3}\\ & m =\frac{-3}{10}\end{align*}
- (-1, 5) and (4, 3)
\begin{align*}& \begin{pmatrix} x_1, & y_1 \\ -1, & 5 \end{pmatrix} \quad \begin{pmatrix} x_2, & y_2 \\ 4, & 3 \end{pmatrix}\\ & m =\frac{y_2-y_1}{x_2-x_1}\\ & m =\frac{3-5}{4--1}\\ & m =\frac{-2}{4+1}\\ & m =-\frac{2}{5}\end{align*}
For each of the following real world problems...
\begin{align*}m&=\frac{\Delta y}{\Delta x}\\ m&=\frac{\text{change in cost}}{\text{change in distance}}=\frac{164-124}{600-320}\\ m&=\frac{40}{280}=\frac{1}{7}=\frac{1(\$)}{7(miles)}\end{align*}
The slope means that the cost of operating the car is one dollar for every seven miles.
\begin{align*}m&=\frac{\Delta y}{\Delta x}\\ m&=\frac{\text{change in cost}}{\text{change in volume}}=\frac{2.95-1.65}{2-1}\\ m&=\frac{1.30}{1}=\frac{1.30(\$)}{1(quart)}\end{align*}
The slope means that the cost of one quart of milk is $1.30
Summary
In this lesson you have learned to determine the slope of a line, from its graph, by counting. This process involved using two exact points on the line to determine the value of \begin{align*}m = \frac{\text{rise}}{\text{run}}\end{align*}
When you counted to determine the value of ‘run’, you counted horizontally from the left point to the right point such that you were above or below the second point. This produced a value for ‘run’ that was positive. The value of ‘rise’ was found by counting up or down the number of units to reach the right point.
This method worked well if the coordinates of these points did not have to be estimated. The second method that you learned was to apply the coordinates of the points to a formula. The formula could be used without having a graph of the line. The formula that was used was
\begin{align*}m=\frac{y_2-y_1}{x_2-x_1}\end{align*}
When you used the formula to determine the slope of the line, you learned to begin by designating the first and the second point.
You were then able to apply one of these methods to a real life situation in order to determine the meaning of the slope.