Algebra behind the Straight Line Equation "y = m x + b"

nosit

Junior Member
Joined
Aug 9, 2020
Messages
51
Hello everyone,

When I draw the straight line into a chart, I can easily see the slope formula in a way that makes sense:

m = ΔY/Δx

However, if we kick off from the basic equation below:

y = m x + b

When isolating M, we get the following:

m = y-b/x

The numerator represents well the ΔY, however I cannot see the change in X!

I suppose that a straight line departs or passes always from/through coordinate (0,b) where b can be any number in the Y-axis, which means the denominator would be "x-o" which equals x and the equation above despite being only X in the denominator, it already represents Δx.

But for this equation to make sense, all straight lines need to depart or pass (0,b), correct?
What about the cases in which the straight line does not touch the Y axis (as per attachment), how this "m = y-b/x" can be the same as this "m = ΔY/Δx"?

Thank you in advance!
 

Attachments

  • linear-regression.png
    linear-regression.png
    3.9 KB · Views: 2
Not every line can be written as your "basic" equation y= mx+ b.

The y-axis is vertical. Any line that does NOT touch the y-axis must be parallel to it so must be vertical so has x constant and cannot be written in that form. A vertical line does NOT have a "slope" (some would say "the slope is infinite").
 
[MATH]y = mx + b \implies mx = y - b \implies m = (y - b)/x \ne y - b/x.[/MATH]
Because you may have had an error at the start, it is difficult to see what you are driving at. I have no idea what you mean by numerator: b or y - b. In any case, neither numerator equals [MATH]\Delta y[/MATH]. Where did you get that idea?

[MATH]\Delta y[/MATH] represents the change in y caused by a change in x. It is not equal to y - b. Consider any two distinct points on the line described by y = mx + b. Our two points are

(x1, y1) and (x2, y2) with x1 not equal to x2.

[MATH]\Delta y = y_1 - y_2 = (mx_1 + b) - (mx_2 + b) = mx_1 + b - mx_2 - b = m(x_1 - x_2).[/MATH]
The constant b has nothing to do with [MATH]\Delta y[/MATH]. You could not be farther off the mark. What we do know is

[MATH]\Delta x = x_1 - x_2.[/MATH]
[MATH]\therefore \Delta y = m(x_1 - x_2) = m * \Delta x \implies m = \dfrac{\Delta y}{\Delta x}.[/MATH]
 
I suppose that a straight line departs or passes always from/through coordinate (0,b) where b can be any number in the Y-axis, which means the denominator would be "x-o" which equals x and the equation above despite being only X in the denominator, it already represents Δx.

