The equation of a line with slope a and y-intercept b can be expressed in the for y = ax + b.
For a line passing through the points (1,1) and (2,-1), its slope is given by:
[tex]a=\frac{(-1)-1}{2-1}=-2[/tex]To find the intercept, we can just replace x and y by one of the given pairs of coordinates:
[tex]\begin{gathered} y=-2x+b \\ 1=(-2)\cdot1+b \\ b=1+2 \\ b=3 \end{gathered}[/tex]Therefore, the equation of the line is y = -2x + 3