I know the start and the end points of a slope.How do I get all the $(x,y)$ values between the start and end point. For example: When $x = 0$, $y = 5$ and $x = 20000$, $y = 20$. How do I generate the $y$ values when $x$ ranges from $0$ to $20000$?
Asked
Active
Viewed 65 times
1
-
Are u thinking about a machinery approach? – Mikasa Dec 30 '16 at 17:17
2 Answers
2
The points satisfy an equation $y=ax+b$, the equation of a (non-vertical) line. You need to find out the values of $a$ and $b$. If you plug in the points you already have, you get the system
$$\left\{\begin{array}{l} 5=a\cdot0+b\\ 20=a\cdot20000+b \end{array}\right.$$
Do you think you can take it from here?
Fimpellizzeri
- 23,126
-
Yes. I was using y=mx + c.Just didn't know I could simply plug in the values and find m.Thanks – VK_217 Dec 30 '16 at 17:23
2
Slope formula:
$$m=\frac{y_2-y_1}{x_2-x_1}=\frac{20-5}{20000-0}=\frac3{4000}$$
Point-slope formula:
$$y-y_2=m(x-x_2)$$
$$y-5=\frac3{4000}(x-0)=\frac3{4000}x$$
$$y=\frac3{4000}x+5$$
Simply Beautiful Art
- 74,685