Given:
Find-:
Equation of a line.
Sol:
General equation of a line.
[tex]y=mx+c[/tex]
Where,
[tex]\begin{gathered} m=\text{ slope} \\ \\ m=\frac{x_2-x_1}{y_2-y_1} \\ \\ c=\text{ y-intercept.} \end{gathered}[/tex]
Choose any two-point then:
[tex]\begin{gathered} (-2,1)=(x_1,y_1) \\ \\ (-1,2)=(x_2,y_2) \end{gathered}[/tex]
So the slope of the line is:
[tex]\begin{gathered} m=\frac{y_2-y_1}{x_2-x_1} \\ \\ m=\frac{2-1}{-1-(-2)} \\ \\ m=\frac{1}{-1+2} \\ \\ m=1 \end{gathered}[/tex]
So the equation become:
[tex]\begin{gathered} y=mx+c \\ \\ y=(1)x+c \\ \\ y=x+c \end{gathered}[/tex]
So y-intercept is:
[tex]\begin{gathered} (x,y)=(-2,1) \\ \\ y=x+c \\ \\ 1=-2+c \\ \\ c=1+2 \\ \\ c=3 \end{gathered}[/tex]
So final equation of a line:
[tex]\begin{gathered} y=mx+c \\ \\ m=1 \\ \\ c=3 \\ \\ y=x+3 \end{gathered}[/tex]
Equation of line is y = x + 3