The slope of a line defines the inclination of the line with respect to the x-axis. The slope can be calculated by obtaining the ratio of the difference in the change in y over the change in x. Here, we will learn about the formula that we can use to calculate the slope of a line.
We will learn about the slope of common lines and we will solve some practice problems.
Formula for the slope of a line
The formula for the slope of a line is derived using the coordinates of two points that lie on the line. Therefore, we find the slope of a line by forming a fraction, where the numerator is equal to the difference of the y-coordinates and the denominator is equal to the difference of the x-coordinates. That is, if we have the points and , the slope formula is:
|Formula for the slope|
Slope of a horizontal line
The slope of a horizontal line can be found by applying the slope formula taking into account that the y-coordinates of all points that lie on a horizontal line are the same. Therefore, we have:
This means that the slope of all horizontal lines is equal to 0.
Slope of a vertical line
Vertical lines have no slope since we cannot define the slope of vertical lines numerically. This is because the x-coordinates of all points on a vertical line are the same. Therefore, when we apply the slope formula with vertical lines, we have:
We know that division by 0 is undefined.
Slope of parallel lines
Consider the following two parallel lines, and , which have slopes α and β. For the lines to be parallel, the slopes must be the same. This means that we have α = β.
Therefore, two parallel lines always have the same slope. Therefore, if we want to determine if two or more lines are parallel, we have to make sure that their slopes are the same.
Slope of perpendicular lines
In the following diagram, we have the lines and , which have the slopes α and β:
If these lines are perpendicular, we can say that β = α+90°. Also, we can write the slopes as follows:
Therefore, for two lines to be perpendicular, the product of their slopes must equal -1. Alternatively, we can think of two perpendicular lines as having slopes that are the negative reciprocal of each other.
Slope of a line – Examples with answers
The following examples are solved using the formula for the slope of a line. Try solving the problems first before looking at the solution.
The points (1, 1) and (3, 5) are part of a line. What is the slope of the line?
The points given are:
Using the coordinates of the points given in the slope formula, we have:
The slope of the line is 2.
A line contains the points (2, 3) and (6, 5). What is its slope?
We have the following points:
Applying the slope formula with these points, we have:
The slope of the line is .
The points (-3, 2) and (3, 4) are part of a line. What is its slope?
We have the following coordinates:
Applying the slope formula with these coordinates, we have:
The slope of the line is .
Determine the slope of a line that contains the points (-3, -2) and (2, -7).
We have the points:
Now, we use these coordinates in the slope formula:
The slope of the line is -1.
Slope of a line – Practice problems
Use the formula for the slope of a line to solve the following problems. If you need help with this, you can look at the solved examples above.
Interested in learning more about distance, midpoint, and slope on the plane? Take a look at these pages: