# Analytic Geometry

## Distance Between Two Points

Using the ideas of analytic geometry, it is possible to calculate the distance between the two points A and B, represented by the line segment AB that connects the points. If two points have the same ordinate but different abscissas, the distance between them is AB = x2 — x1. Similarly, if both points have the same abscissa but different ordinates, the distance is AB = y2 — y1. For points that have neither a common abscissa or ordinate, the Pythagorean theorem is used to determine distance. By drawing horizontal and vertical lines through points A and B to form a right triangle, it can be shown using the distance formula that AB = —(x2 — x1)2 + (y2 — y1) . The distance between the two points is equal to the length of the line segment AB.

In addition to length, it is often desirable to find the coordinates of the midpoint of a line segment. These coordinates can be determined by taking the average of the x and y coordinates of each point. For example, the coordinates for the midpoint M (x,y) between points P (2,5) and Q (4,3) are x = (2 + 4)/2 = 3 and y = (5 + 3)/2 = 4.