Examples:
Adjust the line below by dragging an orange dot at point A or B. The slope of the line is continuously recalculated. You can also drag the origin point at (0,0).
Because the line slopes downwards to the right, it has a negative slope. As x increases, y decreases. If the line sloped upwards to the right, the slope would be a positive number. Adjust the points above to create a positive slope.
Formula for the slope
Given any two points on the line, its slope is given by the formula
![]() |
where: Ax the x coordinate of point A Ay the y coordinate of point A Bx the x coordinate of point B By the y coordinate of point B |
Example
In the diagram at the top of the page click on "reset". Substituting the coordinates for A and B into the formula, we get
![]() |
![]() |
Finding the slope of a line by inspection
Rather than just plugging numbers into the formula above, we can find the slope by understanding the concept and reasoning it out.
- Calculate dx, the horizontal distance from the left point to the right point. Since B is at (15,5) its x-coordinate is the first number, 15. The x-coordinate of A is 30. So the difference (dx) is 15.
- Calculate dy, the amount the line rises or falls as you go to the right. Since B is at (15,5)
its y-coordinate is the second number or 5.
The y-coordinate of A is 25. So the difference (dy) is +20.
It is positive because the line goes up as you go to the right. It would have been negative otherwise. - Dividing the rise (dy) by the run (dx):
Slope direction
The slope of a line can positive, negative, zero or undefined.Positive slope

Negative slope

Zero slope

Undefined slope


Equation of a line
The slope m of a line is one of the elements in the equation of a line when written in the "slope and intercept" form: y = mx+b. The m in the equation is the slope of the line described here. For more on this see:- Intercept of a line
- Equation of a line
- Equation of a vertical line
Slope as an angle
The slope of the line can also be expressed as an angle, usually in degrees or radians.In the figure above click on "show angle". By convention the angle is measured from any horizontal line (parallel to x-axis). Lines with a positive slope (up and to the right) have a positive angle, and a negative angle for a negative slope. Change the slope by dragging A or B and see this for yourself.
To convert from slope m to slope angle and back:
angle = arctan(m)
m = tan(angle)
Tan, and its inverse arctan
0 Comments:
Post a Comment