If a line has two endpoints (x1, y1) and (x2, y2), then its midpoint (x, y) is
[tex]\begin{gathered} x=\frac{x_1+x_2}{2} \\ y=\frac{y_1+y_2}{2} \end{gathered}[/tex]If the endpoints of a line are (2, 3), and (4, -1), then
x1 = 2 and x2 = 4
y1 = 3 and y2 = -1
Substitute them in the rule above to find the midpoint (x, y)
[tex]\begin{gathered} x=\frac{2+4}{2} \\ x=\frac{6}{2} \\ x=3 \\ y=\frac{3+(-1)}{2} \\ y=\frac{3-1}{2} \\ y=\frac{2}{2} \\ y=1 \\ (x,y)=(3,1) \end{gathered}[/tex]The midpoint of the given line is (3, 1)