Definition: The slope of a line is a number that measures its "steepness", usually denoted by the letter m.
It is the change in y for a unit change in x along the line.

Try this
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).

The slope of a line (also called the gradient of a line) is a number that describes how "steep" it is. In the figure above press 'reset'. Notice that for every increase of one unit to the right along the horizontal x-axis, the line moves down a half unit. It therefore has a slope of -0.5. To get from point A to B along the line, we have to move to the right 30 units and down 15. Again, this is a half unit down for every unit across.

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.

where: | |

A_{x} |
is the x coordinate of point A |

A_{y} |
is the y coordinate of point A |

B_{x} |
is the x coordinate of point B |

B_{y} |
is the y coordinate of point B |

- 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):

A way to remember this method is "rise over run". It is the "rise" - the up and down difference between the points, over the "run" - the horizontal run between them. Just remember that rise going downwards is negative.

A vertical line has an equation of the form x = a, where a is the x-intercept. For more on this see Slope of a vertical line.

For more on this see:

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, are described in
Trigonometry Overview
- In the above diagram, Drag the points A and B around and notice how the calculated slope changes. Try and get a positive, negative, zero and undefined slope
- Click "hide details". Drag A and B to some new locations and calculate the slope of the line yourself. Then click "show details" and see how close you got. For a bonus, estimate the slope from two points on the line of your own choosing, rather than A and B.
- Adjust the points A and B to get a slope of +1 and -1. What do you notice about the slope? (Answer: the slope is 45° - the line is half way between vertical and horizontal). Click on "show angle" to verify.

In the interest of clarity in the applet above, the coordinates are rounded off to integers and the lengths rounded to one decimal place. This can cause calculatioons to be slightly off.

For more see Teaching Notes

- Introduction to coordinate geometry
- The coordinate plane
- The origin of the plane
- Axis definition
- Coordinates of a point
- Distance between two points

- Introduction to Lines

in Coordinate Geometry - Line (Coordinate Geometry)
- Ray (Coordinate Geometry)
- Segment (Coordinate Geometry)
- Midpoint Theorem

- Cirumscribed rectangle (bounding box)
- Area of a triangle (formula method)
- Area of a triangle (box method)
- Centroid of a triangle
- Incenter of a triangle
- Area of a polygon
- Algorithm to find the area of a polygon
- Area of a polygon (calculator)
- Rectangle
- Square
- Trapezoid
- Parallelogram

(C) 2011 Copyright Math Open Reference.

All rights reserved

All rights reserved