y = mx + b
We just figured out that a line with a slope of 3 and a y-intercept of 2 has the equation y = 3x + 2. What if we want to know the equation for this line?
The blue line has a slope of 1/3 and a y-intercept of 4. Do we have to do the same work again to find its equation?
Let's guess that the equation for the blue line will have the same form as before. That means that to get y, we should multiply x by the slope and add the y-intercept. Since our slope is 1/3 and our y-intercept is 4, our equation should be y = 1/3 x + 4. If Joan graphs y = 1/3 x + 4, her tongue follows the blue line, so our equation works.
Multiplying x by the slope and adding the y-intercept gave us the right equation for the blue line. As a matter of fact, this will work for any line that isn't vertical. (Vertical lines have to have different equations, because they don't have slopes.)
Let's try to write "To get y, multiply x by the slope and add the y-intercept" in a simpler way. We can start by making the directions into an equation:
y = slope*x + y-intercept
Most people call the slope m and the y-intercept b. If we do that, we can rewrite our equation in a shorter form:
Now we can write an equation for almost any line! All we need to know is its slope and its y-intercept. For example, a line with a slope of 50 and a y-intercept of 32 would have the equation y = 50x + 32. And once we have our equation, we can use it to make all sorts of predictions, even if we don't need to find flies.