MathsGeometry

Midpoint
calculator.

The midpoint of a line segment sits at the average of its two ends, axis by axis.

How it's worked out

OpenStax states the formula for two points in the plane: add the two x values and halve them, then do the same for y. The order of the points makes no difference. For (3, 5) and (9, 1), that gives (6, 3).

M\displaystyle M=(x1+x22, y1+y22)\displaystyle {}= \left( \frac{x_1 + x_2}{2},\ \frac{y_1 + y_2}{2} \right)

It works because moving along a straight line changes x and y at steady rates. Halfway along the line, each one has made half its change. In three dimensions you average z as well, and nothing else changes.

To run the formula backward, double the midpoint and take off the end you know. That is the same equation with the unknown moved across.

x2\displaystyle x_2=2xM−x1\displaystyle {}= 2x_M - x_1

For a point that is not halfway, the section formula weights the two ends. The point S that splits a segment in the ratio m to n, counted from the first end, gives the second end m shares and the first end n shares. When m equals n the shares match and you are back at the midpoint.

xS\displaystyle x_S=mx2+nx1m+n\displaystyle {}= \frac{m x_2 + n x_1}{m + n}

The distance formula gives the length. The perpendicular bisector is the line through the midpoint at a right angle to the segment, so its slope is the negative reciprocal of the segment's slope. For (−4, 1) and (6, 5) the slope is 0.4 and the bisector is y = −2.5x + 5.5.

Worked examples

Dana finds the center of a circle from its diameter

A homework problem gives the ends of a diameter as (−7, 3) and (5, 1). The center of a circle is the midpoint of any diameter, so Dana averages each axis. The center is (−1, 2).

−7+52\displaystyle \frac{-7 + 5}{2}=−1,\displaystyle {}= -1,3+12\displaystyle \frac{3 + 1}{2}=2\displaystyle {}= 2

The diameter is 12.1655 long, so the radius is half that, 6.0828. The check works out too: the center is the same distance from both ends.

Open this example in the tool

Omar places a bracket halfway along a brace in a 3D model

A brace in Omar's model runs from (2, −3, 7) to (−6, 5, 1). Averaging all three axes puts the bracket at (−2, 1, 4). The brace is 12.8062 units long, which is exactly 2 times the root of 41.

Open this example in the tool

Ines works back to the missing end of a segment

A circle has its center at (5, 7), and one end of a diameter is at (2, 3). Ines doubles the center and takes off the known end, which gives the other end at (8, 11). The whole diameter is 10 long.

A common slip here is to average the two points she has. That would give a point between them, not the far end, and it would sit on the wrong side of the center.

Open this example in the tool

Reading your result

One third is a ratio of 1 to 2, not 1 to 3. The ratio compares the two pieces. For (0, 0) to (9, 12), a ratio of 1 to 2 gives (3, 4), which is one third of the way along. The two cut points for thirds are (3, 4) and (6, 8). The table of equal parts lists these for you.

A negative ratio puts the point outside. The section formula still gives an answer when m or n is below zero, but the point falls past an end of the segment. With (0, 0), (4, 0) and a ratio of 3 to −1, it lands at (6, 0). If m + n is 0, there is no such point, and you will see an error.

Level and upright segments have simple bisectors. A level segment from (1, 4) to (7, 4) has a slope of 0 and the upright bisector x = 4. An upright one from (−2, −1) to (−2, 9) has no defined slope, and its bisector is the level line y = 4.

When the two points match, the midpoint is that same point and the length is 0, so there is no slope or bisector to report.

Common mistakes

  • Subtracting instead of adding. The midpoint adds the ends and halves them. Subtracting gives half the change, which is how far M is from an end along that axis, not where M sits.
  • Dropping a minus sign. With −7 and 5, the sum is −2, not 12. A sign error like this gives a point well off the segment, so a quick look at the drawing catches it.
  • Averaging x with y. Each axis is averaged on its own. Mixing them gives a number that has no meaning on the graph.
  • Reading a ratio as a share of the whole. A ratio of 1 to 3 cuts a segment at one quarter, because there are four shares in all.

Questions people ask

Double each coordinate of the midpoint and take off the known endpoint. With midpoint (5, 7) and endpoint (2, 3), the other end is (8, 11). You can check it by averaging the two ends, which should give the midpoint back.

Sources