If a line has two endpoints (x1, y1) and (x2, y2), then its midpoint (x, y) is
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)
The midpoint of the given line is (3, 1)