Skip to content

The midpoint formula

Level: 101 · for anyone starting precalculus

One line: The midpoint of a segment is the average of the two x's and the average of the two y's; "halfway" is two claims, equally far from both ends and on the segment, and the first alone describes a whole line of points.

The idea

The segment from P₁ = (x₁, y₁) to P₂ = (x₂, y₂) has one point exactly halfway along it, the midpoint M:

M = ((x₁ + x₂)/2, (y₁ + y₂)/2)

Each coordinate is the arithmetic mean of the two: the halfway x is the average of the two x's, and the halfway y the average of the two y's. On a number line the point halfway between 2 and 8 is (2 + 8)/2 = 5, and the plane just does that twice, once along each axis. Moving halfway across and halfway up lands you halfway along the diagonal, because the little right triangle from P₁ to M is the big one from P₁ to P₂ at half the size: they are similar triangles with scale factor ½.

This page follows the second objective of section 1.1, The Distance and Midpoint Formulas, in Michael Sullivan's Precalculus.

Symbol by symbol

Piece Say it What it means
segment P₁P₂ "segment P one P two" the straight piece between the two points, ends included. Not the whole line through them.
M "M" the midpoint, a point: it has two coordinates.
(x₁ + x₂)/2 "x one plus x two, over two" the average of the x's. A sum over 2, not a difference.
P₁ + t(P₂ − P₁) "P one plus t times the trip" the point a fraction t of the way from P₁ to P₂; t = ½ is the midpoint.

Halfway is two claims

The program checks both with the distance formula: M is as far from P₁ as from P₂, and M lies on the segment, because the two half-distances add up to the whole. The second claim is not decoration. Every point on a certain line, the perpendicular bisector of the segment, is as far from P₁ as from P₂; section 3 finds two of them with whole-number coordinates. Only one point of that line is on the segment, and it is the midpoint.

The two traps

  • Half the difference is not the midpoint. ((x₂ − x₁)/2, (y₂ − y₁)/2) is half of the trip, how far to move, not where you end up. Added to P₁ it gives the midpoint; on its own it is a different point. Sums go in the midpoint formula; differences go in the distance and slope formulas.
  • Working backwards, do not average again. Given one end P₁ and the midpoint M, the other end is P₂ = (2·x_M − x₁, 2·y_M − y₁): the far end is as far past M as P₁ is short of it.

What the program prints

Verified output of midpoint_formula.py — regenerated by tools/run_examples.py, never hand-typed.

1. THE FORMULA: ONE AVERAGE PER COORDINATE
   P1 = (-5, 5), P2 = (3, 1)
   x: (-5 + 3)/2 = -1     y: (5 + 1)/2 = 3     M = (-1, 3)

2. HALFWAY IS TWO CLAIMS, AND BOTH HOLD
   d(P1, M)^2 = 20, d(M, P2)^2 = 20: equal distances.
   d(P1, P2)^2 = 80 = 4 * 20: M is half the length from each end.
   On the segment: True

3. EQUAL DISTANCES ALONE ARE NOT ENOUGH
   (1, 7)     d(P1,Q)^2 =  40  d(Q,P2)^2 =  40  equidistant: True   on segment: False
   (-3, -1)   d(P1,Q)^2 =  40  d(Q,P2)^2 =  40  equidistant: True   on segment: False
   (-1, 3)    d(P1,Q)^2 =  20  d(Q,P2)^2 =  20  equidistant: True   on segment: True
   Every point of a whole line, the perpendicular bisector, is as far from P1
   as from P2. Only one of them is on the segment: the midpoint.

4. THE TRAP: HALF THE DIFFERENCE IS NOT THE MIDPOINT
   ((x2 - x1)/2, (y2 - y1)/2) = (4, -2): that is half of the trip, a displacement,
   not a place. Added to the start it lands on the midpoint: P1 + (4, -2) = (-1, 3).

5. WORKING BACKWARDS: ONE END AND THE MIDPOINT GIVE THE OTHER END
   P1 = (1, 2), M = (4, -1):  x2 = 2*4 - 1 = 7, y2 = 2*(-1) - 2 = -4, P2 = (7, -4)
   Check: midpoint of (1, 2) and (7, -4) is (4, -1).
   The midpoint is the average, so the far end is as far past M as P1 is short of it.

6. NOT JUST HALFWAY: THE POINT A FRACTION t OF THE WAY
   P1 + t (P2 - P1); t = 1/2 is the midpoint, and t = 0 and t = 1 are the ends.
     t = 0    (-5, 5)       on segment: True
     t = 1/4  (-3, 4)       on segment: True
     t = 1/2  (-1, 3)       on segment: True
     t = 3/4  (1, 2)        on segment: True
     t = 1    (3, 1)        on segment: True
     t = 2    (11, -3)      on segment: False
   t = 2 is on the same line but past P2: t between 0 and 1 is the segment.

To find a midpoint of your own:

python3 08_Analytic_Geometry/midpoint_formula/examples/midpoint_formula.py -5,5 3,1

Questions

1. Find the midpoint of (−5, 5) and (3, 1).

Answer ((−5 + 3)/2, (5 + 1)/2) = (−1, 3).

2. Find the midpoint of (1.5, −2) and (−3.5, 4).

