We will investigate the how to formulate an equation of a straight line.
All equation of straight line have a general slope-intercept format given as follows:
[tex]y\text{ = m}\cdot x\text{ + c}[/tex]Where,
[tex]\begin{gathered} m\colon\text{ Slope} \\ c\colon\text{ y-Intercept} \end{gathered}[/tex]To completely define any equation of a line we need to two points OR we need a point and one of the parameters ( m or c )!
We will suppose that we have two points ( A and B ) as follows:
[tex]\begin{gathered} A\colon(x_1,y_1) \\ B\colon(x_2,y_2) \end{gathered}[/tex]To determine the value of parameter slope ( m ) we utilize the following general formula:
[tex]m\text{ = }\frac{y_2-y_1}{x_2-x_1}[/tex]We simply plug in the respective values of the coordinates ( A and B ) in the general formula above and solve for ( m ).
Once we have evaluated the value of parameter ( m ) in the previous step we will determine the value of parameter ( c ) i.e y-intercept.
To determine the value of ( c ) we need only one point! You can choose either point ( A or B )!
Lets assume that we chose point ( A ). We will then plug in the values of coordinates and the value of parameter ( m ) into the general form of the equation as follows:
[tex]y_1\text{ = m}\cdot x_1+c[/tex]In the above form all are known quantities and only ( c ) is unknown! We can manipulate the above expression and solve for ( c ) as follows:
[tex]c\text{ = }y_1\text{ -m}\cdot x_1[/tex]Then we have obtained the value of ( c ) as well!
We can then write down the complete equation of the straight line by using the calculated values of ( m and c ) into the general equation and express in form:
[tex]y\text{ = m}\cdot x\text{ + c}[/tex]Where,
[tex]m\text{ and c are calculated quantities!}[/tex]