How two points describe a line
Distance is the straight-line length between the points, √((x₂ − x₁)² + (y₂ − y₁)²). That is the Pythagorean theorem with the horizontal and vertical gaps as the legs. The midpoint is the average of the x coordinates and the average of the y coordinates.
Slope is the change in y divided by the change in x. A vertical line has no slope, because the run is zero. The angle is measured from the positive x direction. The y-intercept is the y value where that line would cross the y-axis.
Example: (0, 0) and (3, 4)
The gaps are 3 across and 4 up, so the distance is 5. The midpoint is (1.5, 2). The slope is 4/3, about 1.3333, and the line crosses the y-axis at 0. The angle is about 53.13°.
Swap the points to (3, 4) and (0, 0) and the distance and midpoint stay the same. The angle flips by 180°, because the line is now read in the opposite direction.
Questions people ask
What does a negative slope mean?
The line falls as x increases. A slope of −1 drops one unit for every unit it moves right. The distance is still positive.
Why is a vertical line different?
Both points share an x coordinate, so the run is zero and rise divided by run is undefined. The distance is simply the absolute difference of the y coordinates.
Are the coordinates in a particular unit?
No. Use the same unit for x and y. The distance comes out in that unit. Mixing centimeters on one axis with inches on the other makes the distance meaningless.