This is a way to write a straight line equation to easily determine the slope of the line, and the y-intercept of it.
The form is: y=mx+b where m is the slope, and b is the y-intercept.
The reason this works is pretty easy. If our slope is two, then for every increment to x, y is incremented twice (slope is rise over run). So, if point (0,0) is on the line, then (1,2), (2,4), and (3,6) are on the line. Y is always equal to twice x.
You add the y-intercept (b) because, if we a line with a slope of two, and (0,1) is on the line, the points are the same as those on the line above, but for every x value, y is the same plus one. We have (1,2+1), (2,4+1), and (3,6+1). When the y-intercept changes, we are in effect dragging our line up and down on the y-axis.
Finding the equation from a graph
Pick two points. Find rise/run (y1-y2/x1-x2). That's your slope, and therefore your m value.
Next, go to x=0. Whatever the y value is for x=0 is the y-intercept is your b value.
Plug `em in, and you have your equation.
I know a point, and the slope. How do I get my y-intercept?
Let's say that we have point (2,3) and a slope of 4. We then know that:
We substitute into the equation and solve:
I know a point and the y-intercept. What's the slope?
We'll stick with the line from the previous example:
Substitution and solving again:
I have my equation, now I need points. How do I get them?
Again, taking the same line as before, we have: y=4x-5
Just choose a value for x (zero is a good place to start) and solve for y.
Then, keep changing the value for x until you have enough points: