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.
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).
= (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 –
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
where is the angle of inclination on a line with x-axis in the positive direction (i.e. anti-clockwise).