How this calculator works
The midpoint lies halfway along the segment in both coordinates. Reflecting the known endpoint through that midpoint locates the other end: move the same distance again in the same direction. Negative coordinates work normally. Equal midpoint and endpoint coordinates produce a zero-length segment, which is valid. The optional midpoint mode checks two known endpoints. Use one consistent coordinate unit throughout.
Formula
B = 2M - A, so xB = 2xM - xA and yB = 2yM - yA. Equivalently, A = 2M - B and M = (A+B)/2.
Worked example
With A=(-3,5) and M=(1,2), the displacement from A to M is (4,-3). Repeat that displacement from M to obtain B=(5,-1). Averaging A and B returns (1,2).
Advertisement
Frequently asked questions
Is either endpoint allowed to be the known one?
Yes. Choose the endpoint you want to recover; the reflection relation works in either direction.
Must the midpoint be the origin?
No. Reflection is centred on the midpoint you enter, wherever it lies.
What if the known point is not really the midpoint?
The calculation still gives a reflected point, but it will not recover your intended segment. Check that your supplied point divides the segment equally.