Slope Formula of a Straight Line  Step by Step 
The slope of a straight describes the line's angle of steepness from the horizontal whether it rises or falls. When the line neither rises nor falls, then we claim that it has a slope of zero. This is in fact the case of a horizontal line where it extends infinitely to its left or right but without any sign of "rising" or "falling". In this lesson, the focus is to go over lots of worked examples to illustrate how to use the formula itself.
Remember that two points determine a line. Thus, it is possible to calculate the slope of a straight line, denoted by the symbol , when we know at least two points where the line passes through.
Slope Formula 
The slope, , of a line passing through two arbitrary points and is calculated as follows...


Few observations:
 The first point is assigned with subscript 1, while the second point is assigned with subscript 2.
 The numerical value for slope is expressed in fraction. The numerator contains the difference of yvalues, while the denominator contains the difference of xvalues.
 The slope formula is conceptually defined as the rise over run. The "rise" pertains to the movement of the point along the yaxis, and the "run" pertains to the movement along the xaxis.
Another way of remembering the slope formula is to think of it as the ratio of the change in ycoordinates and xcoordinates, or the division between the difference in yvalues and xvalues. The y's must stay on top the x's.
Direction: Find the slope of the line passing through the given two points.
Example 1: Determine the slope of the line passing through the points .
Start by assigning which ones will be our first and second points. If we decide to make (3,5) as the first point, then (7,13) should automatically be the second. The first point uses subscript 1, and the second point uses subscript 2.
The diagram below should help us visualize the first step.
Next, it is now easy to extract the values that we will substitute in the slope formula.
We are now ready to substitute the known values into the formula.
At , we have a positive slope and therefore the straight line is rising/increasing from left to right. In other words, having a positive slope is like climbing up a hill. See the graph below.
Example 2: Determine the slope of the line passing through the points .
Identify the first and second points.
If we assigned the points to be... 
The coordinate values of each point will be... 






Plug these values in the slope formula. Make sure that you subtract the numbers correctly. This is usually where students commit errors because they tend to be careless when doing basic arithmetic operations.
Here is the graph of the line passing through points with its corresponding negative slope of . This means that the straight line is falling/decreasing from left to right. You may think of it as somebody going down the hill.
Example 3: Determine the slope of the line passing through the points .
In this example, I'd like to show you that the numerical value of the slope is ALWAYS the same, regardless which points you pick to be the "first" or "second". As long as you maintain the correct order in subtracting the corresponding y and x coordinates, the slope should come out unchanged.
Let me illustrate the idea by solving the slope twoways. See side by side comparison below.
Case 1 (usual order of points) 

Case 2 (reverse order of points) 



Label each point with appropriate x and y coordinates. 



Evaluate the values into the slope formula 



That's right! We have shown that the final answers for slope came out the same although we switched the order of points.
 Just a quick reminder, be very careful when you are subtracting negative numbers. Remember that subtracting by a negative number is the same as adding the positive value of that number. You may have heard before that "two negative signs" becomes positive. That is the reason why when I was subtracting by a negative number, I intentionally placed that negative number inside a parenthesis to prompt me to be a little bit careful in dealing with signs.
Example 4: Find the slope of the line that goes through the points .
Solve this again side by side in two ways, to nail down the concept that reversing the order of points doesn't affect the final outcome of the slope.
Case 1 (usual order of points) 

Case 2 (reverse order of points) 



Label each point with appropriate x and y coordinates. 



Evaluate the values into the slope formula 



This is wonderful! The same final answers using two different routes of calculation.
Example 5: Find the slope of the line that goes through the points .
If you want to solve this step by step, you may do it this way.
Step 1: Label the points 

Step 2: Extract values 

Step 3: Write the slope formula 

Step 4: Substitute values from Step 2, then simplify. 

Notes:
 For the numerator: adding two negative numbers yields a negative answer. Since .
 Also, dividing two negative numbers results to a positive answer. That's why our final answer for slope is m = + 4.
Example 6: Find the slope of the line that goes through the points .
This looks like a fun problem because all the entries of the two points are negative numbers. I bet you that your teacher may throw something like this in order to test if you are careful dealing with the subtraction of negative numbers.
Let the first point be (−3,−4), and (−1,−2) be the second. Labeling their corresponding coordinate values, and substituting we should get
First point 
Second point 


Evaluate values into the slope formula 

Example 7: Solve the slope of the line passing through the points .
This problem is an example where the line passing through the two points is a horizontal line. It happens when the computed value of the slope equals zero!
Suppose , and . The slope of this straight line equals...
Indeed, the line is horizontal as shown in the graph. The line behaves this way because no matter how the xcoordinates vary, the yvalues are constant or not changing. The effect is that as long as the y doesn't change, the plotted points will all remain in that same horizontal line where y = 8.
Example 8: Solve the slope of the line passing through the points .
This last example illustrates when the line passing through two given points is a vertical line. All vertical lines have no slope because the numerical value of their slopes results to the division by zero, commonly known as undefined.
Suppose , and . The slope of the straight line equals
Any nonzero number divided by zero has no answer. That's why we just call it undefined.
Here's the graph to show the vertical line.
