To prove the slope formula, use the following definition of slope.
m=change in x-valuechange in y-value
Consider a line passing through the points
(x1,y1) and
(x2,y2).
Notice that the change in y-value is the difference between the y-coordinates of the points as well as the change in x-value is the difference between the x-coordinates.
From here, the slope formula can be found by substituting
y2−y1 and
x2−x1 for the change in
y-value and the change in
x-value, respectively.
m=change in x-valuechange in y-value⇓m=x2−x1y2−y1