The gradient, often denoted by $m$ of a line segment between two points, $A(x_1,y_1)$ and $B(x_2,y_2)$ is given by

$$ m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1} $$Note here we have used the $\Delta$-notation to mean "change in", so the formula read "change in $y$ divided by the change in $x$", this is significant because we tweak this notation to introduce differentiation.

An additional important result is that if two lines, with gradients, $m$ and $n$, are perpendicular, then $$m\times n = - 1$$