Statistics Definitions > What is a Slope?

## What is a slope?

The word “slope” in math has roughly the same meaning in math as it has in everyday language:

“…a surface of which one end or side is at a higher level than another; a rising or falling surface.”

It’s slightly more defined when used in math; it’s a number that describes both the direction (positive or negative) *and *the steepness of the line. It’s usually denoted by the letter **m**.

## What is a Slope? The Slope Formula

The **slope formula **is:

y = m x + b

Where b = the y intercept (where the graph crosses the y-axis), m is the slope and x is a variable.

## How to Find the Slope

The slope of a line is found by dividing the “rise” (the length of a segment on the y-axis) by the “run” (the length of a segment on the x-axis). The rise (the length of the vertical blue line) in the above picture is 4 and the run (the length of the horizontal blue line) is 2, so 4/2 = 2.

## Formulas to Find the Slope

1. Basic linear equation formula: y = mx + b, where “m” is the slope.

The slope of a line tells you how steep the line is; the higher the number, the steeper the line. To find the slope, find the coefficient of x. In other words, look for the “**m**” variable, the multiplier of x. Sometimes you just need to look at the formula (example 1), or you may need to use a little algebra to get the equation in the right form (example 2).

**Examples**:

- The slope of y = 2x + 5 is 2.
- The slope of
**3y – 9x = 12**is 3, because if we rearrange the formula to look like y = mx + b we get:

Adding 9x to both sides: 3y = 9x + 12.

Dividing by 3 (both sides): y = 3x + 4.

**Tip**: if there’s nothing before the x (i.e. y = x + 2), the slope is 1, because 1*x = x.

2. Basic Slope Formula: Slope = rise/run = (y

_{2}– y_{1}) / (x_{2}– x_{1}).

The slope formula is pretty straightforward to use if you’re given a set of points (example 1). You might also be asked what the slope is for something like y = -9 (example 2) or x = -2.5 (example 3). Although they are both equations (and you might think that y = mx + b will help), you actually need the slope formula to visualize the answer.*

**Examples**:

**The slope of the points (2,1) and (4,2)**is 1/2 because: (y_{2}– y_{1}) / (x_{2}– x_{1}) = (2 – 1) / (4 – 2) = 1/2.**The slope of y = 9 is zero**. The graph of y = 9 is parallel to the x-axis and is flat (i.e. it doesn’t rise or fall at all). You*could*use the formula to work this out by choosing a couple of random x-values (I’m going to pick 2 and 3):

Slope = (y_{2}– y_{1}) / (x_{2}– x_{1})

= (9 – 9)/(2 – 1) = 0 / 1 = 0.

As the y-values are constant and will always equal zero when subtracted (i.e. 10 – 10, 4 – 4, -3 – -3), the slope of a line with the equation y = “any number” will always be zero.**The slope of x = 5 is undefined**.**Any line with an equation of x = “any number” is going to be undefined**because look what happens when you plug a couple of points (any random points) into the formula:

Slope = (2 – 1) / (5 – 5) = 1 / 0 = division by zero is undefined.

*That said, technically you could just memorize that equations with the form y = “any number” has a slope of zero and x = “any number” has an undefined slope.

## Why is the Slope Useful?

The slope is a measure of rate of **how fast (or slow) changes are taking place.** Rate of change is used heavily in physics, chemistry, economics and many other branches of science. Rates of change enable us to make predictions about how data is going to behave in the future; a stockbroker might want to predict the future behavior of a stock market or a doctor might want to predict the time it takes a medication to cure an illness. These, and many more situations in real life, have their basis in mathematical equations and more simply — the humble slope. Without the slope, future predictions with statistics (e.g. with regression analysis) would not be possible!

## What is a Slope: History

**Slope** has been in use in mathematics since at least 1829, when it first appeared in George D. Burr’s **A treatise on practical surveying and topographical plan drawing**: “When these lines differ but little from the horizontal lines, they may be taken for them; but if the slope is very great it is easy to reduce them, because we have always the hypotenuse and perpendicular of a right-angled triangle given by our measurement to find the base.”

If you prefer an online interactive environment to learn R and statistics, this *free R Tutorial by Datacamp* is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try *this Statistics with R track*.

*Facebook page*and I'll do my best to help!