Calculating gradient of a line: how do you know which way to order the points?

Very simple question but I keep getting this wrong!

If you have two points e.g. $A(13, 6$) & $B(11, 12)$,

Using the gradient formula $m = \frac{(y_2 - y_1)}{(x_2 - x_1)}$ how do you know which of $A$ or $B$ corresponds to $(x_1, y_1)$?

I can work this out by drawing a diagram of the line. If the slope is negative, the higher of the two points is $(x_1, y_1)$. Otherwise the lower is.

But this takes too long in an exam. Is there a quicker way?

Thanks!

-

It doesn't matter which point is which, since $$\frac{y_2-y_1}{x_2-x_1}\cdot\frac{-1}{-1}=\frac{-y_2+y_1}{-x_2+x_1}=\frac{y_1-y_2}{x_1-x_2}.$$ In your specific example, $$\frac{6-12}{13-11}=\frac{-6}{2}=-3$$ and $$\frac{12-6}{11-13}=\frac{6}{-2}=-3.$$

-