Why is $m = \frac{y_2-y_1}{x_2-x_1}$?

251 Views Asked by At

My question applies to graph questions in general. Given that the equation for a straight line is $y=mx+c$, wouldn't it be easier to calculate the value of a gradient using algebra: $$ \frac{y-c}{x}=m $$ instead of using the formula $\frac{y_2-y_1}{x_2-x_1}$? It just seems unnecessarily complicated and also requiring more than one data point when the gradient of a line can be calculated using only the coordinates of one point.

Ex: enter image description here Let's pick one data point on this line, like $(1,4)$. We also know that the y-intercept is 1. If we substitute this into our formula we get $\frac{4-1}{1}=3$ which is in fact the gradient of this line. Why should we go to the trouble of using multiple data points?

2

There are 2 best solutions below

0
On BEST ANSWER

The formula $$m=\frac{y_2-y_1}{x_2-x_1}$$ is defined for any points of the linear graph that exist (either the point is intercept at x-axis or y-axis). Your formula is surely correct given that point $(0,c)$ for y-intercept or $(b,0)$ for x-intercept will gives : $$m=\frac{y_2-c}{x_2}$$ or $$m=\frac{y_2}{x_2-b}$$

But, the question is, how you will find $b$ and $c$ first before using the the formula above?

0
On

If you know the $y$ intercept, i.e., if you aready know the value of $c$, then yes, you can calculate $$m=\frac{y-c}{x}.$$ The formula $$m=\frac{y_2-y_1}{x_2-x_1}$$ allows you to calculate $m$ when you know two points on the line. In other words, these are two different formulas for two different pairs of input parameters (in one case, the input is a point and the $y$ intercept, in the other, the input is a point and another point).

You can see, however, that the two formulas are quite closely connected. In fact, you can still use the second formula even if you know the $y$ intercept $c$ and a point $(x_2,y_2)$. You can do this becaues "knowing the $y$ intercept is $c$" is equivalent to "knowing that $(0,c)$ is a point on the line. So, if $c$ is the intercept, then if you set $x_1=0, y_1=c$, then $(x_1, y_1)$ is also on the line, which means the second formula gives us

$$m = \frac{y_2-y_1}{x_2-x_1} = \frac{y_2 - c}{x_2 - 0} = \frac{y_2-c}{x_2}$$ which is your second equation.