This process is more or less the same when you have 2 arbitrary points (such as (4,6) and (-9,1)). This time, however, we must take into account that there are variables involved. Let's remind you of slope-intercept form of a line.
y=mx+b
m = slope of the line
b = y-intercept
In this particular case, we know the x- and y-intercepts because those points are given in the original problem. We know that the y-intercept is located at (0,b). Since b is the y-intercept, fill that in! That's the easy bit, I think you'd agree.
y=mx+b
We know that the x-intercept is at the point when y=0, so plug that in:
0=mx+b | Now, solve for x by subtracting b on both sides. |
−b=mx | Divide by m on both sides. |
x=−bm | |
We have determined, with the above algebraic work that when y=0,x=−bm, which means that the x-intercept is located at (−bm,0). However, we also know that the x-intercept is located at (a,0), which means that a=−bm:
a=−bm | Now, we must solve for m because that is the slope of this linear equation after all. |
ma=−b | Divide by a on both sides. |
m=−ba | |
We now know the value for b and for m, so fill it in to get the equation.
y=−bax+b