# Home > Algebra > Coordinate Geometry > Slope of a line

# Slope of a line

The slope of a line, also called the gradient of a line, is a measure of the steepness of the line. There are two ways to measure the slope of a line – positive and negative.

For a given line, when we move from left to right, and the line goes upwards, then we say the slope of the line (or gradient of the line) is positive, i.e. it has positive slope.

On the other hand, when we move from left to right, and the line goes downwards, then the line is said to have negative slope or negative gradient.

There is a special type of slope when the line is horizontal, i.e. it is neither going up or down. In this case, the slope of a line is zero.

## Formula for slope of a line In the diagram, consider the line joining points A (x1, y1) and B (x2, y2). Now drop perpendiculars (shown in dotted lines) from A and B to the x and y axis respectively. This forms a right-angled triangle ABC.

The lines also make an angle – the angle of inclination of the line – with the x-axis. So now, let’s consider right-angled ABC where angle BAC = (because they are corresponding angles on x-axis and BC).

Using trigonometry, we know  = (for the above diagram)

We have also defined earlier the slope of a line to be the steepness of the said line. So the slope of the line will then be equal to .

In other words, the slope of a line (represented by the letter ‘m’) is given by the formula –

m  = = The change in y-axis is called ‘rise‘ since the line rises from a lower point to a higher point. And the change in x-axis is called ‘run‘, since the line runs along the x-axis from left to right. So

m  = = = = where is the angle of inclination on a line with x-axis in the positive direction (i.e. anti-clockwise).