In order to find the equation of the line, you take into account that the general form of the equation of a line is:
![y=mx+b](https://img.qammunity.org/2023/formulas/mathematics/high-school/smsb8cbft03lwblmi49nf2l6jby2ofxzws.png)
where m is the slope and b is the y-intercept.
You calculate the slope m of the line by using the following formula:
![m=\frac{y_2-y_1}{x_2-x_1_{}}](https://img.qammunity.org/2023/formulas/mathematics/college/bc5mz88rq6sxivntwj3pdfog5qhzbibq8g.png)
where (x1,y1) and (x2,y2) are two points of the line. You use the given points (1,2) and (4,8):
![m=(8-2)/(4-1)=(6)/(3)=2](https://img.qammunity.org/2023/formulas/mathematics/college/74ztilmwdiym4i15jfbzeedrkd3oa9dl22.png)
Next, you use again the formula for the slope, but in the following way:
![m=(y-y_1)/(x-x_1)](https://img.qammunity.org/2023/formulas/mathematics/college/jdj1lyi50jbpedvyjqiulvkzma36qgk0om.png)
where (x1,y1) is a point of the line. You use the point (1,2):
![m=(y-2)/(x-1)](https://img.qammunity.org/2023/formulas/mathematics/college/myxku07ggx9zljwwy5gqk6r042nkxg7qjt.png)
Next, you solve the previous equation for y, then you replace the value of m and put the equation in the slope y-intercept form:
![\begin{gathered} m=(y-2)/(x-1) \\ m(x-1)=y-2 \\ mx-m=y-2 \\ mx-m+2=y \\ 2x-2+2=y \\ y=2x \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/y8qq32xaprl84ccf7nnxshk0rpihwiumzk.png)
Hence, the equation of the line is y = 2x