Answer ((1.5 − 3.5)/2, (−2 + 4)/2) = (−1, 1).

3. M = (4, −1) is the midpoint of a segment with one end at (1, 2). Find the other end.

Answer x₂ = 2 · 4 − 1 = 7 and y₂ = 2 · (−1) − 2 = −4, so (7, −4). Check: ((1 + 7)/2, (2 − 4)/2) = (4, −1).

4. Someone writes the midpoint of (2, 3) and (10, 7) as (4, 2). What went wrong, and what is (4, 2)?

Answer They halved the differences: (10 − 2)/2 = 4 and (7 − 3)/2 = 2. That is half the trip, not a point on the segment. The midpoint is (6, 5) = (2, 3) + (4, 2).

5. A point Q is the same distance from A and from B. Is Q the midpoint of AB?

Answer Not necessarily. Every point on the perpendicular bisector of AB is equidistant from A and B. Q is the midpoint only if it also lies on the segment.

6. Does the midpoint depend on which point is called P₁?

Answer No: x₁ + x₂ = x₂ + x₁. Addition does not care about order, which is why the midpoint formula has no sign traps at all.

7. Show that the midpoint is exactly half the distance from each end, using the distance formula.

Answer From P₁ to M the x-difference is (x₁ + x₂)/2 − x₁ = (x₂ − x₁)/2, and likewise for y. So each leg is half the full leg, each square a quarter, and d(P₁, M) = √(¼ · d(P₁, P₂)²) = ½ d(P₁, P₂).

8. Find the points that divide the segment from (0, 0) to (8, 4) into four equal parts.

Answer t = ¼, ½, ¾ of the way: (2, 1), (4, 2), (6, 3). The midpoint is the one at t = ½, and it is also the midpoint of the other two.

9. The diagonals of the quadrilateral with corners (0, 0), (4, 0), (5, 3), (1, 3) cross. Show that they cut each other in half.

Answer The diagonals are (0, 0)–(5, 3) and (4, 0)–(1, 3). Their midpoints are (2.5, 1.5) and (2.5, 1.5): the same point, so each diagonal passes through the other's midpoint. That is the test for a parallelogram.

10. The midpoint is an average. What is the "average" of three points, and what is it for a triangle?

Answer ((x₁ + x₂ + x₃)/3, (y₁ + y₂ + y₃)/3), the centroid, the balancing point of a triangle cut from card. The midpoint is the two-point case.

How to practise

  1. Say "sum over two" before writing. The whole formula is those three words, and saying them keeps the difference out.
  2. Check by distance. For each answer, compute d(P₁, M)² and d(M, P₂)²: they must be equal and each a quarter of d(P₁, P₂)².
  3. Do one backwards problem for every forwards one.
  4. The cards, trap tag first.

Flashcards

The page as a deck of Anki cards: midpoint_formula.txt. Import with File → Import. Tags: formula, why, problems, trap.

Where this goes next

The next section of the book turns an equation into a picture, in graphs, intercepts and symmetry. The midpoint comes back whenever a center is wanted: the center of a circle is the midpoint of any diameter, which is how the book finds the equation of a circle from the two ends of a diameter.

Po polsku, w skrócie

Środek odcinka to średnia arytmetyczna współrzędnych: M = ((x₁ + x₂)/2, (y₁ + y₂)/2). Połowa drogi w poziomie i połowa w pionie dają połowę drogi po przekątnej, bo mały trójkąt od P₁ do M jest podobny do dużego w skali ½.

„W połowie drogi" to dwa warunki: jednakowa odległość od obu końców i leżenie na odcinku. Sam pierwszy warunek spełnia cała prosta, symetralna odcinka. Pułapki: połowa różnicy, ((x₂ − x₁)/2, (y₂ − y₁)/2), to nie środek, tylko połowa przesunięcia; a gdy znamy jeden koniec i środek, drugi koniec to 2M − P₁, nie kolejna średnia. Program sprawdza wszystko wzorem na odległość, na dokładnych ułamkach.

Auf Deutsch: Stichwörter

Der Mittelpunkt ist der Durchschnitt der Koordinaten, bewiesen mit kongruenten Dreiecken; der Punkt beim Anteil t der Strecke ist dieselbe Formel.

Stichwörter: Mittelpunkt einer Strecke, arithmetisches Mittel der Koordinaten, Mittelsenkrechte, kongruente Dreiecke, Teilungspunkt.

See also

  • The distance formula — the tool for checking a midpoint
  • Mean, average, arithmetic mean — each coordinate of the midpoint is one
  • Congruent and similar triangles — why halfway across and halfway up is halfway along
  • Circles — the center is the midpoint of a diameter
  • Midpoint ↗ — Wikipedia
  • Środek odcinka ↗ — Wikipedia po polsku
  • Michael Sullivan, Precalculus (Pearson), section 1.1 The Distance and Midpoint Formulas, objective 2
  • James Stewart, Lothar Redlin and Saleem Watson, Precalculus: Mathematics for Calculus (Cengage), section 1.9, page 94: the formula derived from two congruent triangles, and Example 3, a parallelogram proved by its diagonals sharing a midpoint; compared with Sullivan in the reading guide