6
$\begingroup$

Sorry if this is an easy question for some, but I have tried and failed for a while now, so I need someone else to help me.

I want to figure out why $$a=\frac{f(x)-b}{x_1}$$ is equal to $$a=\frac{y_2-y_1}{x_2-x_1}$$

For example in a task where you know to points in a linear graph, you use the second formula to find $a$.

$$A: (2, 10)\\ B: (8, 130)$$

Then $a=20$.

But why is the flipped version of $f(x)=ax+b$ equal to the direct formula $a=\frac{y_2-y_1}{x_2-x_1}$? Are they even the same? What I mean is that can the two formulas be flipped/multiplied and stuff like that to be the same?

$\endgroup$
4
  • 1
    $\begingroup$ Please read this before posting: math.meta.stackexchange.com/questions/5020/… to better format your questions in future. I fixed the formatting of this first question, but you should not expect others to do this for you! $\endgroup$
    – 5xum
    Commented Oct 15, 2018 at 9:32
  • $\begingroup$ Thank you @5xum This is my first question like this, but I will do better in the future $\endgroup$ Commented Oct 15, 2018 at 9:34
  • $\begingroup$ @5xum Oups, failed the formatting of my link to the formatting page. Shame on me, and thank you for putting the correct link to the mathjax tutorial $\endgroup$
    – F.Carette
    Commented Oct 15, 2018 at 9:35
  • 1
    $\begingroup$ @AdrianFagerland Not a problem. The MathJax formatting takes some time to get used to, so when posting questions, just make your best effort. Someone will probably edit your question to make it even better, and checking what was edited is a great way to learn the syntax! $\endgroup$
    – 5xum
    Commented Oct 15, 2018 at 12:02

2 Answers 2

8
$\begingroup$

They are not equal. Your two equations feature different variables, so clearly, they cannot be the same. However, they are somewhat related, as both are closely linked to linear functions.


Short answer:

The first formula is used to calculate $a$ if you do know $b$ and you know one point on the graph of the function.

The second formula is used to calculate $a$ if you don't know $b$ and you know two points on the graph of the function.


Longer answer:

Both equations can be seen to represent the same thing, which is a linear function of $x$.

Remember: By definition, a linear function is a function of $x$ equal to $$f(x)=ax+b$$

From this equation, we can see that, by moving $b$ to the left side of the equation and dividing by $x$, the equation is equivalent to the equation $$a=\frac{f(x)-b}{x}$$ so long as $x\neq 0$.

Therefore, the above expression is an expression that is true for every point $(x,f(x))$ on the graph of the linear function.

I can use this formula to calculate $a$, for example, if I already know the value of $b$ and one single point on the line, and want to calculate $a$.


On the other hand, let's we take two points, $(x_1,y_1)$ and $(x_2,y_2)$. Then, let's imagine that the two points are on the same line, then $y_1=ax_1+b$ and $y_2=ax_2+b$. Subtracting these two equations, and some division later, we get the equation $$a=\frac{y_2-y_1}{x_2-x_1}$$

which is an equation that is true for every pair of points on the graph of the linear function.

I can use this formula to calculate $a$ if I don't know what $b$ is, so long as I know two points on the graph.


Edit:

There is also a "third", special option for calculating $a$. Let's say you happen to know two points $(x_1, y_1)$ and $(x_2, y_2)$, and the $x$ value for one of them is $0$, that is, $x_1=0$. There are now two ways of calculating $a$.

Using the fact that $f(x)=ax+b$, you can plug in $x_1=0$ and get $y_1=a\cdot 0 + b$ which means that $y_1=b$. You now know the value of $b$ and one point on the equation, which is $(x_2,y_2)$, and you can use the first formula to calculate $a$ to get $$a=\frac{f(x_2)-b}{x_2}\\ a=\frac{y_2-y_1}{x_2}\\ a=\frac{y_2-y_1}{x_2-0}\\ a=\frac{y_2-y_1}{x_2-x_1}$$

You can see that the last formula in this case is exactly the same as the second formula for calculating $a$ in your question.

$\endgroup$
14
  • $\begingroup$ Just to nitpink a bit: you have $f(0)=b$. So, knowing $b$ is the same as knowing that $(0,b)$ belongs to the graph. You can then go back to the situation where you know two points of the graph. That's where the 2 equations are linked $\endgroup$
    – F.Carette
    Commented Oct 15, 2018 at 9:32
  • 1
    $\begingroup$ @F.Carette Thanks for the thought, I edited my answer quite a bit to explain your comment. $\endgroup$
    – 5xum
    Commented Oct 15, 2018 at 9:38
  • 1
    $\begingroup$ @AdrianFagerland That's not it. If you have two equations, $A=B$ and $C=D$, then subtracting the two equations yields a new equation which is $A-C=B-D$. There is no division anywhere. Please, don't tell me the result several steps in. Just tell me what you get when you SUBTRACT the two equations $\endgroup$
    – 5xum
    Commented Oct 16, 2018 at 6:50
  • 1
    $\begingroup$ @AdrianFagerland That's correct! You are two steps away. Remember the rule that $$AB + AC = A(B+C)?$$ Try to use this rule on your equation. $\endgroup$
    – 5xum
    Commented Oct 16, 2018 at 6:58
  • 1
    $\begingroup$ @AdrianFagerland OK, maybe that wasn't taught to you as "this is a rule, you must learn it", but no doubt you were taught how to multiply expressions with unknown variables in it, and no doubt you sometimes "factorized" an expression (which is what that rule is) $\endgroup$
    – 5xum
    Commented Oct 16, 2018 at 7:14
7
$\begingroup$

What is meant by all this is that if You consider an affine-linear function ( actually just the first part $x\mapsto ax$ is linear but by abuse of language one calls the affine function $f$ linear too): $$f(x)=ax+b$$ You can compute $a$ by computing for any $x_0\neq 0$: $$a=\frac{f(x_0)-b}{x_0}$$. On the other hand You know that given two points $A(x_1|y_1)$ and $B(x_2|y_2)$ and $x_1\neq x_2$ there is exactly one affine-linear function $f$ thats graph passes through these points and since the slope of an affine-linear function is everywhere the same You can compute it by the difference-quotient: $$a=\frac{y_2-y_1}{x_2-x_1}.$$ And if the above function $f$ is this one affine-linear function that has a graph passing through $A$ and $B$ then of course You have: $$\frac{y_2-y_1}{x_2-x_1}=\frac{f(x_0)-b}{x_0}$$ for any $x_0\neq 0.$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .