Distance and Midpoint

Watch the video explainer

Learning goals

  • Derive straight-line distance from perpendicular coordinate gaps and the Pythagorean theorem
  • Locate a midpoint and explain why both coordinates are averaged
  • Recover missing endpoint coordinates and check all geometric conditions
  • Justify numerical triangle congruence by matching three exact side lengths

From coordinates to a right triangle

An ordered pair gives horizontal position first, then vertical position. Use the same unit length on both perpendicular axes. For the points (−4,2)(-4,2) and (2,−6)(2,-6), the horizontal change is 66 and the vertical change is −8-8. The negative sign means down; the vertical length is 88.

Coordinate gaps make perpendicular legsEqual unit scales on both axes. A is at (-4, 2); H is at (2, 2); B is at (2, -6). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyAHB
A horizontal step and a vertical step form a right angle at H. The direct segment is AB.

The two perpendicular legs let you measure the direct segment with the Pythagorean theorem:

AB2=62+82,AB2=100,AB=10.\begin{aligned} AB^2&=6^2+8^2,\\ AB^2&=100,\\ AB&=10. \end{aligned}

Adding 66 and 88 would measure a bent route through HH, not the straight segment.

Check your understanding

From (−2,3)(-2,3) to (5,−1)(5,-1), what are the horizontal and vertical leg lengths of the coordinate right triangle?

Answer choices

Distance from perpendicular coordinate gaps#

Take a fresh pair U=(−3,1)U=(-3,1) and V=(9,6)V=(9,6). The corner K=(9,1)K=(9,1) gives perpendicular legs of lengths 1212 and 55. The Pythagorean theorem gives

UV2=122+52,UV2=169.\begin{aligned} UV^2&=12^2+5^2,\\ UV^2&=169. \end{aligned}

Thus the direct distance is 1313.

Take endpoints AA at (xA,yA)(x_A,y_A) and BB at (xB,yB)(x_B,y_B). The corner is HH at (xB,yA)(x_B,y_A). When both coordinates change, the legs are perpendicular and have lengths ∣xB−xA∣|x_B-x_A| and ∣yB−yA∣|y_B-y_A|. The theorem gives

AB2=(xB−xA)2+(yB−yA)2.AB^2=(x_B-x_A)^2+(y_B-y_A)^2.

Absolute values disappear on squaring because a number and its opposite have the same square. Distance is nonnegative, so

AB=(xB−xA)2+(yB−yA)2.AB=\sqrt{(x_B-x_A)^2+(y_B-y_A)^2}.

The actual coordinate values did not matter; the perpendicular gaps did. If the segment is horizontal or vertical, one gap is zero and this expression reduces to the other gap’s absolute value. No nondegenerate right triangle is needed in those cases. If the endpoints coincide, both gaps are zero and the distance is zero. Reversing the endpoints changes both signs but leaves both squares unchanged.

This is the distance formula. It measures a length, so its output is a number in the coordinate unit, not an ordered pair.

Worked example 1 Keep a slanted length exact

Problem. The endpoints of segment ABAB are (−5,−3)(-5,-3) and (1,6)(1,6). Find its exact length in simplest radical form.

A slanted segment across the axesEqual unit scales on both axes. A is at (-5, -3); B is at (1, 6). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyAB
The endpoints are given. Draw the horizontal and vertical legs when solving.

Solution. The horizontal gap is 66 units and the vertical gap is 99 units. Thus

AB2=62+92,AB2=117,AB=117,AB=313.\begin{aligned} AB^2&=6^2+9^2,\\ AB^2&=117,\\ AB&=\sqrt{117},\\ AB&=3\sqrt{13}. \end{aligned}

The square factor 99 comes out of the radical as 33. The radical is an exact length; no decimal is needed.

Check your understanding

Find the exact distance between (−4,−1)(-4,-1) and (0,5)(0,5).

Answer choices

Why a midpoint averages both coordinates

A midpoint is the point on a segment that divides it into two equal lengths. Halfway along a straight segment means making half its horizontal change and half its vertical change together.

For instance, from (−6,−2)(-6,-2) to (4,6)(4,6) the changes are 1010 right and 88 up. Starting at the first endpoint, half of each change gives (−1,2)(-1,2). A dilation centered at the first endpoint with scale factor 1/21/2 puts this point on the segment and makes its distance from that endpoint half the whole length. The other half is the remaining segment.

A dilation places the halfway point on the segmentEqual unit scales on both axes. A is at (-6, -2); M is at (-1, 2); B is at (4, 6). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyAMB
The half-size right triangle ends at M on AB. Its horizontal and vertical changes are half the original changes.

Midpoint coordinates from a half-size dilation#

