Given the points (3, 1) and (5, -1)
we will write the equation of the line using the slope-intercept form:
![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
The slope will be calculated as follows:
![\begin{gathered} slope=(rise)/(run)=(y_2-y_1)/(x_2-x_1) \\ \\ m=(-1-1)/(5-3)=(-2)/(2)=-1 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/zjcsjulyn6m3uqes98fmlpdcneqmrixski.png)
substitute with m into the equation of the line:
![y=-x+b](https://img.qammunity.org/2023/formulas/mathematics/college/ngca3078bqhjqj2ds5jtqdlxmtn48u9opd.png)
Substitute with point (3, 1) to find the value of (b)
![\begin{gathered} 1=-3+b \\ b=1+3=4 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/i2hwkvk7x9rovdv37l9k1mxn1mt0nr91ua.png)
Substitute with (m) and (b) into the equation of the line
So, the answer will be:
![y=-x+4](https://img.qammunity.org/2023/formulas/mathematics/college/jpmwgbhynvixenrwx6f3gs8fecncvx1wpb.png)