In this explainer, we will learn how to find the slope of a line that goes through two given points.
The slope of a straight line in a coordinate plane is a number that allows us to exactly describe the steepness of the line. One possibility would be to describe the steepness of a line with the angle between the straight line and, for instance, the positive . However, as straight lines are described by an equation giving the relationship between the - and -coordinates of the points lying on the line, the definition of the slope that we will use is based on the coordinates of the points of the line. Let us see how.
Definition: Slope of a Straight Line
Consider two points on a straight that are one unit apart horizontally. The slope of the line, , is then given by the change in the -coordinate between the point on the left and that on the right.
From this definition, we first see that the slope is when the straight line goes from left to right and when it goes from left to right.
Second, we see that the larger the absolute value of , the steeper the line (the more inclined it is with respect to the horizontal).
The two extreme cases are
- when the line is horizontal (no steepness),
- when the line is vertical (maximum steepness).
For the first case, we note that all points lying on a horizontal line have the same -coordinate. Hence, there is no change in the -coordinate from one point to another when they are one unit apart horizontally; the slope of a horizontal line is zero.
For the second case, the vertical line, all points lying on the line have the same -coordinate. It is therefore impossible to apply the definition of the slope since there are no two points lying one unit apart horizontally (that is, with a difference between their -coordinates equal to 1). The slope of a vertical line is thus undefined.
Let us test our understanding of the slope of a line with our first two examples.
Example 1: Finding the Sign of the Slope of a Straight Line
Fill in the blank: In this figure, the slope of is .
- negative
- zero
- positive
- undefined
Answer
We are given a triangle , but the question asks only about line . We only have the line segment here, but it is enough to see that the line goes down from left to right.
Recall that the slope of a straight line is positive when the line goes up from left to right and negative when it goes down from left to right. Hence, the slope here is negative, which is answer A.
Now, let us try finding the slope of a straight line parallel to an axis.
Example 2: Using the Known Properties of Horizontal and Vertical Lines to Find Unknown Coordinates
is parallel to the . If the coordinates of the points and are and , respectively, find the value of .
Answer
If is parallel to the , then it is a vertical line. All the points lying on a vertical line have the same -coordinate. So, if the -coordinate of is 8, then the -coordinate of , , must be 8 as well. Hence, the value of is 8.
Let us come back to the definition of the slope. Suppose that two given points on a line are 1 unit apart horizontally. Then, we can draw a right triangle where its hypotenuse is the part of the line between the points and the other two sides are parallel to the - and respectively. The side parallel to the will be 1 unit long, and the side parallel to the will be units long, as shown.
Consider now several points evenly spaced horizontally by 1 unit so that our right triangle can be drawn between each pair of adjacent points. (Note that the angle between a horizontal line and the line is the same at any point of the line; think of the angle relationships between a pair of parallel lines and a transversal.) Thus, we can work out that two points 2 units apart horizontally are units apart vertically, and two points 3 units apart horizontally are units apart vertically, and so on.
We can generalize this observation: if two points and lie on a nonvertical line with slope , then the change in when going from to , given by , is times the change in when going from to , given by . Hence, we have
By dividing both sides of the equation by (we have since the line is not vertical), we find
Let us note this expression for the slope of a straight line in terms of the change in and the change in when going from one point of a line to another.
Relationship: Slope of a Straight Line and Coordinates of Two Points on the Line
The slope of a straight line passing through and is given by
It is worth noting that it does not matter whether is left from or not; if we swapped and in the equation above, we would change the signs of both and , which would therefore not change :
We have now established a relationship between the slope of a straight line, , and the coordinates of any two points lying on the line. In our next example, we will use this relationship to find the slope of a line passing through two given points.
Example 3: Finding the Slope of a Straight Line When Given Two Points
Determine the slope of the line that passes through the points and .
Answer
Recall that the slope of a straight line passing through points and is given by
Substituting in the values , , , and , we find
Therefore, the slope of the line is 5.
We can also check it graphically.
We see that when going from to , we move horizontally and vertically , which corresponds to two moves of horizontally and vertically, that is, a slope of 5.
The relationship between the slope and the coordinates of two points on the line is valid for any two points on the line. In other words, all the points lying on a line are linked by this relationship: the ratio of their change in to their change in is a constant, called the slope of the line. We say that points are collinear when they lie on the same straight line.
Let us use this property to solve our next example.
Example 4: Finding the 𝑦-Coordinate of a Point Given That It Is Collinear with Two Other Given Points
What is the value of so that , , and are collinear?
Answer
We are given the coordinates of two points, and , and only the -coordinate of point . We need to find the -coordinate of so that the three points are collinear, which means that they all lie on a same straight line.
Recall that the ratio of the change in to the change in between any two points on a line equals the slope of the line. Since we have the coordinates of and , we can find the slope of the line passing through and . Then, we can write that the ratio of the change in to the change in between (or ) and must equal the slope of the line if lies on it, which will allow us to find the corresponding value of .
Let us first calculate the slope of the line passing though and . We have
Substituting in the values , , , and , we find
Dividing the numerator and the denominator by 3 gives
If point lies on the line passing through and , then we have
Substituting in the values , , , , and , we find
Multiplying both sides by gives which means that
Thus, the -coordinate of point must be 0 for , , and to be collinear.
So far, we have used the concept of slope in purely mathematical examples. However, the variables and may represent real quantities. For instance, can represent the volume of water in a bathtub while it is being emptied and the time, as shown in the following diagram.
The diagram shows us that the bathtub went from containing 100 litres of water to being empty within 5 minutes. This corresponds to a change in of L and a change in of 5 min, giving a slope of
The value of for the slope means that the volume of water in the bathtub decreased by 20 litres every minute.
In our last example, we will have to find the slopes of different line segments in a real-life situation and understand their meanings.
Example 5: Finding the Slope between Two Points in a Real-World Situation
The following graph represents a journey by car. It is made of 3 parts. Part 1 is represented by , part 2 is represented by , and part 3 is represented by .
- Find the slope of .
- Find the slope of .
- Which of the following statements is not true?
- The same distance is covered in part 1 and in part 3 of the journey, but it takes half the time in part 3 compared to part 1.
- The slope gives the distance covered in one hour.
- The slope in part 1 of the journey is half that in part 3, which means that the speed in part 1 is half that in part 3.
- The change in distance is greater for part 1 of the journey than for part 3, which means that the speed is higher during part 1 than during part 3.
- Which of the following statements is true for part 2 of the journey?
- The slope of is positive, meaning the car is moving forward.
- The slope of is negative, meaning the car is moving backward.
- The slope of is zero, meaning the car is not moving.
Answer
Part 1
We need to find the slope of . We read on the graph that and . Recall that the slope is given by
This is also illustrated in the graph below.
Hence, the slope of is 50.
Part 2
We proceed in the same way as for question 1 to find the slope of . We read on the graph the coordinates of and . The slope is
Graphically, this can be shown as follows.
Thus, the slope of is 100.
Part 3
Let us look at each of the given statements to find out which one is false.
- The same distance was covered in part 1 and in part 3 of the journey, but it took
half the time in part 3 than in part 1.
The distance covered in part 1 is , and that covered in part 3 is , so the first part of this statement is true.
The time taken in part 1 is , and the time taken in part 3 is . So, it is true that the time taken in part 3 is half the time taken in part 1. - The slope gives the distance covered in one hour.
The slope is the change in distance when the change in hours is 1 hour. It is therefore the distance covered in one hour. - The slope in part 1 of the journey is half that in part 3, which means that the
speed in part 1 is half that in part 3.
We found that the slope in part 1 is 50 and that in part 3 is 100, so the slope in part 1 is half that in part 3. The second part of the statement refers to the speed; recall that speed is measured in distance per unit of time (e.g., kilometres per hour or metres per second). Since the slope gives us the distance covered in one hour, it is therefore equivalent to the speed of the car. So, the speed in part 1 is 50 km/h and that in part 3 is 100 km/h. So, it is true that the speed in part 1 is half that in part 3. - The change in time is larger for part 1 of the journey than for part 3 for the same
distance covered, which means that the speed is higher during part 1 than during part
3.
We have seen that the change in time in part 1 (that is, the duration of part 1) is and that the change in time in part 3 is . We have also found above that the distance covered is the same. However, this means that the speed was higher in part 3 since the 50 km were covered in only half an hour, while they were covered in one hour in part 1. At its speed in part 3, the car would have traveled 100 km in one hour, which is double the distance covered in part 1 in one hour.
Hence, the false statement is answer D.
Part 4
We need to find the true statement regarding the slope of line segment . Since is horizontal, its slope is zero. It means that the distance does not change during part 2 of the journey. The car is stationary, that is, it is not moving. Hence, answer C is the true statement.
Let us now recap the key points of this explainer.
Key Points
- The slope of a straight line, , gives the change in the -coordinate from left to right between any two points lying on the line that are 1 unit apart horizontally.
- For any two points lying on a straight line, the ratio of the difference in their -coordinates to the difference in their -coordinates is constant and equal to the slope of the line.
- The slope of a straight line passing through and is given by
- In a real-world context, if two quantities and are in a linear relationship, the graph representing as a function of is a straight line and its slope represents the change in for a change in of one unit of .