The gradient (also known as slope) of a line is defined as
gradient=vertical risehorizontal run
In the following triangle, the gradient of the line is given by: ab
In general, for the line joining the points (x1, y1) and (x2, y2), we have:
We can now write the fomula for the slope of a line.