But for this equation to make sense, all straight lines need to depart or pass (0,b), correct?
What about the cases in which the straight line does not touch the Y axis (as per attachment), how this "m = (y-b)/x" can be the same as this "m = ΔY/Δx"?
Yes, that is correct (except for vertical lines, which don't have this form).

Are you not aware that in this equation, b is the y-intercept, which means that the line passes through (0, b)?

The line you drew can of course be extended to the y-axis.
 
First x and X are not the same. Same with y and Y.

Here is the part you are missing and I understand why!

[math]m=\dfrac{y-y1}{x-x1}[/math] where (x1, y1) is a point on the line

[math]Then \ \ y-y1 = m(x-x1) \ or \ y-y1 = mx - mx1 \ or \ y = mx - mx1 + y1 \ or \ y = mx + (y1 - mx1) \ or \ y = mx + b \ where \ b = (y1-mx1)[/math]
Let's see if this works. Suppose the slope of a line is m = 2 and contains the point (2,5).

So x1 = 2 and y1 =5. Then b = y1 -mx1 = 5 -2*2 = 1. So y= mx+b or y = 2x + 1 which works!
 
Last edited:
[MATH]y = mx + b \implies mx = y - b \implies m = (y - b)/x \ne y - b/x.[/MATH]
Because you may have had an error at the start, it is difficult to see what you are driving at. I have no idea what you mean by numerator: b or y - b. In any case, neither numerator equals [MATH]\Delta y[/MATH]. Where did you get that idea?

[MATH]\Delta y[/MATH] represents the change in y caused by a change in x. It is not equal to y - b. Consider any two distinct points on the line described by y = mx + b. Our two points are

(x1, y1) and (x2, y2) with x1 not equal to x2.

[MATH]\Delta y = y_1 - y_2 = (mx_1 + b) - (mx_2 + b) = mx_1 + b - mx_2 - b = m(x_1 - x_2).[/MATH]
The constant b has nothing to do with [MATH]\Delta y[/MATH]. You could not be farther off the mark. What we do know is

[MATH]\Delta x = x_1 - x_2.[/MATH]
[MATH]\therefore \Delta y = m(x_1 - x_2) = m * \Delta x \implies m = \dfrac{\Delta y}{\Delta x}.[/MATH]

@JeffM , thank you for your help!

By considering two points in the straight line, if one of these points is the Y-intercept I believe it works as well.

If an exercise asks me the slope by using the following two points: A (0,3) and B (2,7):

m = Δy/Δx ⟹ m=(7-3)/(2-0) = 2

Likewise, if we replace the point A and keep the same point B, we have: A (1,5) and B (2,7):

m = Δy/Δx ⟹ m=(7-5)/(2-1) = 2

That's why I believe we can rearrange this formula in such a manner as well:

y =mx + b

m = (y-b)/(x-0) ⟹ Δy/Δx

So the idea is that it is also possible to find the slope by knowing the Y-intercept and having the coordinates of another point.

Am I right in this understanding?
 
Yes, that is correct (except for vertical lines, which don't have this form).

Are you not aware that in this equation, b is the y-intercept, which means that the line passes through (0, b)?

The line you drew can of course be extended to the y-axis.

@Dr.Peterson , yes, I am aware that b in the formula "y=mx+b" represents the y-intercept, the doubt was because I saw on google some lines that were not passing through the y axis, but as you told the straight line can be easily extended to the y-axis.

Btw, very nice content in your page themathdoctors, thank you for it and also for your answer.
 
First x and X are not the same. Same with y and Y.

Here is the part you are missing and I understand why!

[math]m=\dfrac{y-y1}{x-x1}[/math] where (x1, y1) is a point on the line

[math]Then \ \ y-y1 = m(x-x1) \ or \ y-y1 = mx - mx1 \ or \ y = mx - mx1 + y1 \ or \ y = mx + (y1 - mx1) \ or \ y = mx + b \ where \ b = (y1-mx1)[/math]
Let's see if this works. Suppose the slope of a line is m = 2 and contains the point (2,5).

So x1 = 2 and y1 =5. Then b = y1 -mx1 = 5 -2*2 = 1. So y= mx+b or y = 2x + 1 which works!

@Jomo , thank you for your help!

I have two questions:

1- You mentioned about the difference of X and x (Capital letter and no capital letter). When should I use each? Otherwise, if you tell me the topic that explains this I can also search by myself.

2- Could you please explain me algebraically how you got "Y=mx+ (y1-mx1) ? I understood that this last part (y1-mx1) = b, but I would like to understand how you got to this conclusion.
 
@Jomo , thank you for your help!

I have two questions:

1- You mentioned about the difference of X and x (Capital letter and no capital letter). When should I use each? Otherwise, if you tell me the topic that explains this I can also search by myself.
You just need to be consistent. You said
However, if we kick off from the basic equation below:

y = m x + b
So the equation has "x", not "X", and "y", not "Y".

The numerator represents well the ΔY, however I cannot see the change in X!
But here you are using "X" and "Y". They are not the same as "x" and "y". There are no rules for when to use "x" and when to use "X". This is mathematics, not grammar, and "x" and "X" are just symbols- they are not related.

2- Could you please explain me algebraically how you got "Y=mx+ (y1-mx1) ? I understood that this last part (y1-mx1) = b, but I would like to understand how you got to this conclusion.
The equation, as you wrote initially, is y= mx+b so if b= y1- mx1, we must have y= mx+ (y1- mx1), just replacing "b" by "y1- mx1".
 
Last edited:
You can use x and X any time you want but they are different variables. Just like in x + y = 11, x and y are different variables; x and X are different variables in x + X =11
 
Top