Step 1: Find the slope using the formula:
\({\text{Slope}}={\text{m}}=\frac{\text{rise}}{\text{run}}=\frac{{\text{y}}_2-{\text{y}}_1}{{\text{x}}_2-{\text{x}}_1}\)
We have two points,\(\left ( -5,10 \right )\) and \(\left ( -3,4 \right )\). We will choose \(\left ({\color{Red} -5},{\color{Red} 10} \right )\) as point one and \(\left ({\color{Blue} -3},{\color{Blue} 4} \right )\) as point two. (It does not matter which is point one and which is point two as long as we stay consistent throughout our calculations.) Now we can plug the points into our formula for slope:
\(\frac{{\text{y}}_2-{\text{y}}_1}{{\text{x}}_2-{\text{x}}_1}=\frac{{\color{Blue}4}-{\color{Red}10}}{{\color{Blue}-3}-({\color{Red}-5})}\)
Now we can simplify: \(\frac{4-10}{-3-(-5)}=\frac{4-10}{-3+5}=\frac{-6}{2}=-3\)
The slope of the line is \({\color{Blue} -3}\), so the m in y=mx+b is \({\color{Blue} -3}\).
Step 2: Use the slope and one of the points to find the y-intercept b:
It doesn’t matter which point we use. They will both give us the same value for b since they are on the same line. We choose the point \(\left ( {\color{Green} -3},{\color{Red} 4} \right )\). Now we will plug the slope, \({\color{Blue} -3}\), and the point into y=mx+b to get the equation of the line:
\({\color{Red} 4}={\color{Blue} -3}\left ( {\color{Green} -3} \right )+\text{b}\)
Simplify:
4= 9+b
Then subtract 9 from both sides:
4 − 9 = 9+b − 9
\({\color{Red} -5}=\text{b}\)
Step 3: Plug the slope (m=\({\color{Blue} -3}\)), and the y-intercept (b= \({\color{Red} -5}\)), into y=mx+b:
\(\text{y}={\color{Blue} -3}{\text{x}}-{\color{Red} 5}\)