The slope of a line characterizes the direction of a line. To find the slope, you divide the difference of the y-coordinates of 2 points on a line by the difference of the x-coordinates of those same 2 points.
Different words, same formula
Teachers use different words for the y-coordinates and the the x-coordinates.
These words all mean the same thing, which is that the y values are on the top of the formula (numerator) and the x values are on the bottom of the formula (denominator)!
Example One
Remember: difference in the y values goes in the numerator of formula, and the difference in the x values goes in denominator of the formula.
There is only one way to know!
Example 2 of the Slope of A line
Video Tutorial on the Slope of a Line
Slope of vertical and horizontal lines
The slope of a vertical line is undefined
The slope of a horizontal line is zero
Do any two points on a line have the same slope?
Answer: Yes, and this is a fundamental point to remember about calculating slope.
Every line has a consistent slope. In other words, the slope of a line never changes. This fundamental idea means that you can choose any 2 points on a line.
As you can see below, the slope is the same no matter which 2 points you chose.
Algebra 1
How do we find the slope of a linear equation? Let’s dive in and discover!
While mathematics is often grouped with the sciences, in some respects, math is a beautiful language. For instance, when comparing how something grows, one might say it grows slowly, moderately, or quickly. But, how slowly? How quickly? Using mathematics, we can describe the growth of functions using slope.
In this review, we will explain how to find slope, focusing on linear functions. By the end, you will know how to find the slope of a line. This includes how to find slope with two points, how to find slope using a graph, and how to find the slope of an equation.
What is slope?
A linear function will look like a straight line when graphed. Here are some examples of linear equations and their slopes (click images to expand):
What is the formula for slope?
Slope Formula
“Rise Over Run”
In the slope formula above, the letter m represents the slope.
Below is a visual to understand what we mean by “rise” (vertical change shown in the dotted blue line) and “run” (horizontal change shown in the dotted green line):
Negative vs Positive Slope of Linear Equations
Positive Slope
When a function has a positive slope, the line is moving up from left to right. In other words, as the value of x increases, the value of y also increases. The greater the slope of a positive-slope line, the steeper the line is.
Here are some examples of lines with positive slopes (click images to expand):
Negative Slope
When a function has a negative slope, the line is moving down from left to right. In other words, as the value of x increases, the value of y decreases. The lower the slope of a negative-slope line, the steeper the line is.
Here are some examples of lines with negative slopes (click images to expand):
Find Slope from Two Points (Example)
We will now talk about how to find slope with two points.
Remember, we can start with the formula for slope:
Slope Formula
Before we can substitute the values into the equation, we should label the points.
And next, we simplify to find the slope of the line.
If helpful, here’s a quick video explaining how to calculate the slope when given two points:
Find Slope From a Graph (Example)
To calculate the slope of a line from a graph, we use the graph to determine the rise (the vertical change) and the run (the horizontal change)
To begin, we select two points on the graph that are easy to identify. We can consider the line y=2x-1 as an example.
We now know how to find slope using a graph!
For those who prefer videos, here’s a quick clip showing this method of finding slope from a graph:
Find Slope From an Equation (Example)
If you want to know how to find the slope of a linear equation, you must first know that linear equations are often written in slope-intercept form.
In slope-intercept form, an equation is written:
Slope-Intercept Form
For example, consider the equation:
If you encounter an equation in a different form, simply solve the equation for y and write the equation in slope-intercept form. Then, you can use this method to determine the slope.
In addition, this article has some great real-life applications of slope.
And here’s a quick video on how to find the slope of a line when given an equation:
Slope of Horizontal and Vertical Lines
When learning how to calculate slope, there are two unusual cases that require some special attention: horizontal and vertical lines.
Horizontal Lines
If you are finding slope from two points and you end up with zero in the numerator, you have found the slope of a horizontal line.
The equation of a horizontal line is y=a where a is a real number. Here are two examples of horizontal lines shown in red (click images to expand):
Vertical Lines
If you are finding slope from two points and you end up with zero in the denominator, you have found the slope of a vertical line.
The equation of a vertical line is x=a where a is a real number. Here are two examples of vertical lines shown in red (click images to expand):
Summary: Slope of Linear Equations
Practice Problems With Slope
Now that we know how to find slope with two points, how to find slope using a graph, and how to find the slope of an equation, it’s time to practice our new skills.
Interested in a school license?
Bring Albert to your school and empower all teachers with the world’s best question bank for:
➜ SAT® & ACT® ➜ AP® ➜ ELA, Math, Science, & Social Studies ➜ State assessments
*AP® and Advanced Placement® are registered trademarks of the College Board, which was not involved in the production of, and does not endorse, this product. SAT® is a registered trademark of the College Board, which was not involved in the production of, and does not endorse this product. ACT® is a registered trademark of ACT®, Inc., which was not involved in the production of, and does not endorse, this product. GMAT® is a registered trademark of the Graduate Management Admission Council®, which was not involved in the production of, and does not endorse, this product. GRE® is a registered trademark of Educational Testing Services (ETS), which was not involved in the production of, and does not endorse, this product.
Interested in a school license?
Bring Albert to your school and empower all teachers with the world’s best question bank for:
➜ SAT® & ACT® ➜ AP® ➜ ELA, Math, Science, & Social Studies ➜ State assessments
Options for teachers, schools, and districts.
Slope
The slope of a line is the measure of the steepness and the direction of the line. Finding the slope of lines in a coordinate plane can help in predicting whether the lines are parallel, perpendicular, or none without actually using a compass.
The slope of any line can be calculated using any two distinct points lying on the line. The slope of a line formula calculates the ratio of the «vertical change» to the «horizontal change» between two distinct points on a line. In this article, we will understand the method to find the slope and its applications.
1.
What is Slope?
2.
Slope of a Line
3.
Slope of a Line Formula
4.
How to Find Slope?
5.
Types of Slope
6.
Slope of Perpendicular Lines
7.
Slope of Parallel Lines
8.
FAQs on Slope
What is Slope?
The slope of a line is defined as the change in y coordinate with respect to the change in x coordinate of that line. The net change in y coordinate is Δy, while the net change in the x coordinate is Δx. So the change in y coordinate with respect to the change in x coordinate can be written as,
m = Δy/Δx where,m is the slope
Note that tan θ = Δy/Δx
We also refer this tan θ to be the slope of the line.
Slope of a Line
The slope of the line is the ratio of the rise to the run, or rise divided by the run. It describes the steepness of line in the coordinate plane. Calculating the slope of a line is similar to finding the slope between two different points. In general, to find the slope of a line, we need to have the values of any two different coordinates on the line.
Slope Between Two Points
The slope of a line can be calculated using two points lying on the straight line. Given the coordinates of the two points, we can apply the slope of line formula. Let coordinates of those two points be, P1 = (x1, y1) P2 = (x2, y2)
Hence, using these values in a ratio, we get :
where, m is the slope, and θ is the angle made by the line with the positive x-axis.
Slope of a Line Formula
The slope of a line can be calculated from the equation of the line. The general slope of a line formula is given as,
Slope of a Line Example
Let us recall the definition of slope of a line and try solving the example given below.
Solution:
We know that if the slope is given as 1, then the value of m will be 1 in the general equation y = mx + b. So, we substitute the value of m as 1, and we get,
How to Find Slope?
We can find the slope of the line using different methods. The first method to find the value of the slope is by using the equation is given as,
Also, the change in x is run and the change in y is rise or fall. Thus, we can also define a slope as, m = rise/run
Finding Slope from a Graph
While finding the slope of a line from the graph, one method is to directly apply the formula given the coordinates of two points lying on the line. Let’s say the values of the coordinates of the two points are not given. So, we have another method as well to find the slope of the line. In this method, we try to find the tangent of the angle made by the line with the x-axis. Hence, we find the slope as given below.
The slope of a line has only one value. So, the slopes found by Methods 1 and 2 will be equal. In addition to that, let’s say we are given the equation of a straight line. The general equation of a line can be given as,
The value of the slope is given as m; hence the value of m gives the slope of any straight line.
The below-given steps can be followed to find the slope of a line such that the coordinates of two points lying on the line are: (2, 4), (1, 2)
Types of Slope
We can classify the slope into different types depending upon the relationship between the two variables x and y and thus the value of the gradient or slope of the line obtained. There are 4 different types of slopes, given as,
Positive Slope
Graphically, a positive slope indicates that while moving from left to right in the coordinate plane, the line rises, which also signifies that when x increases, so do y.
Negative Slope
Graphically, a negative slope indicates that while moving from left to right in the coordinate plane, the line falls, which also signifies that when x increases, y decreases.
Zero Slope
For a line with zero slope, the rise is zero, and thus applying the rise over run formula we get the slope of the line as zero.
Undefined Slope
For a line with an undefined slope, the value of the run is zero. The slope of a vertical line is undefined.
Slope of Horizontal Line
We know that, a horizontal line is a straight line that is parallel to the x-axis or is drawn from left to right or right to left in a coordinate plane. Therefore, the net change in the y-coordinates of the horizontal line is zero. The slope of a horizontal line can be given as,
Slope of a horizontal line, m = Δy/Δx = zero
Slope of Vertical Line
We know that, a vertical line is a straight line that is parallel to the y-axis or is drawn from top to bottom or bottom to top in a coordinate plane. Therefore, the net change in the x-coordinates of the vertical line is zero. The slope of a vertical line can be given as,
Slope of a vertical line, m = Δy/Δx = undefined
Slope of Perpendicular Lines
A set of perpendicular lines always has 90º angle between them. Let us suppose we have two perpendicular lines l1 and l2 in the coordinate plane, inclined at angle θ1 and θ2 respectively with the x-axis, such that the given angles follow the external angle theorem as, θ2 = θ1 + 90º.
Slope of Parallel Lines
A set of parallel lines always have an equal angle of inclination. Let us suppose we have two parallel lines l1 and l2 in the coordinate plane, inclined at angle θ1 and θ2 respectively with the x-axis, such that the, θ2 = θ1.
Therefore, their slopes can be given as, ⇒ m1 = m2
Thus, the slopes of the two parallel lines are equal.
Important Notes on Slope:
Challenging Question:
☛ Related Topics:
Solved Examples on Slope
Example 1: Given a line with the equation, 2y = 8x + 9, find its slope.
Solution:
We know that the general formula of the slope is given as, y = mx + b
Hence, we try to bring the equation to this form. We make the coefficient of y = 1, and hence we get,
Clearly, the coefficient of x is found to be 4. Hence, our slope will be same as the coefficient of x.
Example 2: The equation of a line is given as x = 5. Find the slope of the given line.
Solution:
The equation is given as x = 5. We can thus see that y is missing from our equation. Hence, we can assume the coefficient of y to be 0 for now. Thus we now get,
Now, we try to make the coefficient of y as 1. Let us try dividing both sides by Zero. We know that mathematically, if any real is divided by Zero, then the value can not be determined.
In this case, the coefficient of x divided by Zero will give us our slope. But we know that the answer will not be defined in such a case. So we can safely say that our slope is not defined in such cases.
Slope is not defined.
Example 3: If the rise is 10 units, while the run is just 5 units, find the slope of the line.
Solution:
We know that the slope of a line will be
Now, substituting the values, we will get
m = Rise/Run = 10/5 = 2
Solution:
We know that the slope of any line is the tangent of its angle made with the x-axis. So, if the line is given to be parallel to the x-axis itself, then the angle made will be 0º. Hence, tan 0º will be 0. So the value of the slope is found to be,
Hence, the value of the slope will be Zero.
How to Find Slope? (+FREE Worksheet!)
The slope of a line shows the direction of the line. In this article, you learn how to find the slope of a line.
Related Topics
Step by step guide to finding slope
Finding Slope – Example 1:
Find the slope of the line through these two points: \((1,–9)\) and \((2,5) \).
Find the slope of a line with these two points: \((2,–10)\) and \((3,6)\).
Solution:
Finding Slope – Example 4:
Find the slope of the line with equation \(y=3x+6\)
Solution:
Exercises for Finding Slope
Find the slope of the line through each pair of points.
Download Finding Slope Worksheet
Answers
by: Reza about 3 years ago (category: Articles)
Reza is an experienced Math instructor and a test-prep expert who has been tutoring students since 2008. He has helped many students raise their standardized test scores—and attend the colleges of their dreams. He works with students individually and in group settings, he tutors both live and online Math courses and the Math portion of standardized tests. He provides an individualized custom learning plan and the personalized attention that makes a difference in how students view math.
Slope and Intercept
Now we will explain how we found the slope and intercept of our function:
Find The Slope
The slope is defined as how much calorie burnage increases, if average pulse increases by one. It tells us how «steep» the diagonal line is.
We can find the slope by using the proportional difference of two points from the graph.
We see that if average pulse increases with 10, the calorie burnage increases by 20.
Mathematically, Slope is Defined as:
f(x2) = Second observation of Calorie_Burnage = 260 f(x1) = First observation of Calorie_Burnage = 240 x2 = Second observation of Average_Pulse = 90 x1 = First observation of Average_Pulse = 80
Be consistent to define the observations in the correct order! If not, the prediction will not be correct!
Use Python to Find the Slope
Calculate the slope with the following code:
Example
def slope(x1, y1, x2, y2): s = (y2-y1)/(x2-x1) return s
Find The Intercept
The intercept is used to fine tune the functions ability to predict Calorie_Burnage.
The intercept is where the diagonal line crosses the y-axis, if it were fully drawn.
The intercept is the value of y, when x = 0.
Here, we see that if average pulse (x) is zero, then the calorie burnage (y) is 80.
So, the intercept is 80.
Sometimes, the intercept has a practical meaning. Sometimes not.
Does it make sense that average pulse is zero?
No, you would be dead and you certainly would not burn any calories.
However, we need to include the intercept in order to complete the mathematical function’s ability to predict Calorie_Burnage correctly.
Other examples where the intercept of a mathematical function can have a practical meaning:
Find the Slope and Intercept Using Python
The np.polyfit() function returns the slope and intercept.
If we proceed with the following code, we can both get the slope and intercept from the function.
x = health_data[«Average_Pulse»] y = health_data[«Calorie_Burnage»] slope_intercept = np.polyfit(x,y,1)
Example Explained:
Tip: linear functions = 1.degree function. In our example, the function is linear, which is in the 1.degree. That means that all coefficients (the numbers) are in the power of one.
We have now calculated the slope (2) and the intercept (80). We can write the mathematical function as follow:
Predict Calorie_Burnage by using a mathematical expression:
Now, we want to predict calorie burnage if average pulse is 135.
Remember that the intercept is a constant. A constant is a number that does not change.
We can now substitute the input x with 135:
If average pulse is 135, the calorie burnage is 350.
Define the Mathematical Function in Python
Here is the exact same mathematical function, but in Python. The function returns 2*x + 80, with x as the input:
Example
def my_function(x): return 2*x + 80
Try to replace x with 140 and 150.
Plot a New Graph in Python
Here, we plot the same graph as earlier, but formatted the axis a little bit.
Max value of the y-axis is now 400 and for x-axis is 150: