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=\frac{-b}{m}\) | |
We have determined, with the above algebraic work that when \(y=0,\hspace{1mm}x=\frac{-b}{m}\), which means that the x-intercept is located at \(\left(\frac{-b}{m},0\right)\). However, we also know that the x-intercept is located at \((a,0)\), which means that \(a=\frac{-b}{m}\):
\(a=\frac{-b}{m}\) | 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=\frac{-b}{a}\) | |
We now know the value for b and for m, so fill it in to get the equation.
\(y=\frac{-b}{a}x+b\)
Creating Linear Equation
Write a linear function that passes through both (a,0) and (0,b).
\(\begin{array}{lcll} \dfrac{x}{a} +\dfrac{y}{b} = 1 \begin{array}{rcll} & \text{if } y = 0 \text{ then } x = a \\ & \text{if } x = 0 \text{ then } y = b \\ \end{array} \end{array}\)
\(\begin{array}{|rcll|} \hline \frac{x}{a} +\frac{y}{b} &=& 1 \quad & | \quad - \frac{x}{a} \\\\ \frac{y}{b} &=& 1 -\frac{x}{a} \quad & | \quad \cdot b \\\\ y &=& b - \frac{b}{a}\cdot x \\\\ \mathbf{y} &\mathbf{=}& \mathbf{ -\frac{b}{a}\cdot x + b } \\ \hline \end{array}\)