Main Page | See live article | Alphabetical index


In mathematics, the slope (or gradient, especially where three or more dimensions are discussed) of a straight line (within a Cartesian coordinate system) is a measure for the "steepness" of said line. This pages focuses on such slopes. With an understanding of algebra and geometry, one can calculate the slope of a straight line; with calculus, one can calculate the slope of a curved line at a point.

The concept of slope, and much of this article, applies directly to gradess or gradients in geography and civil engineering.

Table of contents
1 Definition of a Slope
2 Geometry
3 Algebra
4 Calculus

Definition of a Slope

It is generally represented by m, and defined as the change in y divided by the corresponding change in x (if the horizontal axis is the x-axis and the vertical axis is the y-axis), often written as:

and memorized as "rise over run". (The triangular symbol is the Greek letter
delta, commonly used in mathematics to mean "change". So m is equal to the change in y, the vertical coordinate, divided by the change in x, the horizontal coordinate; that is m is the ratio of the changes.) This concept is fundamental to algebra, analytic geometry, trigonometry, and calculus.

Note that it doesn't matter which two points on the line you pick, or in which order you use them: the same line will always have the same slope. Curves have "accelerating" slopes and one can use calculus to determine such slopes.

Example 1

Suppose a line runs through two points: P(13,8) and Q(1,2). By dividing the difference in y-coordinates by the difference in x-coordinates, one can obtain the slope of the line:

The slope is 1/2 = 0.5.

Example 2

If a line runs through the points (4, 15) and (3, 21) then:


The larger the slope, the steeper the line. A horizontal line has slope 0, a 45° rising line has a slope of +1, and a 45° falling line has a slope of -1. The slope of a vertical line is not defined (it does not make sense to define it as +∞, because it might just as well be defined as -∞).

The angle θ a line makes with the positive x axis is closely related to the slope m via the tangent function:

(see trigonometry).

Two lines are parallel if and only if their slopes are equal; they are perpendicular (i.e. they form a right angle) if and only if the product of their slopes is -1.


If the equation of the line is given in the form

then the slope m can be read off as the coefficient of the x variable. This form of a line's equation is called the slope-intercept form, because b can be interpreted as the y-intercept of the line, the y-coordinate where the line intersects the y-axis.

If you know the slope m of a line and a point (x0, y0) on the line, then you can find the equation of the line using the point-slope formula:

For example, consider a line running through the points (2, 8) and (3, 20). This line has a slope, m, of (20 - 8) / (3 - 2) = 12. One can then write the line's equation, in point-slope form: y - 8 = 12(x - 2) = 12x - 24; or: y = 12x - 16.

Why Algebra Can't Calculate the Slope of a Curve

In algebra, the slope of a straight line can be calculated with m = Δy / Δx; where one is calculating the slope from the values of the function at different points. However, with a curved line (such as that described by y = x²) the slope changes between each and every point described by said curve and one is thus only able to calculate an average slope, via the above method.

For example, the average slope of y = x², from x = 0 to x = 3, is m = 9 / 3 = 3 (which happens to be the actual slope at, and only at, x = 1.5). Should one attempt to use the above formula for a single point, such as (x = 3, y = 9); one then gets m = 0 / 0 ; as the &Delta for both y and x equals zero (see also: division by zero).


The concept of a slope is central to differential calculus; which deals with functions whose graph is not a line. Unlike linear functions, the slope of a non-linear function varies at different points. This slope is often referred to as a derivative. To find the slope at a given point on a curve, one must find a line which is tangent to said function, at said point. The slope of said tangential line is equal to the slope of said function at said point.