Slope is rise over run

Slope between (1, 2) and (4, 8) is (8 − 2) / (4 − 1) = 2. The order has to match: if you reverse the x subtraction, reverse the y subtraction too. Mixing the order flips the sign.

Check the point (1, 2) against a line of slope 2 through it: one step right, two steps up lands on (2, 4), which is still on that line.

Coordinate geometry formulas, with the worked form: MathGPT.