Equation of a Line
The equation of the line in slope-intercept form is:
y=mx+b
Where:
m = slope
b = y-intercept.
Suppose we know the line passes through points A(x1,y1) and B(x2,y2). The slope can be calculated with the equation:
![\displaystyle m=(y_2-y_1)/(x_2-x_1)](https://img.qammunity.org/2023/formulas/mathematics/college/zkw1rebg6qix1w4pvkuol78hb2zfucnx6e.png)
We are given the points (-1,1) and (2,3). Calculating the slope:
![\displaystyle m=(3-1)/(2+1)=(2)/(3)](https://img.qammunity.org/2023/formulas/mathematics/college/4xd65aam7rnhtrwnghkmlygk31jrb84r3a.png)
Once we know the value of the slope, the equation of the line is:
![y=(2)/(3)x+b](https://img.qammunity.org/2023/formulas/mathematics/college/xmeci6li12r7ataumxfn3oftfazlxo0o2x.png)
The value of b can be determined by substituting (x,y) for one of the given points, for example (2,3):
![\begin{gathered} 3=(2)/(3)\cdot2+b \\ \text{Operating:} \\ 3=(4)/(3)+b \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/5yy8h2izmozv1tkp6sqr20oz5tksib38j0.png)
Solving for b:
![b=3-(4)/(3)=(9-4)/(3)=(5)/(3)](https://img.qammunity.org/2023/formulas/mathematics/college/o9tz3q6plmf5uvzqbl2u3bhl202zkz9ljy.png)
The equation of the line is, finally:
![y=(2)/(3)x+(5)/(3)](https://img.qammunity.org/2023/formulas/mathematics/college/y89z5ns49zuyc9ogbg2wmckqzv0yaabmj7.png)
There are other forms to write the equation of a line, we used the slope-intercept form