For a fresh pair U=(−5,9)U=(-5,9) and V=(11,−3)V=(11,-3), the signed coordinate changes are 1616 and −12-12. A half-size dilation from UU halves both changes:

xM=−5+8,xM=3,yM=9−6,yM=3.\begin{aligned} x_M&=-5+8,\\ x_M&=3,\\ y_M&=9-6,\\ y_M&=3. \end{aligned}

It puts M=(3,3)M=(3,3) on UVUV at half its length, rather than merely somewhere equally far from the endpoints.

For general distinct endpoints AA at (xA,yA)(x_A,y_A) and BB at (xB,yB)(x_B,y_B), the same dilation halves both coordinate changes. Name the midpoint MM and its coordinates (xM,yM)(x_M,y_M). Then

xM=xA+xB−xA2,xM=xA+xB2.\begin{aligned} x_M&=x_A+\frac{x_B-x_A}{2},\\ x_M&=\frac{x_A+x_B}{2}. \end{aligned}

The vertical calculation has the same form:

yM=yA+yB−yA2,yM=yA+yB2.\begin{aligned} y_M&=y_A+\frac{y_B-y_A}{2},\\ y_M&=\frac{y_A+y_B}{2}. \end{aligned}

No step depended on the example’s values or on the signs of the changes. A dilation works in any direction, including horizontal and vertical segments. The point stays on the segment and cuts its length in half.

The midpoint formula is therefore

M=(xA+xB2,yA+yB2).M=\left(\frac{x_A+x_B}{2},\frac{y_A+y_B}{2}\right).

Average matching coordinates; do not average an x-coordinate with a y-coordinate. Fractional coordinates are allowed. If the endpoints coincide, the same average returns that point, although there are no two positive half-segments.

Worked example 2 Move a vertical endpoint

Problem. Segment ABAB has endpoints AA at (−3,−5)(-3,-5) and BB at (−3,7)(-3,7). Find its length and midpoint. Then move BB to CC at (−3,3)(-3,3) and find the length and midpoint of ACAC.

Moving one endpoint changes the vertical midpointEqual unit scales on both axes. A is at (-3, -5); B is at (-3, 7); C is at (-3, 3). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyABC
The original endpoint is B; the moved endpoint is C. Both segments remain vertical. No midpoint is marked before it is found.

Solution. For the original segment, the x-coordinate stays −3-3. Call its midpoint MM. Its length and midpoint are

AB=∣7−(−5)∣,AB=12,M=(−3,1).\begin{aligned} AB&=|7-(-5)|,\\ AB&=12,\\ M&=(-3,1). \end{aligned}

The midpoint’s height is the average of −5-5 and 77. Each half is 66 units.

For the moved endpoint, the segment is still vertical. Call the new midpoint NN:

AC=∣3−(−5)∣,AC=8,N=(−3,−1).\begin{aligned} AC&=|3-(-5)|,\\ AC&=8,\\ N&=(-3,-1). \end{aligned}

Here each half is 44 units. Moving just the upper endpoint down 44 units moved the midpoint down 22 units.

Check your understanding

What is the midpoint of the segment joining (5,−6)(5,-6) and (−2,3)(-2,3)?

Answer choices

Recover an endpoint

A midpoint tells you how far to continue beyond it. Repeat the horizontal and vertical changes from the known endpoint to the midpoint, continuing in the same direction.

Worked example 3 Use the midpoint in reverse

Problem. Point MM at (2,−3)(2,-3) is the midpoint of ABAB. One endpoint is AA at (−4,5)(-4,5). Find BB and check the midpoint.

A midpoint and one endpointEqual unit scales on both axes. A is at (-4, 5); M is at (2, -3). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyAM
M is the midpoint of the full segment AB. The unknown endpoint is beyond M from A.

Solution. The two coordinate averages must equal the given midpoint coordinates. Solve them separately:

−4+xB2=2,−4+xB=4,xB=8.\begin{aligned} \frac{-4+x_B}{2}&=2,\\ -4+x_B&=4,\\ x_B&=8. \end{aligned}5+yB2=−3,5+yB=−6,yB=−11.\begin{aligned} \frac{5+y_B}{2}&=-3,\\ 5+y_B&=-6,\\ y_B&=-11. \end{aligned}

So BB is at (8,−11)(8,-11). Averaging the endpoint coordinates gives (2,−3)(2,-3) again. The changes from MM to BB are the same as from AA to MM, which also checks the straight continuation.

In general, multiply each midpoint coordinate by 22, then subtract the known endpoint coordinate. Check both coordinates afterward.

Check your understanding

The midpoint of ABAB is (−1,4)(-1,4). Endpoint AA is at (3,−2)(3,-2). Where is BB?

Answer choices

