12
6
When given two points, (x1, y1) and (x2, y2), a right triangle can be constructed with verticies ABC where A = (x1, y1), B = (x2, y1), and C = (x2, y2). The length of the side AB will be (x2 - x1), and the length of BC will be (y2 - y1). Using the Pythagorean Theorem we can relate the lengths as:

AC 2 = AB 2 + BC 2
AC 2 = (x2 - x1)2 + (y2 - y1)2
AC = √ (x2 - x1)2 + (y2 - y1)2

Since AC describes the distance from (x1, y1) to (x2, y2), the equation can be used to find the distance between any two points.

Another useful formula is for finding the midpoint of a line segment. The midpoint's coordinates will be the averages of the coordinates of the endpoints, or more precisely for a line segment with endpoints (x1, y1) and (x2, y2), the midpoint will be:
(
x2 + x1 , y2 + y1
22
)

a

e