Sub topic 2
Distance and Midpoint Between Two Points
This chapter assumes you can work with fractions, negative numbers, and decimals. It also assumes you can solve one-variable linear equations and use square roots and the Pythagorean theorem. You should already know how to plot an ordered pair (x, y) and name the four quadrants.
Two formulas do most of the work here. The distance formula tells you how far apart two points are. The midpoint formula tells you which point sits exactly halfway between them. Both appear directly on the GRE, and both come back later in this tutorial when you compute areas and work with circles.
The Distance Formula Is the Pythagorean Theorem
Take two points P = (x₁, y₁) and Q = (x₂, y₂). Draw a horizontal segment from P and a vertical segment from Q until they meet at the corner (x₂, y₁). This makes a right triangle whose hypotenuse is the segment PQ.
- The horizontal leg has length |x₂ − x₁|.
- The vertical leg has length |y₂ − y₁|.
The Pythagorean theorem gives the distance d:
d² = (x₂ − x₁)² + (y₂ − y₁)²
So:
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Because each difference is squared, the sign does not matter. You can subtract in either order, as long as you subtract x from x and y from y in the same direction for both coordinates of a pair. The result never depends on which point you call P.
Worked example
Find the distance between (1, 2) and (4, 6).
- Horizontal difference: 4 − 1 = 3.
- Vertical difference: 6 − 2 = 4.
- Sum of squares: 3² + 4² = 9 + 16 = 25.
- Distance: √25 = 5.
The same calculation in Python:
import math
p, q = (1, 2), (4, 6)
distance = math.hypot(q[0] - p[0], q[1] - p[1])
midpoint = ((p[0] + q[0]) / 2, (p[1] + q[1]) / 2)
print(distance) # 5.0
print(midpoint) # (2.5, 4.0)The function math.hypot computes the square root of the sum of squares, so it matches the formula exactly.
Recognize common right triangles
The GRE rewards you for spotting triples such as 3-4-5, 5-12-13, 8-15-17, and 7-24-25. Multiples count too: legs of 6 and 8 give a distance of 10. If the two differences are 5 and 12, you can answer 13 without calculating.
When the differences are not a known triple, leave the answer as a simplified radical. For example, the distance between (0, 0) and (2, 4) is √(4 + 16) = √20 = 2√5.
Special cases
- Same x-coordinate (a vertical segment): the distance is |y₂ − y₁|. The formula reduces to this because the horizontal difference is 0.
- Same y-coordinate (a horizontal segment): the distance is |x₂ − x₁|.
- Distance from the origin to (a, b): √(a² + b²).
- Points in different quadrants: the formula still works. Subtract carefully with negative numbers. The distance between (−3, 2) and (5, −4) uses the differences 8 and −6, so d = √(64 + 36) = √100 = 10.
The Midpoint Formula Averages the Coordinates
The midpoint M of the segment from (x₁, y₁) to (x₂, y₂) is the point halfway along it. Its x-coordinate is the average of the two x-coordinates, and its y-coordinate is the average of the two y-coordinates:
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)
For (1, 2) and (4, 6), the midpoint is (5/2, 8/2) = (2.5, 4). This matches the Python output above.
The midpoint is a point, so the answer has two coordinates. The distance is a single number. Mixing these up is a common source of wrong answers on numeric entry questions.
Why averaging works
Halfway between two numbers on a number line is their average. The x-direction and y-direction are independent, so you find the halfway value in each direction separately. That gives the pair of averages.
Finding a Missing Endpoint
GRE questions often give the midpoint and one endpoint and ask for the other endpoint. Work one coordinate at a time.
If M = (mx, my) is the midpoint and A = (x₁, y₁) is one endpoint, then the other endpoint B satisfies:
- x₂ = 2m_x − x₁
- y₂ = 2m_y − y₁
Worked example
The midpoint of segment AB is (3, −1), and A = (7, 2). Find B.
- x-coordinate: 2(3) − 7 = −1.
- y-coordinate: 2(−1) − 2 = −4.
- So B = (−1, −4).
Check: the average of 7 and −1 is 3, and the average of 2 and −4 is −1. This matches the given midpoint.
An equivalent way to think about it is by steps. From A to M, the x-value drops by 4 and the y-value drops by 3. Taking the same steps again from M lands on B: (3 − 4, −1 − 3) = (−1, −4).
Combining the Two Formulas
Many questions need both ideas in one problem. A typical pattern: find a midpoint, then find the distance from that midpoint to a third point. Another is to show that a point is equally far from two endpoints.
Worked example
Points A = (−2, 1) and B = (6, 7) are the endpoints of a segment. What is the distance from the origin to the midpoint of AB?
- Midpoint: ((−2 + 6)/2, (1 + 7)/2) = (2, 4).
- Distance from the origin: √(2² + 4²) = √20 = 2√5.
The answer is 2√5, which is about 4.47.
Half the length of a segment
The midpoint splits a segment into two equal pieces. So the distance from either endpoint to the midpoint is half the full distance. For A and B above, the full length is √(8² + 6²) = 10, so each half has length 5. This is useful when a problem asks for the distance to the midpoint but you already know the full length.
Checking Whether a Triangle Is Right or Isosceles
The distance formula lets you classify a triangle from its vertex coordinates.
- Compute the three side lengths. To avoid radicals, compute the squared lengths instead.
- If two squared lengths are equal, the triangle is isosceles.
- If the largest squared length equals the sum of the other two, the triangle is right (converse of the Pythagorean theorem).
For vertices (0, 0), (3, 0), and (0, 4), the squared sides are 9, 16, and 25. Since 9 + 16 = 25, the triangle is right, with its right angle at the origin.
Comparing squared lengths is a good habit. It keeps the arithmetic in whole numbers and skips the square root until the end.
Edge Cases and Common Errors
| Situation | What to do |
|---|---|
| Negative coordinates | Put parentheses around each coordinate when subtracting, such as 4 − (−3) = 7. |
| Fractional or decimal coordinates | Find the differences first, then square. Consider scaling the problem by a common factor and dividing at the end. |
| Distance is not a perfect square | Simplify the radical, such as √50 = 5√2. |
| Both points are the same | The distance is 0 and the midpoint is the point itself. |
| Answer asks for a "distance squared" | Stop before the square root. |
| Quantity comparison with distances | Compare the squared distances. Both are nonnegative, so the order is preserved. |
Two further points are worth remembering.
- Distance is never negative. If your calculation gives a negative result, you made an error before the square root.
- The midpoint always lies on the segment, between the endpoints in both coordinates. If your midpoint has an x-value outside the range of the two x-values, recheck the arithmetic.
A GRE-Style Quantitative Comparison
Consider this question.
Quantity A: the distance between (−1, 3) and (4, −9). Quantity B: 13.
The differences are 5 and −12. The sum of squares is 25 + 144 = 169, and √169 = 13. The quantities are equal. This is a 5-12-13 triple in disguise. Recognizing it lets you skip most of the computation.
If the problem had asked about (−1, 3) and (4, −8), the differences would be 5 and −11, giving √146, which is slightly less than 13. Comparing 146 to 169 settles it without a calculator.
Quick Reference
| Quantity | Formula | Result type |
|---|---|---|
| Distance | √((x₂ − x₁)² + (y₂ − y₁)²) | A single nonnegative number |
| Midpoint | ((x₁ + x₂)/2, (y₁ + y₂)/2) | An ordered pair |
| Missing endpoint | (2m_x − x₁, 2m_y − y₁) | An ordered pair |
| Squared distance | (x₂ − x₁)² + (y₂ − y₁)² | A single nonnegative number |
Exercise
The endpoints of a segment are A = (−4, 5) and B = (8, −testing). Replace this with the correct problem: A = (−4, 5) and B = (8, 0). What are the length of AB and its midpoint?
Show answer
The differences are 12 and −5, so the length is √(144 + 25) = √169 = 13. The midpoint is ((−4 + 8)/2, (5 + 0)/2) = (2, 2.5).
Exercise
The midpoint of segment PQ is (1, 4), and P = (−5, 6). Find Q, then find the distance PQ.
Show answer
Q = (2·1 − (−5), 2·4 − 6) = (7, 2). The differences from P to Q are 12 and −4, so PQ = √(144 + 16) = √160 = 4√10.
Exercise
Is the triangle with vertices (1, 1), (5, 1), and (1, 4) a right triangle? Justify your answer using squared distances.
Show answer
The squared side lengths are 16 (from (1, 1) to (5, 1)), 9 (from (1, 1) to (1, 4)), and 25 (from (5, 1) to (1, 4), since 16 + 9 = 25). Because 16 + 9 = 25, the triangle is a right triangle with its right angle at (1, 1).