Use exact lengths to check congruence

Coordinates can establish all three side pairs in the SSS congruence test. Equal squared lengths are enough: nonnegative lengths with equal squares are equal. Rounded decimals that merely look equal do not establish congruence.

Worked example 4 A numerical SSS check

Problem. Triangle ABCABC has vertices AA at (−1,−2)(-1,-2), BB at (3,−1)(3,-1), and CC at (0,2)(0,2). Triangle DEFDEF has vertices DD at (8,0)(8,0), EE at (7,4)(7,4), and FF at (4,1)(4,1). Decide whether △ABC≅△DEF\triangle ABC\cong\triangle DEF in that order. Justify all three side matches.

Match the three named side pairsEqual unit scales on both axes. A is at (-1, -2); B is at (3, -1); C is at (0, 2); D is at (8, 0); E is at (7, 4); F is at (4, 1). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyABCDEF
Solid ABC and dashed DEF have the proposed order A to D, B to E, C to F. No equality or right-angle marks are assumed.

Solution. The proposed correspondence pairs ABAB with DEDE, ACAC with DFDF, and BCBC with EFEF. Compute their squares:

AB2=42+12,AB2=17,DE2=(−1)2+42,DE2=17.\begin{aligned} AB^2&=4^2+1^2,\\ AB^2&=17,\\ DE^2&=(-1)^2+4^2,\\ DE^2&=17. \end{aligned}AC2=12+42,AC2=17,DF2=(−4)2+12,DF2=17.\begin{aligned} AC^2&=1^2+4^2,\\ AC^2&=17,\\ DF^2&=(-4)^2+1^2,\\ DF^2&=17. \end{aligned}BC2=(−3)2+32,BC2=18,EF2=(−3)2+(−3)2,EF2=18.\begin{aligned} BC^2&=(-3)^2+3^2,\\ BC^2&=18,\\ EF^2&=(-3)^2+(-3)^2,\\ EF^2&=18. \end{aligned}

Each named pair has the same exact length. Both triples form nondegenerate triangles. Their two equal sides have length 17\sqrt{17}, and the third has length 18\sqrt{18}. The two equal sides add to more than the third because 68>1868>18 when those positive sums are squared. The other two inequalities each compare 17+18\sqrt{17}+\sqrt{18} with 17\sqrt{17}, so they also hold. SSS proves the stated congruence. Two matching sides alone would not have completed this check.

Check your understanding

For two nondegenerate triangles with a stated vertex correspondence, which coordinate calculation completes an SSS congruence check?

Answer choices

A distance condition can allow two endpoints

A known length need not locate one endpoint uniquely. A point can lie on either side of a fixed vertical line, so keep both signs when solving for a coordinate.

Worked example 5 Find every allowed endpoint

Problem. One endpoint is AA at (1,−4)(1,-4). The other is BB at (t,2)(t,2), where tt is real, and ABAB is 1010 units. Find every possible BB and the midpoint for each segment.

The fixed endpoint and the required heightEqual unit scales on both axes. A is at (1, -4). Solid blue segments and dashed red segments are distinguished by line style as well as color.xyA
B must lie at height 2. Its horizontal position is still unknown; the dashed horizontal guide is not a segment length.

Solution. The vertical gap is 66, so the distance condition gives

(t−1)2+62=100,(t−1)2=64.\begin{aligned} (t-1)^2+6^2&=100,\\ (t-1)^2&=64. \end{aligned}

For the left-hand possibility,

t−1=−8,t=−7.\begin{aligned} t-1&=-8,\\ t&=-7. \end{aligned}

This gives BB at (−7,2)(-7,2) and midpoint (−3,−1)(-3,-1).

For the right-hand possibility,

t−1=8,t=9.\begin{aligned} t-1&=8,\\ t&=9. \end{aligned}

This gives BB at (9,2)(9,2) and midpoint (5,−1)(5,-1). Each has horizontal gap 88 and vertical gap 66, so each length checks as 1010 units. These are all possibilities because the squared equation has only these two real solutions.

If the prescribed length were less than the fixed vertical gap, there would be no endpoint. If it equaled that gap, the horizontal gap would be zero and there would be one endpoint. This checks feasibility before you trust a sketch.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

A small clay tablet in the Yale Babylonian Collection preserves a distance calculation from the Old Babylonian period, roughly 1900 to 1600 BCE. Called YBC 7289, it carries a square, its diagonals, and numbers written in a base-sixty system. One of those numbers is about 1.41421296, remarkably close to the square root of two. The calculation survived on clay even though the tablet’s original findspot is uncertain. The Cuneiform Digital Library Initiative record lets you inspect its photograph and the recorded numbers.

Your progress

See all your progress →