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 getCalculator |
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. Refer to the line on the right, defined by two given points A, B. We can see that the line slopes up and to the right so the slope will be positive.- 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
Here, y increases as x increases, so the line slopes upwards to the right. The slope will be a positive number. The line on the right has a slope of about +0.3, it goes up about 0.3 for every step of 1 along the x-axis.Negative slope
Here, y decreases as x increases, so the line slopes downwards to the right. The slope will be a negative number. The line on the right has a slope of about -0.3, it goes down about 0.3 for every step of 1 along the x-axis.Zero slope
Here, y does not change as x increases, so the line in exactly horizontal. The slope of any horizontal line is always zero. The line on the right goes neither up nor down as x increases, so its slope is zero.Undefined slope
When the line is exactly vertical, it does not have a defined slope. The two x coordinates are the same, so the difference is zero. The slope calculation is then something likeEquation 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